From 1ae16033f34cebe802023922436883867010850f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 23 Mar 2018 18:21:28 +0100 Subject: gexp: 'gexp->script' and 'gexp->file' have a new #:module-path parameter. * guix/gexp.scm (load-path-expression): Add 'path' optional parameter. (gexp->script): Add #:module-path and honor it. (gexp->file): Likewise. * tests/gexp.scm ("gexp->script #:module-path"): New test. * doc/guix.texi (G-Expressions): Update accordingly. --- doc/guix.texi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index 7617d7fe16..b765bcd112 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5150,9 +5150,11 @@ is a list of additional arguments to pass to @code{gexp->derivation}. This is the declarative counterpart of @code{gexp->derivation}. @end deffn -@deffn {Monadic Procedure} gexp->script @var{name} @var{exp} +@deffn {Monadic Procedure} gexp->script @var{name} @var{exp} @ + [#:guile (default-guile)] [#:module-path %load-path] Return an executable script @var{name} that runs @var{exp} using @var{guile}, with @var{exp}'s imported modules in its search path. +Look up @var{exp}'s modules in @var{module-path}. The example below builds a script that simply invokes the @command{ls} command: @@ -5186,11 +5188,13 @@ This is the declarative counterpart of @code{gexp->script}. @end deffn @deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @ - [#:set-load-path? #t] + [#:set-load-path? #t] [#:module-path %load-path] @ + [#:guile (default-guile)] Return a derivation that builds a file @var{name} containing @var{exp}. When @var{set-load-path?} is true, emit code in the resulting file to set @code{%load-path} and @code{%load-compiled-path} to honor -@var{exp}'s imported modules. +@var{exp}'s imported modules. Look up @var{exp}'s modules in +@var{module-path}. The resulting file holds references to all the dependencies of @var{exp} or a subset thereof. -- cgit v1.2.3