1 { stdenv, closureInfo, pixz
3 , # The file name of the resulting tarball
4 fileName ? "nixos-system-${stdenv.hostPlatform.system}"
6 , # The files and directories to be placed in the tarball.
7 # This is a list of attribute sets {source, target} where `source'
8 # is the file system object (regular file or directory) to be
9 # grafted in the file system at path `target'.
12 , # In addition to `contents', the closure of the store paths listed
13 # in `packages' are also placed in the Nix store of the tarball. This is
14 # a list of attribute sets {object, symlink} where `object' if a
15 # store path whose closure will be copied, and `symlink' is a
16 # symlink to `object' that will be added to the tarball.
19 # Extra commands to be executed before archiving files
24 # Command used for compression
25 , compressCommand ? "pixz -t"
26 # Extension for the compressed tarball
27 , compressionExtension ? ".xz"
28 # extra inputs, like the compressor to use
29 , extraInputs ? [ pixz ]
33 symlinks = map (x: x.symlink) storeContents;
34 objects = map (x: x.object) storeContents;
39 builder = ./make-system-tarball.sh;
40 nativeBuildInputs = extraInputs;
42 inherit fileName extraArgs extraCommands compressCommand;
45 sources = map (x: x.source) contents;
46 targets = map (x: x.target) contents;
49 inherit symlinks objects;
51 closureInfo = closureInfo {
55 extension = compressionExtension;