[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: User-profile search paths should include system-profile directories
From: |
Carlos Sánchez de La Lama |
Subject: |
Re: User-profile search paths should include system-profile directories |
Date: |
Tue, 20 Sep 2016 09:39:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Hi,
>> Is this the intended behaviour? I am wondering whether packages with
>> search paths should include both the user-profile directories and the
>> system-profile ones.
>
> I think you’re right. This was discussed at
> <http://bugs.gnu.org/20255>, leading to a patch (for GuixSD).
>
> However, we failed to build consensus around the approach of this patch,
> so we did not apply it. If you have ideas, please email
> address@hidden :-)
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).
No need to expand recursively (no ":$OLD_VALUE" at then end of each
assignment) as we are generating the profile, user additions will come
later. Should be fast enough, and a user can do the (slower) guix
--search-paths in its own profile if he wants to.
If you think it's fine, I will prepare a patch.
Thoughts?
Carlos
- 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 <=
- 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, 2016/09/21
- 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