Move stdenvOverrides under pkgsWithOverrides.

This commit is contained in:
Nicolas B. Pierron 2016-03-20 19:26:57 +00:00
parent 5ae7356d42
commit aa7f0fc214

View File

@ -97,17 +97,6 @@ let
# ... pkgs.foo ..."). # ... pkgs.foo ...").
pkgs = pkgsWithOverrides (self: config.packageOverrides or (super: {})); pkgs = pkgsWithOverrides (self: config.packageOverrides or (super: {}));
# stdenvOverrides is used to avoid circular dependencies for building the
# standard build environment. This mechanism use the override mechanism to
# implement some staged compilation of the stdenv.
#
# We don't want stdenv overrides in the case of cross-building, or
# otherwise the basic overrided packages will not be built with the
# crossStdenv adapter.
stdenvOverrides = self: pkgs:
lib.optionalAttrs (crossSystem == null && pkgs.stdenv ? overrides)
(pkgs.stdenv.overrides pkgs);
# Return the complete set of packages, after applying the overrides # Return the complete set of packages, after applying the overrides
# returned by the `overrider' function (see above). Warning: this # returned by the `overrider' function (see above). Warning: this
# function is very expensive! # function is very expensive!
@ -132,6 +121,17 @@ let
aliases = self: super: import ./aliases.nix super; aliases = self: super: import ./aliases.nix super;
# stdenvOverrides is used to avoid circular dependencies for building
# the standard build environment. This mechanism use the override
# mechanism to implement some staged compilation of the stdenv.
#
# We don't want stdenv overrides in the case of cross-building, or
# otherwise the basic overrided packages will not be built with the
# crossStdenv adapter.
stdenvOverrides = self: super:
lib.optionalAttrs (crossSystem == null && super.stdenv ? overrides)
(super.stdenv.overrides super);
customOverrides = self: super: customOverrides = self: super:
lib.optionalAttrs (bootStdenv == null) (overrider self super); lib.optionalAttrs (bootStdenv == null) (overrider self super);
in in