nixos/make-system-tarball: extra commands to be executed before archive

release-18.03-flake
Jaka Hudoklin 2014-12-11 22:54:46 +01:00
parent 747488ae66
commit a782b890d5
2 changed files with 7 additions and 2 deletions

View File

@ -16,6 +16,9 @@
# symlink to `object' that will be added to the tarball.
storeContents ? []
# Extra commands to be executed before archiving files
, extraCommands ? ""
# Extra tar arguments
, extraArgs ? ""
}:
@ -25,7 +28,7 @@ stdenv.mkDerivation {
builder = ./make-system-tarball.sh;
buildInputs = [perl xz];
inherit fileName pathsFromGraph extraArgs;
inherit fileName pathsFromGraph extraArgs extraCommands;
# !!! should use XML.
sources = map (x: x.source) contents;

View File

@ -33,7 +33,7 @@ for i in $storePaths; do
done
# TODO tar ruxo
# TODO tar ruxo
# Also include a manifest of the closures in a format suitable for
# nix-store --load-db.
printRegistration=1 perl $pathsFromGraph closure-* > nix-path-registration
@ -48,6 +48,8 @@ for ((n = 0; n < ${#objects[*]}; n++)); do
fi
done
$extraCommands
mkdir -p $out/tarball
tar cvJf $out/tarball/$fileName.tar.xz * $extraArgs