unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Thompson <dthompson2@worcester.edu>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] scripts: Add 'environment' command.
Date: Fri, 10 Oct 2014 18:37:03 +0200	[thread overview]
Message-ID: <87y4sn9900.fsf@gnu.org> (raw)
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")

David Thompson <dthompson2@worcester.edu> skribis:

> From 26cac530c7a1f69864fc819bdc14553eacd9dc23 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> 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’t mention it before but it would be wonderful if you could come
up with a little test case.  It’s a bit difficult, esp. since the tests
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 ‘guile’ 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 file.
>  * Invoking guix refresh::       Updating package definitions.
>  * Invoking guix lint::          Finding errors in package definitions.
> +* Invoking guix environment::   Creating new environments from package inputs.

“Setting up development environments.” 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 “, 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:”

> +@item --exec=@var{command}
> +@item -e @var{command}

Should be -E.

> +@item --search-paths
> +Display needed environment variable definitions.

“Display the environment variable definitions that make up the
environment”, or something like that?  (I find “needed” 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’.

  reply	other threads:[~2014-10-10 16:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 22:48 [PATCH] scripts: Add 'environment' command David Thompson
2014-10-09  6:44 ` Alex Kost
2014-10-09 16:50 ` Eric Bavier
2014-10-09 16:54   ` Thompson, David
2014-10-09 17:26     ` Eric Bavier
2014-10-09 19:30 ` Ludovic Courtès
2014-10-10  2:32   ` David Thompson
2014-10-10 12:09     ` David Thompson
2014-10-10 16:37       ` Ludovic Courtès [this message]
2014-10-10 18:09         ` David Thompson
2014-10-10 20:47           ` Ludovic Courtès
2014-10-10 22:16             ` David Thompson
2014-10-11 10:35               ` Ludovic Courtès
2014-10-11 12:27                 ` David Thompson
2014-10-11 21:52                   ` Ludovic Courtès
2014-10-12  4:43                 ` Setting environment variables in .bashrc vs .bash_profile Mark H Weaver
2014-10-12 21:10                   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4sn9900.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).