stdenv: move overriden stdenv in closure
Before that, base stdenv passed non-makeOverridable version of itself inside. This cause it to be lost on package-name.stdenv.
This commit is contained in:
parent
70c97b9385
commit
523c701c0b
1 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
let lib = import ../../../lib; in lib.makeOverridable (
|
||||
let lib = import ../../../lib; stdenv-overridable = lib.makeOverridable (
|
||||
|
||||
{ name ? "stdenv", preHook ? "", initialPath
|
||||
argsStdenv@{ name ? "stdenv", preHook ? "", initialPath
|
||||
|
||||
, # If we don't have a C compiler, we might either have `cc = null` or `cc =
|
||||
# throw ...`, but if we do have a C compiler we should definiely have `cc !=
|
||||
|
@ -81,8 +81,10 @@ let
|
|||
|
||||
defaultBuildInputs = extraBuildInputs;
|
||||
|
||||
stdenv = (stdenv-overridable argsStdenv);
|
||||
|
||||
# The stdenv that we are producing.
|
||||
stdenv =
|
||||
in
|
||||
derivation (
|
||||
lib.optionalAttrs (allowedRequisites != null) {
|
||||
allowedRequisites = allowedRequisites
|
||||
|
@ -172,6 +174,5 @@ let
|
|||
# "lift" packages like curl from the final stdenv for Linux to
|
||||
# all-packages.nix for that platform (meaning that it has a line
|
||||
# like curl = if stdenv ? curl then stdenv.curl else ...).
|
||||
// extraAttrs;
|
||||
|
||||
in stdenv)
|
||||
// extraAttrs
|
||||
); in stdenv-overridable
|
||||
|
|
Loading…
Reference in a new issue