Nix always updates even when versions are the same
What did you expect to happen?
When installed Nix is same as latest Nix release, Topgrade should not attempt an update.
What actually happened?
No matter how Nix is installed, across WSL2 distros, or baremetal Arch or Manjaro, Topgrade always attempts to update Nix, even when the release version is the same as locally installed.
Additional Details
- Which operating system or Linux distribution are you using? Manjaro Linux and Ubuntu-on-WSL2
- How did you install Topgrade? Via Nixpkgs
- Which version are you running? Topgrade 10.2.4 on Manjaro, latest 10.3.1 on WSL2
―― 10:10:03 - Nix ――――――――――――――――――――――――――――――――――――――――――――――――――――――― replacing old 'nix-2.13.2' installing 'nix-2.13.2' unpacking channels...
Is there a way to check if there is a new version for nix available
Sometimes, it seems that topgrade is downgrading the nix packages (instead of upgrading). See an example:
── 19:44:26 - Nix ──────────────────────────────────────────────────────────────
replacing old 'nix-2.14.1'
installing 'nix-2.13.3'
unpacking channels...
upgrading 'nix-2.13.3' to 'nix-2.14.1'
Topgrade calls nix-2.14.1 as "old" and seems to install nix-2.13.3. After unpacking the channels, the "correct" message is shown: upgrading 'nix-2.13.3' to 'nix-2.14.1'
And, when you run topgrade twice, the exact same output is generated. It seems it did not respect the "upgraded" version nix-2.14.1 and run the full proccess again.
No matter how Nix is installed, across WSL2 distros, or baremetal Arch or Manjaro, Topgrade always attempts to update Nix, even when the release version is the same as locally installed.
topgrade runs nix upgrade-nix to upgrade nix itself which always tries to install the latest version defined in nix-fallback-paths.nix. According to the documentation, this may not always be the latest tagged release.
Topgrade calls nix-2.14.1 as "old" and seems to install nix-2.13.3. After unpacking the channels, the "correct" message is shown: upgrading 'nix-2.13.3' to 'nix-2.14.1'
Similar issue: NixOS/nix#8492