opencv: supports darwin

This commit is contained in:
Matthew Bauer 2017-04-20 16:46:11 -05:00
parent 983a0f31ca
commit d21afc0b29
No known key found for this signature in database
GPG Key ID: E04D0AD9469141C3

View File

@ -5,11 +5,12 @@
, enableJPEG ? true, libjpeg , enableJPEG ? true, libjpeg
, enablePNG ? true, libpng , enablePNG ? true, libpng
, enableTIFF ? true, libtiff , enableTIFF ? true, libtiff
, enableEXR ? true, openexr, ilmbase , enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
, enableJPEG2K ? true, jasper , enableJPEG2K ? true, jasper
, enableFfmpeg ? false, ffmpeg , enableFfmpeg ? false, ffmpeg
, enableGStreamer ? false, gst_all , enableGStreamer ? false, gst_all
, enableEigen ? false, eigen , enableEigen ? false, eigen
, darwin
}: }:
let let
@ -48,6 +49,7 @@ stdenv.mkDerivation rec {
++ lib.optional enableFfmpeg ffmpeg ++ lib.optional enableFfmpeg ffmpeg
++ lib.optionals enableGStreamer (with gst_all; [ gstreamer gst-plugins-base ]) ++ lib.optionals enableGStreamer (with gst_all; [ gstreamer gst-plugins-base ])
++ lib.optional enableEigen eigen ++ lib.optional enableEigen eigen
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Cocoa QTKit ])
; ;
propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy; propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
@ -76,11 +78,11 @@ stdenv.mkDerivation rec {
passthru = lib.optionalAttrs enablePython { pythonPath = []; }; passthru = lib.optionalAttrs enablePython { pythonPath = []; };
meta = { meta = with stdenv.lib; {
description = "Open Computer Vision Library with more than 500 algorithms"; description = "Open Computer Vision Library with more than 500 algorithms";
homepage = http://opencv.org/; homepage = http://opencv.org/;
license = stdenv.lib.licenses.bsd3; license = licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [viric flosse]; maintainers = with maintainers; [ viric flosse ];
platforms = with stdenv.lib.platforms; linux; platforms = platforms.linux ++ platforms.darwin;
}; };
} }