OpenCV's CMakeFile will use libraries in /lib and /lib64 if it can find libraries from those paths. However, it causes build failure because nix detects impure paths being used.
···7878 ln -s "${bootdescFiles}/$name" "$NIX_BUILD_TOP/opencv_contrib/xfeatures2d/src/$name"
7979 done
8080 '');
8181+8282+ # This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS)
8383+ postPatch = ''
8484+ sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
8585+ '';
8686+8187 preConfigure =
8288 (let version = "20151201";
8389 md5 = "808b791a6eac9ed78d32a7666804320e";
+5
pkgs/development/libraries/opencv/default.nix
···3535 ./no-build-info.patch
3636 ];
37373838+ # This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS)
3939+ postPatch = ''
4040+ sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
4141+ '';
4242+3843 outputs = [ "out" "dev" ];
39444045 buildInputs =