From 69353cef31aba396015c342c3e4e7a52f89ea683 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 25 Jun 2026 13:43:14 +0200 Subject: [PATCH] nixos/channel: add zstd flavored nixexprs tarball This can significantly speed up consumption of nixexprs because zstd decompress is generally 10x faster than xz. --- nixos/lib/make-channel.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/lib/make-channel.nix b/nixos/lib/make-channel.nix index e366006e908c..f4fca9bf2f7b 100644 --- a/nixos/lib/make-channel.nix +++ b/nixos/lib/make-channel.nix @@ -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 ''; }