From 3ddcfde711ce4a9cbff09c8b54f65bb2a977c094 Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Thu, 18 Oct 2018 03:08:31 +0800 Subject: [PATCH 2/2] java-utils: Use 'strip-store-file-name'. See the discussion at . * guix/build/java-utils.scm (package-name-version): Remove it. (install-javadoc): Use 'strip-store-file-name' instead of 'package-name-version'. --- guix/build/java-utils.scm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm index 128be1ede..7c9cafacc 100644 --- a/guix/build/java-utils.scm +++ b/guix/build/java-utils.scm @@ -23,12 +23,6 @@ install-jars install-javadoc)) -;; Copied from haskell-build-system.scm -(define (package-name-version store-dir) - "Given a store directory STORE-DIR return 'name-version' of the package." - (let* ((base (basename store-dir))) - (string-drop base (+ 1 (string-index base #\-))))) - (define* (ant-build-javadoc #:key (target "javadoc") (make-flags '()) #:allow-other-keys) (apply invoke `("ant" ,target ,@make-flags))) @@ -48,8 +42,9 @@ is used in case the build.xml does not include an install target." install javadocs when this is not done by the install target." (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) + (name-version (strip-store-file-name out)) (docs (string-append (or (assoc-ref outputs "doc") out) - "/share/doc/" (package-name-version out) "/"))) + "/share/doc/" name-version "/"))) (mkdir-p docs) (copy-recursively apidoc-directory docs) #t))) -- 2.19.1