lol

opencv: Fix OpenCV build on non NixOS platform

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.

+11
+6
pkgs/development/libraries/opencv/3.x.nix
··· 78 78 ln -s "${bootdescFiles}/$name" "$NIX_BUILD_TOP/opencv_contrib/xfeatures2d/src/$name" 79 79 done 80 80 ''); 81 + 82 + # This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS) 83 + postPatch = '' 84 + sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt 85 + ''; 86 + 81 87 preConfigure = 82 88 (let version = "20151201"; 83 89 md5 = "808b791a6eac9ed78d32a7666804320e";
+5
pkgs/development/libraries/opencv/default.nix
··· 35 35 ./no-build-info.patch 36 36 ]; 37 37 38 + # This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS) 39 + postPatch = '' 40 + sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt 41 + ''; 42 + 38 43 outputs = [ "out" "dev" ]; 39 44 40 45 buildInputs =