Loading nixos/lib/make-iso9660-image.nix +4 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,10 @@ stdenv.mkDerivation { name = isoName; __structuredAttrs = true; # the image will be self-contained so we can drop references # to the closure that was used to build it unsafeDiscardReferences.out = true; buildCommandPath = ./make-iso9660-image.sh; nativeBuildInputs = [ xorriso Loading nixos/lib/make-squashfs.nix +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ stdenv.mkDerivation { name = "${fileName}${lib.optionalString (!hydraBuildProduct) ".img"}"; __structuredAttrs = true; # the image will be self-contained so we can drop references # to the closure that was used to build it unsafeDiscardReferences.out = true; nativeBuildInputs = [ squashfsTools ]; buildCommand = '' Loading nixos/lib/make-system-tarball.nix +7 −3 Original line number Diff line number Diff line Loading @@ -39,7 +39,13 @@ in stdenv.mkDerivation { name = "tarball"; builder = ./make-system-tarball.sh; __structuredAttrs = true; # the tarball will be self-contained so we can drop references # to the closure that was used to build it unsafeDiscardReferences.out = true; buildCommandPath = ./make-system-tarball.sh; nativeBuildInputs = extraInputs; inherit Loading @@ -49,11 +55,9 @@ stdenv.mkDerivation { compressCommand ; # !!! should use XML. sources = map (x: x.source) contents; targets = map (x: x.target) contents; # !!! should use XML. inherit symlinks objects; closureInfo = closureInfo { Loading nixos/lib/make-system-tarball.sh +3 −10 Original line number Diff line number Diff line sources_=($sources) targets_=($targets) objects=($objects) symlinks=($symlinks) # Remove the initial slash from a path, since genisofs likes it that way. stripSlash() { res="$1" Loading @@ -12,10 +5,10 @@ stripSlash() { } # Add the individual files. for ((i = 0; i < ${#targets_[@]}; i++)); do stripSlash "${targets_[$i]}" for ((i = 0; i < ${#targets[@]}; i++)); do stripSlash "${targets[$i]}" mkdir -p "$(dirname "$res")" cp -a "${sources_[$i]}" "$res" cp -a "${sources[$i]}" "$res" done Loading Loading
nixos/lib/make-iso9660-image.nix +4 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,10 @@ stdenv.mkDerivation { name = isoName; __structuredAttrs = true; # the image will be self-contained so we can drop references # to the closure that was used to build it unsafeDiscardReferences.out = true; buildCommandPath = ./make-iso9660-image.sh; nativeBuildInputs = [ xorriso Loading
nixos/lib/make-squashfs.nix +4 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ stdenv.mkDerivation { name = "${fileName}${lib.optionalString (!hydraBuildProduct) ".img"}"; __structuredAttrs = true; # the image will be self-contained so we can drop references # to the closure that was used to build it unsafeDiscardReferences.out = true; nativeBuildInputs = [ squashfsTools ]; buildCommand = '' Loading
nixos/lib/make-system-tarball.nix +7 −3 Original line number Diff line number Diff line Loading @@ -39,7 +39,13 @@ in stdenv.mkDerivation { name = "tarball"; builder = ./make-system-tarball.sh; __structuredAttrs = true; # the tarball will be self-contained so we can drop references # to the closure that was used to build it unsafeDiscardReferences.out = true; buildCommandPath = ./make-system-tarball.sh; nativeBuildInputs = extraInputs; inherit Loading @@ -49,11 +55,9 @@ stdenv.mkDerivation { compressCommand ; # !!! should use XML. sources = map (x: x.source) contents; targets = map (x: x.target) contents; # !!! should use XML. inherit symlinks objects; closureInfo = closureInfo { Loading
nixos/lib/make-system-tarball.sh +3 −10 Original line number Diff line number Diff line sources_=($sources) targets_=($targets) objects=($objects) symlinks=($symlinks) # Remove the initial slash from a path, since genisofs likes it that way. stripSlash() { res="$1" Loading @@ -12,10 +5,10 @@ stripSlash() { } # Add the individual files. for ((i = 0; i < ${#targets_[@]}; i++)); do stripSlash "${targets_[$i]}" for ((i = 0; i < ${#targets[@]}; i++)); do stripSlash "${targets[$i]}" mkdir -p "$(dirname "$res")" cp -a "${sources_[$i]}" "$res" cp -a "${sources[$i]}" "$res" done Loading