Open
Description
Is your feature request related to a problem?
Currently nix upgrade-nix
fails on profiles that have been modified by nix profile
, typically with a misleading error message like:
error: directory '"/nix/store/46p1z0w9ad605kky62dr53z4h24k2a5r-nix-2.25.3/bin/nix"' does not appear to be part of a Nix profile
DeterminateSystems/nix-installer#1362
Proposed solution
If the profile has a manifest.json
file, use nix profile
to upgrade the Nix package. It's not entirely clear what the behaviour should be, but probably something like:
- If the profile element providing
nix
is a store path, then upgrade it to the store path returned bygetLatestNix()
. - Otherwise do the equivalent of
nix profile upgrade <element>
.
Alternative solutions
Additional context
Checklist
- checked latest Nix manual (source)
- checked open feature issues and pull requests for possible duplicates
Add 👍 to issues you find important.