GNU bug report logs - #30480
[PATCH] environment: Add --manifest option.

Previous Next

Package: guix-patches;

Reported by: "Thompson, David" <dthompson2 <at> worcester.edu>

Date: Fri, 16 Feb 2018 02:14:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Thompson, David" <dthompson2 <at> worcester.edu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30480 <at> debbugs.gnu.org
Subject: [bug#30480] [PATCH] environment: Add --manifest option.
Date: Tue, 20 Feb 2018 22:25:00 -0500
[Message part 1 (text/plain, inline)]
Hey Ludo,

On Mon, Feb 19, 2018 at 4:21 PM, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hi David!
>
> "Thompson, David" <dthompson2 <at> worcester.edu> skribis:
>
>> In my lurkings I've seen people wondering why `guix environment`
>> doesn't work with manifests. The answer is simply: I never thought to
>> add it. This patch fixes that. The implementation is kind of
>> interesting and might seem a little silly to people that know how
>> manifests work.  In order to support manifests with minimal code and
>> make --manifest compose with other options I simply decompile the
>> manifest back into a list of package/output tuples.  That means in the
>> case of `guix environment --manifest=foo.scm` the manifest is created,
>> decompiled, and a new manifest created from that.  Seems redundant!
>> The advantage is that since --manifest composes with all the other
>> ways to specify packages we can do absolutely bonkers things like
>> `guix environment guile --ad-hoc ruby --manifest=foo.scm
>> --manifest=bar.scm --load=frob.scm --expression='(@ (gnu packages
>> python) python)'`.  More realistically you'd use it to throw in an
>> extra package or two with --ad-hoc.
>
> Indeed, that makes a lot of sense.  I wondered about doing that for
> ‘guix pack’ as well, it turns out to be more shenanigans than we’d like.
>
>> From 47e0cf3bef26791c72222175899790a46c49af45 Mon Sep 17 00:00:00 2001
>> From: David Thompson <dthompson2 <at> worcester.edu>
>> Date: Thu, 15 Feb 2018 20:54:28 -0500
>> Subject: [PATCH] environment: Add --manifest option.
>>
>> * guix/scripts/environment.scm (show-help, %options): Add -m/--manifest.
>> (options/resolve-packages): Handle manifests.
>> * doc/guix.texi (Invoking guix environment): Document it.
>
> Could you add an example in tests/guix-environment.sh that uses a
> manifest with the “guile-bootstrap” package for instance?
>
> OK with this change!  :-)

Is this what you had in mind?

- Dave
[0001-environment-Add-manifest-option.patch (text/x-patch, attachment)]

This bug report was last modified 7 years and 176 days ago.

Previous Next


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