summary refs log tree commit diff
path: root/pkgs/top-level/stage.nix
diff options
context:
space:
mode:
authorTyson Whitehead <twhitehead@gmail.com>2018-01-27 10:11:26 -0500
committerJohn Ericson <Ericson2314@yahoo.com>2018-01-31 00:16:27 -0500
commitfefa9ef756298e6863ece2e93bd057124b78452f (patch)
treeccd28d73fe246c0d786f94d94173aea7c9059daf /pkgs/top-level/stage.nix
parentafb87a66b39df4ed1f71f4d42f96f5482ece32f3 (diff)
downloadnixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.tar
nixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.tar.gz
nixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.tar.bz2
nixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.tar.lz
nixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.tar.xz
nixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.tar.zst
nixpkgs-fefa9ef756298e6863ece2e93bd057124b78452f.zip
top-level: Duplicate overlaying unless stdenvOverrides comes last
The stdenvOverrides overlay is used to bring packages forward during
bootstrapping via stdenv.overrides.  These packages have already had
the overlays applied to them in the previous boostrapping stage.  If
stdenvOverrides is not last in the overlays stack, all remaining
overlays will windup being applied again to these packages.

closes #34086
Diffstat (limited to 'pkgs/top-level/stage.nix')
-rw-r--r--pkgs/top-level/stage.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix
index 7cddc664570..de676c5a421 100644
--- a/pkgs/top-level/stage.nix
+++ b/pkgs/top-level/stage.nix
@@ -116,7 +116,9 @@ let
     lib.optionalAttrs allowCustomOverrides
       ((config.packageOverrides or (super: {})) super);
 
-  # The complete chain of package set builders, applied from top to bottom
+  # The complete chain of package set builders, applied from top to bottom.
+  # stdenvOverlays must be last as it brings package forward from the
+  # previous bootstrapping phases which have already been overlayed.
   toFix = lib.foldl' (lib.flip lib.extends) (self: {}) ([
     stdenvBootstappingAndPlatforms
     platformCompat
@@ -125,9 +127,9 @@ let
     splice
     allPackages
     aliases
-    stdenvOverrides
     configOverrides
-  ] ++ overlays);
+  ] ++ overlays ++ [
+    stdenvOverrides ]);
 
 in
   # Return the complete set of packages.