On niv running on mac, which branch should I use to update to 21.11? I can't find release-21.11-darwin branch on nixpkgs

I found relase-21.11, nixos-21.11, nixpkgs-21.11-darwin, but no release-21.11-darwin. Is it gone? On 21.05 we had release-21.05-darwin.

I still don’t understand tje difference between release and nixpkgs branch. I have been using release-21.05 just because niv defaults to release-* branch. And nixpkgs-unstable for using latest packages.

1 Like

So, release branches are just for development, and I shouldn’t use them if I all I need is downloading packages from channels?

The reason niv defaults to release branch is that niv could be used as a way to test packages on nixpkgs?

This still doesn’t explain why there is no release-21.11-darwin branch anymore. Was it handled separately in 21.05?

1 Like

I’m confused. There is nixpkgs-unstable, nixos-unstable, nixos-21.11 but no nixpkgs-21.11 branch.

for NixOS: use nixos-21.11
for development with nix-shell and niv on Linux: use release-21.11
for mac: use nixpkgs-21.11-darwin
for using latest packages: use nixpkgs-unstable

Is this correct?

I think that is mostly correct. Just use nixos or unstable branch as a user. But I am a new user just trying to help and might be wrong.

There was no release-21.05-darwin branch either. There was nixpkgs-21.05-darwin and there is nixpkgs-21.11-darwin.

There’s two kinds of branches in question here. There’s the release-XX.YY branches, which are the active development branches for that release. Then there are the channel branches; i.e. nixos-XX.YY or nixpkgs-XX.YY-darwin. The channel branches are updated to a commit from the corresponding release-XX.YY branch whenever a commit on that branch passes the tests for that channel on Hydra. So nixpkgs-XX.YY-darwin always points to a commit from release-XX.YY that has successfully passed the darwin tests on Hydra, and nixos-XX.YY points to a commit that passes NixOS’s tests.

In the same vein, nixos-unstable and master share this same type of relationship; nixos-unstable always points to the latest commit on master that has passed NixOS’s tests, and nixpkgs-unstable points to the latest commit on master that passes a set of tests that doesn’t include unnecessary NixOS-specific things.

TL;DR: Never follow release-XX.YY branches or master. Always follow one of the channel branches; nixpkgs-XX.YY-darwin for macOS.

2 Likes

Great explanation. The best I have read so far.