diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 6bf42fe0f9ca..1dafc924454b 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -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 diff --git a/pkgs/stdenv/linux/stdenv-bootstrap-tools.nix b/pkgs/stdenv/linux/stdenv-bootstrap-tools.nix index a1bad3ee31d3..894c70389267 100644 --- a/pkgs/stdenv/linux/stdenv-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/stdenv-bootstrap-tools.nix @@ -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"; + }; + }; +})