Skip to content

Use .tar.zst tarballs for downloading Nix channels when available - #16685

Merged
Mic92 merged 1 commit into
NixOS:masterfrom
GraysonTinker:zst-channels
Oct 26, 2026
Merged

Mic92 merged 1 commit into
NixOS:masterfrom
GraysonTinker:zst-channels

Conversation

@GraysonTinker

Copy link
Copy Markdown
Member

Taken largely from this Lix commit, with adaptations for the differences.

Motivation

.tar.xz channel tarballs are eventually going to be deprecated, as described in #16126. This PR does part of the work in supporting the newer and preferred .tar.zst tarballs, for the nix-channel command. The remaining area where support is required is in libexpr/eval-settings.cc and was done in Lix in this commit (and the one before it), but those changes are mildly more involved, so I'm putting this in just to get started.

Implementation

The .zst tarballs are preferred to be fetched when possible, that is for all currently supported releases. (channels.nixos.org began offering nixexprs.tar.zst from release 26.05.) .xz and the seemingly never used? .bz2 tarballs are still checked as a fallback, in that order.

[gt@Legion5:~/src/nix]$ nix-channel --add https://channels.nixos.org/nixos-26.05

[gt@Legion5:~/src/nix]$ nix-channel --update --verbose
downloading 'https://channels.nixos.org/nixos-26.05'...
downloading 'https://releases.nixos.org/nixos/26.05/nixos-26.05.12400.da6dc0e7b260/nixexprs.tar.zst'...

[gt@Legion5:~/src/nix]$ nix-channel --add https://channels.nixos.org/nixos-22.05

[gt@Legion5:~/src/nix]$ nix-channel --update --verbose
downloading 'https://channels.nixos.org/nixos-22.05'...
downloading 'https://releases.nixos.org/nixos/22.05/nixos-22.05.4694.380be19fbd2d/nixexprs.tar.xz'...

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions Bot added the new-cli Relating to the "nix" command label Oct 25, 2026
Comment thread src/nix/nix-channel/nix-channel.cc Resolved
Comment thread src/nix/nix-channel/nix-channel.cc Resolved
@Mic92
Mic92 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into NixOS:master with commit 570246c Oct 26, 2026
16 checks passed
@GraysonTinker
GraysonTinker deleted the zst-channels branch October 27, 2026 17:01
@xokdvium xokdvium mentioned this pull request Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants