[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "The following environment variable definitions may be needed"
From: |
myglc2 |
Subject: |
Re: "The following environment variable definitions may be needed" |
Date: |
Wed, 10 May 2017 09:39:49 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
On 05/10/2017 at 14:01 Ludovic Courtès writes:
> Hi!
>
> Chris Marusich <address@hidden> skribis:
>
>> This leads to my question: If I'm using GuixSD (or a foreign distro in
>> which $GUIX_PROFILE/etc/profile is automatically sourced), do I need to
>> add these recommended export statements to my ~/.bashrc or
>> ~/.bash_profile?
>
> No.
>
>> My suspicion is that the answer is "no". The next time I reboot or log
>> out and back in, the environment variables will be set correctly even if
>> I don't add them to my ~/.bashrc or ~/.bash_profile. In fact, by adding
>> them there, I would be adding redundant entries. I am hoping that
>> someone can confirm that my understanding is correct.
>
> Confirmed!
>
> I think the recommendations that ‘guix package’ produces are still
> useful though, precisely because $GUIX_PROFILE/etc/profile won’t be
> re-sourced until you log in again.
These messages were a source of confusion for me. It is really great to
see this clarified.
What if we change the message from ...
The following environment variable definitions may be needed:
export PATH="test-profile/bin${PATH:+:}$PATH"
... to ...
If you need the package before the next login, do:
export PATH="test-profile/bin${PATH:+:}$PATH"
> Exercise for the reader: extend Bash with Guile-Bash such that the new
> environment variable settings are automatically effected when ‘guix
> package’ is run. :-)
This sounds cool. Could you please expand on it a bit?