From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] scripts: Add 'environment' command. Date: Fri, 10 Oct 2014 18:37:03 +0200 Message-ID: <87y4sn9900.fsf@gnu.org> References: <87oatmch5i.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87siix59cs.fsf@gnu.org> <87r3yg1wpp.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <871tqgdt3o.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcdBe-0005IC-TI for guix-devel@gnu.org; Fri, 10 Oct 2014 12:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcdBa-0002HO-7z for guix-devel@gnu.org; Fri, 10 Oct 2014 12:37:02 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:53529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcdBZ-0002HD-Ot for guix-devel@gnu.org; Fri, 10 Oct 2014 12:36:58 -0400 In-Reply-To: <871tqgdt3o.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Fri, 10 Oct 2014 08:09:15 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org David Thompson skribis: > From 26cac530c7a1f69864fc819bdc14553eacd9dc23 Mon Sep 17 00:00:00 2001 > From: David Thompson > Date: Sun, 21 Sep 2014 13:40:05 -0400 > Subject: [PATCH] scripts: Add 'environment' command. > > * guix/scripts/environment.scm: New file. > * Makefile.am (MODULES): Add it. > * doc/guix.texi ("Invoking guix environment"): New node. Nice! I didn=E2=80=99t mention it before but it would be wonderful if you could c= ome up with a little test case. It=E2=80=99s a bit difficult, esp. since the t= ests cannot assume that will download & build the world. So basically the test could do, in a tests/guix-environment.sh script: guix environment -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' ... and make sure it at least sees =E2=80=98guile=E2=80=99 in $PATH. WDYT? That can come in a later commit if you prefer. > diff --git a/doc/guix.texi b/doc/guix.texi > index c9760f5..5b9c933 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -2417,6 +2417,7 @@ programming interface of Guix in a convenient way. > * Invoking guix hash:: Computing the cryptographic hash of a fi= le. > * Invoking guix refresh:: Updating package definitions. > * Invoking guix lint:: Finding errors in package definitions. > +* Invoking guix environment:: Creating new environments from package i= nputs. =E2=80=9CSetting up development environments.=E2=80=9D maybe? We should also add a @dircategory Software development @direntry ... at the top of the file for this node. > +@node Invoking guix environment > +@section Invoking @command{guix environment} > + > +The purpose of @command{guix environment} is to assist hackers in > +creating reproducible development environments without polluting their > +package profile. The @command{guix environment} tool takes a package, s/a package/one or more packages/ > +The new shell's environment is an augmented version of the environment > +that @command{guix environment} was run in. It contains the necessary > +search paths for building the given package added to the existing > +environment variables. To create a ``pure'' environment in which the > +original environment variables have been unset, use the @code{--pure} > +option. > + > +Additionally, more than one package may be specified. + something like =E2=80=9C, in which case all the inputs ... For example, = the command below spawns a shell where all the dependencies of both Guile and Emacs are available:=E2=80=9D > +@item --exec=3D@var{command} > +@item -e @var{command} Should be -E. > +@item --search-paths > +Display needed environment variable definitions. =E2=80=9CDisplay the environment variable definitions that make up the environment=E2=80=9D, or something like that? (I find =E2=80=9Cneeded=E2= =80=9D ambiguous.) > +@end table Here add something like: It also supports all the common build options that @command{guix build} supports (@pxref{Invoking guix build, common build options}). The rest is good! Thanks, Ludo=E2=80=99.