From 2d7356f0ca102f28277c5244b73363ccfb5eba40 Mon Sep 17 00:00:00 2001 From: etrobert-bot Date: Wed, 8 Jul 2026 13:14:29 +0200 Subject: [PATCH] fix(aaron): drop compiler-rt 18 darwin overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing in aaron's closure references llvmPackages_18 anymore — the system is on LLVM 21.1.8 — so the NixOS/nixpkgs#480849 workaround patches a derivation nobody builds. Verified on aaron: with the overlay deleted, `nix build .#darwinConfigurations.aaron.config.system.build.toplevel` dry-run shows only the toplevel itself and the build succeeds. Co-Authored-By: Claude Fable 5 --- modules/hosts/aaron/configuration.nix | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/modules/hosts/aaron/configuration.nix b/modules/hosts/aaron/configuration.nix index ab4bd635..c7acebac 100644 --- a/modules/hosts/aaron/configuration.nix +++ b/modules/hosts/aaron/configuration.nix @@ -15,32 +15,6 @@ let inherit (pkgs.stdenv.hostPlatform) system; inherit (self.packages.${system}) zsh-wrapped; - - # Workaround for NixOS/nixpkgs#480849: building llvmPackages_18.compiler-rt - # on Darwin fails because Apple SDK 26.4 ships libc++ 21, which dropped the - # fallbacks for __builtin_ctzg/__builtin_clzg — builtins that Clang 18 does - # not recognize. Mirror the fix from NixOS/nixpkgs#523142 by disabling the - # C++ components of compiler-rt 18 here. - # - # TODO: remove this overlay once nixos-unstable advances past the fix. - # Trigger: NixOS/nixpkgs#523142 (or its replacement) is merged AND lands in - # nixos-unstable. Verify by deleting the overlay block below and running - # `nix build .#darwinConfigurations.aaron.system` — if it succeeds, delete - # for good. If it still errors with `__builtin_ctzg`, keep the overlay. - compilerRtOverlay = _final: prev: { - llvmPackages_18 = prev.llvmPackages_18.overrideScope ( - _llvmFinal: llvmPrev: { - compiler-rt-libc = llvmPrev.compiler-rt-libc.overrideAttrs (old: { - cmakeFlags = (old.cmakeFlags or [ ]) ++ [ - (lib.cmakeBool "COMPILER_RT_BUILD_XRAY" false) - (lib.cmakeBool "COMPILER_RT_BUILD_LIBFUZZER" false) - (lib.cmakeBool "COMPILER_RT_BUILD_MEMPROF" false) - (lib.cmakeBool "COMPILER_RT_BUILD_ORC" false) - ]; - }); - } - ); - }; in { allowedUnfreePackages = [ @@ -91,10 +65,6 @@ in networking.hostName = "aaron"; networking.computerName = "aaron"; - nixpkgs.overlays = [ - compilerRtOverlay - ]; - system = { primaryUser = "soft";