opencv: Use multiple outputs and prevent runtime dependency on GCC
commit5cf9d386e012eea66c17672e4fbb6e41d4496846
authorEelco Dolstra <edolstra@gmail.com>
dateSun 2 Oct 2016, 19:22 (10 years ago)
parent3732d1d
pkgs/development/libraries/opencv/default.nix+8
@@ -28,6 +28,14 @@ stdenv.mkDerivation rec {
2828 sha256 = "1k29rxlvrhgc5hadg2nc50wa3d2ls9ndp373257p756a0aividxh";
2929 };
3030
31+ patches =
32+ [ # Don't include a copy of the CMake status output in the
33+ # build. This causes a runtime dependency on GCC.
34+ ./no-build-info.patch
35+ ];
36+
37+ outputs = [ "out" "dev" ];
38+
3139 buildInputs =
3240 [ zlib ]
3341 ++ lib.optional enablePython pythonPackages.python
pkgs/development/libraries/opencv/no-build-info.patchnew file+14
@@ -0,0 +1,14 @@
1+diff -ru -x '*~' opencv-2.4.13-orig/modules/core/src/system.cpp opencv-2.4.13/modules/core/src/system.cpp
2+--- opencv-2.4.13-orig/modules/core/src/system.cpp 1970-01-01 01:00:01.000000000 +0100
3++++ opencv-2.4.13/modules/core/src/system.cpp 2016-10-02 18:44:53.674181762 +0200
4+@@ -442,9 +442,7 @@
5+
6+ const std::string& getBuildInformation()
7+ {
8+- static std::string build_info =
9+-#include "version_string.inc"
10+- ;
11++ static std::string build_info = "(build info elided)";
12+ return build_info;
13+ }
14+