aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-11-20 14:31:34 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-11-27 12:12:41 +0100
commitfa6c4213c6bdd435cf1cbf1afa37ed6d69db5d2d (patch)
tree573281e3d1a85c405849103e832b2fdcea93d9e9
parent9ce7ac992ef148b9906a7bf0b6ac92bd8ea0d9e2 (diff)
downloadguix-fa6c4213c6bdd435cf1cbf1afa37ed6d69db5d2d.tar.gz
guix-fa6c4213c6bdd435cf1cbf1afa37ed6d69db5d2d.zip
gnu: Add ant-junit.
* gnu/packages/java.scm (ant-junit): New variable.
-rw-r--r--gnu/packages/java.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d9fa0c4baf..e2b30e355c 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1785,6 +1785,38 @@ IcedTea build harness.")
`(("java-commons-bcel" ,java-commons-bcel)
,@(package-inputs ant/java8)))))
+(define-public ant-junit
+ (package
+ (inherit ant/java8)
+ (name "ant-junit")
+ (arguments
+ (substitute-keyword-arguments (package-arguments ant/java8)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'link-junit
+ (lambda* (#:key inputs #:allow-other-keys)
+ (for-each (lambda (file)
+ (symlink file
+ (string-append "lib/optional/"
+ (basename file))))
+ (find-files (assoc-ref inputs "java-junit")
+ "\\.jar$"))
+ #t))
+ (add-after 'build 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/java"))
+ (bin (string-append out "/bin"))
+ (lib (string-append out "/lib")))
+ (mkdir-p share)
+ (install-file (string-append lib "/ant-junit.jar") share)
+ (delete-file-recursively bin)
+ (delete-file-recursively lib)
+ #t)))))))
+ (inputs
+ `(("java-junit" ,java-junit)
+ ,@(package-inputs ant/java8)))))
+
(define-public clojure
(let* ((remove-archives '(begin
(for-each delete-file