Skip to content

Commit 2e7f4d3

Browse files
authoredMar 24, 2025
stdenvNoCC: drop extraBuildInputs on Darwin (#392695)
2 parents d5f30d9 + 4928668 commit 2e7f4d3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎pkgs/top-level/stage.nix

+9-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ in
5151

5252
, # `stdenv` without a C compiler. Passing in this helps avoid infinite
5353
# recursions, and may eventually replace passing in the full stdenv.
54-
stdenvNoCC ? stdenv.override { cc = null; hasCC = false; }
54+
stdenvNoCC ? (
55+
stdenv.override {
56+
cc = null;
57+
hasCC = false;
58+
}
59+
# Darwin doesn’t need an SDK in `stdenvNoCC`. Dropping it shrinks the closure
60+
# size down from ~1 GiB to ~83 MiB, which is a considerable reduction.
61+
// lib.optionalAttrs stdenv.hostPlatform.isDarwin { extraBuildInputs = [ ]; }
62+
)
5563

5664
, # This is used because stdenv replacement and the stdenvCross do benefit from
5765
# the overridden configuration provided by the user, as opposed to the normal

0 commit comments

Comments
 (0)
Failed to load comments.