From d86fc0d0f16cae948dac0d5978ff46a902def172 Mon Sep 17 00:00:00 2001
From: Andrew Pan
Date: Thu, 14 Dec 2023 13:27:03 -0600
Subject: [PATCH] emacs: darwin: use architecture-native SDK
Signed-off-by: Andrew Pan
---
pkgs/applications/editors/emacs/default.nix | 17 +++--------------
pkgs/applications/editors/emacs/make-emacs.nix | 3 ++-
pkgs/top-level/all-packages.nix | 2 +-
3 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix
index 29e2c2d85f49..8181b69d335d 100644
--- a/pkgs/applications/editors/emacs/default.nix
+++ b/pkgs/applications/editors/emacs/default.nix
@@ -4,25 +4,14 @@ lib.makeScope pkgs.newScope (self:
let
gconf = pkgs.gnome2.GConf;
inherit (self) callPackage;
- stdenv = if pkgs.stdenv.isDarwin
- then pkgs.darwin.apple_sdk_11_0.stdenv
- else pkgs.stdenv;
inheritedArgs = {
inherit gconf;
- inherit stdenv;
inherit (pkgs.darwin) sigtool;
- inherit (pkgs.darwin.apple_sdk_11_0) llvmPackages_14;
- inherit (pkgs.darwin.apple_sdk_11_0.frameworks)
+ inherit (pkgs.darwin.apple_sdk.frameworks)
Accelerate AppKit Carbon Cocoa GSS ImageCaptureCore ImageIO IOKit OSAKit
- Quartz QuartzCore UniformTypeIdentifiers WebKit;
- gnutls =
- if pkgs.stdenv.isDarwin
- then pkgs.gnutls.override {
- inherit stdenv;
- inherit (pkgs.darwin.apple_sdk_11_0.frameworks) Security;
- }
- else pkgs.gnutls;
+ Quartz QuartzCore WebKit;
+ inherit (pkgs.darwin.apple_sdk_11_0.frameworks) UniformTypeIdentifiers;
};
in {
sources = import ./sources.nix {
diff --git a/pkgs/applications/editors/emacs/make-emacs.nix b/pkgs/applications/editors/emacs/make-emacs.nix
index a52533564616..2e9be6088db7 100644
--- a/pkgs/applications/editors/emacs/make-emacs.nix
+++ b/pkgs/applications/editors/emacs/make-emacs.nix
@@ -296,12 +296,13 @@ mkDerivation (finalAttrs: {
OSAKit
Quartz
QuartzCore
- UniformTypeIdentifiers
WebKit
# TODO are these optional?
GSS
ImageCaptureCore
ImageIO
+ ] ++ lib.optionals (variant == "macport" && stdenv.hostPlatform.isAarch64) [
+ UniformTypeIdentifiers
];
hardeningDisable = [ "format" ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c0054b6f0a94..913a854538a3 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -30613,7 +30613,7 @@ with pkgs;
em = callPackage ../applications/editors/em { };
- inherit (recurseIntoAttrs (darwin.apple_sdk_11_0.callPackage ../applications/editors/emacs { }))
+ inherit (recurseIntoAttrs (callPackage ../applications/editors/emacs { }))
emacs28
emacs28-gtk2
emacs28-gtk3