opencv: add cf-private on darwin

Undefined symbols for architecture x86_64:
      "_NSDefaultRunLoopMode", referenced from:
          _cvWaitKey in window_cocoa.mm.o
      "_OBJC_CLASS_$_NSDate", referenced from:
          objc-class-ref in window_cocoa.mm.o
          objc-class-ref in cap_qtkit.mm.o
      "_OBJC_CLASS_$_NSDictionary", referenced from:
          objc-class-ref in window_cocoa.mm.o
          objc-class-ref in cap_qtkit.mm.o
      "_OBJC_CLASS_$_NSMutableDictionary", referenced from:
          objc-class-ref in window_cocoa.mm.o
      "_OBJC_CLASS_$_NSRunLoop", referenced from:
          objc-class-ref in cap_qtkit.mm.o
      "_OBJC_CLASS_$_NSTimer", referenced from:
          objc-class-ref in cap_qtkit.mm.o
    ld: symbol(s) not found for architecture x86_64
This commit is contained in:
Daiderd Jordan 2018-11-07 20:28:27 +01:00
parent 33104363af
commit 14e41fe461
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,7 @@
, enableFfmpeg ? false, ffmpeg
, enableGStreamer ? false, gst_all_1
, enableEigen ? true, eigen
, darwin
, cf-private, Cocoa, QTKit
}:
let
@ -54,7 +54,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 (with darwin.apple_sdk.frameworks; [ Cocoa QTKit ])
++ lib.optionals stdenv.isDarwin [ Cocoa QTKit cf-private /* For NSDefaultRunLoopMode */ ]
;
propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;

View File

@ -11626,6 +11626,8 @@ with pkgs;
opencv = callPackage ../development/libraries/opencv {
ffmpeg = ffmpeg_2;
inherit (darwin) cf-private;
inherit (darwin.apple_sdk.frameworks) Cocoa QTKit;
};
opencv3 = callPackage ../development/libraries/opencv/3.x.nix {