anchor.diff:  mkDerivation {
     pname = "opencv";
     version = "0.0.0";
  -  src = ./.;
  +  src = builtins.filterSource (path: type:
  +          # Filter out .cpp files under ./src generated by inline-c:
  +            !(lib.hasPrefix (toString (./. + "/src")) (dirOf path)
  +              && lib.hasSuffix ".cpp" (baseNameOf path))
  +
  +          # Filter out generated images:
  +          && !(  type != "directory"
  +              && (  (lib.hasSuffix "doc/generated"          (dirOf path))
  +                 || (lib.hasSuffix "doc/generated/examples" (dirOf path))
  +                 )
  +              )
  +
  +          # Filter out .nix files so that changing them doesn't necessarily cause a rebuild:
  +          && !(lib.hasSuffix ".nix" (baseNameOf path))
  +
  +          # Filter out some other files or directories not needed for a build:
  +          && !(builtins.elem (toString path) (map (p: toString (./. + "/${p}")) [
  +                "cabal.config"
  +                "Makefile"
  +                "README.md"
  +                ".git"
  +                ".gitignore"
  +                "examples"
  +                "dist"
  +              ]))
  +        ) ./.;
   
     libraryHaskellDepends = [
       aeson
  
positive.code: { mkDerivation
  , stdenv
  
  , opencv3_1
  
  
negative.code:       "--with-ld=g++"
      ];
  
    homepage = "https://github.com/LumiGuide/haskell-opencv";
    license = stdenv.lib.licenses.bsd3;
    maintainers = [ "engineering@lumi.guide" ];
  