diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-12-05 17:57:35 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-12-05 17:57:35 +0100 |
commit | 9d5aa009062a49bd035ae33e37f6562526e7d38c (patch) | |
tree | 4ff2302863a5cf9f3cf604240ea793152156f532 /guix/gexp.scm | |
parent | 60bd56c6d8368c23dcd97b26501771c82316fc8c (diff) | |
parent | 2c2fc24b899d3286774f60405888718d98211213 (diff) | |
download | guix-patches-9d5aa009062a49bd035ae33e37f6562526e7d38c.tar guix-patches-9d5aa009062a49bd035ae33e37f6562526e7d38c.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r-- | guix/gexp.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm index b640c079e4..a96592ac76 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -320,9 +320,16 @@ It is implemented as a macro to capture the current source directory where it appears." (syntax-case s () ((_ file rest ...) + (string? (syntax->datum #'file)) + ;; FILE is a literal, so resolve it relative to the source directory. #'(%local-file file (delay (absolute-file-name file (current-source-directory))) rest ...)) + ((_ file rest ...) + ;; Resolve FILE relative to the current directory. + #'(%local-file file + (delay (absolute-file-name file (getcwd))) + rest ...)) ((_) #'(syntax-error "missing file name")) (id |