aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-16 00:06:27 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-16 09:34:32 +0200
commit0687fc9cd98e38feab80e2f9c8044e77ad52c7fd (patch)
treed7e4b82bb0325a433a0d6e5123297b9459291825 /doc/guix.texi
parent07c8a98c3b45dca9fd36af7c4a300d3af58734dd (diff)
downloadguix-0687fc9cd98e38feab80e2f9c8044e77ad52c7fd.tar
guix-0687fc9cd98e38feab80e2f9c8044e77ad52c7fd.tar.gz
gexp: Add #:select? parameter to 'local-file'.
* guix/gexp.scm (<local-file>)[select?]: New field. (true): New procedure. (%local-file): Add #:select? and honor it. (local-file): Likewise. * tests/gexp.scm ("local-file, #:select?"): New test. * doc/guix.texi (G-Expressions): Adjust accordingly.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index f85221d065..227d861482 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3804,7 +3804,7 @@ does not have any effect on what the G-expression does.
content is directly passed as a string.
@deffn {Scheme Procedure} local-file @var{file} [@var{name}] @
- [#:recursive? #f]
+ [#:recursive? #f] [#:select? (const #t)]
Return an object representing local file @var{file} to add to the store; this
object can be used in a gexp. If @var{file} is a relative file name, it is looked
up relative to the source file where this form appears. @var{file} will be added to
@@ -3814,6 +3814,11 @@ When @var{recursive?} is true, the contents of @var{file} are added recursively;
designates a flat file and @var{recursive?} is true, its contents are added, and its
permission bits are kept.
+When @var{recursive?} is true, call @code{(@var{select?} @var{file}
+@var{stat})} for each directory entry, where @var{file} is the entry's
+absolute file name and @var{stat} is the result of @code{lstat}; exclude
+entries for which @var{select?} does not return true.
+
This is the declarative counterpart of the @code{interned-file} monadic
procedure (@pxref{The Store Monad, @code{interned-file}}).
@end deffn