From 9d3994f70095b46b95e6d05562f32c25be326772 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 14 Dec 2015 19:52:47 +0100 Subject: gexp: 'local-file' resolves relative file names. * guix/gexp.scm (): Rename constructor to '%%local-file'. Add 'absolute' field. (%local-file, extract-directory, absolute-file-name): New procedures. (current-source-directory): New macro. (local-file): Adjust call to '%local-file'. (local-file-absolute-file-name): New procedure. (local-file-compiler): Force the 'absolute' field. * tests/guix-system.sh: Test whether 'local-file' canonicalization works. * doc/guix.texi (G-Expressions): Adjust. --- doc/guix.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 29cea5cef8..07668e917f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3489,8 +3489,9 @@ content is directly passed as a string. @deffn {Scheme Procedure} local-file @var{file} [@var{name}] @ [#:recursive? #t] Return an object representing local file @var{file} to add to the store; this -object can be used in a gexp. @var{file} will be added to the store under @var{name}--by -default the base name of @var{file}. +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}. 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 -- cgit v1.2.3