-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
nix upgrade-nix
on new-style profiles
nix3-profile automatically migrates any profile its used on to its style of profile -- the ones with manifest.json instead of manifest.nix. On non-NixOS systems, Nix is conventionally installed to the profile at /nix/var/nix/profiles/default, so if a user passed that to `--profile` of `nix profile`, then it would break upgrade-nix from ever working again, without recreating the profile. This commit fixes that, and allows upgrade-nix to work on either kind of profile. Fixes NixOS#16. Change-Id: I4c49b1beba93bb50e8f8a107edc451affe08c3f7
- Loading branch information
Showing
3 changed files
with
127 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
synopsis: using `nix profile` on `/nix/var/nix/profiles/default` no longer breaks `nix upgrade-nix` | ||
cls: 952 | ||
--- | ||
|
||
On non-NixOS, Nix is conventionally installed into a `nix-env` style profile at /nix/var/nix/profiles/default. | ||
Like any `nix-env` profile, using `nix profile` on it automatically migrates it to a `nix profile` style profile, which is incompatible with `nix-env`. | ||
`nix upgrade-nix` previously relied solely on `nix-env` to do the upgrade, but now will work fine with either kind of profile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters