diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-06-03 11:45:27 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-06-03 11:47:36 +0200 |
| commit | 558e8b11d77ed79c1ae0baf5fda66cfc083bab4b (patch) | |
| tree | 0ce333a9bea9554192c9c26b8ec0b6cb114383ab /doc | |
| parent | 74d441abeee257f5d7ec5bb5fa0db70bd26802b7 (diff) | |
gexp: Add 'plain-file'.
* guix/gexp.scm (<plain-file>): New type.
(plain-file, plain-file-compiler): New procedures.
* tests/gexp.scm ("one plain file"): New test.
* doc/guix.texi (G-Expressions): Document 'plain-file'.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 2d10ec9b598..665bdb028d7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -2948,7 +2948,8 @@ derivations can be defined, such that these objects can also be inserted | |||
| 2948 | into gexps. Another useful type of high-level object that can be | 2948 | into gexps. Another useful type of high-level object that can be |
| 2949 | inserted in a gexp is @dfn{local files}, which allows files from the | 2949 | inserted in a gexp is @dfn{local files}, which allows files from the |
| 2950 | local file system to be added to the store and referred to by | 2950 | local file system to be added to the store and referred to by |
| 2951 | derivations and such (see @code{local-file} below.) | 2951 | derivations and such (see @code{local-file} and @code{plain-file} |
| 2952 | below.) | ||
| 2952 | 2953 | ||
| 2953 | To illustrate the idea, here is an example of a gexp: | 2954 | To illustrate the idea, here is an example of a gexp: |
| 2954 | 2955 | ||
| @@ -3126,6 +3127,13 @@ This is the declarative counterpart of the @code{interned-file} monadic | |||
| 3126 | procedure (@pxref{The Store Monad, @code{interned-file}}). | 3127 | procedure (@pxref{The Store Monad, @code{interned-file}}). |
| 3127 | @end deffn | 3128 | @end deffn |
| 3128 | 3129 | ||
| 3130 | @deffn {Scheme Procedure} plain-file @var{name} @var{content} | ||
| 3131 | Return an object representing a text file called @var{name} with the given | ||
| 3132 | @var{content} (a string) to be added to the store. | ||
| 3133 | |||
| 3134 | This is the declarative counterpart of @code{text-file}. | ||
| 3135 | @end deffn | ||
| 3136 | |||
| 3129 | @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} | 3137 | @deffn {Monadic Procedure} gexp->script @var{name} @var{exp} |
| 3130 | Return an executable script @var{name} that runs @var{exp} using | 3138 | Return an executable script @var{name} that runs @var{exp} using |
| 3131 | @var{guile} with @var{modules} in its search path. | 3139 | @var{guile} with @var{modules} in its search path. |
