linux stdenv: Avoid assert false
On one hand, don't want to pass garbage that affects hash, on the other hand footguns are bad. Now, factored out the derivation so only need to pass in what is used.
This commit is contained in:
parent
670256dc39
commit
7960a1b1b8
18
pkgs/stdenv/linux/bootstrap-tools/default.nix
Normal file
18
pkgs/stdenv/linux/bootstrap-tools/default.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ system, bootstrapFiles }:
|
||||||
|
|
||||||
|
derivation {
|
||||||
|
name = "bootstrap-tools";
|
||||||
|
|
||||||
|
builder = bootstrapFiles.busybox;
|
||||||
|
|
||||||
|
args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ];
|
||||||
|
|
||||||
|
tarball = bootstrapFiles.bootstrapTools;
|
||||||
|
|
||||||
|
inherit system;
|
||||||
|
|
||||||
|
# Needed by the GCC wrapper.
|
||||||
|
langC = true;
|
||||||
|
langCC = true;
|
||||||
|
isGNU = true;
|
||||||
|
}
|
@ -37,22 +37,7 @@ rec {
|
|||||||
|
|
||||||
|
|
||||||
# Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
|
# Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
|
||||||
bootstrapTools = derivation {
|
bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; };
|
||||||
name = "bootstrap-tools";
|
|
||||||
|
|
||||||
builder = bootstrapFiles.busybox;
|
|
||||||
|
|
||||||
args = [ "ash" "-e" ./scripts/unpack-bootstrap-tools.sh ];
|
|
||||||
|
|
||||||
tarball = bootstrapFiles.bootstrapTools;
|
|
||||||
|
|
||||||
inherit system;
|
|
||||||
|
|
||||||
# Needed by the GCC wrapper.
|
|
||||||
langC = true;
|
|
||||||
langCC = true;
|
|
||||||
isGNU = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# This function builds the various standard environments used during
|
# This function builds the various standard environments used during
|
||||||
|
@ -173,16 +173,7 @@ rec {
|
|||||||
bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz";
|
bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz";
|
||||||
};
|
};
|
||||||
|
|
||||||
bootstrapTools = (import ./default.nix {
|
bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; };
|
||||||
inherit system bootstrapFiles;
|
|
||||||
|
|
||||||
lib = assert false; null;
|
|
||||||
allPackages = assert false; null;
|
|
||||||
|
|
||||||
platform = assert false; null;
|
|
||||||
crossSystem = null;
|
|
||||||
config = assert false; null;
|
|
||||||
}).bootstrapTools;
|
|
||||||
|
|
||||||
test = derivation {
|
test = derivation {
|
||||||
name = "test-bootstrap-tools";
|
name = "test-bootstrap-tools";
|
||||||
|
Loading…
Reference in New Issue
Block a user