Skip to content

Commit

Permalink
stdenv: label the ephemeral coreutils-stage4 package
Browse files Browse the repository at this point in the history
During stdenv bootstrapping, coreutils is built twice.  This makes
troubleshooting very difficult, because both packages have
name="coreutils", so it is a hassle to figure out "which coreutils am
I using / is not building"?

The first of these builds is used only in stage4, and is not part of
the final stdenv.  Let's label that one with a different `name`
attribute to make it obvious which is which.
  • Loading branch information
Adam Joseph committed Apr 20, 2022
1 parent cad68ef commit 9dd7908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ in
# stage5.gcc -> stage4.coreutils -> stage3.glibc -> bootstrap
gmp = super.gmp.override { stdenv = self.stdenv; };

# coreutils gets rebuilt both here and also in the final stage; we rename this one to avoid confusion
coreutils = super.coreutils.overrideAttrs (a: a // { name = "coreutils-stage4"; });

gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) {
nativeTools = false;
nativeLibc = false;
Expand Down

0 comments on commit 9dd7908

Please sign in to comment.