Merge staging-next into staging

This commit is contained in:
github-actions[bot]
2021-04-28 18:14:28 +00:00
committed by GitHub
36 changed files with 602 additions and 537 deletions
@@ -1,6 +1,6 @@
{ system, bootstrapFiles }:
{ system, bootstrapFiles, extraAttrs }:
derivation {
derivation ({
name = "bootstrap-tools";
builder = bootstrapFiles.busybox;
@@ -15,4 +15,4 @@ derivation {
langC = true;
langCC = true;
isGNU = true;
}
} // extraAttrs)
@@ -1,6 +1,6 @@
{ system, bootstrapFiles }:
{ system, bootstrapFiles, extraAttrs }:
derivation {
derivation ({
name = "bootstrap-tools";
builder = bootstrapFiles.busybox;
@@ -15,4 +15,4 @@ derivation {
langC = true;
langCC = true;
isGNU = true;
}
} // extraAttrs)
+10 -1
View File
@@ -61,7 +61,16 @@ let
# Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
bootstrapTools = import (if localSystem.libc == "musl" then ./bootstrap-tools-musl else ./bootstrap-tools) { inherit system bootstrapFiles; };
bootstrapTools = import (if localSystem.libc == "musl" then ./bootstrap-tools-musl else ./bootstrap-tools) {
inherit system bootstrapFiles;
extraAttrs = lib.optionalAttrs
(config.contentAddressedByDefault or false)
{
__contentAddressed = true;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
};
};
getLibc = stage: stage.${localSystem.libc};
+12 -3
View File
@@ -224,15 +224,24 @@ in with pkgs; rec {
bootstrapTools = runCommand "bootstrap-tools.tar.xz" {} "cp ${build}/on-server/bootstrap-tools.tar.xz $out";
};
bootstrapTools = if (stdenv.hostPlatform.libc == "glibc") then
bootstrapTools =
let extraAttrs = lib.optionalAttrs
(config.contentAddressedByDefault or false)
{
__contentAddressed = true;
outputHashAlgo = "sha256";
outputHashMode = "recursive";
};
in
if (stdenv.hostPlatform.libc == "glibc") then
import ./bootstrap-tools {
inherit (stdenv.buildPlatform) system; # Used to determine where to build
inherit bootstrapFiles;
inherit bootstrapFiles extraAttrs;
}
else if (stdenv.hostPlatform.libc == "musl") then
import ./bootstrap-tools-musl {
inherit (stdenv.buildPlatform) system; # Used to determine where to build
inherit bootstrapFiles;
inherit bootstrapFiles extraAttrs;
}
else throw "unsupported libc";