Hi Ludo,

>> Making this work would need two things:
>> 1) not stripping unexisting directories from search paths
>> 2) constructing environment variables prepending every profile root to
>>    the search paths of each profile.
>>
>> Now, my question is, why are unexisting search paths removed?
>
> I don’t think this is really the problem here.  The problem here is that
> if a profile contains only, say, guile-json, there is no way Guix can
> know about GUILE_LOAD_PATH because that variable is associated with
> Guile itself, not with guile-json.

The idea is each profile environment unconditionally adds search paths
for all the profiles in use (which are passed when evaluating
<profile>/etc/profile in the GUIX_PROFILES variable). This was the
proposal in my first message (looks *similar* to an earlier post in the
bug discussion, but it is quite different).

In the case you suggest, the profile cointaining guile will define
GUILE_LOAD_PATH to point inside its own profile and *also* inside the
profile containing guile-json.

The profile that has guile-json will do nothing, as its installer
packages have no search paths.

This is the key:

export ACLOCAL_PATH="${profiles//:/\/share/aclocal:}/share/aclocal

So ACLOCAL_PATH will have an entry for <each profile>/share/aclocal,
regardless of that path existing or not. If path is not there, no harm
done. If it is (i.e. that profile has a package installing an aclocal
.m4 file) then aclocal will find it.

I will try to prepare a patch, so we can see (and might be there is some
problem I still fail to see).

BR

Carlos

Reply via email to