diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-04-11 00:52:40 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-04-11 01:03:47 +0200 |
commit | 4fbd1a2b7f0db819e14d7cc862445d9ab3d0d80f (patch) | |
tree | 17a949d66577a8d9e53d731808906ce0d997c2a6 /doc/guix.texi | |
parent | a1639ae9de39d5ce47e6ddfd87e792db52b44bd6 (diff) | |
download | gnu-guix-4fbd1a2b7f0db819e14d7cc862445d9ab3d0d80f.tar gnu-guix-4fbd1a2b7f0db819e14d7cc862445d9ab3d0d80f.tar.gz |
gexp: 'scheme-file' can splice expressions.
* guix/gexp.scm (<scheme-file>)[splice?]: New field.
(scheme-file): Add #:splice? and pass it to '%scheme-file'.
(scheme-file-compiler): Pass SPLICE? to 'gexp->file'.
(gexp->file): Add #:splice? and honor it.
* tests/gexp.scm ("gexp->file + #:splice?"): New test.
("gexp->derivation & with-imported-module & computed module"): Use
#:splice? #t.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 738fdf65ca..d825f39e0e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5221,8 +5221,12 @@ This is the declarative counterpart of @code{gexp->script}. @deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @ [#:set-load-path? #t] [#:module-path %load-path] @ + [#:splice? #f] @ [#:guile (default-guile)] Return a derivation that builds a file @var{name} containing @var{exp}. +When @var{splice?} is true, @var{exp} is considered to be a list of +expressions that will be spliced in the resulting file. + 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. Look up @var{exp}'s modules in @@ -5232,7 +5236,7 @@ The resulting file holds references to all the dependencies of @var{exp} or a subset thereof. @end deffn -@deffn {Scheme Procedure} scheme-file @var{name} @var{exp} +@deffn {Scheme Procedure} scheme-file @var{name} @var{exp} [#:splice? #f] Return an object representing the Scheme file @var{name} that contains @var{exp}. |