[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improving the usability of 'guix environment'
From: |
Ludovic Courtès |
Subject: |
Re: Improving the usability of 'guix environment' |
Date: |
Tue, 10 Feb 2015 22:23:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
David Thompson <address@hidden> skribis:
> Ludovic Courtès <address@hidden> writes:
>
>> David Thompson <address@hidden> skribis:
>>
>>> But all of that boilerplate is unnecessary since it's not possible to
>>> actually build the package successfully without a proper hash of the
>>> source AFAICT. Really, I would rather just use a simple list of
>>> packages:
>>>
>>> (list autoconf automake guile-2.0 guile-json libgcrypt)
>>
>> What about adding a case for the handling of ‘-l’ such that, if the file
>> evaluates to a list of packages, it does what you suggest?
>
> I'm hesitant to do that, because I would also like for a list of
> packages to be usable for building the environment as it's done
> currently. Only allowing a single package in a file is a limitation
> right now.
Yeah.
>>> I propose adding a new flag that indicates whether we want the packages
>>> themselves or their inputs in the environment. If we assume that the
>>> default behavior is to include the packages themselves, a --inputs flag
>>> could indicate to use the package(s) inputs instead:
>>>
>>> guix environment --inputs emacs
>>
>> That makes sense.
>>
>> In terms of UI, what about rather something keeping an interface close
>> to that of ‘guix package’:
>>
>> guix environment -i guile guile-sdl
>> # semantically equivalent to ‘guix package -i guile guile-sdl’
>
> So without the -i switch, it would behave as it does now? Okay, but I
> guess I would prefer to optimize for the common case, which in my case
> would be having -i on by default.
>
>> Now that I think of it, we could even move -E to ‘guix package’ itself:
>> that would make it easy to create a scratch environment based on an
>> existing profile.
>
> I'm a bit confused about that. Are you suggesting we merge 'guix
> environment' into 'guix package'?
A possibility might be to:
• keep ‘guix environment’ as is; after all, ‘guix environment emacs’
really reads as “the environment for [the development of] Emacs”;
• add a -E option to ‘guix package’ (like the -E of ‘guix
environment’).
Example:
# start a shell where guile and guile-sdl are available in addition to
# what’s in ~/.guix-profile
$ guix package -i guile guile-sdl -E $SHELL
# start a shell where only guile and guile-sdl are available
$ guix package -i guile guile-sdl --scratch -E $SHELL
# start a shell in an environment which is my profile minus emacs
# plus vim and with an upgraded zile
$ guix package -r emacs -i vim -u zile --pure -E $SHELL
Hmm.
I’ve not completely convinced myself.
Maybe keeping it in ‘guix environment’ is wiser. I’m not quite sure
that changing the default behavior is desirable though.
Thoughts?
Ludo’.