top-level: Do stdenvOverrides in stage.nix even if crossSystem exists.
Instead, the cross stdenv will patch up the override field -- the complexity is now confined to the one place it matters.
This commit is contained in:
parent
3e197f7d81
commit
0f33b9f7f1
@ -24,6 +24,7 @@ in bootStages ++ [
|
|||||||
stdenv = vanillaPackages.stdenv // {
|
stdenv = vanillaPackages.stdenv // {
|
||||||
# Needed elsewhere as a hacky way to pass the target
|
# Needed elsewhere as a hacky way to pass the target
|
||||||
cross = crossSystem;
|
cross = crossSystem;
|
||||||
|
overrides = _: _: {};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -58,16 +58,11 @@ let
|
|||||||
|
|
||||||
aliases = self: super: import ./aliases.nix super;
|
aliases = self: super: import ./aliases.nix super;
|
||||||
|
|
||||||
# stdenvOverrides is used to avoid circular dependencies for building
|
# stdenvOverrides is used to avoid having multiple of versions
|
||||||
# the standard build environment. This mechanism uses the override
|
# of certain dependencies that were used in bootstrapping the
|
||||||
# mechanism to implement some staged compilation of the stdenv.
|
# standard environment.
|
||||||
#
|
|
||||||
# We don't want stdenv overrides in the case of cross-building, or
|
|
||||||
# otherwise the basic overridden packages will not be built with the
|
|
||||||
# crossStdenv adapter.
|
|
||||||
stdenvOverrides = self: super:
|
stdenvOverrides = self: super:
|
||||||
lib.optionalAttrs (crossSystem == null && super.stdenv ? overrides)
|
(super.stdenv.overrides or (_: _: {})) self super;
|
||||||
(super.stdenv.overrides self super);
|
|
||||||
|
|
||||||
# Allow packages to be overridden globally via the `packageOverrides'
|
# Allow packages to be overridden globally via the `packageOverrides'
|
||||||
# configuration option, which must be a function that takes `pkgs'
|
# configuration option, which must be a function that takes `pkgs'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user