Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment'

From: Ricardo Wurmus <[email-masked]>
Date: Sat, 16 Feb 2019 10:12:08 +0100

Ludovic Courtès <[email-masked]> writes:

>> 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.

It doesn’t need to be much.  People can “save” environments with
“--root” but they have no built-in mechanism to “load” an environment
that has been saved like that.

Loading can be done with “env /path/to/bash --init-file
$profile/etc/profile” for activating an environment without mixing its
environment variables into the current environment.  Merging an
environment can be done with “source $profile/etc/profile”.  It would be
nice if there was a simpler, unified interface for this.

    guix environment --load /my/.guix-profile
    guix environment --pure --load /my/.guix-profile
    guix environment --container --load /my/.guix-profile

etc.

--
Ricardo