top-level: Make stdenvCross which appears at first glance normal...

...but actually is weird just like the original
This commit is contained in:
John Ericson
2016-11-06 21:27:38 -08:00
parent eed34bd214
commit e22346c35e
4 changed files with 52 additions and 22 deletions
+6 -1
View File
@@ -12,6 +12,11 @@
# null, the default standard environment is used.
bootStdenv ? null
, # This is used because stdenv replacement and the stdenvCross do benefit from
# the overridden configuration provided by the user, as opposed to the normal
# bootstrapping stdenvs.
allowCustomOverrides ? (bootStdenv == null)
, # Non-GNU/Linux OSes are currently "impure" platforms, with their libc
# outside of the store. Thus, GCC, GFortran, & co. must always look for
# files in standard system directories (/usr/include, etc.)
@@ -109,7 +114,7 @@ let
# attributes to refer to the original attributes (e.g. "foo =
# ... pkgs.foo ...").
configOverrides = self: super:
lib.optionalAttrs (bootStdenv == null)
lib.optionalAttrs allowCustomOverrides
((config.packageOverrides or (super: {})) super);
# The complete chain of package set builders, applied from top to bottom