[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding a subcommand "load-profile"
From: |
Vagrant Cascadian |
Subject: |
Re: Adding a subcommand "load-profile" |
Date: |
Sun, 03 May 2020 13:56:43 -0700 |
On 2020-05-03, Ludovic Courtès wrote:
> sirgazil <address@hidden> skribis:
>> ---- On Tue, 28 Apr 2020 22:42:53 +0000 Roel Janssen <address@hidden> wrote
>> ----
>> > We added a subcommand in the "guixr" script called "load-profile". It
>> allows a
>> > user to do the following:
>> >
>> --------------------------------------------------------------------------------
>> > $ guixr package -i ... -p /my/profile
>> > $ guixr load-profile /my/profile
>> > [env]$
>> > # ... A new shell is spawned here.
>> > # Inside this shell only the environment variables in
>> > # /my/profile/etc/profile are set ...
>> > [env]$ exit
>> > # Return to the normal shell state
>> >
>> --------------------------------------------------------------------------------
>
> [...]
>
>> Personally, I think managing Guix profiles is currently difficult, and I
>> would like to have commands like this one to make it easier.
>
> I’m interested in your feedback then.
>
> To me, there are already several ways to do that, notably:
>
> 1. guix environment (but it’s slower)
>
> 2. sh
> . /my/profile/etc/profile.sh
> exit
>
> 3. sh
> eval `guix package -p /my/profile --search-paths`
> exit
>
> Options #2 and #3 are more verbose, and less obvious to someone not
> familiar with the shell.
The only way i understand how to trivially get a precise environment is
"guix environment --pure --ad-hoc package1, package2, ... packageN"
Don't options #2 and #3 also include everything from the default profile
and system profile?
I like the ability to maintain separate profiles and run "guix upgrade
-p my/profile" on each profile, but I haven't figured out how to get
something equivalent to "guix environment --pure --profile my/profile".
I find this useful when updating diffoscope or reprotest packages, which
tend to have a lot of suggested optional packages that aren't really
hard dependencies.
This looks "load-profile" subcommand seems to attempting to meet that
use-case, if I'm reading it correctly?
live well,
vagrant
signature.asc
Description: PGP signature