diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2017-07-29 13:05:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-29 13:05:28 +0100 |
commit | a99c2556f437425256ca85c22ce4a1f987e12878 (patch) | |
tree | d0f8bd5da106a65e8e39447f689372f54dea95d5 | |
parent | 140f47eb748f9b24a77fa40a1f1ffd2376a24b81 (diff) | |
parent | 70bbd5e84a01dcb25b277b518592f220fa922789 (diff) | |
download | nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.tar nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.tar.gz nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.tar.bz2 nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.tar.lz nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.tar.xz nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.tar.zst nixlib-a99c2556f437425256ca85c22ce4a1f987e12878.zip |
Merge pull request #27674 from Hodapp87/opencv_contrib_py
opencv: Work around build failure with enableContrib & Python
-rw-r--r-- | pkgs/development/libraries/opencv/3.x.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index 85b4d5627201..0443d00a258d 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -90,9 +90,14 @@ stdenv.mkDerivation rec { done ''); - # This prevents cmake from using libraries in impure paths (which causes build failure on non NixOS) + # 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 + # what appears to be some stray headers in dnn/misc/tensorflow + # in contrib when generating the Python bindings: postPatch = '' sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt + sed -i -e 's|if len(decls) == 0:|if len(decls) == 0 or "opencv2/" not in hdr:|' ./modules/python/src2/gen2.py ''; preConfigure = |