From fa7fbd4ac9c5e4e52a35ce200d5dd43b1e35d5d6 Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 18 Feb 2026 04:24:03 +0000 Subject: [PATCH] darwin.Csu: drop --- .../ap/apple-sdk/common/propagate-inputs.nix | 18 +++++++----------- pkgs/stdenv/darwin/default.nix | 2 -- pkgs/top-level/darwin-aliases.nix | 1 + 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix index f9551b5b9bad..f6e9cf4e2ef2 100644 --- a/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix +++ b/pkgs/by-name/ap/apple-sdk/common/propagate-inputs.nix @@ -48,17 +48,13 @@ in self: super: { # These packages are propagated only because other platforms include them in their libc (or otherwise by default). # Reducing the number of special cases required to support Darwin makes supporting it easier for package authors. - propagatedBuildInputs = - super.propagatedBuildInputs or [ ] - ++ [ - libiconv - darwin.libresolv - darwin.libsbuf - # Shipped with the SDK only as a library with no headers - (lib.getLib darwin.libutil) - ] - # x86_64-darwin links the object files from Csu when targeting very old releases - ++ lib.optionals stdenvNoCC.hostPlatform.isx86_64 [ darwin.Csu ]; + propagatedBuildInputs = super.propagatedBuildInputs or [ ] ++ [ + libiconv + darwin.libresolv + darwin.libsbuf + # Shipped with the SDK only as a library with no headers + (lib.getLib darwin.libutil) + ]; # The Darwin module for Swift requires certain headers to be included in the SDK (and not just be propagated). buildPhase = super.buildPhase or "" + '' diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index f98c8ce0a53d..b19cdcc54de2 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -285,7 +285,6 @@ let }; sdkDarwinPackages = prevStage: { inherit (prevStage.darwin) - Csu adv_cmds copyfile libiconv @@ -1059,7 +1058,6 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.updateAutotoolsGnuConfigScriptsHook.gnu_config ] - ++ lib.optionals localSystem.isx86_64 [ prevStage.darwin.Csu ] ++ (with prevStage.darwin; [ binutils binutils.bintools diff --git a/pkgs/top-level/darwin-aliases.nix b/pkgs/top-level/darwin-aliases.nix index 2d4608cc2201..96aab9d0af29 100644 --- a/pkgs/top-level/darwin-aliases.nix +++ b/pkgs/top-level/darwin-aliases.nix @@ -108,6 +108,7 @@ stubs ### C ### + Csu = throw "darwin.Csu has been removed, as it was only used on `x86_64-darwin`, which is no longer supported"; # added 2026-06-26 cctools = pkgs.cctools; # added 2024-07-17 cctools-apple = pkgs.cctools; # added 2024-07-01 cctools-llvm = pkgs.cctools; # added 2024-07-01