diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-09-27 13:57:14 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-09-29 13:39:52 +0000 |
commit | d69583c6c26551d30e7dac024fb83a65e13e1f65 (patch) | |
tree | 55f0b1ef7f1524bc32e83e6b9939c94dd7fa5ef5 /pkgs/tools | |
parent | 0d19d263fec7af94c70f109fd4741444bc0616d4 (diff) |
opencv2: don't build unfree libraries by default
In opencv 2.x, unfree libraries are built by default. The package should therefore have been marked as unfree, but wasn't. I've disabled the non-free libraries by default, and added an option to enable them. There are three programs in Nixpkgs that depend on opencv2: mathematica, pfstools, and p2pvc. pfstools requires the non-free libraries if it's built with opencv support, so I've disabled opencv by default there and added an option to enable it. p2pvc links fine, so presumably doesn't need the non-free libraries. I can't test mathematica, so I'm just going to leave it alone.
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/graphics/pfstools/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/tools/graphics/pfstools/default.nix b/pkgs/tools/graphics/pfstools/default.nix index 99b9e3e0e487f..a81321204757b 100644 --- a/pkgs/tools/graphics/pfstools/default.nix +++ b/pkgs/tools/graphics/pfstools/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, mkDerivation, fetchurl, cmake, pkg-config, darwin , openexr, zlib, imagemagick6, libGLU, libGL, freeglut, fftwFloat -, fftw, gsl, libexif, perl, opencv2, qtbase, netpbm +, fftw, gsl, libexif, perl, qtbase, netpbm +, enableUnfree ? false, opencv2 }: mkDerivation rec { @@ -28,12 +29,12 @@ mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ openexr zlib imagemagick6 fftwFloat - fftw gsl libexif perl opencv2 qtbase netpbm + fftw gsl libexif perl qtbase netpbm ] ++ (if stdenv.isDarwin then (with darwin.apple_sdk.frameworks; [ OpenGL GLUT ]) else [ libGLU libGL freeglut - ]); + ]) ++ lib.optional enableUnfree (opencv2.override { enableUnfree = true; }); patches = [ ./threads.patch ./pfstools.patch ./pfsalign.patch ]; |