mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 23:20:55 +00:00
opencv3: Enable darwin build
This commit is contained in:
parent
fce59d47e7
commit
68c6e5bc8b
|
@ -4,7 +4,7 @@
|
|||
, enablePNG ? true, libpng
|
||||
, enableTIFF ? true, libtiff
|
||||
, enableWebP ? true, libwebp
|
||||
, enableEXR ? true, openexr, ilmbase
|
||||
, enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
|
||||
, enableJPEG2K ? true, jasper
|
||||
|
||||
, enableIpp ? false
|
||||
|
@ -16,6 +16,7 @@
|
|||
, enableGStreamer ? false, gst_all_1
|
||||
, enableEigen ? false, eigen
|
||||
, enableCuda ? false, cudatoolkit, gcc5
|
||||
, AVFoundation, Cocoa, QTKit
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -115,7 +116,7 @@ stdenv.mkDerivation rec {
|
|||
++ lib.optional enableEigen eigen
|
||||
++ lib.optionals enableCuda [ cudatoolkit gcc5 ]
|
||||
++ lib.optional enableContrib protobuf3_1
|
||||
;
|
||||
++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit ];
|
||||
|
||||
propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;
|
||||
|
||||
|
@ -134,7 +135,8 @@ stdenv.mkDerivation rec {
|
|||
(opencvFlag "CUDA" enableCuda)
|
||||
(opencvFlag "CUBLAS" enableCuda)
|
||||
] ++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ]
|
||||
++ lib.optional enableContrib "-DBUILD_PROTOBUF=off";
|
||||
++ lib.optional enableContrib "-DBUILD_PROTOBUF=off"
|
||||
++ lib.optionals stdenv.isDarwin ["-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF"];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -147,6 +149,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = http://opencv.org/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [viric flosse mdaiter];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9289,7 +9289,9 @@ with pkgs;
|
|||
ffmpeg = ffmpeg_2;
|
||||
};
|
||||
|
||||
opencv3 = callPackage ../development/libraries/opencv/3.x.nix { };
|
||||
opencv3 = callPackage ../development/libraries/opencv/3.x.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit;
|
||||
};
|
||||
|
||||
# this ctl version is needed by openexr_viewers
|
||||
openexr_ctl = ctl;
|
||||
|
|
Loading…
Reference in a new issue