freshBootstrapTools.build: put bootstrapFiles into stdenv-bootstrap-tools.nix

This commit is contained in:
Philip Taron
2024-07-27 13:02:16 -07:00
parent 67a5dcdc41
commit fd5887f5d0
2 changed files with 14 additions and 7 deletions
+1 -5
View File
@@ -47,11 +47,7 @@ in with pkgs; rec {
inherit bootBinutils coreutilsMinimal tarMinimal busyboxMinimal bootGCC libc patchelf;
};
bootstrapFiles = {
# Make them their own store paths to test that busybox still works when the binary is named /nix/store/HASH-busybox
busybox = runCommand "busybox" {} "cp ${build}/on-server/busybox $out";
bootstrapTools = runCommand "bootstrap-tools.tar.xz" {} "cp ${build}/on-server/bootstrap-tools.tar.xz $out";
};
inherit (build) bootstrapFiles;
bootstrapTools =
let extraAttrs = lib.optionalAttrs
+13 -2
View File
@@ -23,6 +23,7 @@
mpfr,
patch,
patchelf,
runCommand,
tarMinimal,
zlib,
}:
@@ -30,7 +31,7 @@ let
# ${libc.src}/sysdeps/unix/sysv/linux/loongarch/lp64/libnsl.abilist does not exist!
withLibnsl = !stdenv.hostPlatform.isLoongArch64;
in
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
name = "stdenv-bootstrap-tools";
meta = {
@@ -208,4 +209,14 @@ stdenv.mkDerivation {
# that we can safely copy them out of the store and to other
# locations in the store.
allowedReferences = [ ];
}
passthru = {
bootstrapFiles = {
# Make them their own store paths to test that busybox still works when the binary is named /nix/store/HASH-busybox
busybox = runCommand "busybox" { } "cp ${finalAttrs.finalPackage}/on-server/busybox $out";
bootstrapTools =
runCommand "bootstrap-tools.tar.xz" { }
"cp ${finalAttrs.finalPackage}/on-server/bootstrap-tools.tar.xz $out";
};
};
})