From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enssw-00050h-56 for guix-patches@gnu.org; Mon, 19 Feb 2018 16:22:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ensss-0005mb-QA for guix-patches@gnu.org; Mon, 19 Feb 2018 16:22:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:43823) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ensss-0005mV-Lp for guix-patches@gnu.org; Mon, 19 Feb 2018 16:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ensss-0002jo-EH for guix-patches@gnu.org; Mon, 19 Feb 2018 16:22:02 -0500 Subject: [bug#30480] [PATCH] environment: Add --manifest option. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: Date: Mon, 19 Feb 2018 22:21:37 +0100 In-Reply-To: (David Thompson's message of "Thu, 15 Feb 2018 21:12:58 -0500") Message-ID: <87r2pgekv2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "Thompson, David" Cc: 30480@debbugs.gnu.org Hi David! "Thompson, David" 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=3Dfoo.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=3Dfoo.scm > --manifest=3Dbar.scm --load=3Dfrob.scm --expression=3D'(@ (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 =E2=80=98guix pack=E2=80=99 as well, it turns out to be more shenanigans th= an we=E2=80=99d like. > From 47e0cf3bef26791c72222175899790a46c49af45 Mon Sep 17 00:00:00 2001 > From: David Thompson > 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 =E2=80=9Cguile-bootstrap=E2=80=9D package for instance? OK with this change! :-) Thank you, Ludo=E2=80=99.