From f2fadc0e91abc0488fb7127d8513239a5885717c Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 00:24:04 +0100 Subject: darwin: don't include cf-private in framework dependencies Using cf-private can cause problems, it's better to include it explicitly in places where it's actually required. --- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index 9e47b8d02fd..aab2852c168 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -34,7 +34,7 @@ with frameworks; with libs; { CoreMIDIServer = []; CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ]; CoreMediaIO = [ CF CoreMedia ]; - CoreText = [ CF CoreGraphics cf-private ]; + CoreText = [ CF CoreGraphics ]; CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ]; CoreWLAN = [ SecurityFoundation ]; DVComponentGlue = [ CoreServices QuickTime ]; @@ -48,8 +48,7 @@ with frameworks; with libs; { ExceptionHandling = []; FWAUserLib = []; ForceFeedback = [ CF IOKit ]; - # cf-private was moved first in list because of https://github.com/NixOS/nixpkgs/pull/28635 - Foundation = [ cf-private CF libobjc Security ApplicationServices SystemConfiguration ]; + Foundation = [ CF libobjc Security ApplicationServices SystemConfiguration ]; GLKit = [ CF ]; GLUT = [ OpenGL ]; GSS = []; -- cgit 1.4.1 From fd1ffd0e0d8a701616cd51c33717f6ad4fdbd508 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 12:22:11 +0100 Subject: 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 7d8f5b2caee..4b358f68a11 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 4e06c6aece5..153336c08aa 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; }; -- cgit 1.4.1 From 7edfded9c3936f50fb227aabc6423f2736f07eae Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 12:47:14 +0100 Subject: SDL: include cf-private on darwin It's not included implicitly by the frameworks anymore. Undefined symbols for architecture x86_64: "_NSDefaultRunLoopMode", referenced from: _QZ_PumpEvents in SDL_QuartzEvents.o "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in SDL_QuartzEvents.o "_OBJC_CLASS_$_NSDate", referenced from: objc-class-ref in SDL_QuartzEvents.o ld: symbol(s) not found for architecture x86_64 --- pkgs/development/libraries/SDL/default.nix | 7 ++++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index 7bbb1a5e1c9..08a52096d4b 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -4,6 +4,7 @@ , x11Support ? stdenv.hostPlatform == stdenv.buildPlatform, libXext, libICE, libXrandr , pulseaudioSupport ? true, libpulseaudio , OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa +, cf-private }: # NOTE: When editing this expression see if the same change applies to @@ -41,7 +42,11 @@ stdenv.mkDerivation rec { buildInputs = [ ] ++ optional (!stdenv.hostPlatform.isMinGW) audiofile - ++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]; + ++ optionals stdenv.isDarwin [ + AudioUnit CoreAudio CoreServices Kernel OpenGL + # Needed for NSDefaultRunLoopMode symbols. + cf-private + ]; configureFlags = [ "--disable-oss" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 153336c08aa..0c61e47ce57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12126,6 +12126,7 @@ with pkgs; alsaSupport = stdenv.isLinux; x11Support = !stdenv.isCygwin; pulseaudioSupport = config.pulseaudio or stdenv.isLinux; + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa; }; -- cgit 1.4.1 From 8abc1cccfbf5b72f90f71627f8a13ddccf4c3670 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 12:55:08 +0100 Subject: SDL: move overrides out of all-packages.nix Using defaults makes it much easier to understand what the values are. --- pkgs/development/libraries/SDL/default.nix | 14 +++++++------- pkgs/development/libraries/SDL2/default.nix | 16 ++++++++-------- pkgs/top-level/all-packages.nix | 10 ---------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix index 08a52096d4b..7ef3c4c8968 100644 --- a/pkgs/development/libraries/SDL/default.nix +++ b/pkgs/development/libraries/SDL/default.nix @@ -1,8 +1,8 @@ -{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, audiofile, libcap, libiconv -, openglSupport ? false, libGL, libGLU -, alsaSupport ? true, alsaLib -, x11Support ? stdenv.hostPlatform == stdenv.buildPlatform, libXext, libICE, libXrandr -, pulseaudioSupport ? true, libpulseaudio +{ stdenv, config, libGLSupported, fetchurl, fetchpatch, pkgconfig, audiofile, libcap, libiconv +, openglSupport ? libGLSupported, libGL, libGLU +, alsaSupport ? stdenv.isLinux, alsaLib +, x11Support ? !stdenv.isCygwin, libXext, libICE, libXrandr +, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio , OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa , cf-private }: @@ -10,7 +10,7 @@ # NOTE: When editing this expression see if the same change applies to # SDL2 expression too -with lib; +with stdenv.lib; assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport; assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null && libGLU != null); @@ -114,7 +114,7 @@ stdenv.mkDerivation rec { postFixup = '' for lib in $out/lib/*.so* ; do if [[ -L "$lib" ]]; then - patchelf --set-rpath "$(patchelf --print-rpath $lib):${lib.makeLibraryPath propagatedBuildInputs}" "$lib" + patchelf --set-rpath "$(patchelf --print-rpath $lib):${makeLibraryPath propagatedBuildInputs}" "$lib" fi done ''; diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 4b358f68a11..242b1b8a3f5 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -1,12 +1,12 @@ -{ stdenv, lib, fetchurl, pkgconfig, pruneLibtoolFiles -, openglSupport ? false, libGL -, alsaSupport ? true, alsaLib -, x11Support ? true, libX11, xproto, libICE, libXi, libXScrnSaver, libXcursor, libXinerama, libXext, libXxf86vm, libXrandr -, waylandSupport ? true, wayland, wayland-protocols, libxkbcommon -, dbusSupport ? false, dbus +{ stdenv, config, libGLSupported, fetchurl, pkgconfig, pruneLibtoolFiles +, openglSupport ? libGLSupported, libGL +, alsaSupport ? stdenv.isLinux, alsaLib +, x11Support ? !stdenv.isCygwin, libX11, xproto, libICE, libXi, libXScrnSaver, libXcursor, libXinerama, libXext, libXxf86vm, libXrandr +, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols, libxkbcommon +, dbusSupport ? stdenv.isLinux, dbus , udevSupport ? false, udev , ibusSupport ? false, ibus -, pulseaudioSupport ? true, libpulseaudio +, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio , AudioUnit, Cocoa, CoreAudio, CoreServices, ForceFeedback, OpenGL , audiofile, cf-private, libiconv }: @@ -14,7 +14,7 @@ # NOTE: When editing this expression see if the same change applies to # SDL expression too -with lib; +with stdenv.lib; assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport; assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0c61e47ce57..07f0bf2bed2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12122,10 +12122,6 @@ with pkgs; schroedinger = callPackage ../development/libraries/schroedinger { }; SDL = callPackage ../development/libraries/SDL { - openglSupport = libGLSupported; - alsaSupport = stdenv.isLinux; - x11Support = !stdenv.isCygwin; - pulseaudioSupport = config.pulseaudio or stdenv.isLinux; inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) OpenGL CoreAudio CoreServices AudioUnit Kernel Cocoa; }; @@ -12147,12 +12143,6 @@ with pkgs; SDL_ttf = callPackage ../development/libraries/SDL_ttf { }; SDL2 = callPackage ../development/libraries/SDL2 { - openglSupport = libGLSupported; - alsaSupport = stdenv.isLinux; - x11Support = !stdenv.isCygwin; - 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; }; -- cgit 1.4.1 From c8e480b4dab4fe8c40d84a9d48c4a79a5a1cc7e9 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 19:12:46 +0100 Subject: atomicparsley: include cf-private on darwin Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in nsfile.o objc-class-ref in nsimage.o ld: symbol(s) not found for architecture x86_64 --- pkgs/tools/video/atomicparsley/default.nix | 14 +++++++++----- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/video/atomicparsley/default.nix b/pkgs/tools/video/atomicparsley/default.nix index 701850758bc..74f4c562102 100644 --- a/pkgs/tools/video/atomicparsley/default.nix +++ b/pkgs/tools/video/atomicparsley/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchhg, autoreconfHook, zlib, darwin }: +{ stdenv, fetchhg, autoreconfHook, zlib, cf-private, Cocoa }: stdenv.mkDerivation rec { name = "atomicparsley-${version}"; @@ -9,10 +9,14 @@ stdenv.mkDerivation rec { sha256 = "05n4kbn91ps52h3wi1qb2jwygjsc01qzx4lgkv5mvwl5i49rj8fm"; }; - buildInputs = - [ autoreconfHook - zlib - ] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Cocoa; + nativeBuildInputs = [ autoreconfHook ]; + + buildInputs = [ zlib ] + ++ stdenv.lib.optionals stdenv.isDarwin [ + Cocoa + # Needed for OBJC_CLASS_$_NSDictionary symbols. + cf-private + ]; installPhase = "install -D AtomicParsley $out/bin/AtomicParsley"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 07f0bf2bed2..1d36b9a6de9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -571,7 +571,10 @@ with pkgs; gsl = gsl_1; }; - atomicparsley = callPackage ../tools/video/atomicparsley { }; + atomicparsley = callPackage ../tools/video/atomicparsley { + inherit (darwin) cf-private; + inherit (darwin.apple_sdk.frameworks) Cocoa; + }; autoflake = callPackage ../development/tools/analysis/autoflake { }; -- cgit 1.4.1 From 7fd359f2f920bb6ffde09e06f6792b6fd7483bd7 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 19:57:12 +0100 Subject: pinentry_mac: add cf-private Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in GPGDefaults.o "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in PinentryController.o objc-class-ref in GPGDefaults.o objc-class-ref in KeychainSupport.o "_OBJC_CLASS_$_NSMutableDictionary", referenced from: objc-class-ref in GPGDefaults.o "_OBJC_CLASS_$_NSSet", referenced from: objc-class-ref in GPGDefaults.o "_OBJC_CLASS_$_NSUserDefaults", referenced from: objc-class-ref in GPGDefaults.o ld: symbol(s) not found for architecture x86_64 --- pkgs/tools/security/pinentry/mac.nix | 9 +++++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/pinentry/mac.nix b/pkgs/tools/security/pinentry/mac.nix index 4acdd6cb897..8168aa94b3d 100644 --- a/pkgs/tools/security/pinentry/mac.nix +++ b/pkgs/tools/security/pinentry/mac.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, xcbuildHook, libiconv, Cocoa, ncurses }: +{ stdenv, fetchFromGitHub, xcbuildHook, libiconv, Cocoa, ncurses, cf-private }: stdenv.mkDerivation rec { name = "pinentry-mac-0.9.4"; @@ -11,7 +11,12 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ libiconv Cocoa ncurses ]; + + buildInputs = [ + libiconv Cocoa ncurses + # Needed for OBJC_CLASS_$_NSArray symbols. + cf-private + ]; installPhase = '' mkdir -p $out/Applications diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d36b9a6de9..db7dd73001d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4779,6 +4779,7 @@ with pkgs; }; pinentry_mac = callPackage ../tools/security/pinentry/mac.nix { + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Cocoa; }; -- cgit 1.4.1 From d4b7c2b88f3b121429a08c04cb50dcef48319b8f Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 20:30:02 +0100 Subject: vim: add cf-private on darwin Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in os_macosx.o ld: symbol(s) not found for architecture x86_64 --- pkgs/applications/editors/vim/default.nix | 8 ++++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 26cd61d182b..2f34a6ddeb6 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -6,7 +6,7 @@ sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c"; } # apple frameworks -, Carbon, Cocoa +, cf-private, Carbon, Cocoa }: let @@ -19,7 +19,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gettext pkgconfig ]; buildInputs = [ ncurses ] - ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ Carbon Cocoa ]; + ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [ + Carbon Cocoa + # Needed for OBJC_CLASS_$_NSArray symbols. + cf-private + ]; configureFlags = [ "--enable-multibyte" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db7dd73001d..fd464eed8ef 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19378,6 +19378,7 @@ with pkgs; }; vim = callPackage ../applications/editors/vim { + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; }; -- cgit 1.4.1 From 86bf715c49d576c67c0c0746ca2471981124e530 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 20:35:06 +0100 Subject: contacts: add cf-private Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in contacts.o objc-class-ref in FormatHelper.o "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in FormatHelper.o ld: symbol(s) not found for architecture x86_64 --- pkgs/tools/misc/contacts/default.nix | 12 +++++++----- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/contacts/default.nix b/pkgs/tools/misc/contacts/default.nix index dc8f776cef6..b262626b136 100644 --- a/pkgs/tools/misc/contacts/default.nix +++ b/pkgs/tools/misc/contacts/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xcbuildHook, Foundation, AddressBook }: +{ stdenv, fetchurl, xcbuildHook, cf-private, Foundation, AddressBook }: stdenv.mkDerivation rec { version = "1.1a-3"; @@ -10,16 +10,18 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ Foundation AddressBook ]; + + buildInputs = [ + Foundation AddressBook + # Needed for OBJC_CLASS_$_NSArray symbols. + cf-private + ]; installPhase = '' mkdir -p $out/bin cp Products/Default/contacts $out/bin ''; - ## FIXME: the framework setup hook isn't adding these correctly - NIX_LDFLAGS = " -F${Foundation}/Library/Frameworks/ -F${AddressBook}/Library/Frameworks/"; - meta = with stdenv.lib; { description = "Access contacts from the Mac address book from command-line"; homepage = http://www.gnufoo.org/contacts/contacts.html; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd464eed8ef..798b7a29ad3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1172,6 +1172,7 @@ with pkgs; codec2 = callPackage ../development/libraries/codec2 { }; contacts = callPackage ../tools/misc/contacts { + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Foundation AddressBook; }; -- cgit 1.4.1 From f495707eb68cf56b4611ed57e2ae7a05740493d9 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 21:11:46 +0100 Subject: emacs: include cf-private on darwin and don't propagate frameworks Undefined symbols for architecture x86_64: "_CFNotificationCenterAddObserver", referenced from: _macfont_copy_available_families_cache in macfont.o "_CFNotificationCenterGetLocalCenter", referenced from: _macfont_copy_available_families_cache in macfont.o "_NSDefaultRunLoopMode", referenced from: _ns_send_appdefined in nsterm.o -[EmacsApp run] in nsterm.o "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in nsterm.o objc-class-ref in nsmenu.o objc-class-ref in nsselect.o "_OBJC_CLASS_$_NSData", referenced from: objc-class-ref in nsimage.o "_OBJC_CLASS_$_NSDate", referenced from: objc-class-ref in nsterm.o "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in macfont.o "_OBJC_CLASS_$_NSLocale", referenced from: objc-class-ref in nsterm.o "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in nsterm.o objc-class-ref in nsmenu.o "_OBJC_CLASS_$_NSMutableDictionary", referenced from: objc-class-ref in nsmenu.o objc-class-ref in nsselect.o "_OBJC_CLASS_$_NSMutableSet", referenced from: objc-class-ref in nsterm.o "_OBJC_CLASS_$_NSRunLoop", referenced from: objc-class-ref in nsmenu.o "_OBJC_CLASS_$_NSTimer", referenced from: objc-class-ref in nsterm.o objc-class-ref in nsmenu.o "_OBJC_CLASS_$_NSURL", referenced from: objc-class-ref in nsterm.o objc-class-ref in nsfns.o "_OBJC_CLASS_$_NSUserDefaults", referenced from: objc-class-ref in nsterm.o objc-class-ref in nsfns.o "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table8 in nsterm.o GCC_except_table1 in nsselect.o ld: symbol(s) not found for architecture x86_64 --- pkgs/applications/editors/emacs/default.nix | 11 +++++++---- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix index c1bfdf8157d..e95d2b61535 100644 --- a/pkgs/applications/editors/emacs/default.nix +++ b/pkgs/applications/editors/emacs/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d , pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif , libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux -, alsaLib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf +, alsaLib, cairo, acl, gpm, cf-private, AppKit, GSS, ImageIO, m17n_lib, libotf , systemd ? null , withX ? !stdenv.isDarwin , withNS ? stdenv.isDarwin @@ -64,9 +64,12 @@ stdenv.mkDerivation rec { ++ lib.optional (withX && withGTK2) gtk2-x11 ++ lib.optionals (withX && withGTK3) [ gtk3-x11 gsettings-desktop-schemas ] ++ lib.optional (stdenv.isDarwin && withX) cairo - ++ lib.optionals (withX && withXwidgets) [ webkitgtk ]; - - propagatedBuildInputs = lib.optionals withNS [ AppKit GSS ImageIO ]; + ++ lib.optionals (withX && withXwidgets) [ webkitgtk ] + ++ lib.optionals withNS [ + AppKit GSS ImageIO + # Needed for CFNotificationCenterAddObserver symbols. + cf-private + ]; hardeningDisable = [ "format" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 798b7a29ad3..2cc9beb895f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16313,6 +16313,7 @@ with pkgs; imagemagick = null; acl = null; gpm = null; + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) AppKit GSS ImageIO; }; -- cgit 1.4.1 From f00a4af18fc7a3bae3e59b370554f82c882e3a42 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 6 Nov 2018 18:48:14 +0100 Subject: quartz-wm: add cf-private Undefined symbols for architecture x86_64: "_CFNotificationCenterAddObserver", referenced from: _main in main.o "_CFNotificationCenterGetDistributedCenter", referenced from: _main in main.o "_OBJC_CLASS_$_NSTimer", referenced from: objc-class-ref in main.o objc-class-ref in x-screen.o "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table25 in main.o ld: symbol(s) not found for architecture x86_64 --- pkgs/servers/x11/quartz-wm/default.nix | 8 +++++--- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/x11/quartz-wm/default.nix b/pkgs/servers/x11/quartz-wm/default.nix index d724a81debb..ccb3937ac85 100644 --- a/pkgs/servers/x11/quartz-wm/default.nix +++ b/pkgs/servers/x11/quartz-wm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, xorg, pixman, pkgconfig, AppKit, Xplugin, darwin }: +{ stdenv, fetchurl, xorg, pixman, pkgconfig, AppKit, Foundation, Xplugin, cf-private }: let version = "1.3.1"; in stdenv.mkDerivation { @@ -19,9 +19,11 @@ in stdenv.mkDerivation { xorg.libXext pixman pkgconfig - AppKit Xplugin darwin.apple_sdk.frameworks.Foundation + AppKit Xplugin Foundation + # Needed for CFNotificationCenterAddObserver symbols. + cf-private ]; - meta = with lib; { + meta = with stdenv.lib; { license = licenses.apsl20; platforms = platforms.darwin; maintainers = with maintainers; [ matthewbauer ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2cc9beb895f..060c4df627a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13845,7 +13845,8 @@ with pkgs; xquartz = callPackage ../servers/x11/xquartz { }; quartz-wm = callPackage ../servers/x11/quartz-wm { stdenv = clangStdenv; - inherit (darwin.apple_sdk.frameworks) AppKit; + inherit (darwin) cf-private; + inherit (darwin.apple_sdk.frameworks) AppKit Foundation; inherit (darwin.apple_sdk.libs) Xplugin; }; -- cgit 1.4.1 From 2b76ad8fe7d849c6c08040dafaab12ed919beb41 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 6 Nov 2018 18:54:06 +0100 Subject: xquartz: add cf-private Undefined symbols for architecture x86_64: "_NSDefaultRunLoopMode", referenced from: _X11ApplicationMain in libXquartz.a(X11Application.o) "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in libXquartz.a(X11Application.o) objc-class-ref in libXquartz.a(X11Controller.o) objc-class-ref in libxpbproxy.a(x-selection.o) "_OBJC_CLASS_$_NSData", referenced from: objc-class-ref in libxpbproxy.a(x-selection.o) "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in libxpbproxy.a(x-selection.o) "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in libXquartz.a(X11Application.o) objc-class-ref in libXquartz.a(X11Controller.o) "_OBJC_CLASS_$_NSMutableDictionary", referenced from: objc-class-ref in libXquartz.a(X11Application.o) "_OBJC_CLASS_$_NSRunLoop", referenced from: objc-class-ref in libXquartz.a(X11Application.o) "_OBJC_CLASS_$_NSURL", referenced from: objc-class-ref in libXquartz.a(X11Application.o) "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table29 in libxpbproxy.a(x-selection.o) ld: symbol(s) not found for architecture x86_64 --- pkgs/servers/x11/xquartz/default.nix | 13 +++++++++---- pkgs/top-level/all-packages.nix | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/x11/xquartz/default.nix b/pkgs/servers/x11/xquartz/default.nix index 3fc7aaea9c9..8cb96d0ae39 100644 --- a/pkgs/servers/x11/xquartz/default.nix +++ b/pkgs/servers/x11/xquartz/default.nix @@ -1,6 +1,7 @@ -{ stdenv, lib, buildEnv, makeFontsConf, gnused, writeScript, xorg, bashInteractive, xterm, makeWrapper, ruby +{ stdenv, buildEnv, makeFontsConf, gnused, writeScript, xorg, bashInteractive, xterm, makeWrapper, ruby , quartz-wm, fontconfig, xlsfonts, xfontsel , ttf_bitstream_vera, freefont_ttf, liberation_ttf +, cf-private , shell ? "${bashInteractive}/bin/bash" }: @@ -97,7 +98,11 @@ let in stdenv.mkDerivation { name = "xquartz-${stdenv.lib.getVersion xorg.xorgserver}"; - buildInputs = [ ruby makeWrapper ]; + buildInputs = [ + ruby makeWrapper + # Needed for NSDefaultRunLoopMode symbols. + cf-private + ]; unpackPhase = "sourceRoot=."; @@ -134,7 +139,7 @@ in stdenv.mkDerivation { defaultStartX="$out/bin/startx -- $out/bin/Xquartz" ruby ${./patch_plist.rb} \ - ${lib.escapeShellArg (builtins.toXML { + ${stdenv.lib.escapeShellArg (builtins.toXML { XQUARTZ_DEFAULT_CLIENT = "${xterm}/bin/xterm"; XQUARTZ_DEFAULT_SHELL = "${shell}"; XQUARTZ_DEFAULT_STARTX = "@STARTX@"; @@ -179,7 +184,7 @@ in stdenv.mkDerivation { --replace "@FONTCONFIG_FILE@" "$fontsConfPath" ''; - meta = with lib; { + meta = with stdenv.lib; { platforms = platforms.darwin; maintainers = with maintainers; [ cstrahan ]; license = licenses.mit; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 060c4df627a..8cd257857da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13842,7 +13842,10 @@ with pkgs; xqilla = callPackage ../development/tools/xqilla { }; - xquartz = callPackage ../servers/x11/xquartz { }; + xquartz = callPackage ../servers/x11/xquartz { + inherit (darwin) cf-private; + }; + quartz-wm = callPackage ../servers/x11/quartz-wm { stdenv = clangStdenv; inherit (darwin) cf-private; -- cgit 1.4.1 From ecf7c9c4b4e7f5b3737cb4a92570333fde7684c0 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 6 Nov 2018 19:00:03 +0100 Subject: xorg.xorgserver: add cf-private on darwin Undefined symbols for architecture x86_64: "_NSDefaultRunLoopMode", referenced from: _X11ApplicationMain in libXquartz.a(X11Application.o) "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in libXquartz.a(X11Application.o) objc-class-ref in libXquartz.a(X11Controller.o) objc-class-ref in libxpbproxy.a(x-selection.o) "_OBJC_CLASS_$_NSData", referenced from: objc-class-ref in libxpbproxy.a(x-selection.o) "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in libxpbproxy.a(x-selection.o) "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in libXquartz.a(X11Application.o) objc-class-ref in libXquartz.a(X11Controller.o) "_OBJC_CLASS_$_NSMutableDictionary", referenced from: objc-class-ref in libXquartz.a(X11Application.o) "_OBJC_CLASS_$_NSRunLoop", referenced from: objc-class-ref in libXquartz.a(X11Application.o) "_OBJC_CLASS_$_NSURL", referenced from: objc-class-ref in libXquartz.a(X11Application.o) "_OBJC_EHTYPE_$_NSException", referenced from: GCC_except_table29 in libxpbproxy.a(x-selection.o) ld: symbol(s) not found for architecture x86_64 --- pkgs/servers/x11/xorg/overrides.nix | 22 +++++++++++++--------- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 4772ac7f7ee..8f4c251335a 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -2,10 +2,12 @@ stdenv, makeWrapper, lib, fetchurl, fetchpatch, automake, autoconf, libtool, intltool, mtdev, libevdev, libinput, - python, freetype, apple_sdk, tradcpp, fontconfig, + python, freetype, tradcpp, fontconfig, libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, mesa_noglu, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook, - mcpp, epoxy, openssl, pkgconfig, llvm_6 }: + mcpp, epoxy, openssl, pkgconfig, llvm_6, + cf-private, ApplicationServices, Carbon, Cocoa, Xplugin +}: let inherit (stdenv) lib isDarwin; @@ -108,9 +110,9 @@ self: super: }); libAppleWM = super.libAppleWM.overrideAttrs (attrs: { - buildInputs = attrs.buildInputs ++ [ apple_sdk.frameworks.ApplicationServices ]; + buildInputs = attrs.buildInputs ++ [ ApplicationServices ]; preConfigure = '' - substituteInPlace src/Makefile.in --replace -F/System -F${apple_sdk.frameworks.ApplicationServices} + substituteInPlace src/Makefile.in --replace -F/System -F${ApplicationServices} ''; }); @@ -466,7 +468,11 @@ self: super: sha256 = "1j1i3n5xy1wawhk95kxqdc54h34kg7xp4nnramba2q8xqfr5k117"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ]; + buildInputs = [ dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ] + ++ stdenv.lib.optionals stdenv.isDarwin [ + # Needed for NSDefaultRunLoopMode symbols. + cf-private + ]; postPatch = stdenv.lib.optionalString stdenv.isLinux "sed '1i#include ' -i include/os.h"; meta.platforms = stdenv.lib.platforms.unix; } else throw "unsupported xorg abiCompat ${abiCompat} for ${attrs_passed.name}"; @@ -538,9 +544,7 @@ self: super: nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook self.utilmacros self.fontutil ]; buildInputs = commonBuildInputs ++ [ bootstrap_cmds automake autoconf - apple_sdk.libs.Xplugin - apple_sdk.frameworks.Carbon - apple_sdk.frameworks.Cocoa + Xplugin Carbon Cocoa ]; propagatedBuildInputs = commonPropagatedBuildInputs ++ [ libAppleWM applewmproto @@ -582,7 +586,7 @@ self: super: preConfigure = '' mkdir -p $out/Applications export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error" - substituteInPlace hw/xquartz/pbproxy/Makefile.in --replace -F/System -F${apple_sdk.frameworks.ApplicationServices} + substituteInPlace hw/xquartz/pbproxy/Makefile.in --replace -F/System -F${ApplicationServices} ''; postInstall = '' rm -fr $out/share/X11/xkb/compiled diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8cd257857da..08e6662b4ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13858,7 +13858,9 @@ with pkgs; # have created a cycle. xorg = recurseIntoAttrs ((lib.callPackageWith __splicedPackages ../servers/x11/xorg { }).overrideScope' (lib.callPackageWith __splicedPackages ../servers/x11/xorg/overrides.nix { - inherit (darwin) apple_sdk; + inherit (darwin) cf-private; + inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa; + inherit (darwin.apple_sdk.libs) Xplugin; bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null; python = python2; # Incompatible with Python 3x udev = if stdenv.isLinux then udev else null; -- cgit 1.4.1