Architecture-specific channels

Q: Trying to wrap my head around the differences between channels, specifically architecture-specific ones

Q: Trying to wrap my head around the differences between channels, especially architecture-specific ones. I one of my flakes, for reasons unclear to me, I have:

inputs.nixpkgs.url = "nixpkgs/nixos-22.05";
inputs.nixpkgsArm.url = "nixpkgs/nixos-22.05-aarch64";

Further, on GitHub I see branches like:

or nixpkgs-unstable-darwin-aarch64 on Hydra.

Reading about channels, I see threads like this, but it doesn’t go terribly into depth.

https://nixos.wiki/wiki/Nix_channels:

  • Then, for each unstable channel (see above), a particular job at hydra.nixos.org is started which must succeed:

So does this mean that unstable is dynamically updated to point to a new unstable any time hydra passes a specific set of tests? Is that also what happens with e.g. nixos-22.05, just with a different set of tests?

Can someone please help confirm my understanding and fill in some blanks between the following GitHub branches https://github.com/NixOS/nixpkgs/branches/all?query=22.05?

  • unstable: all packages, only small set of critical pieces must pass some set of (x86_64-linux) tests on hydra
  • release-22.05: snapshot of unstable about this date during which all packages (or just a bunch? some core set?) happened to be passing on x86_64-linux on hydra
  • nixos-22.05: snapshot of unstableabout this date during which even more(?) packages thanrelease-22.05` were passing on x86_64-linux on hydra
  • nixos-22.05-small: same as above, but fewer tests are run / stuff is evaluated (and cached)
  • nixpkgs-22.05-darwin: snapshot of unstable about this date during which roughly the same set as nixos-22.05 (or maybe release-22.05?) were passing, but on x86_64-darwin on hydra
  • nixos-22.05-aarch64: snapshot of unstable about this date during which roughly the same set as nixos-22.05 were passing, but passing on aarch64-linux on hydra
  • unstable-aarch64: Looks like this branch is dead?

Is that roughly right? If so, what ramifications does this have for caching? If I’m on an aarch64-linux machine, will using an nixos-22.05-aarch64 channel (as opposed to nixos-22.05) lead to a higher proportion of binaries available at cache.nixos.org? Other than the compilation target of the binaries, are there other major differences between the packages I would get?

What about nixpkgs-unstable-darwin-aarch64 on hydra? I don’t see this branch at GitHub. Could I (and would it be wise) for me to use this somehow, as my main machine is an M1 Mac with nix-darwin? (So far I’ve been mostly using flakes with nixpkgs-unstable, but ran across an issue with an update yesterday, so trying to learn more about channels – and overlays.)

Sorry for so many questions, thank you to so many of you for patiently teaching me.

Other reading:

That is correct.

  • master is a development branch for “unstable” release, the following channels are based on it:
    • nixos-unstable, nixos-unstable-small, nixpkgs-unstable. The namesake branches update whenever the corresponding channel advances.
  • release-22.05 is a development branch for the stable release:
    • nixos-22.05, nixos-22.05-small, … updated whenever namesake channel advances

See https://status.nixos.org/ for the Hydra job that needs to succeed for a channel to advance.

Nixpkgs PR tracker also has these very nice diagrams of how the changes usually flow through branches/channels:

progress-stable progress-unstable

Mainly that different channels have different Hydra job that they require to succeed before they can advance. It looks like nixos/release-22.05-aarch64/tested actually contains less constituents than nixos/release-22.05/tested so it might advance faster. nixos/release-22.05-small/tested might be even faster but it does not track any aarch64 jobs so it will advance even if something you might depend on fails to build.

You can view the constituents of each job by clicking the job link on the NixOS status page.

Interesting, thanks!

So my primary machine being aarch64-darwin, none of those channels seem to be particularly relevant.

But on my aarch64 Raspberry Pi, for example, tracking the nixpkgs/nixos-22.05-aarch64 may be a good idea, since it should have a good set of packages that for sure build for that platform / architecture.

Looks like some of the logic may be at https://github.com/NixOS/nixos-channel-scripts

I assume that existing tests are run by default with a build, so saying that something builds without errors implies that all the tests have passed as well. Is that right?

All jobs in the relevant jobset must finish and the tested aggregate job (or unstable aggregate job for nixpkgs-unsable) must finish successfully. That means all the constituent jobs will have to finish successfully. See also Success Conditions section on the Nix channels wiki article.

Thanks again. I have a much better understanding already, and I made some modifications to my Raspberry Pi flake (preferring nixos-22.05-aarch64) and was able to resolve the issue with nix-darwin not building on my M1 Mac (by replacing non-building packages from nixpkgs-22.05-darwin with unstable) thanks to this conversation.

I cloned nixpkgs locally, and some of the diffs are interesting.

For example, the difference between nixos-22.05 and nixos-22.05-aarch64 seems really trivial – literally one nextcloud-related file:

$ git diff origin/nixos-22.05 origin/nixos-22.05-aarch64 
diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix
index 24caa9d8d91..2d058b996b5 100644
--- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -26,7 +26,7 @@
 
 mkDerivation rec {
   pname = "nextcloud-client";
-  version = "3.6.0";
+  version = "3.6.1";
 
   outputs = [ "out" "dev" ];
 
@@ -34,7 +34,7 @@ mkDerivation rec {
     owner = "nextcloud";
     repo = "desktop";
     rev = "v${version}";
-    sha256 = "sha256-wAxq5xFlofn2xEguvewMvGcel9O+CN/1AycR3tv/xMA=";
+    sha256 = "sha256-RCYiUxTZSuZbDocueW0d8PdsRTR9bTjDgx0H53UGDP4=";
   };
 
   patches = [

Or even nixpkgs-22.05-darwin:

$ git diff origin/nixos-22.05 origin/nixpkgs-22.05-darwin 
diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix
index 24caa9d8d91..2d058b996b5 100644
--- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -26,7 +26,7 @@
 
 mkDerivation rec {
   pname = "nextcloud-client";
-  version = "3.6.0";
+  version = "3.6.1";
 
   outputs = [ "out" "dev" ];
 
@@ -34,7 +34,7 @@ mkDerivation rec {
     owner = "nextcloud";
     repo = "desktop";
     rev = "v${version}";
-    sha256 = "sha256-wAxq5xFlofn2xEguvewMvGcel9O+CN/1AycR3tv/xMA=";
+    sha256 = "sha256-RCYiUxTZSuZbDocueW0d8PdsRTR9bTjDgx0H53UGDP4=";
   };
 
   patches = [
diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix
index 86d729f95d6..eb27468b40f 100644
--- a/pkgs/tools/security/clamav/default.nix
+++ b/pkgs/tools/security/clamav/default.nix
@@ -6,11 +6,11 @@
 
 stdenv.mkDerivation rec {
   pname = "clamav";
-  version = "0.105.0";
+  version = "0.105.1";
 
   src = fetchurl {
     url = "https://www.clamav.net/downloads/production/${pname}-${version}.tar.gz";
-    sha256 = "sha256-JwIDpUxFgEnbVPzZNoP/Wy2xkVHzY8SOgs7O/d4rNdQ=";
+    sha256 = "sha256-0rwWN024iablpqxA+MbnACVKA5rKpTaIWgnu6kuFKfY=";
   };
 
   patches = [

Am I doing that right?

That indeed seems to be the case. Again, you can look at the NixOS status page to see the current commit each channel branch points to. Currently that is:

Channel Last updated Commit
nixos-22.05-aarch64 12 hours ago 451c1a3e32ac
nixos-22.05 a day ago c5203abb1329

And comparing those, it does in fact look like they only differ in a single commit:

Very cool.

I imagine that the list of builds that must pass for each channel are published somewhere, but I’m not immediately finding them at:

Did I miss them somewhere?

Ah, nevermind:

https://status.nixos.orgHydra job for tests. For example: <https://hydra.nixos.org/job/nixos/release-22.05-aarch64/tested#tabs-constituents>

And it looks like that list probably comes from https://github.com/NixOS/nixpkgs/blob/b7d8c687782c8f9a1d425a7e486eb989654f6468/pkgs/top-level/release.nix#L42

Cool!