bootstrap-tools: Add bootstrapFiles argument
I was having a hard time testing new bootstrapFiles because `make-bootstrap-tools.nix` imports `pkgspath` but does not pass anything but the current system. This is merely for convenience and I'm not entirely certain it's a sensible thing to do, maybe generating new bootstrapFiles while overriding the current bootstrapFiles isn't something you're supposed to do?
This commit is contained in:
parent
7da313e10a
commit
3b8782a806
|
@ -1,10 +1,17 @@
|
|||
{ pkgspath ? ../../.., test-pkgspath ? pkgspath, system ? builtins.currentSystem, crossSystem ? null }:
|
||||
{ pkgspath ? ../../.., test-pkgspath ? pkgspath
|
||||
, system ? builtins.currentSystem, crossSystem ? null, bootstrapFiles ? null
|
||||
}:
|
||||
|
||||
let
|
||||
pkgs = import pkgspath ({ inherit system; } // (if (crossSystem != null) then { inherit crossSystem; } else {}));
|
||||
in
|
||||
|
||||
with pkgs;
|
||||
let cross = if crossSystem != null
|
||||
then { inherit crossSystem; }
|
||||
else {};
|
||||
custom-bootstrap = if bootstrapFiles != null
|
||||
then { stdenvStages = args:
|
||||
let args' = args // { bootstrapFiles = bootstrapFiles; };
|
||||
in (import "${pkgspath}/pkgs/stdenv/darwin" args').stagesDarwin;
|
||||
}
|
||||
else {};
|
||||
in with import pkgspath ({ inherit system; } // cross // custom-bootstrap);
|
||||
|
||||
let
|
||||
llvmPackageSet = if stdenv.hostPlatform.isAarch64 then "llvmPackages_11" else "llvmPackages_7";
|
||||
|
|
Loading…
Reference in a new issue