Currently using nix-channel 2.18.1 on MacOS. I’ve also tried nix-channel 2.21.2 with the same results:
$ nix-channel --update
unpacking channels...
Nothing gets updated. In particular I’m looking to update nixUnstable
, but nix-build -A nixUnstable '<nixpkgs>'
still gives me:
/nix/store/xddsxyp60qq5jmdxb9rkwbvxzxa4lhar-nix-2.19.3
I’m on nixpkgs-unstable, which is supposed to have v2.21 as nixUnstable. The version I’m seeing matches the state of the repository in my channel, which is using a commit from 3 months ago:
$ cat ~/.local/state/nix/profiles/channels-4-link/nixpkgs/svn-revision
592652.f945939fd679
I timed the nix-channel --update command and it takes ~0.1s, so it doesn’t seem to be doing much. I don’t think it’s just caching results from the last hour, as the current generation is months old:
$ nix-channel --list-generations
1 2023-10-02 14:56:04
2 2023-10-02 15:04:52
3 2024-03-08 09:52:07 (current)
I tried re-adding the nixpkgs
channel under a different name (nixpkgs-unstable
), and it took much longer so I hoped it was fetching the latest. It created a new generation:
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable
nixpkgs-unstable https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --list-generations
1 2023-10-02 14:56:04
2 2023-10-02 15:04:52
3 2024-03-08 09:52:07
4 2024-04-25 10:46:04 (current)
But it looks like that time was just spent unpacking, as it resulted in the same git revision as my long-running nixpkgs channel:
$ cat ~/.local/state/nix/profiles/channels-4-link/nixpkgs{,-unstable}/svn-revision
592652.f945939fd679
592652.f945939fd679
I also tried removing ~/.cache/nix
, but no change (after re-running the update).
Any ideas? I’m getting tempted to somehow update various symlinks myself, but I’d much rather do it properly.