I really don’t know where to ask this question so I am trying here.
I am on macOS darwin, and I use home-manager.
I recently wanted to upgrade to the latest nix (2.5.1) but by doing so calling
home-manager sync or even trying to re-install home-manager via
nix-shell '<home-manager>' -A install fails with this error:
building '/nix/store/rc1l9h28xrgfymjl3zsja24wnlwayv2s-user-environment.drv'... error: packages '/nix/store/fq0v0m7lhqrc2j7x1b5d7bw8jyi083lj-nix-2.5.1/bin/nix-prefetch-url' and '/nix/store/93qibvqxgqii6nxqz8kfdk6q11gsbaak-home-manager-path/bin/nix-prefetch-url' have the same priority 5; use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the conflicting packages (0 being the highest priority) error: builder for '/nix/store/rc1l9h28xrgfymjl3zsja24wnlwayv2s-user-environment.drv' failed with exit code 1
So I have 3 computer I would like to upgrade. For one of them, I’ve fixed this issue by completely deleting and reinstalling
nix (and of course the
So I would like to better understand what is going on here, and if there is a way to fix this issue without wiping out
I have tried:
- changing the priority (I think I am not doing it correctly)
- trying to uninstall
nix-env -e home-manager-path.
rmthe conflicting files (it makes the issue going further and further, but ultimately I end up with a major issue)
- using an empty
home.nixworks as expected. I think there might be a single package creating this issue. But the message does not make it clear which one.
> nix-env -q nix-2.5.1 nss-cacert-3.71
So now I am just asking for help, can I fix the issue without removing my entire
While writing this question I found the solution, the conflicting package was
nix, even if it was not explicitly put in my
nix-env -e home-manager-path nix-env --set-flag priority 4 nix nix-shell '<home-manager>' -A install