# 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

**URL:** https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446
**Category:** Help
**Created:** [December 6, 2021, 1:37am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446 "2021-12-06T01:37:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![vroad](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vroad/32/3675_2.png) [@vroad](https://discourse.nixos.org/u/vroad)
#### Post date: [December 6, 2021, 1:37am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/1 "2021-12-06T01:37:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![rofrol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rofrol/32/5018_2.png) [@rofrol](https://discourse.nixos.org/u/rofrol)
#### Post date: [December 6, 2021, 1:45am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/2 "2021-12-06T01:45:24Z")

</div>

> [@Why there are branches nixos-21.05 and release-21.05?](https://discourse.nixos.org/t/why-there-are-branches-nixos-21-05-and-release-21-05/16116/2):
>
> I have found this: Which channel is right for me? You probably want to use the current stable, ie: nixos-18.03. nixos-18.03 comes from the release-18.03 branch on GitHub. It maintains some package version stability over its six-month life, providing better guarantees that your system will keep working without major changes for the life of the release. The stable branch also gets timely security patches delivered through channels. The channels beginning with the nixos- prefix are thoroughly …

---

<div class="post-metadata">

### Author: ![vroad](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vroad/32/3675_2.png) [@vroad](https://discourse.nixos.org/u/vroad)
#### Post date: [December 6, 2021, 3:02am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/3 "2021-12-06T03:02:58Z")

</div>

> <https://github.com/NixOS/nixpkgs/blob/26f5e6dd5f2d703d5c39d661540397ea119aa94f/CONTRIBUTING.md?plain=1#L51-L69>

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?

---

<div class="post-metadata">

### Author: ![vroad](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vroad/32/3675_2.png) [@vroad](https://discourse.nixos.org/u/vroad)
#### Post date: [December 6, 2021, 3:04am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/4 "2021-12-06T03:04:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![vroad](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vroad/32/3675_2.png) [@vroad](https://discourse.nixos.org/u/vroad)
#### Post date: [December 6, 2021, 3:18am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/5 "2021-12-06T03:18:39Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![rofrol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rofrol/32/5018_2.png) [@rofrol](https://discourse.nixos.org/u/rofrol)
#### Post date: [December 6, 2021, 6:52am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/6 "2021-12-06T06:52:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [December 6, 2021, 7:54am UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/7 "2021-12-06T07:54:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![rofrol](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rofrol/32/5018_2.png) [@rofrol](https://discourse.nixos.org/u/rofrol)
#### Post date: [December 6, 2021, 3:17pm UTC](https://discourse.nixos.org/t/on-niv-running-on-mac-which-branch-should-i-use-to-update-to-21-11-i-cant-find-release-21-11-darwin-branch-on-nixpkgs/16446/8 "2021-12-06T15:17:55Z")

</div>

Great explanation. The best I have read so far.
