[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: doc: Move 'text-file*' to the gexp section.
From: |
Ludovic Courtès |
Subject: |
01/04: doc: Move 'text-file*' to the gexp section. |
Date: |
Wed, 14 Jan 2015 13:46:02 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 1ed194646b22600e002ab8050905fd428d3036fc
Author: Ludovic Courtès <address@hidden>
Date: Wed Jan 14 11:22:51 2015 +0100
doc: Move 'text-file*' to the gexp section.
This is a follow-up to commit 462a3fa.
* doc/guix.texi (The Store Monad): Move 'text-file*'...
(G-Expressions): ... to here.
---
doc/guix.texi | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index d92495b..5f25583 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -2255,31 +2255,6 @@ Return as a monadic value the absolute file name in the
store of the file
containing @var{text}, a string.
@end deffn
address@hidden {Monadic Procedure} text-file* @var{name} @var{text} @dots{}
-Return as a monadic value a derivation that builds a text file
-containing all of @var{text}. @var{text} may list, in addition to
-strings, packages, derivations, and store file names; the resulting
-store file holds references to all these.
-
-This variant should be preferred over @code{text-file} anytime the file
-to create will reference items from the store. This is typically the
-case when building a configuration file that embeds store file names,
-like this:
-
address@hidden
-(define (profile.sh)
- ;; Return the name of a shell script in the store that
- ;; initializes the 'PATH' environment variable.
- (text-file* "profile.sh"
- "export PATH=" coreutils "/bin:"
- grep "/bin:" sed "/bin\n"))
address@hidden example
-
-In this example, the resulting @file{/gnu/store/@dots{}-profile.sh} file
-will references @var{coreutils}, @var{grep}, and @var{sed}, thereby
-preventing them from being garbage-collected during its lifetime.
address@hidden deffn
-
@deffn {Monadic Procedure} interned-file @var{file} address@hidden @
[#:recursive? #t]
Return the name of @var{file} once interned in the store. Use
@@ -2563,6 +2538,31 @@ The resulting file holds references to all the
dependencies of @var{exp}
or a subset thereof.
@end deffn
address@hidden {Monadic Procedure} text-file* @var{name} @var{text} @dots{}
+Return as a monadic value a derivation that builds a text file
+containing all of @var{text}. @var{text} may list, in addition to
+strings, packages, derivations, and store file names; the resulting
+store file holds references to all these.
+
+This variant should be preferred over @code{text-file} anytime the file
+to create will reference items from the store. This is typically the
+case when building a configuration file that embeds store file names,
+like this:
+
address@hidden
+(define (profile.sh)
+ ;; Return the name of a shell script in the store that
+ ;; initializes the 'PATH' environment variable.
+ (text-file* "profile.sh"
+ "export PATH=" coreutils "/bin:"
+ grep "/bin:" sed "/bin\n"))
address@hidden example
+
+In this example, the resulting @file{/gnu/store/@dots{}-profile.sh} file
+will references @var{coreutils}, @var{grep}, and @var{sed}, thereby
+preventing them from being garbage-collected during its lifetime.
address@hidden deffn
+
Of course, in addition to gexps embedded in ``host'' code, there are
also modules containing build tools. To make it clear that they are
meant to be used in the build stratum, these modules are kept in the