summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Girol <symphorien@users.noreply.github.com>2022-01-22 15:43:20 +0000
committerGitHub <noreply@github.com>2022-01-22 15:43:20 +0000
commitb2d0283ab12dea492cd1453b9a99e0580c29318a (patch)
treee21c461df14681c5b6d49a2d08da73d17e25b836
parentMerge pull request #156166 from NixOS/backport-156156-to-release-21.11 (diff)
parentCODEOWNERS: added cab404 (diff)
downloadnixpkgs-b2d0283ab12dea492cd1453b9a99e0580c29318a.tar.gz
Merge pull request #154652 from NixOS/backport-147544-to-release-21.11
[Backport release-21.11] stdenv: move overriden stdenv in closure
-rw-r--r--.github/CODEOWNERS2
-rw-r--r--pkgs/stdenv/generic/default.nix13
2 files changed, 8 insertions, 7 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 6d1b0c7b8640..4b3109d449db 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -32,7 +32,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
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index d7fb1b0ba063..49ebc67f854e 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -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