Hi Andreas,
> On Mon, Feb 18, 2019 at 10:56:13PM +0100, Ricardo Wurmus wrote: >> when installing a package into a profile Guix very helpfully tells you >> that you may need to set certain environment variables. It doesn’t tell >> you that these environment variables can also be set by source’ing the >> generated etc/profile file. > > something I noticed is that I see these recommendations also when the > environment variables are already set, precisely by sourcing the (previous) > $HOME/.guix-profile/etc/profile. Now the profile changed, so they need to > be re-sourced (which I usually do by calling "bash" from bash, since I source > from the .bashrc). > > On the other hand, using the recommended environment variables would survive > profile changes, since they look like > export > PATH="/home/andreas/.guix-profile/bin:/home/andreas/.guix-profile/sbin${PATH:+:}$PATH" > instead of pointing to /gnu/store/...-profile/bin with a particular hash. > > So the two are clearly not equivalent. Which of them is actually > preferable? I find it a bit confusing that after running > "guix package -i hello" I cannot run "hello" immediately, unlike in > Debian. This only needs to be done when GUIX_PROFILE is not set. The definitions in etc/profile either reference /gnu/store directories directly (when GUIX_PROFILE is not set) or they reference the profile links (when GUIX_PROFILE is set). When GUIX_PROFILE is set an environment variable like PATH that is already set to the profile’s “bin” directory will not have to be defined again after installing another executable. -- Ricardo