You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like there is no way to re-install a package with the nix profile install command. It fails with the following error:
$ nix profile install
error: packages '/nix/store/d0wb2gam2pyksz2dsjx6sa83761jrrgi-hello-2.12/bin/hello' and '/nix/store/61n15131n3b9mn7ajvddbyfnv2b3pgjd-hello-2.12/bin/hello' 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)
I'm not sure how nix-env dealt with this.
(note: the 'nix-env' command suggested in the error message doesn't work because it complains that the profile was installed with "nix profile"; also this wouldn't really solve the issue)
Steps To Reproduce
$ nix flake init
$ nix profile install
# now edit `flake.nix` to change the "hello" derivation, for instance:
$ cat flake.nix
... hello.overrideAttrs (_: {
postBuild = "echo hello";
});
$ $ nix profile install
error: packages '/nix/store/d0wb2gam2pyksz2dsjx6sa83761jrrgi-hello-2.12/bin/hello' and '/nix/store/61n15131n3b9mn7ajvddbyfnv2b3pgjd-hello-2.12/bin/hello' 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)
Expected behavior
The hello package should be replaced.
A clear and concise description of what you expected to happen.
nix-env --version output
$ nix-env --version
nix-env (Nix) 2.6.0
Additional context
Running nix profile upgrade doesn't do anything. For now the workaround is to nix profile remove everything before nix profile installing.
EDIT: I just realized that nix profile upgrade can take a number. When giving it the same number of the flake used to install hello, I get the same error as nix profile install:
$ nix profile list | grep hello
6 path:/private/var/folders/tx/d4435y0s3dqbytdf1f09s8740000gn/T/tmp.YFCSpO8v#defaultPackage.aarch64-darwin path:/private/var/folders/tx/d4435y0s3dqbytdf1f09s8740000gn/T/tmp.YFCSp
O8v?narHash=sha256-JyMfoXbdBn9JlHIPJOPupn0K0zSuniX7bSFf1XQKY5I=#defaultPackage.aarch64-darwin /nix/store/61n15131n3b9mn7ajvddbyfnv2b3pgjd-hello-2.12
$ nix profile upgrade 6
error: packages '/nix/store/d0wb2gam2pyksz2dsjx6sa83761jrrgi-hello-2.12/bin/hello' and '/nix/store/61n15131n3b9mn7ajvddbyfnv2b3pgjd-hello-2.12/bin/hello' 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)
The text was updated successfully, but these errors were encountered:
Describe the bug
Looks like there is no way to re-install a package with the
nix profile install
command. It fails with the following error:I'm not sure how
nix-env
dealt with this.(note: the 'nix-env' command suggested in the error message doesn't work because it complains that the profile was installed with "nix profile"; also this wouldn't really solve the issue)
Steps To Reproduce
Expected behavior
The
hello
package should be replaced.A clear and concise description of what you expected to happen.
nix-env --version
outputAdditional context
Running
nix profile upgrade
doesn't do anything. For now the workaround is tonix profile remove
everything beforenix profile install
ing.EDIT: I just realized that
nix profile upgrade
can take a number. When giving it the same number of the flake used to installhello
, I get the same error asnix profile install
:The text was updated successfully, but these errors were encountered: