10 # Remove the initial slash from a path, since genisofs likes it that way.
13 if test "${res:0:1}" = /; then res
=${res:1}; fi
16 # Add the individual files.
17 for ((i
= 0; i
< ${#targets_[@]}; i
++)); do
18 stripSlash
"${targets_[$i]}"
19 mkdir
-p "$(dirname "$res")"
20 cp -a "${sources_[$i]}" "$res"
24 # Add the closures of the top-level store objects.
27 for i
in $
(< $closureInfo/store-paths
); do
33 # Also include a manifest of the closures in a format suitable for
34 # nix-store --load-db.
35 cp $closureInfo/registration nix-path-registration
37 # Add symlinks to the top-level store objects.
38 for ((n
= 0; n
< ${#objects[*]}; n
++)); do
40 symlink
=${symlinks[$n]}
41 if test "$symlink" != "none"; then
42 mkdir
-p $
(dirname .
/$symlink)
43 ln -s $object .
/$symlink
53 time tar --sort=name
--mtime='@1' --owner=0 --group=0 --numeric-owner -c * $extraArgs |
$compressCommand > $out/tarball
/$fileName.
tar${extension}
55 mkdir
-p $out/nix-support
56 echo $system > $out/nix-support
/system
57 echo "file system-tarball $out/tarball/$fileName.tar${extension}" > $out/nix-support
/hydra-build-products