summary refs log tree commit diff
path: root/pkgs/top-level/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level/default.nix')
-rw-r--r--pkgs/top-level/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/top-level/default.nix b/pkgs/top-level/default.nix
index a1f3a1c38c5..31c51215676 100644
--- a/pkgs/top-level/default.nix
+++ b/pkgs/top-level/default.nix
@@ -23,6 +23,10 @@
 , # Allow a configuration attribute set to be passed in as an argument.
   config ? {}
 
+, # The standard environment for building packages, or rather a function
+  # providing it. See below for the arguments given to that function.
+  stdenv ? assert false; null
+
 , crossSystem ? null
 , platform ? assert false; null
 } @ args:
@@ -72,7 +76,7 @@ in let
     inherit lib nixpkgsFun;
   } // newArgs);
 
-  stdenv = import ../stdenv {
+  stdenv = (args.stdenv or (import ../stdenv)) {
     inherit lib allPackages system platform crossSystem config;
   };