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 Jun 5, 2022
1 parent 122b693 commit 23ea8b3
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 @@ -351,6 +351,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 23ea8b3

Please sign in to comment.