diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-09-07 22:37:14 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-10-10 22:46:14 +0200 |
commit | 919370291f4f9cc93878eea7db11013949ee8473 (patch) | |
tree | cd86c3cf59adc2d07e398ad6779a62de0c09d7f9 /doc | |
parent | a72ccbc25125d0d14cabdc1b0f824f27bb64478b (diff) | |
download | patches-919370291f4f9cc93878eea7db11013949ee8473.tar patches-919370291f4f9cc93878eea7db11013949ee8473.tar.gz |
gexp: Add 'computed-file'.
* guix/gexp.scm (<computed-file>): New record type.
(computed-file, computed-file-compiler): New procedures.
* tests/gexp.scm ("lower-object, computed-file"): New test.
* doc/guix.texi (G-Expressions): Document 'computed-file'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 39b76c7bf6..9c63230a4f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3345,9 +3345,10 @@ The other arguments are as for @code{derivation} (@pxref{Derivations}). @end deffn @cindex file-like objects -The @code{local-file} and @code{plain-file} procedures below return -@dfn{file-like objects}. That is, when unquoted in a G-expression, -these objects lead to a file in the store. Consider this G-expression: +The @code{local-file}, @code{plain-file}, and @code{computed-file} +procedures below return @dfn{file-like objects}. That is, when unquoted +in a G-expression, these objects lead to a file in the store. Consider +this G-expression: @example #~(system* (string-append #$glibc "/sbin/nscd") "-f" @@ -3383,6 +3384,16 @@ Return an object representing a text file called @var{name} with the given This is the declarative counterpart of @code{text-file}. @end deffn +@deffn {Scheme Procedure} computed-file @var{name} @var{gexp} @ + [#:modules '()] [#:options '(#:local-build? #t)] +Return an object representing the store item @var{name}, a file or +directory computed by @var{gexp}. @var{modules} specifies the set of +modules visible in the execution context of @var{gexp}. @var{options} +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} Return an executable script @var{name} that runs @var{exp} using @var{guile} with @var{modules} in its search path. |