freshBootstrapTools: unify glibc and musl into the same directory
CI required that I `nixfmt` them at the same time.
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
{ system, bootstrapFiles, extraAttrs }:
|
||||
|
||||
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;
|
||||
hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" "trivialautovarinit" ];
|
||||
} // extraAttrs)
|
||||
@@ -1,24 +0,0 @@
|
||||
{ system, bootstrapFiles, extraAttrs }:
|
||||
|
||||
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;
|
||||
hardeningUnsupportedFlags = [
|
||||
"fortify3"
|
||||
"stackclashprotection"
|
||||
"trivialautovarinit"
|
||||
"zerocallusedregs"
|
||||
];
|
||||
} // extraAttrs)
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
system,
|
||||
bootstrapFiles,
|
||||
extraAttrs,
|
||||
}:
|
||||
|
||||
derivation (
|
||||
{
|
||||
name = "bootstrap-tools";
|
||||
|
||||
builder = bootstrapFiles.busybox;
|
||||
|
||||
args = [
|
||||
"ash"
|
||||
"-e"
|
||||
./glibc/unpack-bootstrap-tools.sh
|
||||
];
|
||||
|
||||
tarball = bootstrapFiles.bootstrapTools;
|
||||
|
||||
inherit system;
|
||||
|
||||
# Needed by the GCC wrapper.
|
||||
langC = true;
|
||||
langCC = true;
|
||||
isGNU = true;
|
||||
hardeningUnsupportedFlags = [
|
||||
"fortify3"
|
||||
"stackclashprotection"
|
||||
"trivialautovarinit"
|
||||
"zerocallusedregs"
|
||||
];
|
||||
}
|
||||
// extraAttrs
|
||||
)
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
system,
|
||||
bootstrapFiles,
|
||||
extraAttrs,
|
||||
}:
|
||||
|
||||
derivation (
|
||||
{
|
||||
name = "bootstrap-tools";
|
||||
|
||||
builder = bootstrapFiles.busybox;
|
||||
|
||||
args = [
|
||||
"ash"
|
||||
"-e"
|
||||
./musl/unpack-bootstrap-tools.sh
|
||||
];
|
||||
|
||||
tarball = bootstrapFiles.bootstrapTools;
|
||||
|
||||
inherit system;
|
||||
|
||||
# Needed by the GCC wrapper.
|
||||
langC = true;
|
||||
langCC = true;
|
||||
isGNU = true;
|
||||
hardeningUnsupportedFlags = [
|
||||
"fortify3"
|
||||
"zerocallusedregs"
|
||||
"trivialautovarinit"
|
||||
];
|
||||
}
|
||||
// extraAttrs
|
||||
)
|
||||
@@ -139,7 +139,7 @@ let
|
||||
|
||||
|
||||
# Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
|
||||
bootstrapTools = (import (if localSystem.libc == "musl" then ./bootstrap-tools-musl else ./bootstrap-tools) {
|
||||
bootstrapTools = (import (if localSystem.libc == "musl" then ./bootstrap-tools/musl.nix else ./bootstrap-tools/glibc.nix) {
|
||||
inherit system bootstrapFiles;
|
||||
extraAttrs = lib.optionalAttrs config.contentAddressedByDefault {
|
||||
__contentAddressed = true;
|
||||
|
||||
@@ -59,12 +59,12 @@ rec {
|
||||
};
|
||||
in
|
||||
if (stdenv.hostPlatform.libc == "glibc") then
|
||||
import ./bootstrap-tools {
|
||||
import ./bootstrap-tools/glibc.nix {
|
||||
inherit (stdenv.buildPlatform) system; # Used to determine where to build
|
||||
inherit bootstrapFiles extraAttrs;
|
||||
}
|
||||
else if (stdenv.hostPlatform.libc == "musl") then
|
||||
import ./bootstrap-tools-musl {
|
||||
import ./bootstrap-tools/musl.nix {
|
||||
inherit (stdenv.buildPlatform) system; # Used to determine where to build
|
||||
inherit bootstrapFiles extraAttrs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user