snix/src/nix
Daiderd Jordan d85bb4814f
upgrade-nix: resolve profile symlinks
The profile present in PATH is not necessarily the actual profile
location. User profiles are generally added as $HOME/.nix-profile
in which case the indirect profile link needs to be resolved first.

/home/user/.nix-profile -> /nix/var/nix/profiles/per-user/user/profile
/nix/var/nix/profiles/per-user/user/profile -> profile-15-link
/nix/var/nix/profiles/per-user/user/profile-14-link -> /nix/store/hyi4kkjh3bwi2z3wfljrkfymz9904h62-user-environment
/nix/var/nix/profiles/per-user/user/profile-15-link -> /nix/store/6njpl3qvihz46vj911pwx7hfcvwhifl9-user-environment

To upgrade nix here we want /nix/var/nix/profiles/per-user/user/profile-16-link
instead of /home/user/.nix-profile-1-link. The latter is not a gcroot
and would be garbage collected, resulting in a broken profile.

Fixes #2175
2018-08-25 20:50:44 +02:00
..
add-to-store.cc Add "nix add-to-store" command 2017-09-14 13:29:33 +02:00
build.cc Merge branch 'fix/dry-run-partially' of https://github.com/dtzWill/nix 2018-02-22 12:18:20 +01:00
cat.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
command.cc Remove reference to non-existent manpages 2018-03-29 12:29:10 +02:00
command.hh toBuildables -> build 2018-02-12 17:06:06 +01:00
copy.cc s3 binary cache: support specifying an endpoint 2018-08-02 08:19:50 -04:00
dump-path.cc Fix #1762 2018-02-13 14:26:19 +00:00
edit.cc Handle arguments in $EDITOR 2018-04-17 12:16:04 +02:00
eval.cc nix eval: Stop progress bar before printing the result 2018-01-17 12:04:44 +01:00
hash.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
installables.cc Slightly questionable workaround for #2342 2018-08-10 11:34:41 +02:00
legacy.cc Start of new Nix command-line interface 2016-02-09 21:28:29 +01:00
legacy.hh Fix Darwin build 2016-03-15 12:11:27 +01:00
local.mk Update the progress bar at most 20 times per second 2018-02-06 20:51:37 +01:00
log.cc nix log: use pager 2018-01-12 15:05:26 -06:00
ls.cc Update release notes 2018-02-19 20:38:53 +01:00
main.cc Modularize config settings 2018-05-30 13:28:01 +02:00
optimise-store.cc nix optimise-store: Add 2017-08-16 20:56:03 +02:00
path-info.cc Don't indent JSON output 2017-11-14 14:28:03 +01:00
ping-store.cc Manual: Update chapter on remote builds 2018-02-21 16:24:26 +01:00
progress-bar.cc Revert "progress-bar: re-draw last update if nothing new for 1sec." 2018-07-19 10:29:31 -05:00
progress-bar.hh nix run: Flush the progress bar before starting the command 2017-08-29 15:13:30 +02:00
repl.cc repl: use nix build for building instead of nix-store -r 2018-06-23 07:56:26 -05:00
run.cc nix run: Restore CPU affinity 2018-08-19 12:05:08 +02:00
search.cc search.cc: improve UX for nix search 2018-07-02 11:05:59 +02:00
show-config.cc Modularize config settings 2018-05-30 13:28:01 +02:00
show-derivation.cc Add "nix show-derivation" 2017-09-25 13:43:35 +02:00
sigs.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
upgrade-nix.cc upgrade-nix: resolve profile symlinks 2018-08-25 20:50:44 +02:00
verify.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
why-depends.cc nix why-depends: render output into $PAGER 2018-07-03 12:49:12 +02:00