Merge pull request #219928 from elohmeier/opencv2-darwin

opencv2: fix build on Darwin
This commit is contained in:
Weijia Wang 2023-03-07 09:13:01 +02:00 committed by GitHub
commit ff951cd1c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@
, enableGStreamer ? false, gst_all_1
, enableEigen ? true, eigen
, enableUnfree ? false
, Cocoa, QTKit
, AVFoundation, Cocoa, QTKit
}:
let
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
++ lib.optional enableFfmpeg ffmpeg
++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
++ lib.optional enableEigen eigen
++ lib.optionals stdenv.isDarwin [ Cocoa QTKit ]
++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit ]
;
nativeBuildInputs = [ cmake pkg-config unzip ];
@ -79,6 +79,6 @@ stdenv.mkDerivation rec {
homepage = "https://opencv.org/";
license = if enableUnfree then licenses.unfree else licenses.bsd3;
maintainers = with maintainers; [ ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -22706,7 +22706,7 @@ with pkgs;
openct = callPackage ../development/libraries/openct { };
opencv2 = callPackage ../development/libraries/opencv {
inherit (darwin.apple_sdk.frameworks) Cocoa QTKit;
inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit;
ffmpeg = ffmpeg_4;
};