lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

make-{iso9660-image,squashfs,system-tarball}: drop references to build closure (#425700)

authored by

Naïm Camille Favier and committed by
GitHub
494a23fb c5e8f9ed

+18 -13
+4
nixos/lib/make-iso9660-image.nix
··· 76 76 name = isoName; 77 77 __structuredAttrs = true; 78 78 79 + # the image will be self-contained so we can drop references 80 + # to the closure that was used to build it 81 + unsafeDiscardReferences.out = true; 82 + 79 83 buildCommandPath = ./make-iso9660-image.sh; 80 84 nativeBuildInputs = [ 81 85 xorriso
+4
nixos/lib/make-squashfs.nix
··· 27 27 name = "${fileName}${lib.optionalString (!hydraBuildProduct) ".img"}"; 28 28 __structuredAttrs = true; 29 29 30 + # the image will be self-contained so we can drop references 31 + # to the closure that was used to build it 32 + unsafeDiscardReferences.out = true; 33 + 30 34 nativeBuildInputs = [ squashfsTools ]; 31 35 32 36 buildCommand = ''
+7 -3
nixos/lib/make-system-tarball.nix
··· 39 39 40 40 stdenv.mkDerivation { 41 41 name = "tarball"; 42 - builder = ./make-system-tarball.sh; 42 + __structuredAttrs = true; 43 + 44 + # the tarball will be self-contained so we can drop references 45 + # to the closure that was used to build it 46 + unsafeDiscardReferences.out = true; 47 + 48 + buildCommandPath = ./make-system-tarball.sh; 43 49 nativeBuildInputs = extraInputs; 44 50 45 51 inherit ··· 49 55 compressCommand 50 56 ; 51 57 52 - # !!! should use XML. 53 58 sources = map (x: x.source) contents; 54 59 targets = map (x: x.target) contents; 55 60 56 - # !!! should use XML. 57 61 inherit symlinks objects; 58 62 59 63 closureInfo = closureInfo {
+3 -10
nixos/lib/make-system-tarball.sh
··· 1 - sources_=($sources) 2 - targets_=($targets) 3 - 4 - objects=($objects) 5 - symlinks=($symlinks) 6 - 7 - 8 1 # Remove the initial slash from a path, since genisofs likes it that way. 9 2 stripSlash() { 10 3 res="$1" ··· 12 5 } 13 6 14 7 # Add the individual files. 15 - for ((i = 0; i < ${#targets_[@]}; i++)); do 16 - stripSlash "${targets_[$i]}" 8 + for ((i = 0; i < ${#targets[@]}; i++)); do 9 + stripSlash "${targets[$i]}" 17 10 mkdir -p "$(dirname "$res")" 18 - cp -a "${sources_[$i]}" "$res" 11 + cp -a "${sources[$i]}" "$res" 19 12 done 20 13 21 14