Merge pull request #25814 from sifmelcara/fix/opencvCMakeLibraryPath
opencv: Fix OpenCV build on non NixOS platform
This commit is contained in:
commit
fda2318eab
@ -78,6 +78,12 @@ stdenv.mkDerivation rec {
|
|||||||
ln -s "${bootdescFiles}/$name" "$NIX_BUILD_TOP/opencv_contrib/xfeatures2d/src/$name"
|
ln -s "${bootdescFiles}/$name" "$NIX_BUILD_TOP/opencv_contrib/xfeatures2d/src/$name"
|
||||||
done
|
done
|
||||||
'');
|
'');
|
||||||
|
|
||||||
|
# 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
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure =
|
preConfigure =
|
||||||
(let version = "20151201";
|
(let version = "20151201";
|
||||||
md5 = "808b791a6eac9ed78d32a7666804320e";
|
md5 = "808b791a6eac9ed78d32a7666804320e";
|
||||||
|
@ -35,6 +35,11 @@ stdenv.mkDerivation rec {
|
|||||||
./no-build-info.patch
|
./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" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
|
Loading…
Reference in New Issue
Block a user