summaryrefslogtreecommitdiff
path: root/guix/gexp.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-15 23:08:05 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-16 09:34:32 +0200
commit07c8a98c3b45dca9fd36af7c4a300d3af58734dd (patch)
tree1d2db14446ae9f6560ce0b8cb5398559bc9c2180 /guix/gexp.scm
parentb78997495474e07083744c1f3ce506ee04488548 (diff)
downloadguix-patches-07c8a98c3b45dca9fd36af7c4a300d3af58734dd.tar
guix-patches-07c8a98c3b45dca9fd36af7c4a300d3af58734dd.tar.gz
gexp: Move 'current-source-directory' to (guix utils).
* guix/gexp.scm (extract-directory, current-source-directory): Move to... * guix/utils.scm (extract-directory, current-source-directory): ... here. New procedures.
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r--guix/gexp.scm13
1 files changed, 0 insertions, 13 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm
index b4d737ecae..8e604ff7cf 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -202,19 +202,6 @@ cross-compiling.)"
;; %%LOCAL-FILE is not.
(%%local-file file promise name recursive?))
-(define (extract-directory properties)
- "Extract the directory name from source location PROPERTIES."
- (match (assq 'filename properties)
- (('filename . (? string? file-name))
- (dirname file-name))
- (_
- #f)))
-
-(define-syntax-rule (current-source-directory)
- "Expand to the directory of the current source file or #f if it could not
-be determined."
- (extract-directory (current-source-location)))
-
(define (absolute-file-name file directory)
"Return the canonical absolute file name for FILE, which lives in the
vicinity of DIRECTORY."