Skip to content

nix upgrade-nix: Support new profiles #12165

Open
@edolstra

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 by getLatestNix().
  • Otherwise do the equivalent of nix profile upgrade <element>.

Alternative solutions

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Assignees

Labels

featureFeature request or proposal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions