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

+4 -1
nixos/lib/make-system-tarball.nix
···
# symlink to `object' that will be added to the tarball.
storeContents ? []
+
# Extra commands to be executed before archiving files
+
, extraCommands ? ""
+
# Extra tar arguments
, extraArgs ? ""
}:
···
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;
+3 -1
nixos/lib/make-system-tarball.sh
···
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
···
ln -s $object ./$symlink
fi
done
+
+
$extraCommands
mkdir -p $out/tarball