From fd1ffd0e0d8a701616cd51c33717f6ad4fdbd508 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 12:22:11 +0100 Subject: [PATCH] SDL2: include cf-private on darwin It's not included implicitly by the frameworks anymore. Undefined symbols for architecture x86_64: "_NSDefaultRunLoopMode", referenced from: _Cocoa_PumpEvents in SDL_cocoaevents.o "_NSURLIsAliasFileKey", referenced from: -[SDLWindow performDragOperation:] in SDL_cocoawindow.o "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in SDL_cocoaclipboard.o objc-class-ref in SDL_cocoakeyboard.o objc-class-ref in SDL_cocoawindow.o "_OBJC_CLASS_$_NSData", referenced from: objc-class-ref in SDL_cocoamouse.o "_OBJC_CLASS_$_NSDate", referenced from: objc-class-ref in SDL_cocoaevents.o "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in SDL_cocoaevents.o "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in SDL_cocoawindow.o "_OBJC_CLASS_$_NSURL", referenced from: objc-class-ref in SDL_cocoawindow.o "_OBJC_CLASS_$_NSUserDefaults", referenced from: objc-class-ref in SDL_cocoaevents.o "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table67 in SDL_cocoawindow.o ld: symbol(s) not found for architecture x86_64 --- pkgs/development/libraries/SDL2/default.nix | 8 ++++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 7d8f5b2caee6..4b358f68a117 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -8,7 +8,7 @@ , ibusSupport ? false, ibus , pulseaudioSupport ? true, libpulseaudio , AudioUnit, Cocoa, CoreAudio, CoreServices, ForceFeedback, OpenGL -, audiofile, libiconv +, audiofile, cf-private, libiconv }: # NOTE: When editing this expression see if the same change applies to @@ -54,7 +54,11 @@ stdenv.mkDerivation rec { buildInputs = [ audiofile libiconv ] ++ dlopenBuildInputs ++ optional ibusSupport ibus - ++ optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ]; + ++ optionals stdenv.isDarwin [ + AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL + # Needed for NSDefaultRunLoopMode symbols. + cf-private + ]; # /build/SDL2-2.0.7/src/video/wayland/SDL_waylandevents.c:41:10: fatal error: # pointer-constraints-unstable-v1-client-protocol.h: No such file or directory diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e06c6aece52..153336c08aa1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12152,6 +12152,7 @@ with pkgs; waylandSupport = stdenv.isLinux; udevSupport = stdenv.isLinux; pulseaudioSupport = config.pulseaudio or stdenv.isLinux; + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL; };