From b378760b081bee1125d16df92a18189019d25ccf Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 7 Nov 2018 19:18:17 +0100 Subject: [PATCH] emacs25: add 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/25.nix | 11 +++++++---- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/emacs/25.nix b/pkgs/applications/editors/emacs/25.nix index ee21bbbd9bd..6576cd54472 100644 --- a/pkgs/applications/editors/emacs/25.nix +++ b/pkgs/applications/editors/emacs/25.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 +, alsaLib, cairo, acl, gpm, cf-private, AppKit, GSS, ImageIO , withX ? !stdenv.isDarwin , withGTK2 ? false, gtk2 ? null , withGTK3 ? true, gtk3 ? null, gsettings-desktop-schemas ? null @@ -61,9 +61,12 @@ stdenv.mkDerivation rec { ++ lib.optional (withX && withGTK2) gtk2 ++ lib.optionals (withX && withGTK3) [ gtk3 gsettings-desktop-schemas ] ++ lib.optional (stdenv.isDarwin && withX) cairo - ++ lib.optionals (withX && withXwidgets) [ webkitgtk24x-gtk3 glib-networking ]; - - propagatedBuildInputs = lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ]; + ++ lib.optionals (withX && withXwidgets) [ webkitgtk24x-gtk3 glib-networking ] + ++ lib.optionals stdenv.isDarwin [ + 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 574e727afba..18e5201be6b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16372,6 +16372,7 @@ with pkgs; imagemagick = null; acl = null; gpm = null; + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) AppKit GSS ImageIO; };