GNU bug report logs - #50960
[PATCH 00/10] Add 'guix shell' to subsume 'guix environment'

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sat, 2 Oct 2021 10:22:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #101 received at 50960 <at> debbugs.gnu.org (full text, mbox):

From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: Vagrant Cascadian <vagrant <at> debian.org>, Ludovic Courtès
 <ludo <at> gnu.org>, 50960 <at> debbugs.gnu.org
Subject: Re: [bug#50960] [PATCH 00/10] Add 'guix shell' to subsume 'guix
 environment'
Date: Sun, 03 Oct 2021 10:36:40 +0200
Hi!

Vagrant Cascadian <vagrant <at> debian.org> writes:

> On 2021-10-02, Ludovic Courtès wrote:
>> Here comes ‘guix shell’, a proposed replacement for ‘guix environment’!
>
> Yay!
>
>> ‘guix environment’ would stay around though, at least for some time,
>> probably for a long time.
>>
>> The differences to ‘guix environment’ are:
> ...
>>   2. ‘guix shell’, without arguments, loads ‘guix.scm’ or ‘manifest.scm’
>>      from the current directory or one of its ancestors.
>
> This sounds a little scary to me, just implicitly importing whatever
> happens to be lying around doesn't sound very guixy...
> [...]

What about doing something like what direnv[fn:1] does?

Quoting the website:
"direnv checks for the existence of a .envrc file in the current and
parent directories. If the file exists (and is authorized), it is loaded
into a bash sub-shell and all exported variables are then captured by
direnv and then made available to the current shell."

The difference between direnv and the current approach is that if the
file has never been "authorized", before it being imported you need to
run a command (direnv allow) to authorize it.  There's the
~/.config/direnv/allow dir which stores files named with the hash of the
content of the config, and whose content is just the path of the file
(don't know why this is needed).

This allows for automatic environment ({manifest,guix}.scm) file
selection AND a it's a bit more secure (it won't run arbitrary code
residing anywhere in the directory structure).

Except for this, I'd love to see guix shell merged, it will be a major
improvement over guix environment for my use cases.


Thanks!
Nicolò

[fn:1] direnv.net




This bug report was last modified 3 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.