diff --git a/pkgs/applications/editors/emacs/27.nix b/pkgs/applications/editors/emacs/27.nix index b629c2d21207..e0e41a78b9ce 100644 --- a/pkgs/applications/editors/emacs/27.nix +++ b/pkgs/applications/editors/emacs/27.nix @@ -1,7 +1,12 @@ import ./generic.nix (rec { version = "27.2"; sha256 = "sha256-tKfMTnjmPzeGJOCRkhW5EK9bsqCvyBn60pgnLp9Awbk="; - patches = [ + patches = fetchpatch: [ ./tramp-detect-wrapped-gvfsd.patch + (fetchpatch { + name = "fix-aarch64-darwin-triplet.patch"; + url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=a88f63500e475f842e5fbdd9abba4ce122cdb082"; + sha256 = "sha256-RF9b5PojFUAjh2TDUW4+HaWveV30Spy1iAXhaWf1ZVg="; + }) ]; }) diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 1bae0a0c9702..bcd55258a49d 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -10,7 +10,7 @@ , Xaw3d, libXcursor, pkg-config, gettext, libXft, dbus, libpng, libjpeg, giflib , libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux , alsa-lib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf -, jansson, harfbuzz +, sigtool, jansson, harfbuzz , dontRecurseIntoAttrs ,emacsPackagesFor , libgccjit, targetPlatform, makeWrapper # native-comp params , systemd ? null @@ -46,10 +46,10 @@ assert withXwidgets -> withGTK3 && webkitgtk != null; let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp { NATIVE_FULL_AOT = "1"; LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib"; -} // lib.optionalAttrs stdenv.isDarwin { - CFLAGS = "-DMAC_OS_X_VERSION_MAX_ALLOWED=101200"; } // { - inherit pname version patches; + inherit pname version; + + patches = patches fetchpatch; src = fetchurl { url = "mirror://gnu/emacs/${name}.tar.xz"; @@ -118,8 +118,8 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp { ++ lib.optional (withX && withMotif) motif ++ lib.optionals (withX && withXwidgets) [ webkitgtk glib-networking ] ++ lib.optionals withNS [ AppKit GSS ImageIO ] - ++ lib.optionals nativeComp [ libgccjit ] - ; + ++ lib.optionals stdenv.isDarwin [ sigtool ] + ++ lib.optionals nativeComp [ libgccjit ]; hardeningDisable = [ "format" ]; @@ -138,7 +138,7 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp { ++ lib.optional withXwidgets "--with-xwidgets" ++ lib.optional nativeComp "--with-native-compilation" ++ lib.optional withImageMagick "--with-imagemagick" - ; + ; installTargets = [ "tags" "install" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e1fc030ea07..51cbb4ac1fa9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23411,6 +23411,7 @@ in acl = null; gpm = null; inherit (darwin.apple_sdk.frameworks) AppKit GSS ImageIO; + inherit (darwin) sigtool; }; emacs27-nox = lowPrio (appendToName "nox" (emacs27.override {