about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2018-02-01 00:00:00 +0000
committerJan Malakhovski <oxij@oxij.org>2018-02-26 22:46:34 +0000
commite654d9a9ca55c301d1209cd0706c96b682d5baa2 (patch)
tree10a4b165efbd5d92484e6c32d95cddb5dc57197f /pkgs
parent522437362aa4e4cf9e9e50b50e560c87cd3dfc2d (diff)
downloadnixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.tar
nixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.tar.gz
nixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.tar.bz2
nixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.tar.lz
nixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.tar.xz
nixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.tar.zst
nixlib-e654d9a9ca55c301d1209cd0706c96b682d5baa2.zip
stdenv: linux: give distinct names to all the stages
Mainly for debugging.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/stdenv/linux/default.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index cd11dee9c82a..dcf6ecd1f26b 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -66,7 +66,7 @@ let
     let
 
       thisStdenv = import ../generic {
-        name = "stdenv-linux-boot";
+        name = "${name}-stdenv-linux";
         buildPlatform = localSystem;
         hostPlatform = localSystem;
         targetPlatform = localSystem;
@@ -88,6 +88,7 @@ let
         cc = if isNull prevStage.gcc-unwrapped
              then null
              else lib.makeOverridable (import ../../build-support/cc-wrapper) {
+          name = "${name}-gcc-wrapper";
           nativeTools = false;
           propagateDoc = false;
           nativeLibc = false;
@@ -99,7 +100,6 @@ let
           isGNU = true;
           libc = getLibc prevStage;
           inherit (prevStage) coreutils gnugrep;
-          name = name;
           stdenvNoCC = prevStage.ccWrapperStdenv;
         };
 
@@ -139,7 +139,7 @@ in
   # Build a dummy stdenv with no GCC or working fetchurl.  This is
   # because we need a stdenv to build the GCC wrapper and fetchurl.
   (prevStage: stageFun prevStage {
-    name = null;
+    name = "bootstrap-stage0";
 
     overrides = self: super: {
       # We thread stage0's stdenv through under this name so downstream stages
@@ -153,7 +153,7 @@ in
       # create a dummy Glibc here, which will be used in the stdenv of
       # stage1.
       ${localSystem.libc} = self.stdenv.mkDerivation {
-        name = "bootstrap-${localSystem.libc}";
+        name = "bootstrap-stage0-${localSystem.libc}";
         buildCommand = ''
           mkdir -p $out
           ln -s ${bootstrapTools}/lib $out/lib
@@ -165,13 +165,13 @@ in
       };
       gcc-unwrapped = bootstrapTools;
       binutils = import ../../build-support/bintools-wrapper {
+        name = "bootstrap-stage0-binutils-wrapper";
         nativeTools = false;
         nativeLibc = false;
         buildPackages = { };
         libc = getLibc self;
         inherit (self) stdenvNoCC coreutils gnugrep;
         bintools = bootstrapTools;
-        name = "bootstrap-binutils-wrapper";
       };
       coreutils = bootstrapTools;
       gnugrep = bootstrapTools;
@@ -190,7 +190,7 @@ in
   # simply re-export those packages in the middle stage(s) using the
   # overrides attribute and the inherit syntax.
   (prevStage: stageFun prevStage {
-    name = "bootstrap-gcc-wrapper";
+    name = "bootstrap-stage1";
 
     # Rebuild binutils to use from stage2 onwards.
     overrides = self: super: {
@@ -214,7 +214,7 @@ in
   # 2nd stdenv that contains our own rebuilt binutils and is used for
   # compiling our own Glibc.
   (prevStage: stageFun prevStage {
-    name = "bootstrap-gcc-wrapper";
+    name = "bootstrap-stage2";
 
     overrides = self: super: {
       inherit (prevStage)
@@ -235,7 +235,7 @@ in
   # one uses the rebuilt Glibc from stage2.  It still uses the recent
   # binutils and rest of the bootstrap tools, including GCC.
   (prevStage: stageFun prevStage {
-    name = "bootstrap-gcc-wrapper";
+    name = "bootstrap-stage3";
 
     overrides = self: super: rec {
       inherit (prevStage)
@@ -263,7 +263,7 @@ in
   # Construct a fourth stdenv that uses the new GCC.  But coreutils is
   # still from the bootstrap tools.
   (prevStage: stageFun prevStage {
-    name = "";
+    name = "bootstrap-stage4";
 
     overrides = self: super: {
       # Zlib has to be inherited and not rebuilt in this stage,
@@ -292,7 +292,6 @@ in
         bintools = self.binutils;
         libc = getLibc self;
         inherit (self) stdenvNoCC coreutils gnugrep;
-        name = "";
         shell = self.bash + "/bin/bash";
       };
     };
@@ -311,6 +310,8 @@ in
   (prevStage: {
     inherit config overlays;
     stdenv = import ../generic rec {
+      name = "stdenv-linux";
+
       buildPlatform = localSystem;
       hostPlatform = localSystem;
       targetPlatform = localSystem;