File tree Expand file tree Collapse file tree 1 file changed +27
-5
lines changed
Expand file tree Collapse file tree 1 file changed +27
-5
lines changed Original file line number Diff line number Diff line change 11{ mkDerivation
22, stdenv
3+ , lib
34
45, opencv3_1
56
3637mkDerivation {
3738 pname = "opencv" ;
3839 version = "0.0.0" ;
39- src = ./. ;
40+ src = builtins . filterSource ( path : type :
41+ # Filter out .cpp files under ./src generated by inline-c:
42+ ! ( lib . hasPrefix ( toString ( ./. + "/src" ) ) ( dirOf path )
43+ && lib . hasSuffix ".cpp" ( baseNameOf path ) )
44+
45+ # Filter out generated images:
46+ && ! ( type != "directory"
47+ && ( ( lib . hasSuffix "doc/generated" ( dirOf path ) )
48+ || ( lib . hasSuffix "doc/generated/examples" ( dirOf path ) )
49+ )
50+ )
51+
52+ # Filter out .nix files so that changing them doesn't necessarily cause a rebuild:
53+ && ! ( lib . hasSuffix ".nix" ( baseNameOf path ) )
54+
55+ # Filter out some other files or directories not needed for a build:
56+ && ! ( builtins . elem ( toString path ) ( map ( p : toString ( ./. + "/${ p } " ) ) [
57+ "cabal.config"
58+ "Makefile"
59+ "README.md"
60+ ".git"
61+ ".gitignore"
62+ "examples"
63+ "dist"
64+ ] ) )
65+ ) ./. ;
4066
4167 libraryHaskellDepends = [
4268 aeson
@@ -78,10 +104,6 @@ mkDerivation {
78104 "--with-ld=g++"
79105 ] ;
80106
81- preConfigure = ''
82- rm -rf dist
83- '' ;
84-
85107 homepage = "https://github.com/LumiGuide/haskell-opencv" ;
86108 license = stdenv . lib . licenses . bsd3 ;
87109 maintainers = [ "[email protected] " ] ;
You can’t perform that action at this time.
0 commit comments