guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding a subcommand "load-profile"


From: Ludovic Courtès
Subject: Re: Adding a subcommand "load-profile"
Date: Sun, 03 May 2020 22:31:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi,

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.

Still, such commands are targeting shell users, which makes me wonder
how far we should go.  It’s an honest question: I’m torn between the
will to provide a simple CLI, and the need to avoid proliferation of
commands all more or less equivalent.

Thoughts?

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]