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.
This commit is contained in:
@@ -35,6 +35,11 @@ stdenv.mkDerivation rec {
|
||||
./no-build-info.patch
|
||||
];
|
||||
|
||||
# This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS)
|
||||
postPatch = ''
|
||||
sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
|
||||
'';
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
buildInputs =
|
||||
|
||||
Reference in New Issue
Block a user