summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-09-08 22:44:26 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-10 22:46:14 +0200
commit15a01c72209b2d43239fe7516a22e531b7fcb85f (patch)
treeefa0f72643c6b53a75966957eef524eeae712072 /doc
parent919370291f4f9cc93878eea7db11013949ee8473 (diff)
gexp: Add 'program-file'.
* guix/gexp.scm (<program-file>): New record type. (program-file, program-file-compiler): New procedures. * tests/gexp.scm ("program-file"): New test. * doc/guix.texi (G-Expressions): Document it.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi17
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 9c63230a4f..e0a6f2bddf 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3345,10 +3345,10 @@ The other arguments are as for @code{derivation} (@pxref{Derivations}).
@end deffn
@cindex file-like objects
-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:
+The @code{local-file}, @code{plain-file}, @code{computed-file}, and
+@code{program-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"
@@ -3421,6 +3421,15 @@ executable file @file{/gnu/store/@dots{}-list-files} along these lines:
@end example
@end deffn
+@deffn {Scheme Procedure} program-file @var{name} @var{exp} @
+ [#:modules '()] [#:guile #f]
+Return an object representing the executable store item @var{name} that
+runs @var{gexp}. @var{guile} is the Guile package used to execute that
+script, and @var{modules} is the list of modules visible to that script.
+
+This is the declarative counterpart of @code{gexp->script}.
+@end deffn
+
@deffn {Monadic Procedure} gexp->file @var{name} @var{exp}
Return a derivation that builds a file @var{name} containing @var{exp}.