[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-profile search paths should include system-profile directories
From: |
Ludovic Courtès |
Subject: |
Re: User-profile search paths should include system-profile directories |
Date: |
Thu, 22 Sep 2016 00:22:21 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi,
address@hidden (Carlos Sánchez de La Lama) skribis:
> Alex Kost <address@hidden> writes:
[...]
>>> what about something like:
>>>
>>> - /etc/profile
>>> # [...]
>>> GUIX_PROFILES="/run/current-system/profile:$HOME/.guix-profile"
>>> . /run/current-system/profile/etc/profile
>>> # [...]
>>> . "$HOME/.guix-profile/etc/profile"
>>> # [...]
>>>
>>> - /run/current-system/profile/etc/profile
>>> profiles="${GUIX_PROFILES:=/gnu/store/<hashA>-profile}"
>>> export PATH="${profiles//:/\/bin}/bin ${profiles//:/\/sbin}/sbin"
>>> # [...]
>>>
>>>
>>> - $HOME/.guix-profile/etc/profile
>>> profiles="${GUIX_PROFILES:=/gnu/store/<hashB>-profile}"
>>> export ACLOCAL_PATH="${profiles//:/\/share/aclocal}/share/aclocal"
>>> # [...]
>>>
>>> That is, each profile adds all its search paths to all the profile roots
>>> passed in the colon separated variable GUIX_PROFILES. If GUIX_PROFILES
>>> is empty, it adds the search paths inside its own directory only (as
>>> until now).
>>
>> I think it was mentioned somewhere in the bug discussion: this will not
>> work for some things. For example, if a user has 'guile' in a system
>> profile, and several guile packages (but not 'guile' itself) in
>> ~/.guix-profile, then GUILE_LOAD_PATH will include
>> "<system-profile>/share/guile/site/2.0" but not
>> "<user-profile>/share/guile/site/2.0". That's why combining profiles
>> inside "guix package --search-paths" command looks like the only
>> solution.
>
> It will actually solve it, that is the case I was trying to fix in
> fact. The code I show will include /share/guile/site/2.0 prefixed
> by every root in the colon-separated list GUIX_PROFILES (note the
> difference with current code with has GUIX_PROFILE, singular). If
> GUIX_PROFILES is (as in the example):
>
> GUIX_PROFILES="/run/current-system/profile:$HOME/.guix-profile"
>
> And guile is in the system profile, the line
>
> export
> GUILE_LOAD_PATH="${profiles//://share/guile/site/2.0:}/share/guile/site/2.0"
>
> will produce:
>
> export
> GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/2.0:$HOME/.guix-profile/share/guile/site/2.0
Unless I’m mistaken, I don’t think this would work.
In the example Alex gave, none of the two profiles specifies
GUILE_LOAD_PATH if taken individually. This example is also in the
manual to illustrate the use of multiple -p flags with --search-paths
(info "(guix) Invoking guix package").
Thoughts?
Ludo’.
- User-profile search paths should include system-profile directories, Carlos Sánchez de La Lama, 2016/09/14
- Re: User-profile search paths should include system-profile directories, Ludovic Courtès, 2016/09/14
- Re: User-profile search paths should include system-profile directories, Carlos Sánchez de La Lama, 2016/09/20
- Re: User-profile search paths should include system-profile directories, Alex Kost, 2016/09/20
- Re: User-profile search paths should include system-profile directories, Carlos Sánchez de La Lama, 2016/09/20
- Re: User-profile search paths should include system-profile directories,
Ludovic Courtès <=
- Re: User-profile search paths should include system-profile directories, Carlos Sánchez de La Lama, 2016/09/22
- Re: User-profile search paths should include system-profile directories, Ludovic Courtès, 2016/09/23
- Re: User-profile search paths should include system-profile directories, Carlos Sánchez de La Lama, 2016/09/26
- Re: User-profile search paths should include system-profile directories, Ludovic Courtès, 2016/09/30