Skip to content

Commit

Permalink
top-level: Duplicate overlaying unless stdenvOverrides comes last
Browse files Browse the repository at this point in the history
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
  • Loading branch information
twhitehead authored and Ericson2314 committed Jan 31, 2018
1 parent afb87a6 commit fefa9ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/top-level/stage.nix
Expand Up @@ -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
Expand All @@ -125,9 +127,9 @@ let
splice
allPackages
aliases
stdenvOverrides
configOverrides
] ++ overlays);
] ++ overlays ++ [
stdenvOverrides ]);

in
# Return the complete set of packages.
Expand Down

0 comments on commit fefa9ef

Please sign in to comment.