Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment'
From: Ludovic Courtès <[email-masked]>
To: Ricardo Wurmus <[email-masked]>
Cc: [email-masked], "Thompson, David" <[email-masked]>
Date: Sat, 16 Feb 2019 01:05:17 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Ricardo Wurmus <[email-masked]> skribis:

> Ludovic Courtès <[email-masked]> writes:
>
>> This new option allows to specify additional variables to be inherited
>> in a “pure” (semi-pure?) environment.
>>
>> The main motivation was the use of the SLURM batch scheduler, which
>> defines environment variables that you need to preserve so that things
>> like ‘mpirun’ work correctly.
>
> Looks good to me.  The same is needed for Grid Engine.  Previously I
> would use “env” with an installed profile for the same effect:
>
> #!/bin/bash
>
> profile=/path/to/.guix-profile
> exec /bin/env - PATH=/opt/uge/bin/lx-amd64 \
>                 SGE_CELL=default \
>                 SGE_ARCH=lx-amd64 …
>                 GUIX_LOCPATH=… \
>                 /bin/bash --init-file "$profile/etc/profile"

Oh so I guess this is an improvement.  :-)

Pushed as e6e599fa0106f57b9de15f90dcab3795ff1575b6.

> I guess the only thing that’s missing now is to activate an installed
> environment.

Something beyond --search-paths and etc/profile, right?  I’m not sure
what it would look like.

Thanks for your feedback David & Ricardo!

Ludo’.