nixos/channel: add zstd flavored nixexprs tarball

This can significantly speed up consumption of nixexprs because zstd
decompress is generally 10x faster than xz.
This commit is contained in:
Martin Weinelt
2026-06-25 13:43:14 +02:00
parent eb6d0d87ea
commit 69353cef31

View File

@@ -18,7 +18,10 @@ pkgs.releaseTools.makeSourceTarball {
officialRelease = false; # FIXME: fix this in makeSourceTarball
inherit version versionSuffix;
buildInputs = [ pkgs.nix ];
buildInputs = with pkgs; [
nix
zstd
];
distPhase = ''
rm -rf .git
@@ -33,5 +36,10 @@ pkgs.releaseTools.makeSourceTarball {
cd ..
chmod -R u+w $releaseName
tar cfJ $out/tarballs/$releaseName.tar.xz $releaseName
tar \
--create \
--file="$out/tarballs/$releaseName.tar.zst" \
--use-compress-program="zstd -19 -T$NIX_BUILD_CORES" \
$releaseName
'';
}