diff options
author | Marek Mahut <marek.mahut@gmail.com> | 2020-06-07 19:09:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 19:09:43 +0200 |
commit | 7b9d7cc05d828e50dbceeee09a1a88e105b05f4a (patch) | |
tree | f206e21817df388db95dd021be96253663e5e948 /nixos/lib | |
parent | 410ac1128799353726eca94bb4972bb40a92eb35 (diff) | |
parent | 99f4ca8bf89d32c27acee1e9074de11c0d065593 (diff) | |
download | nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.tar nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.tar.gz nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.tar.bz2 nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.tar.lz nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.tar.xz nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.tar.zst nixlib-7b9d7cc05d828e50dbceeee09a1a88e105b05f4a.zip |
Merge pull request #85947 from prusnak/images-zstd
Use zstd for ISO and SD images
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/make-iso9660-image.nix | 4 | ||||
-rw-r--r-- | nixos/lib/make-iso9660-image.sh | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/nixos/lib/make-iso9660-image.nix b/nixos/lib/make-iso9660-image.nix index 0f3f2b5b5234..be8ad9912db0 100644 --- a/nixos/lib/make-iso9660-image.nix +++ b/nixos/lib/make-iso9660-image.nix @@ -34,7 +34,7 @@ , # The path (outside the ISO file system) of the isohybrid-mbr image. isohybridMbrImage ? "" -, # Whether to compress the resulting ISO image with bzip2. +, # Whether to compress the resulting ISO image with zstd. compressImage ? false , # The volume ID. @@ -48,7 +48,7 @@ assert usbBootable -> isohybridMbrImage != ""; stdenv.mkDerivation { name = isoName; builder = ./make-iso9660-image.sh; - buildInputs = [ xorriso syslinux ]; + buildInputs = [ xorriso syslinux zstd ]; inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable; diff --git a/nixos/lib/make-iso9660-image.sh b/nixos/lib/make-iso9660-image.sh index d4633d2c8d16..eb9edcd70269 100644 --- a/nixos/lib/make-iso9660-image.sh +++ b/nixos/lib/make-iso9660-image.sh @@ -129,9 +129,14 @@ fi if test -n "$compressImage"; then echo "Compressing image..." - bzip2 $out/iso/$isoName + zstd -T$NIX_BUILD_CORES $out/iso/$isoName fi mkdir -p $out/nix-support echo $system > $out/nix-support/system -echo "file iso $out/iso/$isoName" >> $out/nix-support/hydra-build-products + +if test -n "$compressImage"; then + echo "file iso $out/iso/$isoName.zst" >> $out/nix-support/hydra-build-products +else + echo "file iso $out/iso/$isoName" >> $out/nix-support/hydra-build-products +fi |