|
|
|
@ -1,6 +1,5 @@ |
|
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, unzip |
|
|
|
|
, zlib |
|
|
|
|
, enablePython ? false, python2Packages |
|
|
|
|
, enableGtk2 ? false, gtk2 |
|
|
|
|
, enableJPEG ? true, libjpeg |
|
|
|
|
, enablePNG ? true, libpng |
|
|
|
@ -44,7 +43,6 @@ stdenv.mkDerivation rec { |
|
|
|
|
|
|
|
|
|
buildInputs = |
|
|
|
|
[ zlib ] |
|
|
|
|
++ lib.optional enablePython python2Packages.python |
|
|
|
|
++ lib.optional enableGtk2 gtk2 |
|
|
|
|
++ lib.optional enableJPEG libjpeg |
|
|
|
|
++ lib.optional enablePNG libpng |
|
|
|
@ -56,8 +54,6 @@ stdenv.mkDerivation rec { |
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa QTKit ] |
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
propagatedBuildInputs = lib.optional enablePython python2Packages.numpy; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config unzip ]; |
|
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR"; |
|
|
|
@ -78,8 +74,6 @@ stdenv.mkDerivation rec { |
|
|
|
|
sed -i $dev/lib/pkgconfig/opencv.pc -e "s|includedir_new=.*|includedir_new=$dev/include|" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
passthru = lib.optionalAttrs enablePython { pythonPath = []; }; |
|
|
|
|
|
|
|
|
|
meta = with lib; { |
|
|
|
|
description = "Open Computer Vision Library with more than 500 algorithms"; |
|
|
|
|
homepage = "https://opencv.org/"; |
|
|
|
|