From a54bd6d72dc91f649fb2b6cb3c612da1639d9b72 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 28 May 2015 08:41:04 -0400 Subject: guix environment: Add --ad-hoc option. * guix/scripts/environment.scm (%options): Add "ad-hoc" option. (show-help): Display help for "--ad-hoc". (packages+propagated-inputs): New procedure. (guix-environment): Create ad hoc environment when asked. * doc/guix.texi ("invoking guix environment"): Document it. --- doc/guix.texi | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 1956dbc422..2d10ec9b59 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2381,7 +2381,7 @@ the @code{#:haddock-flags} parameter. If the file @code{Setup.hs} is not found, the build system looks for @code{Setup.lhs} instead. Which Haskell compiler is used can be specified with the @code{#:haskell} -parameter which defaults to @code{ghc}. +parameter which defaults to @code{ghc}. @end defvr Lastly, for packages that do not need anything as sophisticated, a @@ -3932,6 +3932,21 @@ evaluates to. @item -E @var{command} Execute @var{command} in the new environment. +@item --ad-hoc +Include all specified packages in the resulting environment, as if an +@i{ad hoc} package were defined with them as inputs. This option is +useful for quickly creating an environment without having to write a +package expression to contain the desired inputs. + +For instance, the command: + +@example +guix environment --ad-hoc guile guile-sdl -E guile +@end example + +runs @command{guile} in an environment where Guile and Guile-SDL are +available. + @item --pure Unset existing environment variables when building the new environment. This has the effect of creating an environment in which search paths -- cgit v1.2.3