From dd5346915923d7751e7e8b21226b3db90ade3eea Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 28 Jun 2026 17:34:20 +0100 Subject: [PATCH 01/49] ld64: disable hardening again Turn out this happens on `aarch64-darwin` too. Fixes: 23c05205023464c322a0df9ac0834c00f4da9fa8 --- pkgs/by-name/ld/ld64/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/ld/ld64/package.nix b/pkgs/by-name/ld/ld64/package.nix index 184f635cffe3..ad2613836ff5 100644 --- a/pkgs/by-name/ld/ld64/package.nix +++ b/pkgs/by-name/ld/ld64/package.nix @@ -138,6 +138,9 @@ stdenv.mkDerivation (finalAttrs: { xar ]; + # ld built with this fails to link glib's gio + hardeningDisable = [ "libcxxhardeningfast" ]; + dontUseCmakeConfigure = true; # CMake is only needed because it’s used by Meson to find LLVM. # Note for overrides: ld64 cannot be built as a debug build because of UB in its iteration implementations, From d12a044b56cdfcad9ba633da9b4673ee24f91610 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 28 Jun 2026 17:36:04 +0100 Subject: [PATCH 02/49] Revert "glib: use LLD on Darwin to work around ld64 hardening issue" The ld64 issue has been fixed. This reverts commit 5f08853644352cc04d2b75f967583e621d22bff6. --- pkgs/by-name/gl/glib/package.nix | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pkgs/by-name/gl/glib/package.nix b/pkgs/by-name/gl/glib/package.nix index bda3d4a4a09c..4aa4d639df9e 100644 --- a/pkgs/by-name/gl/glib/package.nix +++ b/pkgs/by-name/gl/glib/package.nix @@ -24,8 +24,6 @@ gi-docgen, # use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib) util-linuxMinimal ? null, - # TODO: Clean up on `staging`. - llvmPackages, buildPackages, # this is just for tests (not in the closure of any regular package) @@ -209,10 +207,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals withDtrace [ systemtap' # for dtrace - ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; propagatedBuildInputs = [ @@ -256,13 +250,6 @@ stdenv.mkDerivation (finalAttrs: { "-DG_DISABLE_CAST_CHECKS" ]; DETERMINISTIC_BUILD = 1; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Work around ld64 hardening issue. - # - # TODO: Clean up on `staging`. - CC_LD = "lld"; - OBJC_LD = "lld"; }; postPatch = '' From 0f8e2da9cb7347b32fe9c090f92d08a1caf36b3b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:18:59 +0100 Subject: [PATCH 03/49] Revert "gtk3: fix build on darwin" The ld64 issue has been fixed. This reverts commit 7487e9cc518250e1c7085640f74fbe08d5d74a90. --- pkgs/by-name/gt/gtk3/package.nix | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/pkgs/by-name/gt/gtk3/package.nix b/pkgs/by-name/gt/gtk3/package.nix index bd66967f1014..3c3ffc066dbb 100644 --- a/pkgs/by-name/gt/gtk3/package.nix +++ b/pkgs/by-name/gt/gtk3/package.nix @@ -58,8 +58,6 @@ broadwaySupport ? true, wayland-scanner, testers, - # TODO: Clean up on `staging` - llvmPackages, }: let @@ -144,10 +142,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals waylandSupport [ wayland-scanner - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = @@ -219,17 +213,7 @@ stdenv.mkDerivation (finalAttrs: { # These are the defines that'd you'd get with --enable-debug=minimum (default). # See: https://developer.gnome.org/gtk3/stable/gtk-building.html#extra-configuration-options - env = { - NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # workaround for ld64 hardening issue - # - # TODO: Clean up on `staging` - - CC_LD = "lld"; - OBJC_LD = "lld"; - }; + env.NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; postPatch = '' # See https://github.com/NixOS/nixpkgs/issues/132259 From e6b2583ec23ed8e6024ebb6a38541969c6a48c7e Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:18:59 +0100 Subject: [PATCH 04/49] Revert "vim: fix build on darwin" The ld64 issue has been fixed. This reverts commit ade4a26bc1c6ecc3098e9fa80c7c4dc43eaff275. --- pkgs/applications/editors/vim/default.nix | 13 ------------- pkgs/applications/editors/vim/full.nix | 12 ++---------- pkgs/applications/editors/vim/macvim.nix | 7 +------ 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index d9abd14e2e51..ec3e7c9a6253 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -14,8 +14,6 @@ url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/68f6d131750aa778807119e03eed70286a17b1cb/trunk/archlinux.vim"; sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c"; }, - # TODO: Clean up on `staging` - llvmPackages, }: let @@ -39,10 +37,6 @@ stdenv.mkDerivation { nativeBuildInputs = [ gettext pkg-config - ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = [ ncurses @@ -50,13 +44,6 @@ stdenv.mkDerivation { gawk ]; - # workaround for ld64 hardening issue - # - # TODO: Clean up on `staging` - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_COMPILE = "-fuse-ld=lld"; - }; - strictDeps = true; configureFlags = [ diff --git a/pkgs/applications/editors/vim/full.nix b/pkgs/applications/editors/vim/full.nix index f07960cf950c..a2a105e3182c 100644 --- a/pkgs/applications/editors/vim/full.nix +++ b/pkgs/applications/editors/vim/full.nix @@ -48,9 +48,6 @@ darwinSupport ? config.vim.darwin or false, # Enable Darwin support ftNixSupport ? config.vim.ftNix or true, # Add nix indentation support from vim-nix (not needed for basic syntax highlighting) sodiumSupport ? config.vim.sodium or true, # Enable sodium based encryption - - # TODO: Clean up on `staging` - llvmPackages, }: let @@ -172,9 +169,7 @@ stdenv.mkDerivation { ++ lib.optional nlsSupport gettext ++ lib.optional perlSupport perl ++ lib.optional (guiSupport == "gtk3") wrapGAppsHook3 - ++ lib.optional waylandSupport wayland-scanner - # TODO: Clean up on `staging` - ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; + ++ lib.optional waylandSupport wayland-scanner; buildInputs = [ ncurses @@ -201,10 +196,7 @@ stdenv.mkDerivation { ++ lib.optional sodiumSupport libsodium; # error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes - # workaround for ld64 hardening issue - # - # TODO: Clean up on `staging` - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-fdeclspec -fuse-ld=lld"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-fdeclspec"; preConfigure = lib.optionalString ftNixSupport '' cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index 9e48750c0b0a..36e22ddc2b0a 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -17,8 +17,6 @@ # This can be set to one of the `darwin.xcode_*` packages as well. # If set, this should be a path to Xcode.app, e.g. `"/Applications/Xcode.app"`. withXcodePath ? null, - # TODO: Clean up on `staging` - llvmPackages, }: # Try to match MacVim's documented script interface compatibility @@ -50,8 +48,6 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ pkg-config - # TODO: Clean up on `staging` - llvmPackages.lld ]; buildInputs = [ # MacVim references up to MAC_OS_VERSION_14_0 in its source @@ -192,8 +188,7 @@ stdenv.mkDerivation (finalAttrs: { # macvim obj-c log macro triggers -Wformat-security (seems like a bug? it's a string literal!) hardeningDisable = common.hardeningDisable ++ [ "format" ]; # os_log also enables -Werror,-Wformat by default - # TODO: Clean up on `staging` - env.NIX_CFLAGS_COMPILE = "-DOS_LOG_FORMAT_WARNINGS -fuse-ld=lld"; + env.NIX_CFLAGS_COMPILE = "-DOS_LOG_FORMAT_WARNINGS"; # We rely on the user's Xcode install to build. It may be located in an arbitrary place, and # it's not clear what system-level components it may require, so for now we'll just allow full From 75de6157388d55f8b8c2c4576f23591de8f3c0f5 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:18:59 +0100 Subject: [PATCH 05/49] Revert "emacs: fix build on darwin" The ld64 issue has been fixed. This reverts commit 27f813249bb0dc258b17be085f7a2f5edd8c3622. --- .../applications/editors/emacs/make-emacs.nix | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/editors/emacs/make-emacs.nix b/pkgs/applications/editors/emacs/make-emacs.nix index ce8cd1d2b9ba..1a650a3b2af6 100644 --- a/pkgs/applications/editors/emacs/make-emacs.nix +++ b/pkgs/applications/editors/emacs/make-emacs.nix @@ -116,8 +116,6 @@ # test callPackage, - # TODO: Clean up on `staging` - llvmPackages, }: assert (withGTK3 && !withNS && variant != "macport") -> withX || withPgtk; @@ -254,11 +252,7 @@ stdenv.mkDerivation (finalAttrs: { autoreconfHook ] ++ lib.optionals (withPgtk || withX && (withGTK3 || withXwidgets)) [ wrapGAppsHook3 ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - sigtool - # TODO: Clean up on `staging` - llvmPackages.lld - ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ]; buildInputs = [ gnutls @@ -424,15 +418,10 @@ stdenv.mkDerivation (finalAttrs: { NATIVE_FULL_AOT = "1"; LIBRARY_PATH = lib.concatStringsSep ":" libGccJitLibraryPaths; } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # workaround for ld64 hardening issue - # - # TODO: Clean up on `staging` - NIX_CFLAGS_COMPILE = - "-fuse-ld=lld" - # Fixes intermittent segfaults when compiled with LLVM >= 7.0. - # See https://github.com/NixOS/nixpkgs/issues/127902 - + lib.optionalString (variant == "macport") " -isystem ${./macport-noescape-noop}"; + // lib.optionalAttrs (variant == "macport") { + # Fixes intermittent segfaults when compiled with LLVM >= 7.0. + # See https://github.com/NixOS/nixpkgs/issues/127902 + NIX_CFLAGS_COMPILE = "-isystem ${./macport-noescape-noop}"; }; enableParallelBuilding = true; From 7c7067ca42769adef5ed97749b2564e33855117c Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 06/49] Revert "gtk-mac-integration: Fix build on darwin" The ld64 issue has been fixed. This reverts commit 30585245b95977313ae04446f15f1447818be62e. --- pkgs/by-name/gt/gtk-mac-integration/package.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkgs/by-name/gt/gtk-mac-integration/package.nix b/pkgs/by-name/gt/gtk-mac-integration/package.nix index 26b30559c991..19976e462e15 100644 --- a/pkgs/by-name/gt/gtk-mac-integration/package.nix +++ b/pkgs/by-name/gt/gtk-mac-integration/package.nix @@ -9,8 +9,6 @@ gtk ? gtk3, gtk3, gobject-introspection, - # TODO: Clean up on `staging` - llvmPackages, }: stdenv.mkDerivation rec { @@ -30,8 +28,6 @@ stdenv.mkDerivation rec { pkg-config gtk-doc gobject-introspection - # TODO: Clean up on `staging` - llvmPackages.lld ]; buildInputs = [ glib ]; propagatedBuildInputs = [ gtk ]; @@ -40,13 +36,6 @@ stdenv.mkDerivation rec { gtkdocize ''; - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - meta = { description = "Provides integration for GTK applications into the Mac desktop"; license = lib.licenses.lgpl21; From ae39e41c5a8a71db246bbb2170f8986d2c99770f Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 07/49] Revert "pinentry-mac: fix build" The ld64 issue has been fixed. This reverts commit 3aa4bf236f9cc482420331fdbe805465e37fc564. --- pkgs/tools/security/pinentry/mac.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkgs/tools/security/pinentry/mac.nix b/pkgs/tools/security/pinentry/mac.nix index fd9dee1723a7..6b354ef48d23 100644 --- a/pkgs/tools/security/pinentry/mac.nix +++ b/pkgs/tools/security/pinentry/mac.nix @@ -10,8 +10,6 @@ common-updater-scripts, writers, re-plistbuddy, - # TODO: Clean up on `staging` - llvmPackages, }: stdenv.mkDerivation rec { @@ -49,8 +47,6 @@ stdenv.mkDerivation rec { makeBinaryWrapper texinfo re-plistbuddy - # TODO: Clean up on `staging` - llvmPackages.lld ]; configureFlags = [ @@ -60,11 +56,6 @@ stdenv.mkDerivation rec { "--with-libassuan-prefix=${libassuan.dev}" ]; - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - env.NIX_CFLAGS_LINK = "-fuse-ld=lld"; - installPhase = '' mkdir -p $out/Applications $out/bin mv macosx/pinentry-mac.app $out/Applications From cdc9d7628c35854e23b6e15c853221265b70ba40 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 08/49] Revert "qt5.qtbase: fix build on darwin" The ld64 issue has been fixed. This reverts commit 17cafcb3652f5a7a36fe5a5c7fb46991cc7af851. --- pkgs/development/libraries/qt-5/modules/qtbase.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 480bd31a6bc1..c1e05d0a8b62 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -20,8 +20,6 @@ which, # darwin support xcbuild, - # TODO: Clean up on `staging` - llvmPackages, dbus, fontconfig, @@ -194,8 +192,6 @@ stdenv.mkDerivation ( ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild - # TODO: Clean up on `staging` - llvmPackages.lld ]; } @@ -377,12 +373,6 @@ stdenv.mkDerivation ( # if dependency paths contain the string "pq", which can occur in the hash. # To prevent these failures, we need to override PostgreSQL detection. PSQL_LIBS = "-L${libpq}/lib -lpq"; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; prefixKey = "-prefix "; From 47052acf7c8d94ba1b120105ba5811423223825f Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 09/49] Revert "gstreamer: fix build on darwin" The ld64 issue has been fixed. This reverts commit fb7e04210400b472485bbd8f81adf6e8cd592ca6. --- .../libraries/gstreamer/base/default.nix | 14 -------------- .../libraries/gstreamer/core/default.nix | 14 -------------- .../libraries/gstreamer/good/default.nix | 13 ------------- 3 files changed, 41 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 8b779a923226..a2a478c76ff2 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -46,8 +46,6 @@ hotdoc, directoryListingUpdater, apple-sdk_gstreamer, - # TODO: Clean up on `staging` - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -89,10 +87,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals enableWayland [ wayland-scanner - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = [ @@ -165,14 +159,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled" ++ lib.optional stdenv.hostPlatform.isDarwin "-Ddrm=disabled"; - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - CC_LD = "lld"; - OBJC_LD = "lld"; - }; - postPatch = '' patchShebangs \ scripts/meson-pkg-config-file-fixup.py \ diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index 35151386097a..d50923558017 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -33,8 +33,6 @@ hotdoc, directoryListingUpdater, apple-sdk_gstreamer, - # TODO: Clean up on `staging` - llvmPackages, }: let @@ -86,10 +84,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals enableDocumentation [ hotdoc - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = [ @@ -123,14 +117,6 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "libdw" (withLibunwind && hasElfutils)) ]; - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - CC_LD = "lld"; - OBJC_LD = "lld"; - }; - postPatch = '' patchShebangs \ gst/parse/get_flex_version.py \ diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 6d0dd4edbdaf..4a689f5d82c7 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -66,8 +66,6 @@ gst-plugins-good, directoryListingUpdater, apple-sdk_gstreamer, - # TODO: Clean up on `staging` - llvmPackages, }: let @@ -139,10 +137,6 @@ stdenv.mkDerivation (finalAttrs: { ) ++ lib.optionals enableWayland [ wayland-protocols - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = [ @@ -271,13 +265,6 @@ stdenv.mkDerivation (finalAttrs: { # linking error on Darwin # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896 "-lncurses"; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - CC_LD = "lld"; - OBJC_LD = "lld"; }; # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''" From 002e6194af9855bfa23026eb3d78228de0c67b3d Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 10/49] Revert "swiftPackages.swift-unwrapped: fix darwin build" The ld64 issue has been fixed. This reverts commit 401b87c97d4922866c708247b3d23818dbc308fa. --- pkgs/development/compilers/swift/compiler/default.nix | 10 ---------- pkgs/development/compilers/swift/default.nix | 3 +-- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/development/compilers/swift/compiler/default.nix b/pkgs/development/compilers/swift/compiler/default.nix index dc15009aac72..2f6fa2a9450f 100644 --- a/pkgs/development/compilers/swift/compiler/default.nix +++ b/pkgs/development/compilers/swift/compiler/default.nix @@ -37,8 +37,6 @@ DarwinTools, apple-sdk_14, darwinMinVersionHook, - # TODO: Clean up on `staging` - lld, }: let @@ -254,8 +252,6 @@ stdenv.mkDerivation { DarwinTools # sw_vers fixDarwinDylibNames cctools.libtool - # TODO: Clean up on `staging` - lld ]; buildInputs = [ @@ -566,12 +562,6 @@ stdenv.mkDerivation { # Fixed in: https://github.com/apple/swift/commit/84083afef1de5931904d5c815d53856cdb3fb232 cmakeFlags=" -GNinja - ${ - # Fix for ld64 hardening issue - # - # TODO: Clean up on staging - lib.optionalString stdenv.hostPlatform.isDarwin "-DCMAKE_LINKER_TYPE=LLD" - } -DBOOTSTRAPPING_MODE=BOOTSTRAPPING${lib.optionalString stdenv.hostPlatform.isDarwin "-WITH-HOSTLIBS"} -DSWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING=ON -DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=ON diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index 8af33b495e9d..ad4fe81c46cb 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -15,8 +15,7 @@ let inherit stdenv; swift-unwrapped = callPackage ./compiler { - # TODO: Clean up on `staging` - inherit (llvmPackages) stdenv lld; + inherit (llvmPackages) stdenv; inherit (darwin) DarwinTools sigtool; }; From 075a8a4c381653c872c4db8712639eb16bd43f87 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 11/49] Revert "moltenvk: fix darwin build" The ld64 issue has been fixed. This reverts commit f3c69aae506bd64cbc7afff907e09b01af7e744f. --- pkgs/by-name/mo/moltenvk/package.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/by-name/mo/moltenvk/package.nix b/pkgs/by-name/mo/moltenvk/package.nix index 7c028f16e0f5..d39bb52b35e9 100644 --- a/pkgs/by-name/mo/moltenvk/package.nix +++ b/pkgs/by-name/mo/moltenvk/package.nix @@ -17,8 +17,6 @@ # but that’s not really a concern for nixpkgs, so use them by default. # See: https://github.com/KhronosGroup/MoltenVK/blob/main/README.md#metal_private_api enablePrivateAPIUsage ? true, - # TODO: Clean up on `staging` - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -37,11 +35,7 @@ stdenv.mkDerivation (finalAttrs: { vulkan-headers ]; - nativeBuildInputs = [ - xcbuildHook - # TODO: Clean up on `staging` - llvmPackages.lld - ]; + nativeBuildInputs = [ xcbuildHook ]; outputs = [ "out" @@ -120,11 +114,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional enablePrivateAPIUsage "-DMVK_USE_METAL_PRIVATE_API=1" ); - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - env.NIX_CFLAGS_LINK = "-fuse-ld=lld"; - env.NIX_LDFLAGS = toString [ "-lglslang" "-lSPIRV" From 9ae58090350dfebe6400e18a2f956ab6f832dad6 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 12/49] Revert "gtk2: fix darwin build" The ld64 issue has been fixed. This reverts commit adf395eab93e4ad624fce769455bf51e9b96f9e9. --- pkgs/by-name/gt/gtk2/package.nix | 41 ++++++++++---------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/pkgs/by-name/gt/gtk2/package.nix b/pkgs/by-name/gt/gtk2/package.nix index 369cfbee3695..3f05469c1afc 100644 --- a/pkgs/by-name/gt/gtk2/package.nix +++ b/pkgs/by-name/gt/gtk2/package.nix @@ -27,8 +27,6 @@ gdktarget ? if stdenv.hostPlatform.isDarwin then "quartz" else "x11", cupsSupport ? config.gtk2.cups or stdenv.hostPlatform.isLinux, xineramaSupport ? stdenv.hostPlatform.isLinux, - # TODO: Clean up on `staging` - llvmPackages, }: let @@ -58,19 +56,13 @@ stdenv.mkDerivation (finalAttrs: { gtkCleanImmodulesCache ]; - nativeBuildInputs = - finalAttrs.setupHooks - ++ [ - gdk-pixbuf - gettext - gobject-introspection - perl - pkg-config - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld - ]; + nativeBuildInputs = finalAttrs.setupHooks ++ [ + gdk-pixbuf + gettext + gobject-introspection + perl + pkg-config + ]; patches = [ ./patches/2.0-immodules.cache.patch @@ -128,19 +120,12 @@ stdenv.mkDerivation (finalAttrs: { "ac_cv_path_GDK_PIXBUF_CSOURCE=${buildPackages.gdk-pixbuf.dev}/bin/gdk-pixbuf-csource" ]; - env = - lib.optionalAttrs stdenv.cc.isGNU { - NIX_CFLAGS_COMPILE = toString [ - "-Wno-error=implicit-int" - "-Wno-error=incompatible-pointer-types" - ]; - } - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=implicit-int" + "-Wno-error=incompatible-pointer-types" + ]; + }; enableParallelBuilding = true; From 0de2f5816b3b0d186efa114ea518908ade4db040 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:01 +0100 Subject: [PATCH 13/49] Revert "fltk_1_{3,4}: fix darwin build" The ld64 issue has been fixed. This reverts commit a450c2d068f288e3ca1279f889265101ec08790a. --- pkgs/by-name/fl/fltk_1_3/package.nix | 12 ------------ pkgs/by-name/fl/fltk_1_4/package.nix | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/pkgs/by-name/fl/fltk_1_3/package.nix b/pkgs/by-name/fl/fltk_1_3/package.nix index af71afe150d8..41762add1ce7 100644 --- a/pkgs/by-name/fl/fltk_1_3/package.nix +++ b/pkgs/by-name/fl/fltk_1_3/package.nix @@ -35,8 +35,6 @@ withShared ? true, nix-update-script, - # TODO: Clean up on `staging` - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -70,10 +68,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals withDocs [ doxygen graphviz - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = @@ -145,12 +139,6 @@ stdenv.mkDerivation (finalAttrs: { # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ (lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" true) - ] - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - (lib.cmakeFeature "CMAKE_LINKER_TYPE" "LLD") ]; preBuild = lib.optionalString (withCairo && withShared && stdenv.hostPlatform.isDarwin) '' diff --git a/pkgs/by-name/fl/fltk_1_4/package.nix b/pkgs/by-name/fl/fltk_1_4/package.nix index f6fe650fafd7..57d9b9d87805 100644 --- a/pkgs/by-name/fl/fltk_1_4/package.nix +++ b/pkgs/by-name/fl/fltk_1_4/package.nix @@ -46,8 +46,6 @@ withExamples ? (stdenv.buildPlatform == stdenv.hostPlatform), nix-update-script, - # TODO: Clean up on `staging` - llvmPackages, }: # pango support depends on Xft @@ -86,10 +84,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals withDocs [ doxygen graphviz - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = @@ -175,12 +169,6 @@ stdenv.mkDerivation (finalAttrs: { # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ (lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" true) - ] - # Fix for ld64 hardening issue - # - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - (lib.cmakeFeature "CMAKE_LINKER_TYPE" "LLD") ]; postBuild = lib.optionalString withDocs '' From c336281d85a8d0c956316f2927d0c88453941bbb Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:03 +0100 Subject: [PATCH 14/49] Revert "ffmpeg: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 05e5a4e27941717c399a477ffa1d44ac9f412e15. --- pkgs/development/libraries/ffmpeg/generic.nix | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index d036b01bb5c9..96166235a309 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -366,9 +366,6 @@ libnpp, # Testing testers, - - # TODO: Clean up on `staging`. - llvmPackages, }: /* @@ -837,9 +834,7 @@ stdenv.mkDerivation ( ++ optionals stdenv.hostPlatform.isx86 [ nasm ] # Texinfo version 7.1 introduced breaking changes, which older versions of ffmpeg do not handle. ++ optionals (lib.versionAtLeast version "6") [ texinfo ] - ++ optionals withCudaNVCC [ cuda_nvcc ] - # TODO: Clean up on `staging`. - ++ optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + ++ optionals withCudaNVCC [ cuda_nvcc ]; buildInputs = [ ] @@ -983,17 +978,12 @@ stdenv.mkDerivation ( buildFlags = [ "all" ] ++ optional buildQtFaststart "tools/qt-faststart"; # Build qt-faststart executable - env = - lib.optionalAttrs stdenv.cc.isGNU { - NIX_CFLAGS_COMPILE = toString [ - "-Wno-error=incompatible-pointer-types" - "-Wno-error=int-conversion" - ]; - } - # TODO: Clean up on `staging`. - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env = lib.optionalAttrs stdenv.cc.isGNU { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=incompatible-pointer-types" + "-Wno-error=int-conversion" + ]; + }; # tests linking broken with shaderc after https://github.com/NixOS/nixpkgs/pull/477464/changes/5a47b12dfcd1b909ba35778a866394430054319a doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform && !withShaderc; From a63bd182681f6ad1c55763321884e5b01a2098e7 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:04 +0100 Subject: [PATCH 15/49] Revert "sdl3: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 984fe3dd058506862bce440677cfaf2e1749e320. --- pkgs/by-name/sd/sdl3/package.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkgs/by-name/sd/sdl3/package.nix b/pkgs/by-name/sd/sdl3/package.nix index 691b8edf7a8f..9345096f3fa7 100644 --- a/pkgs/by-name/sd/sdl3/package.nix +++ b/pkgs/by-name/sd/sdl3/package.nix @@ -61,9 +61,6 @@ vulkanSupport ? true, waylandSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, x11Support ? !stdenv.hostPlatform.isAndroid && !stdenv.hostPlatform.isWindows, - - # TODO: Clean up on `staging`. - llvmPackages, }: assert lib.assertMsg ( @@ -130,8 +127,7 @@ stdenv.mkDerivation (finalAttrs: { ninja validatePkgConfig ] - ++ lib.optional waylandSupport wayland-scanner - ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; + ++ lib.optional waylandSupport wayland-scanner; buildInputs = lib.optionals libusbSupport [ @@ -211,10 +207,6 @@ stdenv.mkDerivation (finalAttrs: { && !(stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isAndroid) && !(x11Support || waylandSupport) )) - ] - # TODO: Clean up on `staging` - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - (lib.cmakeFeature "CMAKE_LINKER_TYPE" "LLD") ]; doCheck = true; From 4e60e200cc748c67a79ae546ab2a3674ec43e855 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:06 +0100 Subject: [PATCH 16/49] Revert "qemu: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 7a83e820ddc2dd54a2ff6038ffe5a2f7a4005fb8. --- pkgs/by-name/qe/qemu/package.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkgs/by-name/qe/qemu/package.nix b/pkgs/by-name/qe/qemu/package.nix index 57796c752243..978d4e21cecc 100644 --- a/pkgs/by-name/qe/qemu/package.nix +++ b/pkgs/by-name/qe/qemu/package.nix @@ -123,9 +123,6 @@ minimal ? toolsOnly || userOnly, gitUpdater, qemu-utils, # for tests attribute - - # TODO: Clean up on `staging`. - llvmPackages, }: assert lib.assertMsg ( @@ -183,9 +180,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals hexagonSupport [ glib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool - - # TODO: Clean up on `staging`. - llvmPackages.lld ] ++ lib.optionals (!userOnly) [ dtc ]; @@ -431,10 +425,6 @@ stdenv.mkDerivation (finalAttrs: { ln -s $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} $out/bin/qemu-kvm ''; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - passthru = { qemu-system-i386 = "bin/qemu-system-i386"; tests = lib.optionalAttrs (!toolsOnly) { From a0509f9918bbf9f4f994333e7c4b28b5bf1b6601 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:06 +0100 Subject: [PATCH 17/49] Revert "glfw3: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 3b114d3460c13c07f259ee6ffb24e43de5f03277. --- pkgs/by-name/gl/glfw3/package.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkgs/by-name/gl/glfw3/package.nix b/pkgs/by-name/gl/glfw3/package.nix index 6ecf627adce1..711406030b70 100644 --- a/pkgs/by-name/gl/glfw3/package.nix +++ b/pkgs/by-name/gl/glfw3/package.nix @@ -20,9 +20,6 @@ libxkbcommon, libdecor, withMinecraftPatch ? false, - - # TODO: Clean up on `staging`. - llvmPackages, }: let version = "3.4"; @@ -61,11 +58,7 @@ stdenv.mkDerivation { cmake pkg-config ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - fixDarwinDylibNames - # TODO: Clean up on `staging`. - llvmPackages.lld - ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ @@ -93,9 +86,6 @@ stdenv.mkDerivation { cmakeFlags = [ # Static linking isn't supported (lib.cmakeBool "BUILD_SHARED_LIBS" true) - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - (lib.cmakeFeature "CMAKE_LINKER_TYPE" "LLD") ]; env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) { From c00cb4542ad52c633888d0da93460edc3934fca5 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:06 +0100 Subject: [PATCH 18/49] Revert "python{313,314}Packages.pyobjc-core: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 2c0e8d977ae15f20f251167091b61e5a3e62bc27. --- pkgs/development/python-modules/pyobjc-core/default.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkgs/development/python-modules/pyobjc-core/default.nix b/pkgs/development/python-modules/pyobjc-core/default.nix index 278ad48196d8..e07a01289f74 100644 --- a/pkgs/development/python-modules/pyobjc-core/default.nix +++ b/pkgs/development/python-modules/pyobjc-core/default.nix @@ -4,9 +4,6 @@ fetchFromGitHub, lib, setuptools, - - # TODO: Clean up on `staging`. - llvmPackages, }: buildPythonPackage rec { @@ -31,9 +28,6 @@ buildPythonPackage rec { nativeBuildInputs = [ darwin.DarwinTools # sw_vers - - # TODO: Clean up on `staging`. - llvmPackages.lld ]; env.NIX_CFLAGS_COMPILE = toString [ @@ -42,9 +36,6 @@ buildPythonPackage rec { "-Wno-error=unused-command-line-argument" ]; - # TODO: Clean up on `staging`. - env.NIX_CFLAGS_LINK = "-fuse-ld=lld"; - pythonImportsCheck = [ "objc" ]; meta = { From 7b6ed7cb7ae909d69697fdc1a9d47f088c669c66 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:06 +0100 Subject: [PATCH 19/49] Revert "wxwidgets_{3_1,3_2,3_3}: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 89af4db9cfc5c1b13ba5b9e666683699f8179fab. --- pkgs/by-name/wx/wxwidgets_3_1/package.nix | 26 ++++++----------------- pkgs/by-name/wx/wxwidgets_3_2/package.nix | 26 ++++++----------------- pkgs/by-name/wx/wxwidgets_3_3/package.nix | 26 ++++++----------------- 3 files changed, 21 insertions(+), 57 deletions(-) diff --git a/pkgs/by-name/wx/wxwidgets_3_1/package.nix b/pkgs/by-name/wx/wxwidgets_3_1/package.nix index bea53d1e25e1..17b1d60e360f 100644 --- a/pkgs/by-name/wx/wxwidgets_3_1/package.nix +++ b/pkgs/by-name/wx/wxwidgets_3_1/package.nix @@ -23,9 +23,6 @@ withWebKit ? stdenv.hostPlatform.isDarwin, webkitgtk_4_1, libpng, - - # TODO: Clean up on `staging`. - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -48,11 +45,7 @@ stdenv.mkDerivation (finalAttrs: { ./0002-support-webkitgtk-41.patch ]; - nativeBuildInputs = [ - pkg-config - ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ gst_all_1.gst-plugins-base @@ -96,17 +89,12 @@ stdenv.mkDerivation (finalAttrs: { "--enable-webviewwebkit" ]; - env = - lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { - SEARCH_LIB = toString [ - "${libGLU.out}/lib" - "${libGL.out}/lib" - ]; - } - # TODO: Clean up on `staging`. - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { + SEARCH_LIB = toString [ + "${libGLU.out}/lib" + "${libGL.out}/lib" + ]; + }; preConfigure = '' substituteInPlace configure --replace \ diff --git a/pkgs/by-name/wx/wxwidgets_3_2/package.nix b/pkgs/by-name/wx/wxwidgets_3_2/package.nix index 164911b73410..0b1edf024fd9 100644 --- a/pkgs/by-name/wx/wxwidgets_3_2/package.nix +++ b/pkgs/by-name/wx/wxwidgets_3_2/package.nix @@ -29,9 +29,6 @@ withMesa ? !stdenv.hostPlatform.isDarwin, withWebKit ? true, webkitgtk_4_1, - - # TODO: Clean up on `staging`. - llvmPackages, }: let catch = fetchFromGitHub { @@ -59,11 +56,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-YaQrPJSlTpJKwjXLdRsGB04f7wKJCWfHjXWkB45qyEg="; }; - nativeBuildInputs = [ - pkg-config - ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ gst_all_1.gst-plugins-base @@ -121,17 +114,12 @@ stdenv.mkDerivation (finalAttrs: { "--enable-webviewwebkit" ]; - env = - lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { - SEARCH_LIB = toString [ - "${libGLU.out}/lib" - "${libGL.out}/lib" - ]; - } - # TODO: Clean up on `staging`. - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { + SEARCH_LIB = toString [ + "${libGLU.out}/lib" + "${libGL.out}/lib" + ]; + }; preConfigure = '' cp -r ${catch}/* 3rdparty/catch/ diff --git a/pkgs/by-name/wx/wxwidgets_3_3/package.nix b/pkgs/by-name/wx/wxwidgets_3_3/package.nix index d7e649b1e8ea..d15b0a4de841 100644 --- a/pkgs/by-name/wx/wxwidgets_3_3/package.nix +++ b/pkgs/by-name/wx/wxwidgets_3_3/package.nix @@ -30,9 +30,6 @@ withEGL ? true, withPrivateFonts ? false, webkitgtk_4_1, - - # TODO: Clean up on `staging`. - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -47,11 +44,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-gB+mEk8rHpB4z1m8RWJSV+upKzLt7pZtlviS2g03EHY="; }; - nativeBuildInputs = [ - pkg-config - ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ gst_all_1.gst-plugins-base @@ -110,17 +103,12 @@ stdenv.mkDerivation (finalAttrs: { "--enable-webviewwebkit" ]; - env = - lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { - SEARCH_LIB = toString [ - "${libGLU.out}/lib" - "${libGL.out}/lib" - ]; - } - # TODO: Clean up on `staging`. - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { + SEARCH_LIB = toString [ + "${libGLU.out}/lib" + "${libGL.out}/lib" + ]; + }; postInstall = " pushd $out/include From 1d1caa92dd1f41095b56fcb694499833a9f9887e Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:06 +0100 Subject: [PATCH 20/49] Revert "qt6.qtbase: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit fc952632d96e506faa958a807771a6577b48cf1a. --- .../libraries/qt-6/modules/qtbase/default.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase/default.nix b/pkgs/development/libraries/qt-6/modules/qtbase/default.nix index e3f60553ee63..7686093f4d75 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase/default.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase/default.nix @@ -89,9 +89,6 @@ # options qttranslations ? null, fetchpatch, - - # TODO: Clean up on `staging`. - llvmPackages, }: let @@ -200,11 +197,7 @@ stdenv.mkDerivation { cmake ninja ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - moveBuildTree - # TODO: Clean up on `staging`. - llvmPackages.lld - ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ moveBuildTree ]; propagatedNativeBuildInputs = [ lndir @@ -319,8 +312,6 @@ stdenv.mkDerivation { # When this variable is not set, cmake tries to execute xcodebuild # to query the version. "-DQT_INTERNAL_XCODE_VERSION=0.1" - # TODO: Clean up on `staging`. - (lib.cmakeFeature "CMAKE_LINKER_TYPE" "LLD") ] ++ lib.optionals isCrossBuild [ "-DQT_HOST_PATH=${pkgsBuildBuild.qt6.qtbase}" From d18b05d487863ad1782190404eb56b7350167d1f Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:06 +0100 Subject: [PATCH 21/49] Revert "python{313,314}Packages.matplotlib: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit e39e53c6c6a82f41bef75c5e0a3d01315d17bb88. --- .../python-modules/matplotlib/default.nix | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index bee69a777e5e..ab1d363fc6ab 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -62,9 +62,6 @@ # Reverse dependency sage, - - # TODO: Clean up on `staging`. - llvmPackages, }: let @@ -107,12 +104,7 @@ buildPythonPackage (finalAttrs: { --replace-fail libwayland-client.so.0 ${wayland}/lib/libwayland-client.so.0 ''; - nativeBuildInputs = [ - pkg-config - ] - ++ lib.optionals enableGtk3 [ gobject-introspection ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ pkg-config ] ++ lib.optionals enableGtk3 [ gobject-introspection ]; buildInputs = [ ffmpeg-headless @@ -168,11 +160,6 @@ buildPythonPackage (finalAttrs: { b_lto = false; }; - # TODO: Clean up on `staging`. - env.${if stdenv.hostPlatform.isDarwin then "CC_LD" else null} = "lld"; - env.${if stdenv.hostPlatform.isDarwin then "CXX_LD" else null} = "lld"; - env.${if stdenv.hostPlatform.isDarwin then "OBJC_LD" else null} = "lld"; - passthru.tests = { inherit sage; }; From 6472ba3a88c6fce9fabeed0eb0d06d0dda64e383 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:08 +0100 Subject: [PATCH 22/49] Revert "opencv: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 8f2f727a6786bede3b45b2ae637dc0b88299306d. --- pkgs/development/libraries/opencv/4.x.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index a7412473707e..85163117298f 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -91,9 +91,6 @@ bzip2, callPackage, - - # TODO: Clean up on `staging`. - llvmPackages, }@inputs: let @@ -478,10 +475,6 @@ effectiveStdenv.mkDerivation { ) ++ optionals enableCuda [ cudaPackages.cuda_nvcc - ] - # TODO: Clean up on `staging`. - ++ optionals effectiveStdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; env = { @@ -572,10 +565,6 @@ effectiveStdenv.mkDerivation { ] ++ optionals (enabledModules != [ ]) [ (cmakeFeature "BUILD_LIST" (concatStringsSep "," enabledModules)) - ] - # TODO: Clean up on `staging`. - ++ optionals effectiveStdenv.hostPlatform.isDarwin [ - (cmakeFeature "CMAKE_LINKER_TYPE" "LLD") ]; postBuild = optionalString enableDocs '' From 6d9191113982f171b72743e34723143d2bce95e0 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:10 +0100 Subject: [PATCH 23/49] Revert "swiftPackages.swift{,NoSwiftDriver}: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit eb22b856d1d0d35f75ebf991f9163b8d1d314b13. --- .../development/compilers/swift/swiftpm/default.nix | 5 ----- .../development/compilers/swift/wrapper/default.nix | 13 ------------- 2 files changed, 18 deletions(-) diff --git a/pkgs/development/compilers/swift/swiftpm/default.nix b/pkgs/development/compilers/swift/swiftpm/default.nix index 2d5db28d68c7..9d8e414b72c9 100644 --- a/pkgs/development/compilers/swift/swiftpm/default.nix +++ b/pkgs/development/compilers/swift/swiftpm/default.nix @@ -135,11 +135,6 @@ let # so we don't have to account for that scenario. "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; - - # TODO: Clean up on `staging`. - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_LDFLAGS = "-headerpad_max_install_names"; - }; } ); diff --git a/pkgs/development/compilers/swift/wrapper/default.nix b/pkgs/development/compilers/swift/wrapper/default.nix index 0bd4a818da6d..e446bec66868 100644 --- a/pkgs/development/compilers/swift/wrapper/default.nix +++ b/pkgs/development/compilers/swift/wrapper/default.nix @@ -5,10 +5,6 @@ useSwiftDriver ? true, swift-driver, clang, - - # TODO: Clean up on `staging`. - llvmPackages, - writeShellScriptBin, }: stdenv.mkDerivation ( @@ -94,15 +90,6 @@ stdenv.mkDerivation ( cp "$input" "$out/nix-support/$(basename "$input")" done fi - '' - # TODO: Clean up on `staging`. - + lib.optionalString stdenv.targetPlatform.isDarwin '' - printf "NIX_SWIFTFLAGS_COMPILE+=' -use-ld=lld -tools-directory %s'\n" \ - ${writeShellScriptBin "ld" '' - exec ${lib.getExe' llvmPackages.lld "ld64.lld"} "$@" - ''}/bin \ - >> $out/nix-support/setup-hook - printf '%s\n' ${lib.getBin llvmPackages.lld} >> $out/nix-support/propagated-build-inputs ''; passthru = { From ce07aaecd6ae79098599699db471fcada6a7f12e Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:12 +0100 Subject: [PATCH 24/49] Revert "gfxstream: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit ba224f14b0e34098f24c5e9fa2a3576d5632d1a3. --- pkgs/by-name/gf/gfxstream/package.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/by-name/gf/gfxstream/package.nix b/pkgs/by-name/gf/gfxstream/package.nix index 42f9ba41d58f..5ec352798319 100644 --- a/pkgs/by-name/gf/gfxstream/package.nix +++ b/pkgs/by-name/gf/gfxstream/package.nix @@ -13,8 +13,6 @@ vulkan-headers, vulkan-loader, libx11, - # TODO: Clean up on `staging`. - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -43,10 +41,6 @@ stdenv.mkDerivation (finalAttrs: { ninja pkg-config python3 - ] - # TODO: Clean up on `staging`. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = [ aemu @@ -66,8 +60,6 @@ stdenv.mkDerivation (finalAttrs: { "-framework QuartzCore" "-needed-lvulkan" ]; - # TODO: Clean up on `staging`. - NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; # dlopens libvulkan. From c331209980ea6072843f4691b76870bed8aae54d Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:14 +0100 Subject: [PATCH 25/49] Revert "livekit-libwebrtc: link with lld on darwin" The ld64 issue has been fixed. This reverts commit 7149c9fa371b483948da77550d66f70c265ac396. --- pkgs/by-name/li/livekit-libwebrtc/package.nix | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/li/livekit-libwebrtc/package.nix b/pkgs/by-name/li/livekit-libwebrtc/package.nix index b4cebbf58efd..f7e1fd2e88b3 100644 --- a/pkgs/by-name/li/livekit-libwebrtc/package.nix +++ b/pkgs/by-name/li/livekit-libwebrtc/package.nix @@ -7,8 +7,6 @@ fetchurl, fetchpatch, xcbuild, - lld, - llvm, python3, ninja, git, @@ -184,13 +182,7 @@ stdenv.mkDerivation { ln -sf ${lib.getExe gn} buildtools/mac/gn chmod +x build/toolchain/apple/linker_driver.py patchShebangs build/toolchain/apple/linker_driver.py - - # When 'use_lld=true' is set, llvm-ar is used instead of ar. - # The build config expects llvm-ar to be inside the provided clang base path, - # but this is not the case in nixpkgs. - substituteInPlace build/toolchain/apple/toolchain.gni \ - --replace-fail "/bin/cp -Rc" "cp -a" \ - --replace-fail '${"$"}{prefix}llvm-ar' '${lib.getExe' llvm "llvm-ar"}' + substituteInPlace build/toolchain/apple/toolchain.gni --replace-fail "/bin/cp -Rc" "cp -a" # nixpkgs calls the target "darwin" instead of "macos", and passing a different target # results in warnings by the nixpkgs compiler wrapper @@ -218,10 +210,7 @@ stdenv.mkDerivation { cpio pkg-config ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - xcbuild - lld - ]; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = [ nasm @@ -290,8 +279,7 @@ stdenv.mkDerivation { "rtc_enable_objc_symbol_export=true" "rtc_include_dav1d_in_internal_decoder_factory=true" "clang_use_chrome_plugins=false" - # ld64 traps on linking because of C++ hardening - "use_lld=true" + "use_lld=false" ''clang_base_path="${clang}"'' ]); @@ -309,12 +297,6 @@ stdenv.mkDerivation { "desktop_capture_objc" ]; - env = { - # ensure install_name_tool has enough space in binary headers - # to replace rpaths with very long nix store paths - NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; - }; - postBuild = lib.optionalString stdenv.hostPlatform.isLinux '' objcopy --redefine-syms="${boringSslSymbols}" "libwebrtc.so" From a54c484d7419ae66ccb087c601a397455d6cc46b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:15 +0100 Subject: [PATCH 26/49] Revert "kitty: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 83cc719d53c59fea985d96aaa0f9105b8b49c3fc. --- pkgs/by-name/ki/kitty/package.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/by-name/ki/kitty/package.nix b/pkgs/by-name/ki/kitty/package.nix index 9795d74cdc06..b9483acf8a76 100644 --- a/pkgs/by-name/ki/kitty/package.nix +++ b/pkgs/by-name/ki/kitty/package.nix @@ -45,8 +45,6 @@ makeBinaryWrapper, darwin, cairo, - # TODO: Clean up on `staging`. - llvmPackages, }: with python3Packages; @@ -119,8 +117,6 @@ buildPythonApplication rec { imagemagick libicns # For the png2icns tool. darwin.autoSignDarwinBinariesHook - # TODO: Clean up on `staging`. - llvmPackages.lld ] ++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner @@ -157,10 +153,6 @@ buildPythonApplication rec { CGO_ENABLED = 0; GOFLAGS = "-trimpath"; GOTOOLCHAIN = "local"; - } - # TODO: Clean up on `staging`. - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; configurePhase = '' From 6dfa35220cab1d9c0f7e1364cb3937adec845792 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:17 +0100 Subject: [PATCH 27/49] Revert "mpv-unwrapped: fix darwin build (fixes #540682)" The ld64 issue has been fixed. This reverts commit 1dbdb986bbaf6551ac3a97871b9b90bf16f44728. --- pkgs/by-name/mp/mpv-unwrapped/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/mp/mpv-unwrapped/package.nix b/pkgs/by-name/mp/mpv-unwrapped/package.nix index 924f515fff27..4333d1ce35f5 100644 --- a/pkgs/by-name/mp/mpv-unwrapped/package.nix +++ b/pkgs/by-name/mp/mpv-unwrapped/package.nix @@ -61,7 +61,6 @@ wayland-protocols, wayland-scanner, zimg, - llvmPackages, # Boolean alsaSupport ? stdenv.hostPlatform.isLinux, @@ -164,8 +163,6 @@ stdenv.mkDerivation (finalAttrs: { buildPackages.darwin.sigtool swift makeBinaryWrapper - # TODO: Remove once #536365 reaches this branch - llvmPackages.lld ] ++ lib.optionals waylandSupport [ wayland-scanner ]; @@ -236,9 +233,6 @@ stdenv.mkDerivation (finalAttrs: { # ./osdep/mac/swift.h:270:9: fatal error: '.../app_bridge_objc-1.pch' file not found env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin) { NIX_SWIFTFLAGS_COMPILE = "-disable-bridging-pch"; - - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; }; postBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' From 12301d74a0ed899e0cea420cf716319317310978 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:19 +0100 Subject: [PATCH 28/49] Revert "caffeine: fix darwin build (fixes #540657)" The ld64 issue has been fixed. This reverts commit de1fd69eb30dee555e9bbaec2837c5055710e61b. --- pkgs/by-name/ca/caffeine/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/ca/caffeine/package.nix b/pkgs/by-name/ca/caffeine/package.nix index 36a4aaa70e15..881d85276502 100644 --- a/pkgs/by-name/ca/caffeine/package.nix +++ b/pkgs/by-name/ca/caffeine/package.nix @@ -5,7 +5,6 @@ apple-sdk, darwin, xcbuildHook, - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -32,8 +31,6 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ xcbuildHook darwin.autoSignDarwinBinariesHook - # TODO: Remove once #536365 reaches this branch - llvmPackages.lld ]; buildInputs = [ @@ -45,9 +42,6 @@ stdenv.mkDerivation (finalAttrs: { "-configuration Release" ]; - # TODO: Remove once #536365 reaches this branch - env.NIX_CFLAGS_LINK = "-fuse-ld=lld"; - installPhase = '' runHook preInstall From d14250c1b0bc9a583a2597a27679d73bbf970882 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:21 +0100 Subject: [PATCH 29/49] Revert "qbittorrent: fix darwin build" The ld64 issue has been fixed. This reverts commit fac56b935339f50c6582b5fccf0bcf33d69b9741. --- pkgs/by-name/qb/qbittorrent/package.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkgs/by-name/qb/qbittorrent/package.nix b/pkgs/by-name/qb/qbittorrent/package.nix index 07f1fe49193e..671e1d0e3d2b 100644 --- a/pkgs/by-name/qb/qbittorrent/package.nix +++ b/pkgs/by-name/qb/qbittorrent/package.nix @@ -17,7 +17,6 @@ wrapGAppsHook3, zlib, nixosTests, - llvmPackages, }: stdenv.mkDerivation (finalAttrs: { @@ -36,10 +35,6 @@ stdenv.mkDerivation (finalAttrs: { pkg-config wrapGAppsHook3 qt6.wrapQtAppsHook - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # TODO: Remove once #536365 reaches this branch - llvmPackages.lld ]; buildInputs = [ @@ -65,11 +60,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals (!webuiSupport) [ "-DWEBUI=OFF" ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - qtWrapperArgs = lib.optionals trackerSearch [ "--prefix PATH : ${lib.makeBinPath [ python3 ]}" ]; dontWrapGApps = true; From 1077d6b0cd9569c66d51aaa8480bfc86ce6c2070 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:22 +0100 Subject: [PATCH 30/49] Revert "iamb: fix darwin build" The ld64 issue has been fixed. This reverts commit 8f575ecf14910e22d1bf6a41c3ad1b6c8af27533. --- pkgs/by-name/ia/iamb/package.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkgs/by-name/ia/iamb/package.nix b/pkgs/by-name/ia/iamb/package.nix index 59f21eb62b36..8a15554b29cf 100644 --- a/pkgs/by-name/ia/iamb/package.nix +++ b/pkgs/by-name/ia/iamb/package.nix @@ -6,8 +6,6 @@ writableTmpDirAsHomeHook, versionCheckHook, nix-update-script, - llvmPackages, - stdenv, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -29,17 +27,8 @@ rustPlatform.buildRustPackage (finalAttrs: { nativeBuildInputs = [ installShellFiles - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # TODO: Remove once #536365 reaches this branch - llvmPackages.lld ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - postInstall = '' installManPage $src/docs/iamb.{1,5} install -D $src/docs/iamb.svg -t $out/share/icons/hicolor/scalable/apps From 45ffb993fa878471256a11256487ba64240f7f9d Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:24 +0100 Subject: [PATCH 31/49] Revert "starship: fix build on Darwin" The ld64 issue has been fixed. This reverts commit 883e799eb2843d1438a5ce76ed8ac4a924cf6ce5. --- pkgs/by-name/st/starship/package.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/st/starship/package.nix b/pkgs/by-name/st/starship/package.nix index d5482bf24114..877f887a9569 100644 --- a/pkgs/by-name/st/starship/package.nix +++ b/pkgs/by-name/st/starship/package.nix @@ -3,7 +3,6 @@ stdenv, fetchFromGitHub, rustPlatform, - llvmPackages, installShellFiles, writableTmpDirAsHomeHook, gitMinimal, @@ -23,24 +22,13 @@ rustPlatform.buildRustPackage (finalAttrs: { hash = "sha256-pStNE8SMMVavL3ld6RO+5QQRJPXpqlU3asccS2tUoMQ="; }; - nativeBuildInputs = [ - installShellFiles - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ installShellFiles ]; buildInputs = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ writableTmpDirAsHomeHook ]; - env = { - TZDIR = "${tzdata}/share/zoneinfo"; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Work around ld64's libc++ hardening issue. - # - # TODO: Remove once #536365 reaches this branch. - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env.TZDIR = "${tzdata}/share/zoneinfo"; postInstall = '' presetdir=$out/share/starship/presets/ From ac9166993a6f1462efbd1da01e55b5589e0c6e3b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:26 +0100 Subject: [PATCH 32/49] Revert "picocrypt{,-ng}: fix build on darwin" The ld64 issue has been fixed. This reverts commit 53bd18aca0a74eae9553c36ecccb84211d75a206. --- pkgs/by-name/pi/picocrypt-ng/package.nix | 13 ++----------- pkgs/by-name/pi/picocrypt/package.nix | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/pi/picocrypt-ng/package.nix b/pkgs/by-name/pi/picocrypt-ng/package.nix index f3535dfa8f22..026dbbad8989 100644 --- a/pkgs/by-name/pi/picocrypt-ng/package.nix +++ b/pkgs/by-name/pi/picocrypt-ng/package.nix @@ -12,7 +12,6 @@ pkg-config, wrapGAppsHook3, writableTmpDirAsHomeHook, - llvmPackages, }: buildGoModule (finalAttrs: { @@ -50,9 +49,7 @@ buildGoModule (finalAttrs: { pkg-config wrapGAppsHook3 writableTmpDirAsHomeHook - ] - # TODO: Remove once #536365 reaches this branch - ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; + ]; # git ls-files doesn't work as source is not a git repo checkFlags = @@ -64,13 +61,7 @@ buildGoModule (finalAttrs: { in [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; - env = { - CGO_ENABLED = 1; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env.CGO_ENABLED = 1; postInstall = '' mv $out/bin/picocrypt $out/bin/picocrypt-ng-gui diff --git a/pkgs/by-name/pi/picocrypt/package.nix b/pkgs/by-name/pi/picocrypt/package.nix index 4728d400dc5c..cfa8906fdd91 100644 --- a/pkgs/by-name/pi/picocrypt/package.nix +++ b/pkgs/by-name/pi/picocrypt/package.nix @@ -11,7 +11,6 @@ gtk3, pkg-config, wrapGAppsHook3, - llvmPackages, }: buildGoModule (finalAttrs: { @@ -47,17 +46,9 @@ buildGoModule (finalAttrs: { copyDesktopItems pkg-config wrapGAppsHook3 - ] - # TODO: Remove once #536365 reaches this branch - ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; + ]; - env = { - CGO_ENABLED = 1; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env.CGO_ENABLED = 1; postInstall = '' mv $out/bin/Picocrypt $out/bin/picocrypt-gui From 0ae746de77e3776d2125a1aa4ea2f53746623989 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:28 +0100 Subject: [PATCH 33/49] Revert "imhex: fix build on darwin" The ld64 issue has been fixed. This reverts commit 1f6f094ec0e18408b25b9487d34b402e79cdebc7. --- pkgs/by-name/im/imhex/package.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/im/imhex/package.nix b/pkgs/by-name/im/imhex/package.nix index 0ce61eea2f86..7b9f98853290 100644 --- a/pkgs/by-name/im/imhex/package.nix +++ b/pkgs/by-name/im/imhex/package.nix @@ -23,7 +23,6 @@ nix-update-script, autoPatchelfHook, makeWrapper, - llvmPackages, }: let @@ -62,9 +61,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config makeWrapper ] - ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook - # TODO: Remove once #536365 reaches this branch - ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; + ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]; buildInputs = [ capstone @@ -106,13 +103,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "CMAKE_INSTALL_NAME_DIR" "@executable_path/../Frameworks") ]; - env = { - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; # Comment out fixup_bundle in PostprocessBundle.cmake as we are not building a standalone application postPatch = '' From 734bc6c4e9411321aeb2e29da318f3a9ea330516 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:29 +0100 Subject: [PATCH 34/49] Revert "R: fix build on darwin" The ld64 issue has been fixed. This reverts commit f03ea24eb13ee4d647def42e799ed0644e4d7ca8. --- pkgs/applications/science/math/R/default.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index f227a7f742f0..6376bf4f08e8 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -27,7 +27,6 @@ pkg-config, bison, which, - llvmPackages, jdk, blas, lapack, @@ -69,10 +68,7 @@ stdenv.mkDerivation (finalAttrs: { pkg-config tzdata which - ] - # TODO: Remove once #536365 reaches this branch - ++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.lld; - + ]; buildInputs = [ bzip2 gfortran @@ -130,11 +126,6 @@ stdenv.mkDerivation (finalAttrs: { dontDisableStatic = static; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - preConfigure = '' configureFlagsArray=( --disable-lto From 975a5cb35076e523cf2117fc8d3184562b284a0f Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:31 +0100 Subject: [PATCH 35/49] Revert "topgrade: fix Darwin build" The ld64 issue has been fixed. This reverts commit f93cef19e8c20f24cd5aff2617ac99917b489ea6. --- pkgs/by-name/to/topgrade/package.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/to/topgrade/package.nix b/pkgs/by-name/to/topgrade/package.nix index 45ef928a6052..c3609237d5a3 100644 --- a/pkgs/by-name/to/topgrade/package.nix +++ b/pkgs/by-name/to/topgrade/package.nix @@ -4,7 +4,6 @@ fetchFromGitHub, rustPlatform, installShellFiles, - llvmPackages, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -22,18 +21,14 @@ rustPlatform.buildRustPackage (finalAttrs: { nativeBuildInputs = [ installShellFiles - ] - # TODO: Remove once #536365 reaches this branch - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_COMPILE = toString [ + env.NIX_CFLAGS_COMPILE = toString ( + lib.optionals stdenv.hostPlatform.isDarwin [ "-framework" "AppKit" - ]; - # TODO: Remove once #536365 reaches this branch - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; + ] + ); postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd topgrade \ From bc6d2bc1aa75a53726132f6726ffa231036844fc Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:33 +0100 Subject: [PATCH 36/49] Revert "rectangle: fix darwin build (second attempt)" The ld64 issue has been fixed. This reverts commit ec3327048366853e58afb5132b0d9908f811cb1a. --- pkgs/by-name/re/rectangle/package.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/by-name/re/rectangle/package.nix b/pkgs/by-name/re/rectangle/package.nix index c0cd0994b03f..2726452ff546 100644 --- a/pkgs/by-name/re/rectangle/package.nix +++ b/pkgs/by-name/re/rectangle/package.nix @@ -199,11 +199,10 @@ stdenv.mkDerivation (finalAttrs: { ) masShortcutSources} nixLog "linking MASShortcut dylib" - # `-fuse-ld=lld`: fix for ld64 hardening issue - # TODO: Clean up on `staging` clang -dynamiclib "''${masObjFiles[@]}" \ -framework AppKit -framework Carbon -framework Foundation \ -install_name "@rpath/MASShortcut.framework/MASShortcut" \ + # TODO: Clean up on `staging` -fuse-ld=lld \ -o "$buildDir/libMASShortcut.dylib" From 27e7e37de42bd57c81a11482c0ba7a47475e39f1 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:34 +0100 Subject: [PATCH 37/49] Revert "rectangle: fix darwin build" The ld64 issue has been fixed. This reverts commit 08e2d92d786eb15eb97f9bb9a4c3d3136195c2f2. --- pkgs/by-name/re/rectangle/package.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/by-name/re/rectangle/package.nix b/pkgs/by-name/re/rectangle/package.nix index 2726452ff546..19438c2cba8d 100644 --- a/pkgs/by-name/re/rectangle/package.nix +++ b/pkgs/by-name/re/rectangle/package.nix @@ -5,8 +5,6 @@ darwin, actool, ibtool, - # TODO: Clean up on `staging` - llvmPackages, makeWrapper, nix-update-script, }: @@ -151,8 +149,6 @@ stdenv.mkDerivation (finalAttrs: { ibtool darwin.autoSignDarwinBinariesHook makeWrapper - # TODO: Clean up on `staging` - llvmPackages.lld ]; dontConfigure = true; @@ -165,8 +161,6 @@ stdenv.mkDerivation (finalAttrs: { commonSwiftFlags=( -O -disable-bridging-pch -Xlinker -platform_version -Xlinker macos -Xlinker 14.0 -Xlinker 26.0 - # TODO: Clean up on `staging` - -use-ld=lld ) nixLog "building Sparkle stub framework" @@ -202,8 +196,6 @@ stdenv.mkDerivation (finalAttrs: { clang -dynamiclib "''${masObjFiles[@]}" \ -framework AppKit -framework Carbon -framework Foundation \ -install_name "@rpath/MASShortcut.framework/MASShortcut" \ - # TODO: Clean up on `staging` - -fuse-ld=lld \ -o "$buildDir/libMASShortcut.dylib" rectSwiftFiles=() From 4378d0d124097a7c872518f81c25ff7f72da61dd Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:36 +0100 Subject: [PATCH 38/49] Revert "terminal-notifier: fix darwin build" The ld64 issue has been fixed. This reverts commit 1f1964ac3df2ff2966c91942898204e39cc449ad. --- pkgs/by-name/te/terminal-notifier/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/te/terminal-notifier/package.nix b/pkgs/by-name/te/terminal-notifier/package.nix index 59cd6469b99d..ecfea7c2fb1d 100644 --- a/pkgs/by-name/te/terminal-notifier/package.nix +++ b/pkgs/by-name/te/terminal-notifier/package.nix @@ -3,7 +3,6 @@ fetchFromGitHub, ibtool, lib, - llvmPackages, makeBinaryWrapper, stdenv, xcbuildHook, @@ -24,8 +23,6 @@ stdenv.mkDerivation (finalAttrs: { ibtool makeBinaryWrapper xcbuildHook - # TODO: Clean up on `staging` - llvmPackages.lld ]; buildInputs = [ @@ -39,9 +36,6 @@ stdenv.mkDerivation (finalAttrs: { "Release" ]; - # TODO: Clean up on `staging` - env.NIX_CFLAGS_LINK = "-fuse-ld=lld"; - installPhase = '' runHook preInstall From c0324ab3a33db96ec7776724a3c6f078dac1288b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:37 +0100 Subject: [PATCH 39/49] Revert "telegram-desktop: work around ld64 hardening issue" The ld64 issue has been fixed. This reverts commit f5616cc38c3ec227efa85d9f7c9195837efab8c3. --- .../telegram/telegram-desktop/unwrapped.nix | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix index e1072e07d6ea..7472cc1155db 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/unwrapped.nix @@ -34,7 +34,6 @@ libjxl, libicns, apple-sdk_15, - llvmPackages, nix-update-script, }: @@ -68,11 +67,6 @@ stdenv.mkDerivation (finalAttrs: { # to build bundled libdispatch clang gobject-introspection - ] - # Work around ld64's libc++ hardening issue causing Trace/BPT trap: 5 - # TODO: Remove once nixpkgs#536365 reaches this branch. - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - llvmPackages.lld ]; buildInputs = [ @@ -108,12 +102,6 @@ stdenv.mkDerivation (finalAttrs: { dontWrapQtApps = true; - # Work around ld64's libc++ hardening issue causing Trace/BPT trap: 5 - # TODO: Remove once nixpkgs#536365 reaches this branch. - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - cmakeFlags = [ # We're allowed to used the API ID of the Snap package: (lib.cmakeFeature "TDESKTOP_API_ID" "611335") From 7f3a48d8db1ab40fb8ff8884e767a5d328abfe41 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:39 +0100 Subject: [PATCH 40/49] Revert "blueutil: fix build by linking with lld" The ld64 issue has been fixed. This reverts commit 7168ff819ba911776e0bfd96ad949d05854339d7. --- pkgs/by-name/bl/blueutil/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/bl/blueutil/package.nix b/pkgs/by-name/bl/blueutil/package.nix index 6f13a65ab4f1..31d6eaf1cadd 100644 --- a/pkgs/by-name/bl/blueutil/package.nix +++ b/pkgs/by-name/bl/blueutil/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - llvmPackages, testers, nix-update-script, }: @@ -18,12 +17,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-Qw5c9dp7wpuOcQSLsg1pfJ+NbrEtme2o6nKD3Ba3A3M="; }; - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - nativeBuildInputs = [ llvmPackages.lld ]; - env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Werror -mmacosx-version-min=10.9 -framework Foundation -framework IOBluetooth"; - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - env.NIX_CFLAGS_LINK = "--ld-path=${lib.getExe' llvmPackages.lld "ld64.lld"}"; installPhase = '' runHook preInstall From 041ff67b5ec5c6129af8d995b6fe667049efc952 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:41 +0100 Subject: [PATCH 41/49] Revert "yabai: work around `ld64` hardening issue" The ld64 issue has been fixed. This reverts commit 0125c384a55ce6d6df59fd279edeaa787ff67bc6. --- pkgs/by-name/ya/yabai/package.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/by-name/ya/yabai/package.nix b/pkgs/by-name/ya/yabai/package.nix index 3f2e417939d3..e650f1b735f4 100644 --- a/pkgs/by-name/ya/yabai/package.nix +++ b/pkgs/by-name/ya/yabai/package.nix @@ -28,17 +28,12 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ installShellFiles xxd - # TODO: Clean up on `staging`. - llvmPackages.lld ]; buildInputs = [ apple-sdk_15 ]; - # TODO: Clean up on `staging`. - env.NIX_CFLAGS_LINK = "-fuse-ld=lld"; - # Upstream Makefile races clean-build against linking under parallel make. enableParallelBuilding = false; From 3bb4c65bd227287564913eabf63dbe48a197691e Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:42 +0100 Subject: [PATCH 42/49] Revert "qtspeech: fix build on Darwin" The ld64 issue has been fixed. This reverts commit 23c83f33eca0e330ce1304cc5d9fdfe8bad7b538. --- pkgs/development/libraries/qt-6/modules/qtspeech.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtspeech.nix b/pkgs/development/libraries/qt-6/modules/qtspeech.nix index f87953f6fe81..4867bcaf7ee9 100644 --- a/pkgs/development/libraries/qt-6/modules/qtspeech.nix +++ b/pkgs/development/libraries/qt-6/modules/qtspeech.nix @@ -2,7 +2,6 @@ qtModule, lib, stdenv, - llvmPackages, qtbase, qtmultimedia, pkg-config, @@ -13,10 +12,7 @@ qtModule { pname = "qtspeech"; - nativeBuildInputs = [ - pkg-config - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ flite alsa-lib @@ -26,9 +22,4 @@ qtModule { qtbase qtmultimedia ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Work around ld64's libc++ hardening issue. - # TODO: Remove once #536365 reaches this branch. - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; } From e25c85530fccecf4ebbff23537a8c948615ed01c Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:44 +0100 Subject: [PATCH 43/49] Revert "mactop: fix build on Darwin" The ld64 issue has been fixed. This reverts commit c0984aabedab91dd368f572dad3e7c6015abed3f. --- pkgs/by-name/ma/mactop/package.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkgs/by-name/ma/mactop/package.nix b/pkgs/by-name/ma/mactop/package.nix index 7b0a15ee20c7..e54d58aec534 100644 --- a/pkgs/by-name/ma/mactop/package.nix +++ b/pkgs/by-name/ma/mactop/package.nix @@ -2,7 +2,6 @@ lib, buildGoModule, fetchFromGitHub, - llvmPackages, versionCheckHook, nix-update-script, }: @@ -22,14 +21,6 @@ buildGoModule rec { proxyVendor = true; - nativeBuildInputs = [ llvmPackages.lld ]; - - env = { - # Work around ld64's libc++ hardening issue. - # TODO: Remove once #536365 reaches this branch. - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - ldflags = [ "-s" "-w" From b3d3cfb2709632a68d8293fc71b014a1c1f7e5bf Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:45 +0100 Subject: [PATCH 44/49] Revert "darktable: fix build on Darwin" The ld64 issue has been fixed. This reverts commit 3aad607343efb414fdf22fc1284c99c3f640ed3e. --- pkgs/by-name/da/darktable/package.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/by-name/da/darktable/package.nix b/pkgs/by-name/da/darktable/package.nix index d70fc071213a..c954ded2f1f6 100644 --- a/pkgs/by-name/da/darktable/package.nix +++ b/pkgs/by-name/da/darktable/package.nix @@ -103,8 +103,7 @@ stdenv.mkDerivation rec { pkg-config wrapGAppsHook3 saxon # Use Saxon instead of libxslt to fix XSLT generate-id() consistency issues - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + ]; buildInputs = [ SDL2 @@ -185,12 +184,6 @@ stdenv.mkDerivation rec { "-DUSE_KWALLET=OFF" ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Work around ld64's libc++ hardening issue. - # TODO: Remove once #536365 reaches this branch. - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - # darktable changed its rpath handling in commit # 83c70b876af6484506901e6b381304ae0d073d3c and as a result the # binaries can't find libdarktable.so, so change LD_LIBRARY_PATH in From cd3be32b01dbe24563d85040f3822315ef1bc230 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:47 +0100 Subject: [PATCH 45/49] Revert "noti: fix build on Darwin" The ld64 issue has been fixed. This reverts commit f2722a7fade8fdda3a0ee2d682c9009f543d2b06. --- pkgs/by-name/no/noti/package.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/by-name/no/noti/package.nix b/pkgs/by-name/no/noti/package.nix index a51018ab362d..264e5e34fbfe 100644 --- a/pkgs/by-name/no/noti/package.nix +++ b/pkgs/by-name/no/noti/package.nix @@ -1,9 +1,7 @@ { lib, - stdenv, buildGoModule, fetchFromCodeberg, - llvmPackages, installShellFiles, }: @@ -20,19 +18,10 @@ buildGoModule (finalAttrs: { vendorHash = null; - nativeBuildInputs = [ - installShellFiles - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ]; + nativeBuildInputs = [ installShellFiles ]; subPackages = [ "cmd/noti" ]; - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # Work around ld64's libc++ hardening issue. - # TODO: Remove once #536365 reaches this branch. - NIX_CFLAGS_LINK = "-fuse-ld=lld"; - }; - ldflags = [ "-s" "-w" From 1b1b7273ebba49ee0d1c7364a0bdda7293cce22b Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:49 +0100 Subject: [PATCH 46/49] Revert "lima: fix build on Darwin by linking with lld" The ld64 issue has been fixed. This reverts commit 5ce128c4d99036a72c5c4c2044a954ebcd8e0801. --- pkgs/by-name/li/lima/package.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkgs/by-name/li/lima/package.nix b/pkgs/by-name/li/lima/package.nix index 8d4d63925e30..c998ae4731b6 100644 --- a/pkgs/by-name/li/lima/package.nix +++ b/pkgs/by-name/li/lima/package.nix @@ -11,7 +11,6 @@ apple-sdk_15, withAdditionalGuestAgents ? false, lima-additional-guestagents, - llvmPackages, writableTmpDirAsHomeHook, versionCheckHook, testers, @@ -36,16 +35,7 @@ buildGoModule (finalAttrs: { # For checkPhase, and installPhase(required to build completion) writableTmpDirAsHomeHook ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.sigtool - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - llvmPackages.lld - ]; - - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { - NIX_CFLAGS_LINK = "-fuse-ld=${lib.getExe' llvmPackages.lld "ld64.lld"}"; - }; + ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ]; From be99681c30cadf7d2602835e8ba06fc581ddbb09 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:50 +0100 Subject: [PATCH 47/49] Revert "gtk4: fix build on darwin by linking with lld" The ld64 issue has been fixed. This reverts commit d846912fb0b533478ce337c08bd303c8635015cd. --- pkgs/by-name/gt/gtk4/package.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkgs/by-name/gt/gtk4/package.nix b/pkgs/by-name/gt/gtk4/package.nix index c92464ba6e3d..9b7807508a35 100644 --- a/pkgs/by-name/gt/gtk4/package.nix +++ b/pkgs/by-name/gt/gtk4/package.nix @@ -60,7 +60,6 @@ compileSchemas ? stdenv.hostPlatform.emulatorAvailable buildPackages, cups, libexecinfo, - llvmPackages, broadwaySupport ? true, testers, darwinMinVersionHook, @@ -131,10 +130,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals vulkanSupport [ shaderc # for glslc ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - llvmPackages.lld - ] ++ finalAttrs.setupHooks; buildInputs = [ @@ -226,10 +221,6 @@ stdenv.mkDerivation (finalAttrs: { } // lib.optionalAttrs stdenv.hostPlatform.isMusl { NIX_LDFLAGS = "-lexecinfo"; - } - // lib.optionalAttrs stdenv.hostPlatform.isDarwin { - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - NIX_CFLAGS_LINK = "--ld-path=${lib.getExe' llvmPackages.lld "ld64.lld"}"; }; postPatch = '' From 03741d43de97bfa594fab5ca8e29ffebe3f4e3fa Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:52 +0100 Subject: [PATCH 48/49] Revert "godot: fix build on darwin by linking with lld" The ld64 issue has been fixed. This reverts commit 0a930dd847a2a0d3e25ea733537138fbd64687db. --- pkgs/development/tools/godot/common.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/tools/godot/common.nix b/pkgs/development/tools/godot/common.nix index ac25ea3cfde6..1ff39286d4bf 100644 --- a/pkgs/development/tools/godot/common.nix +++ b/pkgs/development/tools/godot/common.nix @@ -38,7 +38,6 @@ libxkbcommon, libxrandr, libxrender, - llvmPackages, makeWrapper, mbedtls, miniupnpc, @@ -399,8 +398,6 @@ let "-I${lib.getDev harfbuzz-icu}/include/harfbuzz" "-I${lib.getDev recastnavigation}/include/recastnavigation" ]; - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - NIX_CFLAGS_LINK = "--ld-path=${lib.getExe' llvmPackages.lld "ld64.lld"}"; }; preConfigure = lib.optionalString (editor && withMono) '' @@ -646,8 +643,6 @@ let ++ lib.optionals stdenv.hostPlatform.isDarwin ( [ darwin.sigtool - # TODO: Remove when NixOS/nixpkgs#536365 reaches master. - llvmPackages.lld ] ++ lib.optionals (!editor) [ strip-nondeterminism From b5cd571e922633a37cbacd083308407b4d61d778 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 15 Jul 2026 03:19:54 +0100 Subject: [PATCH 49/49] Revert "stats: fix darwin build" The ld64 issue has been fixed. This reverts commit 490db099aa4330d875b6f6c0d02f57d3b7a29d98. --- pkgs/by-name/st/stats/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index 00ef020ed709..5168a4051808 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -3,8 +3,6 @@ swiftPackages, fetchFromGitHub, leveldb, - # TODO: Clean up on `staging`. - llvmPackages, perl, actool, makeWrapper, @@ -90,8 +88,6 @@ stdenv.mkDerivation (finalAttrs: { actool makeWrapper rcodesign - # TODO: Clean up on `staging`. - llvmPackages.lld ]; buildInputs = [ leveldb ]; @@ -130,8 +126,6 @@ stdenv.mkDerivation (finalAttrs: { # The Swift compiler in nixpkgs uses SDK 14 headers (which compile fine), but without # this flag the linker records SDK 14 and macOS withholds it (Liquid Glass) -Xlinker -platform_version -Xlinker macos -Xlinker 14.0 -Xlinker 26.0 - # TODO: Clean up on `staging` - -use-ld=lld ) buildFramework() {