freshBootstrapTools: extract bootstrapFiles as a passthru on its core derivation

This commit is contained in:
Philip Taron
2024-08-04 17:36:25 +02:00
committed by gador
parent 2a4cbf7837
commit 2f51e776b5
2 changed files with 13 additions and 8 deletions
+1 -6
View File
@@ -25,12 +25,7 @@ in
rec {
build = pkgs.callPackage ./stdenv-bootstrap-tools.nix { };
bootstrapFiles = {
bootstrapTools = "${build}/on-server/bootstrap-tools.tar.xz";
unpack = pkgs.runCommand "unpack" { allowedReferences = []; } ''
cp -r ${build}/unpack $out
'';
};
inherit (build) bootstrapFiles;
bootstrapTools = pkgs.callPackage ./bootstrap-tools.nix {
inherit (bootstrapFiles) bootstrapTools unpack;
+12 -2
View File
@@ -29,12 +29,13 @@
openssl,
patch,
pbzx,
runCommand,
writeText,
xar,
xz,
zlib,
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
name = "stdenv-bootstrap-tools";
nativeBuildInputs = [
@@ -290,7 +291,16 @@ stdenv.mkDerivation {
allowedReferences = [ ];
passthru = {
bootstrapFiles = {
bootstrapTools = "${finalAttrs.finalPackage}/on-server/bootstrap-tools.tar.xz";
unpack = runCommand "unpack" { allowedReferences = [ ]; } ''
cp -r ${finalAttrs.finalPackage}/unpack $out
'';
};
};
meta = {
maintainers = [ lib.maintainers.copumpkin ];
};
}
})