aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-01-15 23:38:35 +0100
committerLudovic Courtès <ludo@gnu.org>2020-01-15 23:48:33 +0100
commit65b510bbc4f2a9ce5bfe3355e6006e9d08f14532 (patch)
tree968173d990cc5562bbc608d0f9ddd7dd479324e6
parent0aa6b3869584dba5916039b8e71b6532463e42ab (diff)
downloadpatches-65b510bbc4f2a9ce5bfe3355e6006e9d08f14532.tar
patches-65b510bbc4f2a9ce5bfe3355e6006e9d08f14532.tar.gz
clojure-utils: Avoid use of '@@'.
* guix/build/clojure-utils.scm (%doc-regex): Avoid @@, which doesn't work on Guile 3. (file-sans-extension): Likewise.
-rw-r--r--guix/build/clojure-utils.scm15
1 files changed, 7 insertions, 8 deletions
diff --git a/guix/build/clojure-utils.scm b/guix/build/clojure-utils.scm
index 9f7334bc8d..a9ffad3c8f 100644
--- a/guix/build/clojure-utils.scm
+++ b/guix/build/clojure-utils.scm
@@ -69,10 +69,7 @@
(define-with-docs %doc-regex
"Default regex for matching the base name of top-level documentation files."
- (format #f
- "(~a)|(\\.(html|markdown|md|txt)$)"
- (@@ (guix build guile-build-system)
- %documentation-file-regexp)))
+ "^(README.*|.*\\.html|.*\\.org|.*\\.md|\\.markdown|\\.txt)$")
(define* (install-doc #:key
doc-dirs
@@ -185,10 +182,12 @@ canonicalized."
(apply find-files "./" args))))
;;; FIXME: should be moved to (guix build utils)
-(define-with-docs file-sans-extension
- "Strip extension from path, if any."
- (@@ (guix build guile-build-system)
- file-sans-extension))
+(define (file-sans-extension file) ;TODO: factorize
+ "Return the substring of FILE without its extension, if any."
+ (let ((dot (string-rindex file #\.)))
+ (if dot
+ (substring file 0 dot)
+ file)))
(define (relative-path->clojure-lib-string path)
"Convert PATH to a clojure library string."