Nix 2.20 released

Hi,

I’m pleased to announce the availability of Nix 2.20.0. It is available from Download Nix / NixOS | Nix & NixOS and http://releases.nixos.org/?prefix=nix/nix-2.20.0/ .

The most important changes are listed in the release notes.

67 Likes

Glad to see the release announcement is back :slight_smile:

Massive release !

I really like the improvements of error reporting and the nix hash convert command.

8 Likes

I love the error message improvements! Excited to try them out on a flake I’ve put off debugging.

7 Likes

Error message improvements? Error message improvements. Error message improvements!!!

Incredulity aside, while this release has some solid changes, I think we all have to agree that the error messages are the MVP here.

14 Likes

:partying_face: great release! Thanks everyone for all their work :+1:

1 Like

To anticipate any question on when it will be available on nixpkgs, follow this PR nixVersions.nix_2_20: init at 2.20.1; nixVersions.unstable: 2.19 -> 2.20 by SuperSandro2000 · Pull Request #285264 · NixOS/nixpkgs · GitHub and track that PR at Nixpkgs PR #285264 ("nixVersions.nix_2_20: init at 2.20.1; nixVersions.unstable: 2.19 -> 2.20") progress

5 Likes

Holy hole in a donut the changes to the error messages look game changing! From a cursory glance that looks like it’s all the work of @9999years to whom I will be forever in debt.

27 Likes
  • Option allowed-uris can now match whole schemes in URIs without slashes #9547If a scheme, such as github: is specified in the allowed-uris option, all URIs starting with github: are allowed. Previously this only worked for schemes whose URIs used the :// syntax.

FWIW this is technically a breaking change when using e.g. Hydra or restrict-eval in general since you’ll now have to add github: to your allowed-uris which was accepted without an error before.

Also, this seems to have been backported to Nix 2.19.3, so I think it should be part of the 2.19 release notes? @edolstra @roberth @ericson2314

2 Likes

Eh I think point release notes don’t really exist, and also don’t make it back to master, so I could see how this would happen,

(If we merged xx-maintenance back into master it would be easier to get this right, but that is a major break from how we do things.)

The release notes script does support minor releases, but it does not publish them to master, so for the minor releases we’d have to link to the versioned docs at nix.dev; in this case Release 2.19 (2023-11-17) - Nix Reference Manual. (Spoiler: no minor release notes there either.)

My PR is actually a solution to a cleanup/bugfix by Eelco that unfortunately I didn’t link.
allowed-uris wasn’t applied correctly to fetchTree before. I’m glad we found this in the process of making it stable, which is ongoing.
Sorry for the inconvenience.

1 Like

Don’t get me wrong, I fully agree with that, in fact I think I was among the people who pointed the issue out :slight_smile:

I wanted to point out that the allowed-uris change is technically part of 2.19 already and the lack of a release notes entry for that might’ve contributed to people being confused why their Hydra didn’t evaluate their Nix code anymore.

1 Like

Why are new versions of Nix actually released prominently on the website before making it into nixpkgs?

It seems kind of strange that the bar to get a release into nixpkgs is so higher than the bar to get it onto the website.

I would think the quality control criteria for both would be similar, or higher for getting onto the website.

4 Likes

The problem is the unified website. From Nixpkgs/NixOS’s perspective, Nix is just another upstream project to package, and distro packages always lag somewhat behind upstream releases. If we had separate domains for Nix vs Nixpkgs vs NixOS, this would be a lot clearer — the Nixpkgs/NixOS webpages would not talk about unpackaged Nix releases.

7 Likes

FWIW, to address this problem I have just been tracking Nix from the 2.*-maintenance branches of nixos/nix for some time. That way I can get releases, and patch releases soon after they are released. Same day if I see it right away.