···7676 name = isoName;
7777 __structuredAttrs = true;
78787979+ # the image will be self-contained so we can drop references
8080+ # to the closure that was used to build it
8181+ unsafeDiscardReferences.out = true;
8282+7983 buildCommandPath = ./make-iso9660-image.sh;
8084 nativeBuildInputs = [
8185 xorriso
+4
nixos/lib/make-squashfs.nix
···2727 name = "${fileName}${lib.optionalString (!hydraBuildProduct) ".img"}";
2828 __structuredAttrs = true;
29293030+ # the image will be self-contained so we can drop references
3131+ # to the closure that was used to build it
3232+ unsafeDiscardReferences.out = true;
3333+3034 nativeBuildInputs = [ squashfsTools ];
31353236 buildCommand = ''
+7-3
nixos/lib/make-system-tarball.nix
···39394040stdenv.mkDerivation {
4141 name = "tarball";
4242- builder = ./make-system-tarball.sh;
4242+ __structuredAttrs = true;
4343+4444+ # the tarball will be self-contained so we can drop references
4545+ # to the closure that was used to build it
4646+ unsafeDiscardReferences.out = true;
4747+4848+ buildCommandPath = ./make-system-tarball.sh;
4349 nativeBuildInputs = extraInputs;
44504551 inherit
···4955 compressCommand
5056 ;
51575252- # !!! should use XML.
5358 sources = map (x: x.source) contents;
5459 targets = map (x: x.target) contents;
55605656- # !!! should use XML.
5761 inherit symlinks objects;
58625963 closureInfo = closureInfo {
+3-10
nixos/lib/make-system-tarball.sh
···11-sources_=($sources)
22-targets_=($targets)
33-44-objects=($objects)
55-symlinks=($symlinks)
66-77-81# Remove the initial slash from a path, since genisofs likes it that way.
92stripSlash() {
103 res="$1"
···125}
136147# Add the individual files.
1515-for ((i = 0; i < ${#targets_[@]}; i++)); do
1616- stripSlash "${targets_[$i]}"
88+for ((i = 0; i < ${#targets[@]}; i++)); do
99+ stripSlash "${targets[$i]}"
1710 mkdir -p "$(dirname "$res")"
1818- cp -a "${sources_[$i]}" "$res"
1111+ cp -a "${sources[$i]}" "$res"
1912done
20132114