iso-image: use zstd for compression
This commit is contained in:
parent
c09ffc7a55
commit
f20fd89fc0
|
@ -34,7 +34,7 @@
|
||||||
, # The path (outside the ISO file system) of the isohybrid-mbr image.
|
, # The path (outside the ISO file system) of the isohybrid-mbr image.
|
||||||
isohybridMbrImage ? ""
|
isohybridMbrImage ? ""
|
||||||
|
|
||||||
, # Whether to compress the resulting ISO image with bzip2.
|
, # Whether to compress the resulting ISO image with zstd.
|
||||||
compressImage ? false
|
compressImage ? false
|
||||||
|
|
||||||
, # The volume ID.
|
, # The volume ID.
|
||||||
|
@ -48,7 +48,7 @@ assert usbBootable -> isohybridMbrImage != "";
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = isoName;
|
name = isoName;
|
||||||
builder = ./make-iso9660-image.sh;
|
builder = ./make-iso9660-image.sh;
|
||||||
buildInputs = [ xorriso syslinux ];
|
buildInputs = [ xorriso syslinux zstd ];
|
||||||
|
|
||||||
inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
|
inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
|
||||||
|
|
||||||
|
|
|
@ -129,9 +129,14 @@ fi
|
||||||
|
|
||||||
if test -n "$compressImage"; then
|
if test -n "$compressImage"; then
|
||||||
echo "Compressing image..."
|
echo "Compressing image..."
|
||||||
bzip2 $out/iso/$isoName
|
zstd -T$NIX_BUILD_CORES $out/iso/$isoName
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
echo $system > $out/nix-support/system
|
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
|
||||||
|
|
|
@ -413,7 +413,7 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether the ISO image should be compressed using
|
Whether the ISO image should be compressed using
|
||||||
<command>bzip2</command>.
|
<command>zstd</command>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue