summaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-11-19 22:57:27 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-11-27 12:12:40 +0100
commitc5ff11dcc160f589685f705f7713c94099067f44 (patch)
tree5fa60988bfc9c243feaeec7c377bce9b4d4812a6 /gnu/packages/java.scm
parentd7fed31ad2d115f2708e1801607df727e985ae52 (diff)
downloadpatches-c5ff11dcc160f589685f705f7713c94099067f44.tar
patches-c5ff11dcc160f589685f705f7713c94099067f44.tar.gz
gnu: Add java-cofoja.
* gnu/packages/java.scm (java-cofoja): New variable.
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm56
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 10ed3b6664..748da1d1ef 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -6516,6 +6516,62 @@ provides control over value quantization behavior across the value range and
the subsequent value resolution at any given level.")
(license license:public-domain)))
+(define-public java-cofoja
+ (package
+ (name "java-cofoja")
+ (version "1.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nhatminhle/cofoja.git")
+ (commit (string-append "v" version))))
+ (file-name (string-append "java-cofoja-" version "-checkout"))
+ (sha256
+ (base32
+ "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:build-target "dist"
+ #:test-target "test"
+ #:jdk ,icedtea-8
+ #:make-flags
+ (list "-Ddist.dir=dist")
+ #:modules ((guix build ant-build-system)
+ (guix build java-utils)
+ (guix build utils)
+ (srfi srfi-1)
+ (ice-9 match))
+ #:phases
+ (modify-phases %standard-phases
+ ;; The bulid system ignores the class path the ant-build-system sets
+ ;; up and instead expects to find all dependencies in the "lib"
+ ;; directory.
+ (add-after 'unpack 'create-libdir
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "lib")
+ (for-each
+ (lambda (file)
+ (let ((target (string-append "lib/" (basename file))))
+ (unless (file-exists? target)
+ (symlink file target))))
+ (append-map (match-lambda
+ ((label . dir)
+ (find-files dir "\\.jar$")))
+ inputs))
+ #t))
+ (replace 'install (install-jars "dist")))))
+ (inputs
+ `(("java-asm" ,java-asm)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "https://github.com/nhatminhle/cofoja")
+ (synopsis "Contracts for Java")
+ (description "Contracts for Java, or Cofoja for short, is a contract
+programming framework and test tool for Java, which uses annotation processing
+and bytecode instrumentation to provide run-time checking. (In particular,
+this is not a static analysis tool.)")
+ (license license:lgpl3+)))
+
(define-public java-aopalliance
(package
(name "java-aopalliance")