top-level: Allow manually specifying a stdenv, and fix stdenv tests
- The darwin test can now force the use of the freshly-booted darwin stdenv - The linux test now passes enough dummy arguments This may make debugging harder, if so, check out #20889
This commit is contained in:
parent
4751d9e5ad
commit
5c6234a7d3
@ -332,10 +332,10 @@ in rec {
|
||||
};
|
||||
|
||||
# The ultimate test: bootstrap a whole stdenv from the tools specified above and get a package set out of it
|
||||
test-pkgs = let
|
||||
stdenv = import (test-pkgspath + "/pkgs/stdenv/darwin") { inherit system bootstrapFiles; };
|
||||
in import test-pkgspath {
|
||||
test-pkgs = import test-pkgspath {
|
||||
inherit system;
|
||||
bootStdenv = stdenv.stdenvDarwin;
|
||||
stdenv = args: let
|
||||
args' = args // { inherit bootstrapFiles; };
|
||||
in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stdenvDarwin;
|
||||
};
|
||||
}
|
||||
|
@ -175,6 +175,13 @@ rec {
|
||||
|
||||
bootstrapTools = (import ./default.nix {
|
||||
inherit system bootstrapFiles;
|
||||
|
||||
lib = assert false; null;
|
||||
allPackages = assert false; null;
|
||||
|
||||
platform = assert false; null;
|
||||
crossSystem = assert false; null;
|
||||
config = assert false; null;
|
||||
}).bootstrapTools;
|
||||
|
||||
test = derivation {
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user