1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge pull request #147544 from cab404/fix-stdenv-override

stdenv: move overriden stdenv in closure
This commit is contained in:
Guillaume Girol 2021-12-10 20:29:30 +00:00 committed by GitHub
commit 4a8f9970e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

2
.github/CODEOWNERS vendored
View file

@ -39,7 +39,7 @@
/pkgs/top-level/stage.nix @nbp @Ericson2314 @matthewbauer
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer @cab404
/pkgs/stdenv/cross @Ericson2314 @matthewbauer
/pkgs/build-support/cc-wrapper @Ericson2314 @orivej
/pkgs/build-support/bintools-wrapper @Ericson2314 @orivej

View file

@ -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