mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
/etc/profile.d/guix.sh: Add guix pull profile even when absent
* etc/guix-install.sh (sys_create_init_profile): Set PATH and INFOPATH even when $_GUIX_PROFILE does not exist. After initial installation on a foreign distro, the guix pull profile won't be present in path. This means that the first guix pull won't take effect until the shell is restarted. ~/.guix-profile cannot be pre-loaded like this as the relevant paths are stored in ~/.guix-profile/etc/profile, which simply won't exist. However, guix package will output a relevant hint that instructs the user to reload the profile, so this isn't a problem.
This commit is contained in:
parent
2cb5ebf7a8
commit
9d34b04f40
1 changed files with 7 additions and 8 deletions
|
@ -7,6 +7,7 @@
|
||||||
# Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
|
# Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
|
||||||
# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
|
# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
|
# Copyright © 2020 Daniel Brooks <db48x@db48x.net>
|
||||||
|
# Copyright © 2021 Jakub Kądziołka <kuba@kadziolka.net>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Guix.
|
# This file is part of GNU Guix.
|
||||||
#
|
#
|
||||||
|
@ -454,14 +455,12 @@ sys_create_init_profile()
|
||||||
cat <<"EOF" > /etc/profile.d/guix.sh
|
cat <<"EOF" > /etc/profile.d/guix.sh
|
||||||
# _GUIX_PROFILE: `guix pull` profile
|
# _GUIX_PROFILE: `guix pull` profile
|
||||||
_GUIX_PROFILE="$HOME/.config/guix/current"
|
_GUIX_PROFILE="$HOME/.config/guix/current"
|
||||||
if [ -L $_GUIX_PROFILE ]; then
|
export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
|
||||||
export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
|
# Export INFOPATH so that the updated info pages can be found
|
||||||
# Export INFOPATH so that the updated info pages can be found
|
# and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
|
||||||
# and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
|
# When INFOPATH is unset, add a trailing colon so that Emacs
|
||||||
# When INFOPATH is unset, add a trailing colon so that Emacs
|
# searches 'Info-default-directory-list'.
|
||||||
# searches 'Info-default-directory-list'.
|
export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
|
||||||
export INFOPATH="$_GUIX_PROFILE/share/info:$INFOPATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# GUIX_PROFILE: User's default profile
|
# GUIX_PROFILE: User's default profile
|
||||||
GUIX_PROFILE="$HOME/.guix-profile"
|
GUIX_PROFILE="$HOME/.guix-profile"
|
||||||
|
|
Loading…
Reference in a new issue