diff options
author | Mike Purvis <mpurvis@clearpath.ai> | 2021-09-14 19:10:54 +0000 |
---|---|---|
committer | Mike Purvis <mpurvis@clearpath.ai> | 2021-09-16 01:55:08 +0000 |
commit | eac9faf01be06ce4fdea37a4d1f21909a4d57649 (patch) | |
tree | df0367c48e273168626a30a336e83856a6a93726 /pkgs/development/libraries/opencv | |
parent | 177c0befbce07b4a7d7471628f4c6d2f3a2f4262 (diff) | |
download | nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.tar nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.tar.gz nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.tar.bz2 nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.tar.lz nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.tar.xz nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.tar.zst nixpkgs-eac9faf01be06ce4fdea37a4d1f21909a4d57649.zip |
opencv3: 3.4.8 -> 3.4.15
Diffstat (limited to 'pkgs/development/libraries/opencv')
-rw-r--r-- | pkgs/development/libraries/opencv/3.x.nix | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/opencv/4.x.nix | 6 |
2 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 33b1cd18757..fcc6238500f 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -1,5 +1,5 @@ { lib, stdenv -, fetchFromGitHub, fetchpatch +, fetchFromGitHub , cmake, pkg-config, unzip, zlib, pcre, hdf5 , glog, boost, gflags, protobuf , config @@ -39,20 +39,20 @@ assert blas.implementation == "openblas" && lapack.implementation == "openblas"; assert enablePython -> pythonPackages != null; let - version = "3.4.8"; + version = "3.4.15"; src = fetchFromGitHub { owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "1dnz3gfj70lm1gbrk8pz28apinlqi2x6nvd6xcy5hs08505nqnjp"; + hash = "sha256-dLwQM2VhVlBV4xazS2rItTscKYeeNlNT0G8G1A1mOmc="; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "0psaa1yx36n34l09zd1y8jxgf8q4jzxd3vn06fqmzwzy85hcqn8i"; + hash = "sha256-FJDRMmSOT5jA+n2Ke0gEH7n5rgGvB1UzYpYZ1vmucjg="; }; # Contrib must be built in order to enable Tesseract support: @@ -151,6 +151,11 @@ stdenv.mkDerivation { cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/opencv_contrib" ''; + # Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV. + patches = [ + ./cmake-don-t-use-OpenCVFindOpenEXR.patch + ]; + # This prevents cmake from using libraries in impure paths (which # causes build failure on non NixOS) # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index a33eff4faa5..16ada260932 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -214,11 +214,13 @@ stdenv.mkDerivation { cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib" ''; - # This prevents cmake from using libraries in impure paths (which - # causes build failure on non NixOS) + # Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV. patches = [ ./cmake-don-t-use-OpenCVFindOpenEXR.patch ] ++ lib.optional enableCuda ./cuda_opt_flow.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 ''; |