nixos/make-system-tarball: extra commands to be executed before archive
This commit is contained in:
parent
747488ae66
commit
a782b890d5
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user