summaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-11-30 17:17:00 +0100
committerLudovic Courtès <ludo@gnu.org>2019-11-30 23:50:40 +0100
commit99c45877a984dd0148151b2e304afef6fb04f1a5 (patch)
tree39a1e9ff9cbcb619842b6dea70e7efb4126b28c4 /doc/guix.texi
parentd70478da2b878350450b976686f29712c06745f3 (diff)
gexp: 'local-file' properly resolves non-literal relative file names.
* guix/gexp.scm (local-file): Distinguish the case where FILE is a literal string and when it's not. Add a clause for when FILE is not a literal string. * tests/gexp.scm ("local-file, non-literal relative file name"): New test. * doc/guix.texi (G-Expressions): Update accordingly.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi11
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index d188f06a43..661aa41785 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7684,10 +7684,13 @@ content is directly passed as a string.
@deffn {Scheme Procedure} local-file @var{file} [@var{name}] @
[#: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
-the store under @var{name}--by default the base name of @var{file}.
+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 literal string
+denoting a relative file name, it is looked up relative to the source
+file where it appears; if @var{file} is not a literal string, it is
+looked up relative to the current working directory at run time.
+@var{file} will be added to the store under @var{name}--by default the
+base name of @var{file}.
When @var{recursive?} is true, the contents of @var{file} are added recursively; if @var{file}
designates a flat file and @var{recursive?} is true, its contents are added, and its