-
-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell opencv doesn't build anymore #47595
Labels
Comments
I just ran into this on 18.09. @basvandijk - is LumiGuide/haskell-opencv@cd613e2 relevant here? |
I can confirm the above commit fixes things. The following expression builds: { mkDerivation, aeson, base, base64-bytestring, bindings-DSL
, bytestring, Cabal, containers, criterion, data-default, deepseq
, directory, fetchgit, Glob, haskell-src-exts, inline-c
, inline-c-cpp, JuicyPixels, lens, linear, mtl, opencv, primitive
, QuickCheck, random, repa, stdenv, tasty, tasty-hunit
, tasty-quickcheck, template-haskell, text, transformers, vector
}:
mkDerivation {
pname = "opencv";
version = "0.0.2.1";
src = fetchgit {
url = "git://github.com/LumiGuide/haskell-opencv";
sha256 = "1qaslz1pmc4nbg8cpnn5vzwzlxks9b9jipv2sz2fhr5lyrhm9718";
rev = "65b9f38677aaf7f0bb63261b4ddf20802dc911f8";
};
postUnpack = "sourceRoot+=/opencv; echo source root reset to $sourceRoot";
setupHaskellDepends = [ base Cabal ];
libraryHaskellDepends = [
aeson base base64-bytestring bindings-DSL bytestring containers
data-default deepseq inline-c inline-c-cpp JuicyPixels linear mtl
primitive repa template-haskell text transformers vector
];
libraryPkgconfigDepends = [ opencv ];
testHaskellDepends = [
base bytestring containers data-default deepseq directory Glob
haskell-src-exts JuicyPixels lens linear primitive QuickCheck
random repa tasty tasty-hunit tasty-quickcheck template-haskell
text transformers vector
];
benchmarkHaskellDepends = [
base bytestring criterion linear repa vector
];
hardeningDisable = [ "bindnow" ];
homepage = "https://github.com/LumiGuide/haskell-opencv";
description = "Haskell binding to OpenCV-3.x";
license = stdenv.lib.licenses.bsd3;
} This is generated by |
Yes, the following example works using your nix expression ( # shell.nix
let
config = {
packageOverrides = pkgs: rec {
_opencv3 = (pkgs.opencv3.override {
enableGtk3 = true;
}).overrideDerivation (attrs: {
doCheck = false;
});
haskellPackages = pkgs.haskellPackages.override {
overrides = haskellPackagesNew: haskellPackagesOld: rec {
opencv = pkgs.haskell.lib.dontCheck (
haskellPackagesNew.callPackage ./opencvhs.nix {
opencv = _opencv3;
});
};
};
};
};
rev = "18.09";
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
pkgs = import (fetchTarball url) { inherit config; };
in
(pkgs.haskellPackages.mkDerivation {
pname = "myexec";
version = "0.1";
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = with pkgs.haskellPackages; [
opencv
];
license = pkgs.stdenv.lib.licenses.mit;
}).env -- image_display.hs
import Control.Monad ( void )
import qualified OpenCV as CV
import qualified Data.ByteString as B
import System.Environment (getArgs)
main :: IO ()
main = do
args <- getArgs
if null args
then putStrLn "missing image filename"
else do
let filename = head args
img <- CV.imdecode CV.ImreadUnchanged <$> B.readFile filename
CV.withWindow "image display" $ \window -> do
CV.imshow window img
void $ CV.waitKey 0 |
Reopening because it's still broken in |
typetetris
added a commit
to typetetris/nixpkgs
that referenced
this issue
Nov 10, 2018
applied patch can be removed, when LumiGuide/haskell-opencv@cd613e2 hits hackage and later nixpkgs.
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
To run some haskell programs (which use opencv), I use the following
shell.nix
. This works fine with nixos-18.03, but it fails with more recent channels (nixos-18.09-beta, unstable).The
nix-shell
command fails and prints the following error message.Technical details
The text was updated successfully, but these errors were encountered: