Commit | Line | Data |
---|---|---|
0760e3a1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
799c3c86 | 2 | ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
559239af | 3 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
ea9e58ef CZ |
4 | ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org> |
5 | ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> | |
9f68e74a | 6 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
88f256a1 | 7 | ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be> |
1d47ea86 | 8 | ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com> |
f4548394 | 9 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
d0e9ded7 GB |
10 | ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com> |
11 | ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> | |
0760e3a1 RW |
12 | ;;; |
13 | ;;; This file is part of GNU Guix. | |
14 | ;;; | |
15 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
16 | ;;; under the terms of the GNU General Public License as published by | |
17 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
18 | ;;; your option) any later version. | |
19 | ;;; | |
20 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
21 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | ;;; GNU General Public License for more details. | |
24 | ;;; | |
25 | ;;; You should have received a copy of the GNU General Public License | |
26 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
27 | ||
28 | (define-module (gnu packages java) | |
29 | #:use-module ((guix licenses) #:prefix license:) | |
30 | #:use-module (guix packages) | |
31 | #:use-module (guix download) | |
62c9bfaa | 32 | #:use-module (guix hg-download) |
72885a4c | 33 | #:use-module (guix git-download) |
78745d33 | 34 | #:use-module (guix svn-download) |
f6789047 | 35 | #:use-module (guix utils) |
068e476f | 36 | #:use-module (guix build-system ant) |
0760e3a1 | 37 | #:use-module (guix build-system gnu) |
6a5829d9 | 38 | #:use-module (guix build-system trivial) |
0760e3a1 RW |
39 | #:use-module (gnu packages) |
40 | #:use-module (gnu packages attr) | |
41 | #:use-module (gnu packages autotools) | |
42 | #:use-module (gnu packages base) | |
43 | #:use-module (gnu packages bash) | |
f21403e2 | 44 | #:use-module (gnu packages certs) |
0760e3a1 RW |
45 | #:use-module (gnu packages cpio) |
46 | #:use-module (gnu packages cups) | |
47 | #:use-module (gnu packages compression) | |
48 | #:use-module (gnu packages fontutils) | |
49 | #:use-module (gnu packages gawk) | |
72885a4c | 50 | #:use-module (gnu packages gettext) |
0760e3a1 | 51 | #:use-module (gnu packages gcc) |
8581c813 | 52 | #:use-module (gnu packages gl) |
0760e3a1 RW |
53 | #:use-module (gnu packages gnuzilla) ;nss |
54 | #:use-module (gnu packages ghostscript) ;lcms | |
55 | #:use-module (gnu packages gnome) | |
56 | #:use-module (gnu packages gtk) | |
6a5829d9 | 57 | #:use-module (gnu packages guile) |
afb5858d | 58 | #:use-module (gnu packages icu4c) |
0760e3a1 | 59 | #:use-module (gnu packages image) |
c4fd86f9 | 60 | #:use-module (gnu packages libffi) |
0760e3a1 | 61 | #:use-module (gnu packages linux) ;alsa |
2f0d0418 | 62 | #:use-module (gnu packages maths) |
5766984b | 63 | #:use-module (gnu packages web) |
0760e3a1 | 64 | #:use-module (gnu packages wget) |
0760e3a1 RW |
65 | #:use-module (gnu packages pkg-config) |
66 | #:use-module (gnu packages perl) | |
c4fd86f9 | 67 | #:use-module (gnu packages popt) |
89e34644 | 68 | #:use-module (gnu packages kerberos) |
0760e3a1 RW |
69 | #:use-module (gnu packages xml) |
70 | #:use-module (gnu packages xorg) | |
f6789047 | 71 | #:use-module (gnu packages texinfo) |
2d15f601 RW |
72 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
73 | #:use-module (srfi srfi-11) | |
74 | #:use-module (ice-9 match)) | |
0760e3a1 | 75 | |
e1ae3587 RW |
76 | \f |
77 | ;;; | |
78 | ;;; Java bootstrap toolchain. | |
79 | ;;; | |
80 | ||
81 | ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We | |
269fb7d3 RW |
82 | ;; use it to build a simple version of GNU Classpath, the Java standard |
83 | ;; library. We chose version 0.93 because it is the last version that can be | |
84 | ;; built with Jikes. With Jikes and this version of GNU Classpath we can | |
85 | ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is | |
86 | ;; the last version of JamVM that works with a version of GNU classpath that | |
87 | ;; does not require ECJ. These three packages make up the bootstrap JDK. | |
88 | ||
89 | ;; This is sufficient to build an older version of Ant, which is needed to | |
90 | ;; build an older version of ECJ, an incremental Java compiler, both of which | |
91 | ;; are written in Java. | |
e1ae3587 | 92 | ;; |
269fb7d3 RW |
93 | ;; ECJ is needed to build the latest release (0.99) and the development |
94 | ;; version of GNU Classpath. The development version of GNU Classpath has | |
95 | ;; much more support for Java 1.6 than the latest release, but we need to | |
96 | ;; build 0.99 first to get a working version of javah. ECJ, the development | |
97 | ;; version of GNU Classpath, and the latest version of JamVM make up the | |
98 | ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x | |
99 | ;; build framework. We then build the more recent JDKs Icedtea 2.x and | |
100 | ;; Icedtea 3.x. | |
e1ae3587 RW |
101 | |
102 | (define jikes | |
103 | (package | |
104 | (name "jikes") | |
105 | (version "1.22") | |
106 | (source (origin | |
107 | (method url-fetch) | |
108 | (uri (string-append "mirror://sourceforge/jikes/Jikes/" | |
109 | version "/jikes-" version ".tar.bz2")) | |
110 | (sha256 | |
111 | (base32 | |
112 | "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) | |
113 | (build-system gnu-build-system) | |
114 | (home-page "http://jikes.sourceforge.net/") | |
115 | (synopsis "Compiler for the Java language") | |
116 | (description "Jikes is a compiler that translates Java source files as | |
117 | defined in The Java Language Specification into the bytecoded instruction set | |
118 | and binary format defined in The Java Virtual Machine Specification.") | |
119 | (license license:ibmpl1.0))) | |
120 | ||
45f762ee RW |
121 | ;; This is the last version of GNU Classpath that can be built without ECJ. |
122 | (define classpath-bootstrap | |
123 | (package | |
124 | (name "classpath") | |
125 | (version "0.93") | |
126 | (source (origin | |
127 | (method url-fetch) | |
128 | (uri (string-append "mirror://gnu/classpath/classpath-" | |
129 | version ".tar.gz")) | |
130 | (sha256 | |
131 | (base32 | |
132 | "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")))) | |
133 | (build-system gnu-build-system) | |
134 | (arguments | |
135 | `(#:configure-flags | |
136 | (list (string-append "JAVAC=" | |
137 | (assoc-ref %build-inputs "jikes") | |
138 | "/bin/jikes") | |
139 | "--disable-Werror" | |
140 | "--disable-gmp" | |
141 | "--disable-gtk-peer" | |
142 | "--disable-gconf-peer" | |
143 | "--disable-plugin" | |
144 | "--disable-dssi" | |
145 | "--disable-alsa" | |
146 | "--disable-gjdoc") | |
147 | #:phases | |
148 | (modify-phases %standard-phases | |
149 | (add-after 'install 'install-data | |
150 | (lambda _ (zero? (system* "make" "install-data"))))))) | |
151 | (native-inputs | |
152 | `(("jikes" ,jikes) | |
153 | ("fastjar" ,fastjar) | |
154 | ("libltdl" ,libltdl) | |
155 | ("pkg-config" ,pkg-config))) | |
156 | (home-page "https://www.gnu.org/software/classpath/") | |
157 | (synopsis "Essential libraries for Java") | |
158 | (description "GNU Classpath is a project to create core class libraries | |
159 | for use with runtimes, compilers and tools for the Java programming | |
160 | language.") | |
161 | ;; GPLv2 or later, with special linking exception. | |
162 | (license license:gpl2+))) | |
163 | ||
063629aa RW |
164 | ;; This is the last version of JamVM that works with a version of GNU |
165 | ;; classpath that does not require ECJ. | |
166 | (define jamvm-1-bootstrap | |
167 | (package | |
168 | (name "jamvm") | |
169 | (version "1.5.1") | |
170 | (source (origin | |
171 | (method url-fetch) | |
172 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" | |
173 | "JamVM%20" version "/jamvm-" | |
174 | version ".tar.gz")) | |
175 | (sha256 | |
176 | (base32 | |
177 | "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")))) | |
178 | (build-system gnu-build-system) | |
179 | (arguments | |
180 | `(#:configure-flags | |
181 | (list (string-append "--with-classpath-install-dir=" | |
182 | (assoc-ref %build-inputs "classpath"))))) | |
183 | (inputs | |
184 | `(("classpath" ,classpath-bootstrap) | |
185 | ("jikes" ,jikes) | |
186 | ("zlib" ,zlib))) | |
187 | (home-page "http://jamvm.sourceforge.net/") | |
188 | (synopsis "Small Java Virtual Machine") | |
189 | (description "JamVM is a Java Virtual Machine conforming to the JVM | |
190 | specification edition 2 (blue book). It is extremely small. However, unlike | |
191 | other small VMs it supports the full spec, including object finalisation and | |
192 | JNI.") | |
193 | (license license:gpl2+))) | |
194 | ||
5783bd77 RW |
195 | (define ant-bootstrap |
196 | (package | |
197 | (name "ant-bootstrap") | |
198 | ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which | |
199 | ;; are not supported. The 1.8.x series is the last to use only features | |
ff4d9fdf RW |
200 | ;; supported by Jikes. |
201 | (version "1.8.4") | |
5783bd77 RW |
202 | (source (origin |
203 | (method url-fetch) | |
204 | (uri (string-append "http://archive.apache.org/dist/" | |
205 | "ant/source/apache-ant-" | |
206 | version "-src.tar.bz2")) | |
207 | (sha256 | |
208 | (base32 | |
ff4d9fdf | 209 | "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) |
5783bd77 RW |
210 | (build-system gnu-build-system) |
211 | (arguments | |
212 | `(#:tests? #f ; no "check" target | |
213 | #:phases | |
214 | (modify-phases %standard-phases | |
d4fd4c3a | 215 | (delete 'bootstrap) |
5783bd77 RW |
216 | (delete 'configure) |
217 | (replace 'build | |
218 | (lambda* (#:key inputs #:allow-other-keys) | |
aa432388 | 219 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
5783bd77 | 220 | (setenv "JAVACMD" |
aa432388 RW |
221 | (string-append (assoc-ref inputs "jamvm") |
222 | "/bin/jamvm")) | |
5783bd77 | 223 | (setenv "JAVAC" |
aa432388 RW |
224 | (string-append (assoc-ref inputs "jikes") |
225 | "/bin/jikes")) | |
226 | (setenv "CLASSPATH" | |
227 | (string-append (assoc-ref inputs "jamvm") | |
228 | "/lib/rt.jar")) | |
5783bd77 | 229 | |
d4fd4c3a RW |
230 | ;; Ant complains if this file doesn't exist. |
231 | (setenv "HOME" "/tmp") | |
232 | (with-output-to-file "/tmp/.ant.properties" | |
233 | (lambda _ (display ""))) | |
234 | ||
5783bd77 RW |
235 | ;; Use jikes instead of javac for <javac ...> tags in build.xml |
236 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") | |
237 | ||
238 | ;; jikes produces lots of warnings, but they are not very | |
239 | ;; interesting, so we silence them. | |
240 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") | |
241 | ||
d4fd4c3a RW |
242 | ;; Without these JamVM options the build may freeze. |
243 | (substitute* "bootstrap.sh" | |
244 | (("^\"\\$\\{JAVACMD\\}\" " m) | |
245 | (string-append m "-Xnocompact -Xnoinlining "))) | |
246 | ||
5783bd77 RW |
247 | ;; Disable tests because we are bootstrapping and thus don't have |
248 | ;; any of the dependencies required to build and run the tests. | |
249 | (substitute* "build.xml" | |
250 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
251 | (zero? (system* "bash" "bootstrap.sh" | |
252 | (string-append "-Ddist.dir=" | |
253 | (assoc-ref %outputs "out")))))) | |
254 | (delete 'install)))) | |
255 | (native-inputs | |
256 | `(("jikes" ,jikes) | |
aa432388 | 257 | ("jamvm" ,jamvm-1-bootstrap))) |
5783bd77 RW |
258 | (home-page "http://ant.apache.org") |
259 | (synopsis "Build tool for Java") | |
260 | (description | |
261 | "Ant is a platform-independent build tool for Java. It is similar to | |
262 | make but is implemented using the Java language, requires the Java platform, | |
263 | and is best suited to building Java projects. Ant uses XML to describe the | |
264 | build process and its dependencies, whereas Make uses Makefile format.") | |
265 | (license license:asl2.0))) | |
266 | ||
5461721f RW |
267 | ;; Version 3.2.2 is the last version without a dependency on a full-fledged |
268 | ;; compiler for Java 1.5. | |
269 | (define ecj-bootstrap | |
270 | (package | |
271 | (name "ecj-bootstrap") | |
272 | (version "3.2.2") | |
273 | (source (origin | |
274 | (method url-fetch) | |
275 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
276 | "downloads/drops/R-" version | |
277 | "-200702121330/ecjsrc.zip")) | |
278 | (sha256 | |
279 | (base32 | |
280 | "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) | |
281 | ;; It would be so much easier if we could use the ant-build-system, but we | |
282 | ;; cannot as we don't have ant at this point. We use ecj for | |
283 | ;; bootstrapping the JDK. | |
284 | (build-system gnu-build-system) | |
285 | (arguments | |
286 | `(#:modules ((guix build gnu-build-system) | |
287 | (guix build utils) | |
288 | (srfi srfi-1)) | |
289 | #:tests? #f ; there are no tests | |
290 | #:phases | |
291 | (modify-phases %standard-phases | |
292 | (replace 'configure | |
293 | (lambda* (#:key inputs #:allow-other-keys) | |
294 | (setenv "CLASSPATH" | |
295 | (string-join | |
6c775dc6 RW |
296 | (cons (string-append (assoc-ref inputs "jamvm") |
297 | "/lib/rt.jar") | |
298 | (find-files (string-append | |
299 | (assoc-ref inputs "ant-bootstrap") | |
300 | "/lib") | |
301 | "\\.jar$")) | |
5461721f RW |
302 | ":")) |
303 | #t)) | |
304 | (replace 'build | |
305 | (lambda* (#:key inputs #:allow-other-keys) | |
306 | ;; The unpack phase enters the "org" directory by mistake. | |
307 | (chdir "..") | |
308 | ||
309 | ;; Create a simple manifest to make ecj executable. | |
310 | (with-output-to-file "manifest" | |
311 | (lambda _ | |
312 | (display "Manifest-Version: 1.0 | |
313 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) | |
314 | ||
315 | ;; Compile it all! | |
6c775dc6 | 316 | (and (zero? (apply system* "jikes" |
5461721f RW |
317 | (find-files "." "\\.java$"))) |
318 | (zero? (system* "fastjar" "cvfm" | |
319 | "ecj-bootstrap.jar" "manifest" "."))))) | |
320 | (replace 'install | |
321 | (lambda* (#:key outputs #:allow-other-keys) | |
322 | (let ((share (string-append (assoc-ref outputs "out") | |
323 | "/share/java/"))) | |
324 | (mkdir-p share) | |
325 | (install-file "ecj-bootstrap.jar" share) | |
326 | #t)))))) | |
327 | (native-inputs | |
328 | `(("ant-bootstrap" ,ant-bootstrap) | |
329 | ("unzip" ,unzip) | |
6c775dc6 RW |
330 | ("jikes" ,jikes) |
331 | ("jamvm" ,jamvm-1-bootstrap) | |
5461721f RW |
332 | ("fastjar" ,fastjar))) |
333 | (home-page "https://eclipse.org") | |
334 | (synopsis "Eclipse Java development tools core batch compiler") | |
335 | (description "This package provides the Eclipse Java core batch compiler | |
336 | for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a | |
337 | requirement for all GNU Classpath releases after version 0.93.") | |
338 | (license license:epl1.0))) | |
339 | ||
6a5829d9 RW |
340 | (define ecj-javac-wrapper |
341 | (package (inherit ecj-bootstrap) | |
342 | (name "ecj-javac-wrapper") | |
343 | (source #f) | |
344 | (build-system trivial-build-system) | |
345 | (arguments | |
346 | `(#:modules ((guix build utils)) | |
347 | #:builder | |
c4f06c11 | 348 | (begin |
6a5829d9 RW |
349 | (use-modules (guix build utils)) |
350 | (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) | |
351 | (target (string-append bin "/javac")) | |
352 | (guile (string-append (assoc-ref %build-inputs "guile") | |
353 | "/bin/guile")) | |
354 | (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") | |
355 | "/share/java/ecj-bootstrap.jar")) | |
c4f06c11 RW |
356 | (java (string-append (assoc-ref %build-inputs "jamvm") |
357 | "/bin/jamvm")) | |
358 | (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath") | |
359 | "/share/classpath"))) | |
360 | (string-append jvmlib "/lib/glibj.zip:" | |
361 | jvmlib "/lib/tools.zip")))) | |
6a5829d9 RW |
362 | (mkdir-p bin) |
363 | (with-output-to-file target | |
364 | (lambda _ | |
365 | (format #t "#!~a --no-auto-compile\n!#\n" guile) | |
366 | (write | |
367 | `(begin (use-modules (ice-9 match) | |
368 | (ice-9 receive) | |
369 | (ice-9 hash-table) | |
370 | (srfi srfi-1) | |
371 | (srfi srfi-26)) | |
372 | (define defaults | |
373 | '(("-bootclasspath" ,bootcp) | |
374 | ("-source" "1.5") | |
375 | ("-target" "1.5") | |
376 | ("-cp" "."))) | |
377 | (define (main args) | |
378 | (let ((classpath (getenv "CLASSPATH"))) | |
379 | (setenv "CLASSPATH" | |
c4f06c11 RW |
380 | (string-join (list ,ecj |
381 | ,(string-append (assoc-ref %build-inputs "jamvm") | |
382 | "/lib/rt.jar") | |
383 | (or classpath "")) | |
384 | ":"))) | |
6a5829d9 RW |
385 | (receive (vm-args other-args) |
386 | ;; Separate VM arguments from arguments to ECJ. | |
387 | (partition (cut string-prefix? "-J" <>) | |
388 | (fold (lambda (default acc) | |
389 | (if (member (first default) acc) | |
390 | acc (append default acc))) | |
391 | args defaults)) | |
392 | (apply system* ,java | |
393 | (append | |
ae0a5a7e | 394 | (list "-Xnocompact" "-Xnoinlining") |
6a5829d9 RW |
395 | ;; Remove "-J" prefix |
396 | (map (cut string-drop <> 2) vm-args) | |
397 | '("org.eclipse.jdt.internal.compiler.batch.Main") | |
398 | (cons "-nowarn" other-args))))) | |
399 | ;; Entry point | |
400 | (let ((args (cdr (command-line)))) | |
401 | (if (null? args) | |
402 | (format (current-error-port) "javac: no arguments given!\n") | |
403 | (main args))))))) | |
404 | (chmod target #o755) | |
405 | #t)))) | |
406 | (native-inputs | |
407 | `(("guile" ,guile-2.2) | |
408 | ("ecj-bootstrap" ,ecj-bootstrap) | |
c4f06c11 RW |
409 | ("jamvm" ,jamvm-1-bootstrap) |
410 | ("classpath" ,classpath-bootstrap))) | |
6a5829d9 RW |
411 | (description "This package provides a wrapper around the @dfn{Eclipse |
412 | compiler for Java} (ecj) with a command line interface that is compatible with | |
413 | the standard javac executable."))) | |
414 | ||
8778da03 RW |
415 | ;; The classpath-bootstrap was built without a virtual machine, so it does not |
416 | ;; provide a wrapper for javah. We cannot build the development version of | |
417 | ;; Classpath without javah. | |
418 | (define classpath-0.99 | |
419 | (package (inherit classpath-bootstrap) | |
d3551e86 RW |
420 | (version "0.99") |
421 | (source (origin | |
422 | (method url-fetch) | |
423 | (uri (string-append "mirror://gnu/classpath/classpath-" | |
424 | version ".tar.gz")) | |
425 | (sha256 | |
426 | (base32 | |
427 | "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")))) | |
d3551e86 RW |
428 | (arguments |
429 | `(#:configure-flags | |
430 | (list (string-append "--with-ecj-jar=" | |
431 | (assoc-ref %build-inputs "ecj-bootstrap") | |
432 | "/share/java/ecj-bootstrap.jar") | |
433 | (string-append "JAVAC=" | |
434 | (assoc-ref %build-inputs "ecj-javac-wrapper") | |
435 | "/bin/javac") | |
436 | (string-append "JAVA=" | |
8778da03 RW |
437 | (assoc-ref %build-inputs "jamvm") |
438 | "/bin/jamvm") | |
d3551e86 RW |
439 | "GCJ_JAVAC_TRUE=no" |
440 | "ac_cv_prog_java_works=yes" ; trust me | |
441 | "--disable-Werror" | |
442 | "--disable-gmp" | |
443 | "--disable-gtk-peer" | |
444 | "--disable-gconf-peer" | |
445 | "--disable-plugin" | |
446 | "--disable-dssi" | |
447 | "--disable-alsa" | |
448 | "--disable-gjdoc") | |
449 | #:phases | |
450 | (modify-phases %standard-phases | |
451 | (add-after 'install 'install-data | |
452 | (lambda _ (zero? (system* "make" "install-data"))))))) | |
453 | (native-inputs | |
454 | `(("ecj-bootstrap" ,ecj-bootstrap) | |
455 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) | |
456 | ("fastjar" ,fastjar) | |
8778da03 RW |
457 | ("jamvm" ,jamvm-1-bootstrap) |
458 | ("classpath" ,classpath-bootstrap) | |
d3551e86 | 459 | ("libltdl" ,libltdl) |
8778da03 | 460 | ("pkg-config" ,pkg-config))))) |
5f4402c7 | 461 | |
c98d7a66 RW |
462 | ;; We need this because classpath-bootstrap does not provide all of the tools |
463 | ;; we need to build classpath-devel. | |
04d7cae2 | 464 | (define classpath-jamvm-wrappers |
c98d7a66 | 465 | (package (inherit classpath-0.99) |
04d7cae2 RW |
466 | (name "classpath-jamvm-wrappers") |
467 | (source #f) | |
468 | (build-system trivial-build-system) | |
469 | (arguments | |
470 | `(#:modules ((guix build utils)) | |
471 | #:builder | |
472 | (begin | |
473 | (use-modules (guix build utils)) | |
474 | (let* ((bash (assoc-ref %build-inputs "bash")) | |
475 | (jamvm (assoc-ref %build-inputs "jamvm")) | |
476 | (classpath (assoc-ref %build-inputs "classpath")) | |
477 | (bin (string-append (assoc-ref %outputs "out") | |
478 | "/bin/"))) | |
479 | (mkdir-p bin) | |
480 | (for-each (lambda (tool) | |
481 | (with-output-to-file (string-append bin tool) | |
482 | (lambda _ | |
483 | (format #t "#!~a/bin/sh | |
40e3a197 | 484 | ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ |
04d7cae2 RW |
485 | gnu.classpath.tools.~a.~a $@" |
486 | bash jamvm classpath tool | |
487 | (if (string=? "native2ascii" tool) | |
488 | "Native2ASCII" "Main")))) | |
489 | (chmod (string-append bin tool) #o755)) | |
490 | (list "javah" | |
491 | "rmic" | |
492 | "rmid" | |
493 | "orbd" | |
494 | "rmiregistry" | |
495 | "native2ascii")) | |
496 | #t)))) | |
497 | (native-inputs | |
498 | `(("bash" ,bash) | |
c98d7a66 RW |
499 | ("jamvm" ,jamvm-1-bootstrap) |
500 | ("classpath" ,classpath-0.99))) | |
04d7cae2 RW |
501 | (inputs '()) |
502 | (synopsis "Executables from GNU Classpath") | |
503 | (description "This package provides wrappers around the tools provided by | |
504 | the GNU Classpath library. They are executed by the JamVM virtual | |
505 | machine."))) | |
506 | ||
72885a4c RW |
507 | ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since |
508 | ;; then Classpath has gained much more support for Java 1.6. | |
509 | (define-public classpath-devel | |
510 | (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") | |
511 | (revision "1")) | |
8778da03 | 512 | (package (inherit classpath-bootstrap) |
72885a4c RW |
513 | (version (string-append "0.99-" revision "." (string-take commit 9))) |
514 | (source (origin | |
515 | (method git-fetch) | |
516 | (uri (git-reference | |
5f13bf09 | 517 | (url "https://git.savannah.gnu.org/git/classpath.git") |
72885a4c | 518 | (commit commit))) |
51988e3a | 519 | (file-name (string-append "classpath-" version "-checkout")) |
72885a4c RW |
520 | (sha256 |
521 | (base32 | |
522 | "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")))) | |
523 | (arguments | |
93c103ab RW |
524 | `(#:make-flags |
525 | ;; Ensure that the initial heap size is smaller than the maximum | |
526 | ;; size. By default only Xmx is set, which can lead to invalid | |
527 | ;; memory settings on some machines with a lot of memory. | |
528 | '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") | |
529 | #:configure-flags | |
72885a4c RW |
530 | (list (string-append "--with-ecj-jar=" |
531 | (assoc-ref %build-inputs "ecj-bootstrap") | |
532 | "/share/java/ecj-bootstrap.jar") | |
93c103ab | 533 | (string-append "--with-javac=" |
72885a4c RW |
534 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
535 | "/bin/javac") | |
536 | (string-append "JAVA=" | |
537 | (assoc-ref %build-inputs "jamvm") | |
538 | "/bin/jamvm") | |
539 | "GCJ_JAVAC_TRUE=no" | |
540 | "ac_cv_prog_java_works=yes" ; trust me | |
541 | "--disable-Werror" | |
542 | "--disable-gmp" | |
543 | "--disable-gtk-peer" | |
544 | "--disable-gconf-peer" | |
545 | "--disable-plugin" | |
546 | "--disable-dssi" | |
547 | "--disable-alsa" | |
548 | "--disable-gjdoc") | |
549 | #:phases | |
550 | (modify-phases %standard-phases | |
c427fda2 | 551 | (add-after 'unpack 'bootstrap |
72885a4c RW |
552 | (lambda _ |
553 | (zero? (system* "autoreconf" "-vif")))) | |
554 | (add-after 'unpack 'remove-unsupported-annotations | |
555 | (lambda _ | |
556 | (substitute* (find-files "java" "\\.java$") | |
557 | (("@Override") "")) | |
558 | #t)) | |
559 | (add-after 'install 'install-data | |
560 | (lambda _ (zero? (system* "make" "install-data"))))))) | |
561 | (native-inputs | |
562 | `(("autoconf" ,autoconf) | |
563 | ("automake" ,automake) | |
564 | ("libtool" ,libtool) | |
565 | ("gettext" ,gettext-minimal) | |
566 | ("texinfo" ,texinfo) | |
567 | ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah | |
568 | ("ecj-bootstrap" ,ecj-bootstrap) | |
b5a0d427 | 569 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
72885a4c | 570 | ("fastjar" ,fastjar) |
58d2b135 | 571 | ("jamvm" ,jamvm-1-bootstrap) |
72885a4c RW |
572 | ("libltdl" ,libltdl) |
573 | ("pkg-config" ,pkg-config)))))) | |
574 | ||
58d2b135 RW |
575 | (define jamvm |
576 | (package (inherit jamvm-1-bootstrap) | |
577 | (version "2.0.0") | |
578 | (source (origin | |
579 | (method url-fetch) | |
580 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" | |
581 | "JamVM%20" version "/jamvm-" | |
582 | version ".tar.gz")) | |
583 | (sha256 | |
584 | (base32 | |
585 | "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")))) | |
586 | (build-system gnu-build-system) | |
587 | (arguments | |
588 | `(#:configure-flags | |
589 | (list (string-append "--with-classpath-install-dir=" | |
590 | (assoc-ref %build-inputs "classpath"))))) | |
8c6091e3 RW |
591 | (inputs |
592 | `(("classpath" ,classpath-devel) | |
b5a0d427 | 593 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
8c6091e3 RW |
594 | ("zlib" ,zlib))))) |
595 | ||
b5a0d427 RW |
596 | (define ecj-javac-wrapper-final |
597 | (package (inherit ecj-javac-wrapper) | |
1bf56c72 RW |
598 | (native-inputs |
599 | `(("guile" ,guile-2.2) | |
600 | ("ecj-bootstrap" ,ecj-bootstrap) | |
601 | ("jamvm" ,jamvm) | |
602 | ("classpath" ,classpath-devel))))) | |
603 | ||
98419316 | 604 | ;; The bootstrap JDK consisting of jamvm, classpath-devel, |
b5a0d427 RW |
605 | ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's |
606 | ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x, | |
607 | ;; which uses Java 6 only. | |
98419316 RW |
608 | (define-public icedtea-6 |
609 | (package | |
610 | (name "icedtea") | |
611 | (version "1.13.13") | |
612 | (source (origin | |
613 | (method url-fetch) | |
614 | (uri (string-append | |
615 | "http://icedtea.wildebeest.org/download/source/icedtea6-" | |
616 | version ".tar.xz")) | |
617 | (sha256 | |
618 | (base32 | |
619 | "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) | |
620 | (modules '((guix build utils))) | |
621 | (snippet | |
622 | '(substitute* "Makefile.in" | |
623 | ;; do not leak information about the build host | |
624 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
625 | "DISTRIBUTION_ID=\"\\\"guix\\\"\""))))) | |
626 | (build-system gnu-build-system) | |
627 | (outputs '("out" ; Java Runtime Environment | |
628 | "jdk" ; Java Development Kit | |
629 | "doc")) ; all documentation | |
630 | (arguments | |
631 | `(;; There are many failing tests and many are known to fail upstream. | |
632 | #:tests? #f | |
633 | ||
634 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
635 | ;; gremlin) doesn't support it yet, so skip this phase. | |
636 | #:validate-runpath? #f | |
637 | ||
638 | #:modules ((guix build utils) | |
639 | (guix build gnu-build-system) | |
640 | (srfi srfi-19)) | |
641 | ||
642 | #:configure-flags | |
643 | `("--enable-bootstrap" | |
644 | "--enable-nss" | |
645 | "--without-rhino" | |
646 | "--with-parallel-jobs" | |
647 | "--disable-downloading" | |
648 | "--disable-tests" | |
649 | ,(string-append "--with-ecj=" | |
650 | (assoc-ref %build-inputs "ecj") | |
651 | "/share/java/ecj-bootstrap.jar") | |
652 | ,(string-append "--with-jar=" | |
653 | (assoc-ref %build-inputs "fastjar") | |
654 | "/bin/fastjar") | |
655 | ,(string-append "--with-jdk-home=" | |
656 | (assoc-ref %build-inputs "classpath")) | |
657 | ,(string-append "--with-java=" | |
658 | (assoc-ref %build-inputs "jamvm") | |
659 | "/bin/jamvm")) | |
660 | #:phases | |
661 | (modify-phases %standard-phases | |
662 | (replace 'unpack | |
663 | (lambda* (#:key source inputs #:allow-other-keys) | |
664 | (and (zero? (system* "tar" "xvf" source)) | |
665 | (begin | |
666 | (chdir (string-append "icedtea6-" ,version)) | |
667 | (mkdir "openjdk") | |
668 | (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") | |
669 | ;; The convenient OpenJDK source bundle is no longer | |
670 | ;; available for download, so we have to take the sources | |
671 | ;; from the Mercurial repositories and change the Makefile | |
672 | ;; to avoid tests for the OpenJDK zip archive. | |
673 | (with-directory-excursion "openjdk" | |
674 | (for-each (lambda (part) | |
675 | (mkdir part) | |
676 | (copy-recursively | |
677 | (assoc-ref inputs | |
678 | (string-append part "-src")) | |
679 | part)) | |
680 | '("jdk" "hotspot" "corba" | |
681 | "langtools" "jaxp" "jaxws"))) | |
682 | (substitute* "Makefile.in" | |
683 | (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") | |
684 | "echo \"trust me\";") | |
685 | ;; The contents of the bootstrap directory must be | |
686 | ;; writeable but when copying from the store they are | |
687 | ;; not. | |
688 | (("mkdir -p lib/rt" line) | |
689 | (string-append line "; chmod -R u+w $(BOOT_DIR)"))) | |
690 | (zero? (system* "chmod" "-R" "u+w" "openjdk")) | |
691 | #t)))) | |
692 | (add-after 'unpack 'use-classpath | |
693 | (lambda* (#:key inputs #:allow-other-keys) | |
b5a0d427 RW |
694 | (let ((jvmlib (assoc-ref inputs "classpath")) |
695 | (jamvm (assoc-ref inputs "jamvm"))) | |
98419316 RW |
696 | ;; Classpath does not provide rt.jar. |
697 | (substitute* "Makefile.in" | |
698 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") | |
699 | (string-append jvmlib "/share/classpath/glibj.zip"))) | |
700 | ;; Make sure we can find all classes. | |
701 | (setenv "CLASSPATH" | |
702 | (string-append jvmlib "/share/classpath/glibj.zip:" | |
b5a0d427 RW |
703 | jvmlib "/share/classpath/tools.zip:" |
704 | jamvm "/lib/rt.jar")) | |
98419316 RW |
705 | (setenv "JAVACFLAGS" |
706 | (string-append "-cp " | |
707 | jvmlib "/share/classpath/glibj.zip:" | |
708 | jvmlib "/share/classpath/tools.zip"))) | |
709 | #t)) | |
710 | (add-after 'unpack 'patch-patches | |
711 | (lambda _ | |
712 | ;; shebang in patches so that they apply cleanly | |
713 | (substitute* '("patches/jtreg-jrunscript.patch" | |
714 | "patches/hotspot/hs23/drop_unlicensed_test.patch") | |
715 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
716 | #t)) | |
717 | (add-after 'unpack 'patch-paths | |
718 | (lambda* (#:key inputs #:allow-other-keys) | |
719 | ;; buildtree.make generates shell scripts, so we need to replace | |
720 | ;; the generated shebang | |
721 | (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") | |
722 | (("/bin/sh") (which "bash"))) | |
723 | ||
724 | (let ((corebin (string-append | |
725 | (assoc-ref inputs "coreutils") "/bin/")) | |
726 | (binbin (string-append | |
727 | (assoc-ref inputs "binutils") "/bin/")) | |
728 | (grepbin (string-append | |
729 | (assoc-ref inputs "grep") "/bin/"))) | |
730 | (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" | |
731 | "openjdk/corba/make/common/shared/Defs-linux.gmk") | |
732 | (("UNIXCOMMAND_PATH = /bin/") | |
733 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
734 | (("USRBIN_PATH = /usr/bin/") | |
735 | (string-append "USRBIN_PATH = " corebin)) | |
736 | (("DEVTOOLS_PATH *= */usr/bin/") | |
737 | (string-append "DEVTOOLS_PATH = " corebin)) | |
738 | (("COMPILER_PATH *= */usr/bin/") | |
739 | (string-append "COMPILER_PATH = " | |
740 | (assoc-ref inputs "gcc") "/bin/")) | |
741 | (("DEF_OBJCOPY *=.*objcopy") | |
742 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
743 | ||
744 | ;; fix path to alsa header | |
745 | (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" | |
746 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
747 | (string-append "ALSA_INCLUDE=" | |
748 | (assoc-ref inputs "alsa-lib") | |
749 | "/include/alsa/version.h"))) | |
750 | ||
751 | ;; fix hard-coded utility paths | |
752 | (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" | |
753 | "openjdk/corba/make/common/shared/Defs-utils.gmk") | |
754 | (("ECHO *=.*echo") | |
755 | (string-append "ECHO = " (which "echo"))) | |
756 | (("^GREP *=.*grep") | |
757 | (string-append "GREP = " (which "grep"))) | |
758 | (("EGREP *=.*egrep") | |
759 | (string-append "EGREP = " (which "egrep"))) | |
760 | (("CPIO *=.*cpio") | |
761 | (string-append "CPIO = " (which "cpio"))) | |
762 | (("READELF *=.*readelf") | |
763 | (string-append "READELF = " (which "readelf"))) | |
764 | (("^ *AR *=.*ar") | |
765 | (string-append "AR = " (which "ar"))) | |
766 | (("^ *TAR *=.*tar") | |
767 | (string-append "TAR = " (which "tar"))) | |
768 | (("AS *=.*as") | |
769 | (string-append "AS = " (which "as"))) | |
770 | (("LD *=.*ld") | |
771 | (string-append "LD = " (which "ld"))) | |
772 | (("STRIP *=.*strip") | |
773 | (string-append "STRIP = " (which "strip"))) | |
774 | (("NM *=.*nm") | |
775 | (string-append "NM = " (which "nm"))) | |
776 | (("^SH *=.*sh") | |
777 | (string-append "SH = " (which "bash"))) | |
778 | (("^FIND *=.*find") | |
779 | (string-append "FIND = " (which "find"))) | |
780 | (("LDD *=.*ldd") | |
781 | (string-append "LDD = " (which "ldd"))) | |
782 | (("NAWK *=.*(n|g)awk") | |
783 | (string-append "NAWK = " (which "gawk"))) | |
784 | (("XARGS *=.*xargs") | |
785 | (string-append "XARGS = " (which "xargs"))) | |
786 | (("UNZIP *=.*unzip") | |
787 | (string-append "UNZIP = " (which "unzip"))) | |
788 | (("ZIPEXE *=.*zip") | |
789 | (string-append "ZIPEXE = " (which "zip"))) | |
790 | (("SED *=.*sed") | |
791 | (string-append "SED = " (which "sed")))) | |
792 | ||
793 | ;; Some of these timestamps cause problems as they are more than | |
794 | ;; 10 years ago, failing the build process. | |
795 | (substitute* | |
796 | "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" | |
797 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
798 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
799 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
800 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")) | |
801 | #t))) | |
802 | (add-before 'configure 'set-additional-paths | |
803 | (lambda* (#:key inputs #:allow-other-keys) | |
804 | (setenv "CPATH" | |
805 | (string-append (assoc-ref inputs "libxrender") | |
806 | "/include/X11/extensions" ":" | |
807 | (assoc-ref inputs "libxtst") | |
808 | "/include/X11/extensions" ":" | |
809 | (assoc-ref inputs "libxinerama") | |
810 | "/include/X11/extensions" ":" | |
811 | (or (getenv "CPATH") ""))) | |
812 | (setenv "ALT_CUPS_HEADERS_PATH" | |
813 | (string-append (assoc-ref inputs "cups") | |
814 | "/include")) | |
815 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
816 | (string-append (assoc-ref inputs "freetype") | |
817 | "/include")) | |
818 | (setenv "ALT_FREETYPE_LIB_PATH" | |
819 | (string-append (assoc-ref inputs "freetype") | |
820 | "/lib")) | |
821 | #t)) | |
822 | (replace 'install | |
823 | (lambda* (#:key outputs #:allow-other-keys) | |
824 | (let ((doc (string-append (assoc-ref outputs "doc") | |
825 | "/share/doc/icedtea")) | |
826 | (jre (assoc-ref outputs "out")) | |
827 | (jdk (assoc-ref outputs "jdk"))) | |
828 | (copy-recursively "openjdk.build/docs" doc) | |
829 | (copy-recursively "openjdk.build/j2re-image" jre) | |
830 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
831 | #t))))) | |
832 | (native-inputs | |
833 | `(("ant" ,ant-bootstrap) | |
834 | ("alsa-lib" ,alsa-lib) | |
835 | ("attr" ,attr) | |
836 | ("classpath" ,classpath-devel) | |
837 | ("coreutils" ,coreutils) | |
838 | ("cpio" ,cpio) | |
839 | ("cups" ,cups) | |
840 | ("ecj" ,ecj-bootstrap) | |
b5a0d427 | 841 | ("ecj-javac" ,ecj-javac-wrapper-final) |
98419316 RW |
842 | ("fastjar" ,fastjar) |
843 | ("fontconfig" ,fontconfig) | |
844 | ("freetype" ,freetype) | |
845 | ("gtk" ,gtk+-2) | |
846 | ("gawk" ,gawk) | |
847 | ("giflib" ,giflib) | |
848 | ("grep" ,grep) | |
849 | ("jamvm" ,jamvm) | |
850 | ("lcms" ,lcms) | |
851 | ("libjpeg" ,libjpeg) | |
852 | ("libpng" ,libpng) | |
853 | ("libtool" ,libtool) | |
854 | ("libx11" ,libx11) | |
855 | ("libxcomposite" ,libxcomposite) | |
856 | ("libxi" ,libxi) | |
857 | ("libxinerama" ,libxinerama) | |
858 | ("libxrender" ,libxrender) | |
859 | ("libxslt" ,libxslt) ;for xsltproc | |
860 | ("libxt" ,libxt) | |
861 | ("libxtst" ,libxtst) | |
862 | ("mit-krb5" ,mit-krb5) | |
863 | ("nss" ,nss) | |
864 | ("nss-certs" ,nss-certs) | |
865 | ("perl" ,perl) | |
866 | ("pkg-config" ,pkg-config) | |
867 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
868 | ("unzip" ,unzip) | |
869 | ("wget" ,wget) | |
870 | ("which" ,which) | |
871 | ("zip" ,zip) | |
872 | ("zlib" ,zlib) | |
873 | ("openjdk-src" | |
874 | ,(origin | |
875 | (method hg-fetch) | |
876 | (uri (hg-reference | |
877 | (url "http://hg.openjdk.java.net/jdk6/jdk6/") | |
878 | (changeset "jdk6-b41"))) | |
879 | (sha256 | |
880 | (base32 | |
881 | "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv")))) | |
882 | ("jdk-src" | |
883 | ,(origin | |
884 | (method hg-fetch) | |
885 | (uri (hg-reference | |
886 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/") | |
887 | (changeset "jdk6-b41"))) | |
888 | (sha256 | |
889 | (base32 | |
890 | "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9")))) | |
891 | ("hotspot-src" | |
892 | ,(origin | |
893 | (method hg-fetch) | |
894 | (uri (hg-reference | |
895 | (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/") | |
896 | (changeset "jdk6-b41"))) | |
897 | (sha256 | |
898 | (base32 | |
899 | "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")))) | |
900 | ("corba-src" | |
901 | ,(origin | |
902 | (method hg-fetch) | |
903 | (uri (hg-reference | |
904 | (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/") | |
905 | (changeset "jdk6-b41"))) | |
906 | (sha256 | |
907 | (base32 | |
908 | "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q")))) | |
909 | ("langtools-src" | |
910 | ,(origin | |
911 | (method hg-fetch) | |
912 | (uri (hg-reference | |
913 | (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/") | |
914 | (changeset "jdk6-b41"))) | |
915 | (sha256 | |
916 | (base32 | |
917 | "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d")))) | |
918 | ("jaxp-src" | |
919 | ,(origin | |
920 | (method hg-fetch) | |
921 | (uri (hg-reference | |
922 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/") | |
923 | (changeset "jdk6-b41"))) | |
924 | (sha256 | |
925 | (base32 | |
926 | "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm")))) | |
927 | ("jaxws-src" | |
928 | ,(origin | |
929 | (method hg-fetch) | |
930 | (uri (hg-reference | |
931 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/") | |
932 | (changeset "jdk6-b41"))) | |
933 | (sha256 | |
934 | (base32 | |
935 | "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0")))))) | |
936 | (home-page "http://icedtea.classpath.org") | |
937 | (synopsis "Java development kit") | |
938 | (description | |
939 | "This package provides the OpenJDK built with the IcedTea build harness. | |
940 | This version of the OpenJDK is no longer maintained and is only used for | |
941 | bootstrapping purposes.") | |
942 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
943 | ;; same license as both GNU Classpath and OpenJDK. | |
944 | (license license:gpl2+))) | |
945 | ||
a243e12a | 946 | (define-public icedtea-7 |
7f6485e7 | 947 | (let* ((version "2.6.13") |
f6789047 RW |
948 | (drop (lambda (name hash) |
949 | (origin | |
950 | (method url-fetch) | |
951 | (uri (string-append | |
d30ce4a7 | 952 | "http://icedtea.classpath.org/download/drops" |
f6789047 RW |
953 | "/icedtea7/" version "/" name ".tar.bz2")) |
954 | (sha256 (base32 hash)))))) | |
71053e14 RW |
955 | (package |
956 | (name "icedtea") | |
f6789047 RW |
957 | (version version) |
958 | (source (origin | |
959 | (method url-fetch) | |
960 | (uri (string-append | |
961 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
962 | version ".tar.xz")) | |
963 | (sha256 | |
964 | (base32 | |
7f6485e7 | 965 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
f6789047 RW |
966 | (modules '((guix build utils))) |
967 | (snippet | |
968 | '(substitute* "Makefile.in" | |
969 | ;; do not leak information about the build host | |
970 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") | |
971 | "DISTRIBUTION_ID=\"\\\"guix\\\"\""))))) | |
71053e14 RW |
972 | (build-system gnu-build-system) |
973 | (outputs '("out" ; Java Runtime Environment | |
974 | "jdk" ; Java Development Kit | |
975 | "doc")) ; all documentation | |
f6789047 RW |
976 | (arguments |
977 | `(;; There are many test failures. Some are known to | |
978 | ;; fail upstream, others relate to not having an X | |
979 | ;; server running at test time, yet others are a | |
980 | ;; complete mystery to me. | |
981 | ||
982 | ;; hotspot: passed: 241; failed: 45; error: 2 | |
983 | ;; langtools: passed: 1,934; failed: 26 | |
984 | ;; jdk: unknown | |
985 | #:tests? #f | |
71053e14 RW |
986 | |
987 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build | |
988 | ;; gremlin) doesn't support it yet, so skip this phase. | |
989 | #:validate-runpath? #f | |
990 | ||
f6789047 RW |
991 | ;; Apparently, the C locale is needed for some of the tests. |
992 | #:locale "C" | |
71053e14 RW |
993 | |
994 | #:modules ((guix build utils) | |
995 | (guix build gnu-build-system) | |
996 | (ice-9 match) | |
997 | (ice-9 popen) | |
71053e14 RW |
998 | (srfi srfi-19) |
999 | (srfi srfi-26)) | |
1000 | ||
1001 | #:configure-flags | |
e2098e2d RW |
1002 | ;; TODO: package pcsc and sctp, and add to inputs |
1003 | `("--disable-system-pcsc" | |
1004 | "--disable-system-sctp" | |
1005 | "--enable-bootstrap" | |
1006 | "--enable-nss" | |
1007 | "--without-rhino" | |
1008 | "--disable-downloading" | |
1009 | "--disable-tests" ;they are run in the check phase instead | |
1010 | "--with-openjdk-src-dir=./openjdk.src" | |
1011 | ,(string-append "--with-jdk-home=" | |
1012 | (assoc-ref %build-inputs "jdk"))) | |
71053e14 RW |
1013 | |
1014 | #:phases | |
1015 | (modify-phases %standard-phases | |
1016 | (replace 'unpack | |
1017 | (lambda* (#:key source inputs #:allow-other-keys) | |
1018 | (let ((target (string-append "icedtea-" ,version)) | |
1019 | (unpack (lambda* (name #:optional dir) | |
1020 | (let ((dir (or dir | |
1021 | (string-drop-right name 5)))) | |
1022 | (mkdir dir) | |
1023 | (zero? (system* "tar" "xvf" | |
1024 | (assoc-ref inputs name) | |
1025 | "-C" dir | |
1026 | "--strip-components=1")))))) | |
1027 | (mkdir target) | |
1028 | (and | |
1029 | (zero? (system* "tar" "xvf" source | |
1030 | "-C" target "--strip-components=1")) | |
1031 | (chdir target) | |
1032 | (unpack "openjdk-src" "openjdk.src") | |
1033 | (with-directory-excursion "openjdk.src" | |
1034 | (for-each unpack | |
1035 | (filter (cut string-suffix? "-drop" <>) | |
1036 | (map (match-lambda | |
1037 | ((name . _) name)) | |
1038 | inputs)))) | |
1039 | #t)))) | |
1040 | (add-after 'unpack 'fix-x11-extension-include-path | |
1041 | (lambda* (#:key inputs #:allow-other-keys) | |
1042 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" | |
1043 | (((string-append "\\$\\(firstword \\$\\(wildcard " | |
1044 | "\\$\\(OPENWIN_HOME\\)" | |
1045 | "/include/X11/extensions\\).*$")) | |
1046 | (string-append (assoc-ref inputs "libxrender") | |
1047 | "/include/X11/extensions" | |
1048 | " -I" (assoc-ref inputs "libxtst") | |
1049 | "/include/X11/extensions" | |
1050 | " -I" (assoc-ref inputs "libxinerama") | |
1051 | "/include/X11/extensions")) | |
1052 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) | |
1053 | #t)) | |
1054 | (add-after 'unpack 'patch-paths | |
1055 | (lambda _ | |
1056 | ;; buildtree.make generates shell scripts, so we need to replace | |
1057 | ;; the generated shebang | |
1058 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") | |
1059 | (("/bin/sh") (which "bash"))) | |
1060 | ||
1061 | (let ((corebin (string-append | |
1062 | (assoc-ref %build-inputs "coreutils") "/bin/")) | |
1063 | (binbin (string-append | |
1064 | (assoc-ref %build-inputs "binutils") "/bin/")) | |
1065 | (grepbin (string-append | |
1066 | (assoc-ref %build-inputs "grep") "/bin/"))) | |
1067 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" | |
1068 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") | |
1069 | (("UNIXCOMMAND_PATH = /bin/") | |
1070 | (string-append "UNIXCOMMAND_PATH = " corebin)) | |
1071 | (("USRBIN_PATH = /usr/bin/") | |
1072 | (string-append "USRBIN_PATH = " corebin)) | |
1073 | (("DEVTOOLS_PATH *= */usr/bin/") | |
1074 | (string-append "DEVTOOLS_PATH = " corebin)) | |
1075 | (("COMPILER_PATH *= */usr/bin/") | |
1076 | (string-append "COMPILER_PATH = " | |
1077 | (assoc-ref %build-inputs "gcc") "/bin/")) | |
1078 | (("DEF_OBJCOPY *=.*objcopy") | |
1079 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) | |
1080 | ||
1081 | ;; fix path to alsa header | |
1082 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" | |
1083 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1084 | (string-append "ALSA_INCLUDE=" | |
1085 | (assoc-ref %build-inputs "alsa-lib") | |
1086 | "/include/alsa/version.h"))) | |
1087 | ||
1088 | ;; fix hard-coded utility paths | |
1089 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" | |
1090 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") | |
1091 | (("ECHO *=.*echo") | |
1092 | (string-append "ECHO = " (which "echo"))) | |
1093 | (("^GREP *=.*grep") | |
1094 | (string-append "GREP = " (which "grep"))) | |
1095 | (("EGREP *=.*egrep") | |
1096 | (string-append "EGREP = " (which "egrep"))) | |
1097 | (("CPIO *=.*cpio") | |
1098 | (string-append "CPIO = " (which "cpio"))) | |
1099 | (("READELF *=.*readelf") | |
1100 | (string-append "READELF = " (which "readelf"))) | |
1101 | (("^ *AR *=.*ar") | |
1102 | (string-append "AR = " (which "ar"))) | |
1103 | (("^ *TAR *=.*tar") | |
1104 | (string-append "TAR = " (which "tar"))) | |
1105 | (("AS *=.*as") | |
1106 | (string-append "AS = " (which "as"))) | |
1107 | (("LD *=.*ld") | |
1108 | (string-append "LD = " (which "ld"))) | |
1109 | (("STRIP *=.*strip") | |
1110 | (string-append "STRIP = " (which "strip"))) | |
1111 | (("NM *=.*nm") | |
1112 | (string-append "NM = " (which "nm"))) | |
1113 | (("^SH *=.*sh") | |
1114 | (string-append "SH = " (which "bash"))) | |
1115 | (("^FIND *=.*find") | |
1116 | (string-append "FIND = " (which "find"))) | |
1117 | (("LDD *=.*ldd") | |
1118 | (string-append "LDD = " (which "ldd"))) | |
1119 | (("NAWK *=.*(n|g)awk") | |
1120 | (string-append "NAWK = " (which "gawk"))) | |
1121 | (("XARGS *=.*xargs") | |
1122 | (string-append "XARGS = " (which "xargs"))) | |
1123 | (("UNZIP *=.*unzip") | |
1124 | (string-append "UNZIP = " (which "unzip"))) | |
1125 | (("ZIPEXE *=.*zip") | |
1126 | (string-append "ZIPEXE = " (which "zip"))) | |
1127 | (("SED *=.*sed") | |
1128 | (string-append "SED = " (which "sed")))) | |
1129 | ||
1130 | ;; Some of these timestamps cause problems as they are more than | |
1131 | ;; 10 years ago, failing the build process. | |
1132 | (substitute* | |
1133 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" | |
1134 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") | |
1135 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") | |
1136 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") | |
1137 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))) | |
1138 | #t)) | |
1139 | (add-before 'configure 'set-additional-paths | |
1140 | (lambda* (#:key inputs #:allow-other-keys) | |
e2098e2d RW |
1141 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
1142 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") | |
1143 | (string-append "ALSA_INCLUDE=" | |
1144 | (assoc-ref inputs "alsa-lib") | |
1145 | "/include/alsa/version.h"))) | |
1146 | (setenv "CC" "gcc") | |
1147 | (setenv "CPATH" | |
1148 | (string-append (assoc-ref inputs "libxcomposite") | |
1149 | "/include/X11/extensions" ":" | |
1150 | (assoc-ref inputs "libxrender") | |
1151 | "/include/X11/extensions" ":" | |
1152 | (assoc-ref inputs "libxtst") | |
1153 | "/include/X11/extensions" ":" | |
1154 | (assoc-ref inputs "libxinerama") | |
1155 | "/include/X11/extensions" ":" | |
1156 | (or (getenv "CPATH") ""))) | |
1157 | (setenv "ALT_OBJCOPY" (which "objcopy")) | |
1158 | (setenv "ALT_CUPS_HEADERS_PATH" | |
1159 | (string-append (assoc-ref inputs "cups") | |
1160 | "/include")) | |
1161 | (setenv "ALT_FREETYPE_HEADERS_PATH" | |
1162 | (string-append (assoc-ref inputs "freetype") | |
1163 | "/include")) | |
1164 | (setenv "ALT_FREETYPE_LIB_PATH" | |
1165 | (string-append (assoc-ref inputs "freetype") | |
1166 | "/lib")) | |
71053e14 RW |
1167 | #t)) |
1168 | (add-before 'check 'fix-test-framework | |
1169 | (lambda _ | |
1170 | ;; Fix PATH in test environment | |
1171 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" | |
1172 | (("PATH=/bin:/usr/bin") | |
1173 | (string-append "PATH=" (getenv "PATH")))) | |
1174 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" | |
1175 | (("/usr/bin/env") (which "env"))) | |
1176 | (substitute* "openjdk.src/hotspot/test/test_env.sh" | |
1177 | (("/bin/rm") (which "rm")) | |
1178 | (("/bin/cp") (which "cp")) | |
1179 | (("/bin/mv") (which "mv"))) | |
1180 | #t)) | |
1181 | (add-before 'check 'fix-hotspot-tests | |
1182 | (lambda _ | |
1183 | (with-directory-excursion "openjdk.src/hotspot/test/" | |
1184 | (substitute* "jprt.config" | |
1185 | (("PATH=\"\\$\\{path4sdk\\}\"") | |
1186 | (string-append "PATH=" (getenv "PATH"))) | |
1187 | (("make=/usr/bin/make") | |
1188 | (string-append "make=" (which "make")))) | |
1189 | (substitute* '("runtime/6626217/Test6626217.sh" | |
1190 | "runtime/7110720/Test7110720.sh") | |
1191 | (("/bin/rm") (which "rm")) | |
1192 | (("/bin/cp") (which "cp")) | |
1193 | (("/bin/mv") (which "mv")))) | |
1194 | #t)) | |
1195 | (add-before 'check 'fix-jdk-tests | |
1196 | (lambda _ | |
1197 | (with-directory-excursion "openjdk.src/jdk/test/" | |
1198 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" | |
1199 | (("/bin/pwd") (which "pwd"))) | |
1200 | (substitute* "com/sun/jdi/ShellScaffold.sh" | |
1201 | (("/bin/kill") (which "kill"))) | |
1202 | (substitute* "start-Xvfb.sh" | |
1203 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) | |
1204 | (("/usr/bin/nohup") (which "nohup"))) | |
1205 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" | |
1206 | (("/bin/rm") (which "rm"))) | |
1207 | (substitute* "tools/launcher/MultipleJRE.sh" | |
1208 | (("echo \"#!/bin/sh\"") | |
1209 | (string-append "echo \"#!" (which "rm") "\"")) | |
1210 | (("/usr/bin/zip") (which "zip"))) | |
1211 | (substitute* "com/sun/jdi/OnThrowTest.java" | |
1212 | (("#!/bin/sh") (string-append "#!" (which "sh")))) | |
1213 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" | |
1214 | (("/usr/bin/uptime") (which "uptime"))) | |
1215 | (substitute* "java/lang/ProcessBuilder/Basic.java" | |
1216 | (("/usr/bin/env") (which "env")) | |
1217 | (("/bin/false") (which "false")) | |
1218 | (("/bin/true") (which "true")) | |
1219 | (("/bin/cp") (which "cp")) | |
1220 | (("/bin/sh") (which "sh"))) | |
1221 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" | |
1222 | (("/bin/sh") (which "sh"))) | |
1223 | (substitute* "java/lang/ProcessBuilder/Zombies.java" | |
1224 | (("/usr/bin/perl") (which "perl")) | |
1225 | (("/bin/ps") (which "ps")) | |
1226 | (("/bin/true") (which "true"))) | |
1227 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" | |
1228 | (("/usr/bin/tee") (which "tee"))) | |
1229 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" | |
1230 | (("/bin/true") (which "true"))) | |
1231 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" | |
1232 | (("/bin/cat") (which "cat"))) | |
1233 | (substitute* "java/lang/Runtime/exec/ExitValue.java" | |
1234 | (("/bin/sh") (which "sh")) | |
1235 | (("/bin/true") (which "true")) | |
1236 | (("/bin/kill") (which "kill"))) | |
1237 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" | |
1238 | (("/usr/bin/echo") (which "echo"))) | |
1239 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" | |
1240 | (("/usr/bin/cat") (which "cat"))) | |
1241 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" | |
1242 | (("/bin/cat") (which "cat")) | |
1243 | (("/bin/sleep") (which "sleep")) | |
1244 | (("/bin/sh") (which "sh"))) | |
1245 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" | |
1246 | (("/bin/cat") (which "cat"))) | |
1247 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" | |
1248 | (("/bin/chmod") (which "chmod"))) | |
1249 | (substitute* "java/util/zip/ZipFile/Assortment.java" | |
1250 | (("/bin/sh") (which "sh")))) | |
1251 | #t)) | |
1252 | (replace 'check | |
1253 | (lambda _ | |
1254 | ;; The "make check-*" targets always return zero, so we need to | |
1255 | ;; check for errors in the associated log files to determine | |
1256 | ;; whether any tests have failed. | |
1257 | (use-modules (ice-9 rdelim)) | |
1258 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) | |
1259 | (checker (lambda (port) | |
1260 | (let loop () | |
1261 | (let ((line (read-line port))) | |
1262 | (cond | |
1263 | ((eof-object? line) #t) | |
1264 | ((regexp-exec error-pattern line) #f) | |
1265 | (else (loop))))))) | |
1266 | (run-test (lambda (test) | |
1267 | (system* "make" test) | |
1268 | (call-with-input-file | |
1269 | (string-append "test/" test ".log") | |
1270 | checker)))) | |
1271 | (or #t ; skip tests | |
1272 | (and (run-test "check-hotspot") | |
1273 | (run-test "check-langtools") | |
1274 | (run-test "check-jdk")))))) | |
1275 | (replace 'install | |
1276 | (lambda* (#:key outputs #:allow-other-keys) | |
1277 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1278 | "/share/doc/icedtea")) | |
1279 | (jre (assoc-ref outputs "out")) | |
1280 | (jdk (assoc-ref outputs "jdk"))) | |
1281 | (copy-recursively "openjdk.build/docs" doc) | |
1282 | (copy-recursively "openjdk.build/j2re-image" jre) | |
1283 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) | |
1284 | #t)) | |
491dc2fb RJ |
1285 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
1286 | ;; But that shared object is located in the server/ folder, so it | |
1287 | ;; cannot be found. This phase creates a symbolic link in the | |
1288 | ;; lib/amd64 folder so that the other libraries can find it. | |
1289 | ;; | |
1290 | ;; See: | |
1291 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html | |
1292 | ;; | |
1293 | ;; FIXME: Find the bug in the build system, so that this symlink is | |
1294 | ;; not needed. | |
1295 | (add-after 'install 'install-libjvm | |
1296 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1297 | (let* ((lib-path (string-append (assoc-ref outputs "out") | |
1298 | "/lib/amd64"))) | |
1299 | (symlink (string-append lib-path "/server/libjvm.so") | |
1300 | (string-append lib-path "/libjvm.so"))) | |
1301 | #t)) | |
71053e14 RW |
1302 | ;; By default IcedTea only generates an empty keystore. In order to |
1303 | ;; be able to use certificates in Java programs we need to generate a | |
1304 | ;; keystore from a set of certificates. For convenience we use the | |
1305 | ;; certificates from the nss-certs package. | |
1306 | (add-after 'install 'install-keystore | |
1307 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1308 | (let* ((keystore "cacerts") | |
1309 | (certs-dir (string-append (assoc-ref inputs "nss-certs") | |
1310 | "/etc/ssl/certs")) | |
1311 | (keytool (string-append (assoc-ref outputs "jdk") | |
1312 | "/bin/keytool"))) | |
1313 | (define (extract-cert file target) | |
1314 | (call-with-input-file file | |
1315 | (lambda (in) | |
1316 | (call-with-output-file target | |
1317 | (lambda (out) | |
1318 | (let loop ((line (read-line in 'concat)) | |
1319 | (copying? #f)) | |
1320 | (cond | |
1321 | ((eof-object? line) #t) | |
1322 | ((string-prefix? "-----BEGIN" line) | |
1323 | (display line out) | |
1324 | (loop (read-line in 'concat) #t)) | |
1325 | ((string-prefix? "-----END" line) | |
1326 | (display line out) | |
1327 | #t) | |
1328 | (else | |
1329 | (when copying? (display line out)) | |
1330 | (loop (read-line in 'concat) copying?))))))))) | |
1331 | (define (import-cert cert) | |
1332 | (format #t "Importing certificate ~a\n" (basename cert)) | |
1333 | (let ((temp "tmpcert")) | |
1334 | (extract-cert cert temp) | |
1335 | (let ((port (open-pipe* OPEN_WRITE keytool | |
1336 | "-import" | |
1337 | "-alias" (basename cert) | |
1338 | "-keystore" keystore | |
1339 | "-storepass" "changeit" | |
1340 | "-file" temp))) | |
1341 | (display "yes\n" port) | |
1342 | (when (not (zero? (status:exit-val (close-pipe port)))) | |
1343 | (format #t "failed to import ~a\n" cert))) | |
1344 | (delete-file temp))) | |
1345 | ||
1346 | ;; This is necessary because the certificate directory contains | |
1347 | ;; files with non-ASCII characters in their names. | |
1348 | (setlocale LC_ALL "en_US.utf8") | |
1349 | (setenv "LC_ALL" "en_US.utf8") | |
1350 | ||
1351 | (for-each import-cert (find-files certs-dir "\\.pem$")) | |
1352 | (mkdir-p (string-append (assoc-ref outputs "out") | |
1353 | "/lib/security")) | |
1354 | (mkdir-p (string-append (assoc-ref outputs "jdk") | |
1355 | "/jre/lib/security")) | |
1356 | ||
1357 | ;; The cacerts files we are going to overwrite are chmod'ed as | |
1358 | ;; read-only (444) in icedtea-8 (which derives from this | |
1359 | ;; package). We have to change this so we can overwrite them. | |
1360 | (chmod (string-append (assoc-ref outputs "out") | |
1361 | "/lib/security/" keystore) #o644) | |
1362 | (chmod (string-append (assoc-ref outputs "jdk") | |
1363 | "/jre/lib/security/" keystore) #o644) | |
1364 | ||
1365 | (install-file keystore | |
1366 | (string-append (assoc-ref outputs "out") | |
1367 | "/lib/security")) | |
1368 | (install-file keystore | |
1369 | (string-append (assoc-ref outputs "jdk") | |
1370 | "/jre/lib/security")) | |
1371 | #t)))))) | |
f6789047 | 1372 | (native-inputs |
d9148890 | 1373 | `(("openjdk-src" |
f6789047 | 1374 | ,(drop "openjdk" |
7f6485e7 | 1375 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
f6789047 RW |
1376 | ("corba-drop" |
1377 | ,(drop "corba" | |
7f6485e7 | 1378 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
f6789047 RW |
1379 | ("jaxp-drop" |
1380 | ,(drop "jaxp" | |
7f6485e7 | 1381 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
f6789047 RW |
1382 | ("jaxws-drop" |
1383 | ,(drop "jaxws" | |
7f6485e7 | 1384 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
f6789047 RW |
1385 | ("jdk-drop" |
1386 | ,(drop "jdk" | |
7f6485e7 | 1387 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) |
f6789047 RW |
1388 | ("langtools-drop" |
1389 | ,(drop "langtools" | |
7f6485e7 | 1390 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
f6789047 RW |
1391 | ("hotspot-drop" |
1392 | ,(drop "hotspot" | |
7f6485e7 | 1393 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) |
e2098e2d | 1394 | ("ant" ,ant-bootstrap) |
71053e14 | 1395 | ("attr" ,attr) |
71053e14 RW |
1396 | ("coreutils" ,coreutils) |
1397 | ("diffutils" ,diffutils) ;for tests | |
1398 | ("gawk" ,gawk) | |
1399 | ("grep" ,grep) | |
1400 | ("libtool" ,libtool) | |
1401 | ("pkg-config" ,pkg-config) | |
1402 | ("wget" ,wget) | |
1403 | ("which" ,which) | |
1404 | ("cpio" ,cpio) | |
1405 | ("zip" ,zip) | |
1406 | ("unzip" ,unzip) | |
1407 | ("fastjar" ,fastjar) | |
1408 | ("libxslt" ,libxslt) ;for xsltproc | |
1409 | ("nss-certs" ,nss-certs) | |
1410 | ("perl" ,perl) | |
1411 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it | |
e2098e2d | 1412 | ("jdk" ,icedtea-6 "jdk"))) |
b711df02 | 1413 | (inputs |
71053e14 RW |
1414 | `(("alsa-lib" ,alsa-lib) |
1415 | ("cups" ,cups) | |
1416 | ("libx11" ,libx11) | |
1417 | ("libxcomposite" ,libxcomposite) | |
1418 | ("libxt" ,libxt) | |
1419 | ("libxtst" ,libxtst) | |
1420 | ("libxi" ,libxi) | |
1421 | ("libxinerama" ,libxinerama) | |
1422 | ("libxrender" ,libxrender) | |
1423 | ("libjpeg" ,libjpeg) | |
1424 | ("libpng" ,libpng) | |
1425 | ("mit-krb5" ,mit-krb5) | |
1426 | ("nss" ,nss) | |
1427 | ("giflib" ,giflib) | |
1428 | ("fontconfig" ,fontconfig) | |
1429 | ("freetype" ,freetype) | |
1430 | ("lcms" ,lcms) | |
1431 | ("zlib" ,zlib) | |
1432 | ("gtk" ,gtk+-2))) | |
1433 | (home-page "http://icedtea.classpath.org") | |
1434 | (synopsis "Java development kit") | |
1435 | (description | |
1436 | "This package provides the Java development kit OpenJDK built with the | |
1437 | IcedTea build harness.") | |
1438 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the | |
1439 | ;; same license as both GNU Classpath and OpenJDK. | |
1440 | (license license:gpl2+)))) | |
d2540f80 | 1441 | |
349a3147 | 1442 | (define-public icedtea-8 |
1d97d8ff | 1443 | (let* ((version "3.7.0") |
349a3147 RW |
1444 | (drop (lambda (name hash) |
1445 | (origin | |
1446 | (method url-fetch) | |
1447 | (uri (string-append | |
db531f73 | 1448 | "http://icedtea.classpath.org/download/drops" |
349a3147 RW |
1449 | "/icedtea8/" version "/" name ".tar.xz")) |
1450 | (sha256 (base32 hash)))))) | |
1451 | (package (inherit icedtea-7) | |
1d97d8ff | 1452 | (version "3.7.0") |
349a3147 RW |
1453 | (source (origin |
1454 | (method url-fetch) | |
1455 | (uri (string-append | |
1456 | "http://icedtea.wildebeest.org/download/source/icedtea-" | |
1457 | version ".tar.xz")) | |
1458 | (sha256 | |
1459 | (base32 | |
1d97d8ff | 1460 | "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w")) |
349a3147 RW |
1461 | (modules '((guix build utils))) |
1462 | (snippet | |
0c729ef4 | 1463 | '(begin |
f2785bd6 RW |
1464 | (substitute* '("configure" |
1465 | "acinclude.m4") | |
0c729ef4 RW |
1466 | ;; Do not embed build time |
1467 | (("(DIST_ID=\"Custom build).*$" _ prefix) | |
1468 | (string-append prefix "\"\n")) | |
1469 | ;; Do not leak information about the build host | |
1470 | (("DIST_NAME=\"\\$build_os\"") | |
1471 | "DIST_NAME=\"guix\"")) | |
1472 | #t)))) | |
349a3147 | 1473 | (arguments |
f2785bd6 RW |
1474 | `(#:imported-modules |
1475 | ((guix build ant-build-system) | |
1476 | (guix build syscalls) | |
1477 | ,@%gnu-build-system-modules) | |
1478 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) | |
1479 | ((#:modules modules) | |
1480 | `((guix build utils) | |
1481 | (guix build gnu-build-system) | |
1482 | ((guix build ant-build-system) #:prefix ant:) | |
1483 | (ice-9 match) | |
1484 | (ice-9 popen) | |
1485 | (srfi srfi-19) | |
1486 | (srfi srfi-26))) | |
1487 | ((#:configure-flags flags) | |
1488 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) | |
1489 | `( ;;"--disable-bootstrap" | |
1490 | "--enable-bootstrap" | |
1491 | "--enable-nss" | |
1492 | "--disable-downloading" | |
1493 | "--disable-system-pcsc" | |
1494 | "--disable-system-sctp" | |
1495 | "--disable-tests" ;they are run in the check phase instead | |
1496 | "--with-openjdk-src-dir=./openjdk.src" | |
1497 | ,(string-append "--with-jdk-home=" jdk)))) | |
1498 | ((#:phases phases) | |
1499 | `(modify-phases ,phases | |
1500 | (delete 'fix-x11-extension-include-path) | |
1501 | (delete 'patch-paths) | |
1502 | (delete 'set-additional-paths) | |
1503 | (delete 'patch-patches) | |
1504 | ;; Prevent the keytool from recording the current time when | |
1505 | ;; adding certificates at build time. | |
1506 | (add-after 'unpack 'patch-keystore | |
1507 | (lambda _ | |
1508 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" | |
1509 | (("date = new Date\\(\\);") | |
1510 | "\ | |
1511 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ | |
1512 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ | |
1513 | new Date();")) | |
1514 | #t)) | |
1515 | (add-after 'unpack 'patch-jni-libs | |
1516 | ;; Hardcode dynamically loaded libraries. | |
1517 | (lambda _ | |
1518 | (let* ((library-path (search-path-as-string->list | |
1519 | (getenv "LIBRARY_PATH"))) | |
1520 | (find-library (lambda (name) | |
1521 | (search-path | |
1522 | library-path | |
1523 | (string-append "lib" name ".so"))))) | |
1524 | (for-each | |
1525 | (lambda (file) | |
1526 | (catch 'decoding-error | |
1527 | (lambda () | |
1528 | (substitute* file | |
1529 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" | |
1530 | _ name version) | |
1531 | (format #f "\"~a\"" (find-library name))) | |
1532 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) | |
1533 | (format #f "\"~a\"" (find-library name))))) | |
1534 | (lambda _ | |
1535 | ;; Those are safe to skip. | |
1536 | (format (current-error-port) | |
1537 | "warning: failed to substitute: ~a~%" | |
1538 | file)))) | |
1539 | (find-files "openjdk.src/jdk/src/solaris/native" | |
1540 | "\\.c|\\.h")) | |
1541 | #t))) | |
1542 | (replace 'install | |
1543 | (lambda* (#:key outputs #:allow-other-keys) | |
1544 | (let ((doc (string-append (assoc-ref outputs "doc") | |
1545 | "/share/doc/icedtea")) | |
1546 | (jre (assoc-ref outputs "out")) | |
1547 | (jdk (assoc-ref outputs "jdk"))) | |
1548 | (copy-recursively "openjdk.build/docs" doc) | |
1549 | (copy-recursively "openjdk.build/images/j2re-image" jre) | |
1550 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) | |
1551 | ;; Install the nss.cfg file to JRE to enable SSL/TLS | |
1552 | ;; support via NSS. | |
1553 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") | |
1554 | (string-append jre "/lib/security/nss.cfg")) | |
1555 | #t))) | |
1556 | (add-after 'install 'strip-jar-timestamps | |
1557 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) | |
349a3147 RW |
1558 | (native-inputs |
1559 | `(("jdk" ,icedtea-7 "jdk") | |
1560 | ("openjdk-src" | |
1561 | ,(drop "openjdk" | |
1d97d8ff | 1562 | "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p")) |
12eecbf0 LF |
1563 | ("aarch32-drop" |
1564 | ,(drop "aarch32" | |
1d97d8ff | 1565 | "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg")) |
349a3147 RW |
1566 | ("corba-drop" |
1567 | ,(drop "corba" | |
1d97d8ff | 1568 | "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah")) |
349a3147 RW |
1569 | ("jaxp-drop" |
1570 | ,(drop "jaxp" | |
1d97d8ff | 1571 | "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i")) |
349a3147 RW |
1572 | ("jaxws-drop" |
1573 | ,(drop "jaxws" | |
1d97d8ff | 1574 | "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf")) |
349a3147 RW |
1575 | ("jdk-drop" |
1576 | ,(drop "jdk" | |
1d97d8ff | 1577 | "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl")) |
349a3147 RW |
1578 | ("langtools-drop" |
1579 | ,(drop "langtools" | |
1d97d8ff | 1580 | "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) |
349a3147 RW |
1581 | ("hotspot-drop" |
1582 | ,(drop "hotspot" | |
1d97d8ff | 1583 | "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) |
349a3147 RW |
1584 | ("nashorn-drop" |
1585 | ,(drop "nashorn" | |
1d97d8ff | 1586 | "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) |
fd34d4f4 LF |
1587 | ("shenandoah-drop" |
1588 | ,(drop "shenandoah" | |
1d97d8ff | 1589 | "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy")) |
349a3147 | 1590 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
e2098e2d | 1591 | '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
349a3147 RW |
1592 | "jdk-drop" "langtools-drop" "hotspot-drop"))))))) |
1593 | ||
a243e12a | 1594 | (define-public icedtea icedtea-7) |
068e476f | 1595 | |
5490480c | 1596 | \f |
8bbd0408 RW |
1597 | (define-public ant/java8 |
1598 | (package (inherit ant-bootstrap) | |
1599 | (name "ant") | |
1600 | (version "1.10.1") | |
1601 | (source (origin | |
1602 | (method url-fetch) | |
1603 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
1604 | version "-src.tar.gz")) | |
1605 | (sha256 | |
1606 | (base32 | |
1607 | "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8")) | |
1608 | (modules '((guix build utils))) | |
1609 | (snippet | |
1610 | '(begin | |
1611 | (for-each delete-file | |
1612 | (find-files "lib/optional" "\\.jar$")) | |
1613 | #t)))) | |
1614 | (arguments | |
1615 | (substitute-keyword-arguments (package-arguments ant-bootstrap) | |
1616 | ((#:phases phases) | |
1617 | `(modify-phases ,phases | |
1618 | (add-after 'unpack 'remove-scripts | |
1619 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant | |
1620 | ;; wrappers. | |
1621 | (lambda _ | |
1622 | (for-each delete-file | |
1623 | (find-files "src/script" | |
1624 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) | |
1625 | #t)) | |
1626 | (replace 'build | |
1627 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1628 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) | |
1629 | ||
1630 | ;; Disable tests to avoid dependency on hamcrest-core, which needs | |
1631 | ;; Ant to build. This is necessary in addition to disabling the | |
1632 | ;; "check" phase, because the dependency on "test-jar" would always | |
1633 | ;; result in the tests to be run. | |
1634 | (substitute* "build.xml" | |
1635 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) | |
1636 | (zero? (system* "bash" "bootstrap.sh" | |
1637 | (string-append "-Ddist.dir=" | |
1638 | (assoc-ref outputs "out")))))))))) | |
1639 | (native-inputs | |
1640 | `(("jdk" ,icedtea-8 "jdk"))))) | |
1641 | ||
e441fc56 RW |
1642 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
1643 | ;; requires Java 8. | |
1644 | (define-public ant | |
1645 | (package (inherit ant/java8) | |
1646 | (version "1.9.9") | |
1647 | (source (origin | |
1648 | (method url-fetch) | |
1649 | (uri (string-append "mirror://apache/ant/source/apache-ant-" | |
1650 | version "-src.tar.gz")) | |
1651 | (sha256 | |
1652 | (base32 | |
1653 | "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n")))) | |
1654 | (native-inputs | |
1655 | `(("jdk" ,icedtea-7 "jdk"))))) | |
1656 | ||
9ce7ac99 RW |
1657 | (define-public ant-apache-bcel |
1658 | (package | |
1659 | (inherit ant/java8) | |
1660 | (name "ant-apache-bcel") | |
1661 | (arguments | |
1662 | (substitute-keyword-arguments (package-arguments ant/java8) | |
1663 | ((#:phases phases) | |
1664 | `(modify-phases ,phases | |
1665 | (add-after 'unpack 'link-bcel | |
1666 | (lambda* (#:key inputs #:allow-other-keys) | |
1667 | (for-each (lambda (file) | |
1668 | (symlink file | |
1669 | (string-append "lib/optional/" | |
1670 | (basename file)))) | |
1671 | (find-files (assoc-ref inputs "java-commons-bcel") | |
1672 | "\\.jar$")) | |
1673 | #t)) | |
1674 | (add-after 'build 'install | |
1675 | (lambda* (#:key outputs #:allow-other-keys) | |
1676 | (let* ((out (assoc-ref outputs "out")) | |
1677 | (share (string-append out "/share/java")) | |
1678 | (bin (string-append out "/bin")) | |
1679 | (lib (string-append out "/lib"))) | |
1680 | (mkdir-p share) | |
1681 | (install-file (string-append lib "/ant-apache-bcel.jar") share) | |
1682 | (delete-file-recursively bin) | |
1683 | (delete-file-recursively lib) | |
1684 | #t))))))) | |
1685 | (inputs | |
1686 | `(("java-commons-bcel" ,java-commons-bcel) | |
1687 | ,@(package-inputs ant/java8))))) | |
1688 | ||
fa6c4213 RW |
1689 | (define-public ant-junit |
1690 | (package | |
1691 | (inherit ant/java8) | |
1692 | (name "ant-junit") | |
1693 | (arguments | |
1694 | (substitute-keyword-arguments (package-arguments ant/java8) | |
1695 | ((#:phases phases) | |
1696 | `(modify-phases ,phases | |
1697 | (add-after 'unpack 'link-junit | |
1698 | (lambda* (#:key inputs #:allow-other-keys) | |
1699 | (for-each (lambda (file) | |
1700 | (symlink file | |
1701 | (string-append "lib/optional/" | |
1702 | (basename file)))) | |
1703 | (find-files (assoc-ref inputs "java-junit") | |
1704 | "\\.jar$")) | |
1705 | #t)) | |
1706 | (add-after 'build 'install | |
1707 | (lambda* (#:key outputs #:allow-other-keys) | |
1708 | (let* ((out (assoc-ref outputs "out")) | |
1709 | (share (string-append out "/share/java")) | |
1710 | (bin (string-append out "/bin")) | |
1711 | (lib (string-append out "/lib"))) | |
1712 | (mkdir-p share) | |
1713 | (install-file (string-append lib "/ant-junit.jar") share) | |
1714 | (delete-file-recursively bin) | |
1715 | (delete-file-recursively lib) | |
1716 | #t))))))) | |
1717 | (inputs | |
1718 | `(("java-junit" ,java-junit) | |
1719 | ,@(package-inputs ant/java8))))) | |
1720 | ||
fc6e2727 RW |
1721 | (define-public clojure |
1722 | (let* ((remove-archives '(begin | |
1723 | (for-each delete-file | |
1724 | (find-files "." ".*\\.(jar|zip)")) | |
1725 | #t)) | |
1726 | (submodule (lambda (prefix version hash) | |
1727 | (origin | |
1728 | (method url-fetch) | |
1729 | (uri (string-append "https://github.com/clojure/" | |
1730 | prefix version ".tar.gz")) | |
1731 | (sha256 (base32 hash)) | |
1732 | (modules '((guix build utils))) | |
1733 | (snippet remove-archives))))) | |
1734 | (package | |
1735 | (name "clojure") | |
1d47ea86 | 1736 | (version "1.9.0") |
fc6e2727 RW |
1737 | (source |
1738 | (origin | |
1739 | (method url-fetch) | |
1740 | (uri | |
1d47ea86 AV |
1741 | (string-append "https://github.com/clojure/clojure/archive/clojure-" |
1742 | version ".tar.gz")) | |
fc6e2727 | 1743 | (sha256 |
1d47ea86 | 1744 | (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha")) |
fc6e2727 RW |
1745 | (modules '((guix build utils))) |
1746 | (snippet remove-archives))) | |
1747 | (build-system ant-build-system) | |
1748 | (arguments | |
1749 | `(#:modules ((guix build ant-build-system) | |
1750 | (guix build utils) | |
1751 | (ice-9 ftw) | |
1752 | (ice-9 regex) | |
1753 | (srfi srfi-1) | |
1754 | (srfi srfi-26)) | |
1755 | #:test-target "test" | |
1756 | #:phases | |
1757 | (modify-phases %standard-phases | |
1758 | (add-after 'unpack 'unpack-submodule-sources | |
1759 | (lambda* (#:key inputs #:allow-other-keys) | |
1760 | (for-each | |
1761 | (lambda (name) | |
1762 | (mkdir-p name) | |
1763 | (with-directory-excursion name | |
1764 | (or (zero? (system* "tar" | |
1765 | ;; Use xz for repacked tarball. | |
1766 | "--xz" | |
1767 | "--extract" | |
1768 | "--verbose" | |
1769 | "--file" (assoc-ref inputs name) | |
1770 | "--strip-components=1")) | |
1771 | (error "failed to unpack tarball" name))) | |
1772 | (copy-recursively (string-append name "/src/main/clojure/") | |
1773 | "src/clj/")) | |
1d47ea86 AV |
1774 | '("core-specs-alpha-src" |
1775 | "data-generators-src" | |
1776 | "spec-alpha-src" | |
fc6e2727 RW |
1777 | "test-check-src" |
1778 | "test-generative-src" | |
1d47ea86 | 1779 | "tools-namespace-src")) |
fc6e2727 RW |
1780 | #t)) |
1781 | ;; The javadoc target is not built by default. | |
1782 | (add-after 'build 'build-doc | |
1783 | (lambda _ | |
1784 | (zero? (system* "ant" "javadoc")))) | |
1785 | ;; Needed since no install target is provided. | |
1786 | (replace 'install | |
1787 | (lambda* (#:key outputs #:allow-other-keys) | |
1788 | (let ((java-dir (string-append (assoc-ref outputs "out") | |
1789 | "/share/java/"))) | |
1790 | ;; Install versioned to avoid collisions. | |
1791 | (install-file (string-append "clojure-" ,version ".jar") | |
1792 | java-dir) | |
1793 | #t))) | |
1794 | ;; Needed since no install-doc target is provided. | |
1795 | (add-after 'install 'install-doc | |
1796 | (lambda* (#:key outputs #:allow-other-keys) | |
1797 | (let ((doc-dir (string-append (assoc-ref outputs "out") | |
1798 | "/share/doc/clojure-" | |
1799 | ,version "/"))) | |
1800 | (copy-recursively "doc/clojure" doc-dir) | |
1801 | (copy-recursively "target/javadoc/" | |
1802 | (string-append doc-dir "javadoc/")) | |
1803 | (for-each (cut install-file <> doc-dir) | |
1804 | (filter (cut string-match | |
1805 | ".*\\.(html|markdown|md|txt)" | |
1806 | <>) | |
1807 | (scandir "./"))) | |
1808 | #t)))))) | |
1809 | ;; The native-inputs below are needed to run the tests. | |
1810 | (native-inputs | |
1d47ea86 AV |
1811 | `(("core-specs-alpha-src" |
1812 | ,(submodule "core.specs.alpha/archive/core.specs.alpha-" | |
1813 | "0.1.24" | |
1814 | "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv")) | |
1815 | ("data-generators-src" | |
fc6e2727 RW |
1816 | ,(submodule "data.generators/archive/data.generators-" |
1817 | "0.1.2" | |
1818 | "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1")) | |
1d47ea86 AV |
1819 | ("spec-alpha-src" |
1820 | ,(submodule "spec.alpha/archive/spec.alpha-" | |
1821 | "0.1.143" | |
1822 | "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz")) | |
fc6e2727 RW |
1823 | ("test-check-src" |
1824 | ,(submodule "test.check/archive/test.check-" | |
1825 | "0.9.0" | |
1826 | "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md")) | |
1827 | ("test-generative-src" | |
1828 | ,(submodule "test.generative/archive/test.generative-" | |
1829 | "0.5.2" | |
1830 | "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8")) | |
1831 | ("tools-namespace-src" | |
1832 | ,(submodule "tools.namespace/archive/tools.namespace-" | |
1833 | "0.2.11" | |
1d47ea86 | 1834 | "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0")))) |
fc6e2727 RW |
1835 | (home-page "https://clojure.org/") |
1836 | (synopsis "Lisp dialect running on the JVM") | |
1837 | (description "Clojure is a dynamic, general-purpose programming language, | |
1838 | combining the approachability and interactive development of a scripting | |
1839 | language with an efficient and robust infrastructure for multithreaded | |
1840 | programming. Clojure is a compiled language, yet remains completely dynamic | |
1841 | – every feature supported by Clojure is supported at runtime. Clojure | |
1842 | provides easy access to the Java frameworks, with optional type hints and type | |
1843 | inference, to ensure that calls to Java can avoid reflection. | |
1844 | ||
1845 | Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy | |
1846 | and a powerful macro system. Clojure is predominantly a functional programming | |
1847 | language, and features a rich set of immutable, persistent data structures. | |
1848 | When mutable state is needed, Clojure offers a software transactional memory | |
1849 | system and reactive Agent system that ensure clean, correct, multithreaded | |
1850 | designs.") | |
1851 | ;; Clojure is licensed under EPL1.0 | |
1852 | ;; ASM bytecode manipulation library is licensed under BSD-3 | |
1853 | ;; Guava Murmur3 hash implementation is licensed under APL2.0 | |
1854 | ;; src/clj/repl.clj is licensed under CPL1.0 | |
1855 | ;; | |
1856 | ;; See readme.html or readme.txt for details. | |
1857 | (license (list license:epl1.0 | |
1858 | license:bsd-3 | |
1859 | license:asl2.0 | |
1860 | license:cpl1.0))))) | |
1861 | ||
fc8d100b RW |
1862 | (define-public javacc |
1863 | (package | |
1864 | (name "javacc") | |
1865 | (version "7.0.3") | |
1866 | (source (origin | |
1867 | (method url-fetch) | |
1868 | (uri (string-append "https://github.com/javacc/javacc/" | |
1869 | "archive/" version ".tar.gz")) | |
1870 | (file-name (string-append "javacc-" version ".tar.gz")) | |
1871 | (sha256 | |
1872 | (base32 | |
1873 | "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf")))) | |
1874 | (build-system ant-build-system) | |
1875 | (arguments | |
1876 | `(#:test-target "test" | |
1877 | #:phases | |
1878 | (modify-phases %standard-phases | |
1879 | (add-after 'unpack 'delete-bundled-libs | |
1880 | (lambda _ | |
1881 | (delete-file-recursively "lib") #t)) | |
1882 | (replace 'install (install-jars "target"))))) | |
1883 | (home-page "https://javacc.org/") | |
1884 | (synopsis "Java parser generator") | |
1885 | (description "Java Compiler Compiler (JavaCC) is the most popular parser | |
1886 | generator for use with Java applications. A parser generator is a tool that | |
1887 | reads a grammar specification and converts it to a Java program that can | |
1888 | recognize matches to the grammar. In addition to the parser generator itself, | |
1889 | JavaCC provides other standard capabilities related to parser generation such | |
1890 | as tree building (via a tool called JJTree included with JavaCC), actions, | |
1891 | debugging, etc.") | |
1892 | (license license:bsd-3))) | |
1893 | ||
6688c41e RW |
1894 | (define-public javacc-4 |
1895 | (package (inherit javacc) | |
1896 | (version "4.1") | |
1897 | (source (origin | |
1898 | (method git-fetch) | |
1899 | (uri (git-reference | |
1900 | (url "https://github.com/javacc/javacc.git") | |
1901 | (commit "release_41"))) | |
1902 | (file-name (string-append "javacc-" version "-checkout")) | |
1903 | (sha256 | |
1904 | (base32 | |
1905 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")))) | |
1906 | ;; Tests fail with | |
1907 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: | |
1908 | ;; JAVACODE failed | |
1909 | (arguments | |
1910 | `(#:tests? #f | |
1911 | #:phases | |
1912 | (modify-phases %standard-phases | |
1913 | (add-after 'unpack 'delete-bundled-libs | |
1914 | (lambda _ | |
1915 | (delete-file-recursively "lib") #t)) | |
1916 | (replace 'install (install-jars "bin/lib"))))))) | |
1917 | ||
c1cb8576 RW |
1918 | ;; This is the last 3.x release of ECJ |
1919 | (define-public java-ecj-3 | |
1920 | (package | |
1921 | (name "java-ecj") | |
1922 | (version "3.8.2") | |
1923 | (source (origin | |
1924 | (method url-fetch) | |
1925 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
1926 | "downloads/drops/R-" version | |
1927 | "-201301310800/ecjsrc-" version ".jar")) | |
1928 | (sha256 | |
1929 | (base32 | |
1930 | "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) | |
1931 | (build-system ant-build-system) | |
1932 | (arguments | |
1933 | `(#:tests? #f ; none included | |
1934 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
1935 | #:make-flags (list "-f" "src/build.xml") | |
1936 | #:build-target "build" | |
1937 | #:phases | |
1938 | (modify-phases %standard-phases | |
1939 | (add-after 'unpack 'fix-manifest | |
1940 | (lambda _ | |
1941 | ;; Record the main class to make ecj executable. | |
1942 | (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" | |
1943 | (lambda (in out) | |
1944 | (display "Manifest-Version: 1.0 | |
1945 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
1946 | out))))) | |
1947 | (replace 'install (install-jars "."))))) | |
1948 | (home-page "https://eclipse.org") | |
1949 | (synopsis "Eclipse Java development tools core batch compiler") | |
1950 | (description "This package provides the Eclipse Java core batch compiler.") | |
1951 | (license license:epl1.0))) | |
1952 | ||
f201b18e RW |
1953 | ;; This is needed for java-cisd-args4j |
1954 | (define-public java-ecj-3.5 | |
1955 | (package (inherit java-ecj-3) | |
1956 | (version "3.5.1") | |
1957 | (source (origin | |
1958 | (method url-fetch/zipbomb) | |
1959 | (uri (string-append "http://archive.eclipse.org/eclipse/" | |
1960 | "downloads/drops/R-" version | |
1961 | "-200909170800/ecjsrc-" version ".zip")) | |
1962 | (sha256 | |
1963 | (base32 | |
1964 | "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) | |
1965 | (build-system ant-build-system) | |
1966 | (arguments | |
1967 | `(#:tests? #f ; none included | |
1968 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ | |
1969 | #:build-target "build" | |
1970 | #:phases | |
1971 | (modify-phases %standard-phases | |
1972 | (add-after 'unpack 'fix-manifest | |
1973 | (lambda _ | |
1974 | ;; Record the main class to make ecj executable. | |
1975 | (with-atomic-file-replacement "META-INF/MANIFEST.MF" | |
1976 | (lambda (in out) | |
1977 | (dump-port in out) | |
1978 | (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" | |
1979 | out))))) | |
1980 | (replace 'install (install-jars "."))))) | |
1981 | (native-inputs | |
1982 | `(("unzip" ,unzip))))) | |
1983 | ||
30d55473 RW |
1984 | (define-public java-cisd-base |
1985 | (let ((revision 38938) | |
1986 | (base-version "14.12.0")) | |
1987 | (package | |
1988 | (name "java-cisd-base") | |
1989 | (version (string-append base-version "-" (number->string revision))) | |
1990 | (source (origin | |
1991 | (method svn-fetch) | |
1992 | (uri (svn-reference | |
1993 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
1994 | "base/tags/release/" | |
1995 | (version-major+minor base-version) | |
1996 | ".x/" base-version "/base/")) | |
1997 | (revision revision))) | |
1998 | (file-name (string-append "java-cisd-base-" version "-checkout")) | |
1999 | (sha256 | |
2000 | (base32 | |
2001 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) | |
2002 | (modules '((guix build utils))) | |
2003 | (snippet | |
2004 | '(begin | |
2005 | ;; Delete included gradle jar | |
2006 | (delete-file-recursively "gradle/wrapper") | |
2007 | ;; Delete pre-built native libraries | |
2008 | (delete-file-recursively "libs") | |
2009 | #t)))) | |
2010 | (build-system ant-build-system) | |
2011 | (arguments | |
2012 | `(#:make-flags '("-file" "build/build.xml") | |
2013 | #:test-target "jar-test" | |
2014 | #:jdk ,icedtea-8 | |
2015 | #:phases | |
2016 | (modify-phases %standard-phases | |
2017 | (add-after 'unpack 'unpack-build-resources | |
2018 | (lambda* (#:key inputs #:allow-other-keys) | |
2019 | (copy-recursively (assoc-ref inputs "build-resources") | |
2020 | "../build_resources") | |
2021 | #t)) | |
2022 | (add-after 'unpack-build-resources 'fix-dependencies | |
2023 | (lambda* (#:key inputs #:allow-other-keys) | |
2024 | (substitute* "build/build.xml" | |
2025 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2026 | (string-append (assoc-ref inputs "java-testng") | |
2027 | "/share/java/java-testng.jar")) | |
2028 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2029 | (string-append (assoc-ref inputs "java-commons-lang") | |
2030 | "/share/java/commons-lang-" | |
2031 | ,(package-version java-commons-lang) ".jar")) | |
2032 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2033 | (string-append (assoc-ref inputs "java-commons-io") | |
2034 | "/share/java/commons-io-" | |
2035 | ,(package-version java-commons-io) | |
2036 | "-SNAPSHOT.jar")) | |
2037 | ;; Remove dependency on svn | |
2038 | (("<build-info.*") "") | |
2039 | (("\\$\\{revision.number\\}") | |
2040 | ,(number->string revision)) | |
2041 | (("\\$\\{version.number\\}") ,base-version)) | |
2042 | ;; Remove dependency on classycle | |
2043 | (substitute* "../build_resources/ant/build-common.xml" | |
2044 | (("<taskdef name=\"dependency-checker.*") "") | |
2045 | (("classname=\"classycle.*") "") | |
2046 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2047 | #t)) | |
2048 | ;; A few tests fail because of the lack of a proper /etc/groups and | |
2049 | ;; /etc/passwd file in the build container. | |
2050 | (add-after 'unpack 'disable-broken-tests | |
2051 | (lambda _ | |
2052 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" | |
2053 | (("Unix.isOperational\\(\\)") "false")) | |
2054 | #t)) | |
2055 | ;; These decorators are almost useless and pull in an unpackaged | |
2056 | ;; dependency. | |
2057 | (add-after 'unpack 'remove-useless-decorators | |
2058 | (lambda _ | |
2059 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" | |
2060 | (("@Private") "") | |
2061 | (("import ch.rinn.restrictions.Private;") "")) | |
2062 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" | |
2063 | (("@Friend.*") "") | |
2064 | (("import ch.rinn.restrictions.Friend;") "")) | |
2065 | #t)) | |
2066 | (add-before 'configure 'build-native-code | |
2067 | (lambda* (#:key inputs #:allow-other-keys) | |
2068 | (let ((jdk (assoc-ref inputs "jdk")) | |
2069 | (dir ,(match (%current-system) | |
2070 | ("i686-linux" | |
2071 | "i386-Linux") | |
2072 | ((or "armhf-linux" "aarch64-linux") | |
2073 | "arm-Linux") | |
2074 | ((or "x86_64-linux") | |
2075 | "amd64-Linux") | |
2076 | (_ "unknown-Linux")))) | |
2077 | (with-directory-excursion "source/c" | |
2078 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" | |
2079 | (string-append "-I" jdk "/include") | |
2080 | (string-append "-I" jdk "/include/linux") | |
2081 | "-o" "libunix.so") | |
2082 | (invoke "gcc" "-shared" "-O3" "-fPIC" | |
2083 | "-DMACHINE_BYTE_ORDER=1" | |
2084 | "copyCommon.c" | |
2085 | "copyByteChar.c" | |
2086 | "copyByteDouble.c" | |
2087 | "copyByteFloat.c" | |
2088 | "copyByteInt.c" | |
2089 | "copyByteLong.c" | |
2090 | "copyByteShort.c" | |
2091 | (string-append "-I" jdk "/include") | |
2092 | (string-append "-I" jdk "/include/linux") | |
2093 | "-o" "libnativedata.so")) | |
2094 | (install-file "source/c/libunix.so" | |
2095 | (string-append "libs/native/unix/" dir)) | |
2096 | (install-file "source/c/libnativedata.so" | |
2097 | (string-append "libs/native/nativedata/" dir)) | |
2098 | #t))) | |
2099 | ;; In the "check" phase we only build the test executable. | |
2100 | (add-after 'check 'run-tests | |
2101 | (lambda _ | |
2102 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") | |
2103 | (delete-file "targets/dist/sis-base-test.jar") | |
2104 | #t)) | |
2105 | (replace 'install (install-jars "targets/dist"))))) | |
2106 | (native-inputs | |
2107 | `(("jdk" ,icedtea-8) | |
2108 | ("java-commons-lang" ,java-commons-lang) | |
2109 | ("java-commons-io" ,java-commons-io) | |
2110 | ("java-testng" ,java-testng) | |
2111 | ("build-resources" | |
2112 | ,(origin | |
2113 | (method svn-fetch) | |
2114 | (uri (svn-reference | |
2115 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2116 | "base/tags/release/" | |
2117 | (version-major+minor base-version) | |
2118 | ".x/" base-version | |
2119 | "/build_resources/")) | |
2120 | (revision revision))) | |
2121 | (sha256 | |
2122 | (base32 | |
2123 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
2124 | (home-page "http://svnsis.ethz.ch") | |
2125 | (synopsis "Utility classes for libraries from ETH Zurich") | |
2126 | (description "This library supplies some utility classes needed for | |
2127 | libraries from the SIS division at ETH Zurich like jHDF5.") | |
2128 | ;; The C sources are under a non-copyleft license, which looks like a | |
2129 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
2130 | (license (list license:asl2.0 | |
2131 | (license:non-copyleft "file://source/c/COPYING")))))) | |
2132 | ||
04ddca26 RW |
2133 | (define-public java-cisd-args4j |
2134 | (let ((revision 39162) | |
2135 | (base-version "9.11.2")) | |
2136 | (package | |
2137 | (name "java-cisd-args4j") | |
2138 | (version (string-append base-version "-" (number->string revision))) | |
2139 | (source (origin | |
2140 | (method svn-fetch) | |
2141 | (uri (svn-reference | |
2142 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2143 | "args4j/tags/release/" | |
2144 | (version-major+minor base-version) | |
2145 | ".x/" base-version "/args4j/")) | |
2146 | (revision revision))) | |
2147 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) | |
2148 | (sha256 | |
2149 | (base32 | |
2150 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) | |
2151 | (build-system ant-build-system) | |
2152 | (arguments | |
2153 | `(#:make-flags '("-file" "build/build.xml") | |
2154 | #:tests? #f ; there are no tests | |
2155 | ;; There are weird build failures with JDK8, such as: "The type | |
2156 | ;; java.io.ObjectInputStream cannot be resolved. It is indirectly | |
2157 | ;; referenced from required .class files" | |
2158 | #:jdk ,icedtea-7 | |
2159 | #:modules ((guix build ant-build-system) | |
2160 | (guix build utils) | |
2161 | (guix build java-utils) | |
2162 | (sxml simple) | |
2163 | (sxml transform) | |
2164 | (sxml xpath)) | |
2165 | #:phases | |
2166 | (modify-phases %standard-phases | |
2167 | (add-after 'unpack 'unpack-build-resources | |
2168 | (lambda* (#:key inputs #:allow-other-keys) | |
2169 | (mkdir-p "../build_resources") | |
2170 | (invoke "tar" "xf" (assoc-ref inputs "build-resources") | |
2171 | "-C" "../build_resources" | |
2172 | "--strip-components=1") | |
2173 | (mkdir-p "../build_resources/lib") | |
2174 | #t)) | |
2175 | (add-after 'unpack-build-resources 'fix-dependencies | |
2176 | (lambda* (#:key inputs #:allow-other-keys) | |
2177 | ;; FIXME: There should be a more convenient abstraction for | |
2178 | ;; editing XML files. | |
2179 | (with-directory-excursion "../build_resources/ant/" | |
2180 | (chmod "build-common.xml" #o664) | |
2181 | (call-with-output-file "build-common.xml.new" | |
2182 | (lambda (port) | |
2183 | (sxml->xml | |
2184 | (pre-post-order | |
2185 | (with-input-from-file "build-common.xml" | |
2186 | (lambda _ (xml->sxml #:trim-whitespace? #t))) | |
2187 | `(;; Remove dependency on classycle and custom ant tasks | |
2188 | (taskdef . ,(lambda (tag . kids) | |
2189 | (let ((name ((sxpath '(name *text*)) kids))) | |
2190 | (if (or (member "build-info" name) | |
2191 | (member "dependency-checker" name) | |
2192 | (member "build-java-subprojects" name) | |
2193 | (member "project-classpath" name)) | |
2194 | '() ; skip | |
2195 | `(,tag ,@kids))))) | |
2196 | (typedef . ,(lambda (tag . kids) | |
2197 | (let ((name ((sxpath '(name *text*)) kids))) | |
2198 | (if (member "recursive-jar" name) | |
2199 | '() ; skip | |
2200 | `(,tag ,@kids))))) | |
2201 | (build-java-subprojects . ,(lambda _ '())) | |
2202 | ;; Ignore everything else | |
2203 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) | |
2204 | (*text* . ,(lambda (_ txt) txt)))) | |
2205 | port))) | |
2206 | (rename-file "build-common.xml.new" "build-common.xml")) | |
2207 | (substitute* "build/build.xml" | |
2208 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") | |
2209 | (string-append (assoc-ref inputs "java-cisd-base") | |
2210 | "/share/java/sis-base.jar")) | |
2211 | ;; Remove dependency on svn | |
2212 | (("<build-info.*") "") | |
2213 | (("\\$\\{revision.number\\}") | |
2214 | ,(number->string revision)) | |
2215 | (("\\$\\{version.number\\}") ,base-version) | |
2216 | ;; Don't use custom ant tasks. | |
2217 | (("recursive-jar") "jar") | |
2218 | (("<project-classpath.*") "")) | |
2219 | #t)) | |
2220 | (replace 'install (install-jars "targets/dist"))))) | |
2221 | (inputs | |
2222 | `(("java-cisd-base" ,java-cisd-base))) | |
2223 | (native-inputs | |
2224 | `(("ecj" ,java-ecj-3.5) | |
2225 | ("build-resources" | |
2226 | ,(origin | |
2227 | (method svn-fetch) | |
2228 | (uri (svn-reference | |
2229 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2230 | "args4j/tags/release/" | |
2231 | (version-major+minor base-version) | |
2232 | ".x/" base-version | |
2233 | "/build_resources/")) | |
2234 | (revision revision))) | |
2235 | (sha256 | |
2236 | (base32 | |
2237 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) | |
2238 | (modules '((guix build utils))) | |
2239 | ;; Delete bundled pre-built jars. | |
2240 | (snippet | |
2241 | '(begin (delete-file-recursively "lib/") #t)))))) | |
2242 | (home-page "http://svnsis.ethz.ch") | |
2243 | (synopsis "Command line parser library") | |
2244 | (description "This package provides a parser for command line arguments.") | |
2245 | (license license:asl2.0)))) | |
2246 | ||
2f0d0418 RW |
2247 | (define-public java-cisd-jhdf5 |
2248 | (let ((revision 39162) | |
2249 | (base-version "14.12.6")) | |
2250 | (package | |
2251 | (name "java-cisd-jhdf5") | |
2252 | (version (string-append base-version "-" (number->string revision))) | |
2253 | (source (origin | |
2254 | (method svn-fetch) | |
2255 | (uri (svn-reference | |
2256 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2257 | "jhdf5/tags/release/" | |
2258 | (version-major+minor base-version) | |
2259 | ".x/" base-version "/jhdf5/")) | |
2260 | (revision revision))) | |
2261 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) | |
2262 | (sha256 | |
2263 | (base32 | |
2264 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) | |
2265 | (modules '((guix build utils))) | |
2266 | (snippet | |
2267 | '(begin | |
2268 | ;; Delete included gradle jar | |
2269 | (delete-file-recursively "gradle/wrapper") | |
2270 | ;; Delete pre-built native libraries | |
2271 | (delete-file-recursively "libs") | |
2272 | #t)))) | |
2273 | (build-system ant-build-system) | |
2274 | (arguments | |
2275 | `(#:make-flags '("-file" "build/build.xml") | |
2276 | #:build-target "jar-all" | |
2277 | #:test-target "jar-test" | |
2278 | #:jdk ,icedtea-8 | |
2279 | #:phases | |
2280 | (modify-phases %standard-phases | |
2281 | ;; Don't erase results from the build phase when building tests. | |
2282 | (add-after 'unpack 'separate-test-target-from-clean | |
2283 | (lambda _ | |
2284 | (substitute* "build/build.xml" | |
2285 | (("\"jar-test\" depends=\"clean, ") | |
2286 | "\"jar-test\" depends=\"")) | |
2287 | #t)) | |
2288 | (add-after 'unpack 'unpack-build-resources | |
2289 | (lambda* (#:key inputs #:allow-other-keys) | |
2290 | (copy-recursively (assoc-ref inputs "build-resources") | |
2291 | "../build_resources") | |
2292 | (delete-file-recursively "../build_resources/lib/") | |
2293 | (mkdir-p "../build_resources/lib") | |
2294 | ;; Remove dependency on classycle | |
2295 | (substitute* "../build_resources/ant/build-common.xml" | |
2296 | (("<taskdef name=\"dependency-checker.*") "") | |
2297 | (("classname=\"classycle.*") "") | |
2298 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) | |
2299 | ;; Remove dependency on svn | |
2300 | (substitute* "build/build.xml" | |
2301 | (("<build-info.*") "") | |
2302 | (("\\$\\{revision.number\\}") | |
2303 | ,(number->string revision)) | |
2304 | (("\\$\\{version.number\\}") ,base-version)) | |
2305 | #t)) | |
2306 | (add-after 'unpack-build-resources 'fix-dependencies | |
2307 | (lambda* (#:key inputs #:allow-other-keys) | |
2308 | (substitute* "../build_resources/ant/build-common.xml" | |
2309 | (("../libraries/testng/testng-jdk15.jar") | |
2310 | (string-append (assoc-ref inputs "java-testng") | |
2311 | "/share/java/java-testng.jar"))) | |
2312 | (substitute* "build/build.xml" | |
2313 | (("\\$\\{lib\\}/sis-base/sis-base.jar") | |
2314 | (string-append (assoc-ref inputs "java-cisd-base") | |
2315 | "/share/java/sis-base.jar")) | |
2316 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") | |
2317 | (string-append (assoc-ref inputs "java-cisd-args4j") | |
2318 | "/share/java/cisd-args4j.jar")) | |
2319 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") | |
2320 | (string-append (assoc-ref inputs "java-commons-lang") | |
2321 | "/share/java/commons-lang-" | |
2322 | ,(package-version java-commons-lang) ".jar")) | |
2323 | (("\\$\\{lib\\}/commons-io/commons-io.jar") | |
2324 | (string-append (assoc-ref inputs "java-commons-io") | |
2325 | "/share/java/commons-io-" | |
2326 | ,(package-version java-commons-io) | |
2327 | "-SNAPSHOT.jar")) | |
2328 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") | |
2329 | (string-append (assoc-ref inputs "java-testng") | |
2330 | "/share/java/java-testng.jar")) | |
2331 | (("\\$\\{lib\\}/junit4/junit.jar") | |
2332 | (string-append (assoc-ref inputs "java-junit") | |
2333 | "/share/java/junit.jar")) | |
2334 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") | |
2335 | (string-append (assoc-ref inputs "java-hamcrest-core") | |
2336 | "/share/java/hamcrest-core.jar"))) | |
2337 | ;; Remove dependency on ch.rinn.restrictions | |
2338 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" | |
2339 | (substitute* '("BitSetConversionUtils.java" | |
2340 | "HDF5Utils.java") | |
2341 | (("import ch.rinn.restrictions.Private;") "") | |
2342 | (("@Private") ""))) | |
2343 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" | |
2344 | (substitute* '("BitSetConversionTest.java" | |
2345 | "h5ar/HDF5ArchiverTest.java") | |
2346 | (("import ch.rinn.restrictions.Friend;") "") | |
2347 | (("@Friend.*") "")) | |
2348 | ;; Remove leftovers from removing @Friend | |
2349 | (substitute* "h5ar/HDF5ArchiverTest.java" | |
2350 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") | |
2351 | ""))) | |
2352 | #t)) | |
2353 | (add-before 'configure 'build-native-library | |
2354 | (lambda* (#:key inputs #:allow-other-keys) | |
2355 | (let ((jdk (assoc-ref inputs "jdk")) | |
2356 | (hdf5 (assoc-ref inputs "hdf5")) | |
2357 | (dir ,(match (%current-system) | |
2358 | ("i686-linux" | |
2359 | "i386-Linux") | |
2360 | ((or "armhf-linux" "aarch64-linux") | |
2361 | "arm-Linux") | |
2362 | ((or "x86_64-linux") | |
2363 | "amd64-Linux") | |
2364 | (_ "unknown-Linux")))) | |
2365 | (with-directory-excursion "source/c" | |
2366 | (apply invoke `("gcc" "-shared" "-O3" | |
2367 | "-fPIC" | |
2368 | "-Wl,--exclude-libs,ALL" | |
2369 | ,@(find-files "jhdf5" "\\.c$") | |
2370 | ,@(find-files "hdf-java" "\\.c$") | |
2371 | ,(string-append "-I" hdf5 "/include") | |
2372 | ,(string-append "-I" jdk "/include") | |
2373 | ,(string-append "-I" jdk "/include/linux") | |
2374 | ,(string-append hdf5 "/lib/libhdf5.a") | |
2375 | "-o" "libjhdf5.so" "-lz"))) | |
2376 | (install-file "source/c/libjhdf5.so" | |
2377 | (string-append "libs/native/jhdf5/" dir)) | |
2378 | #t))) | |
2379 | ;; In the "check" phase we only build the test executable. | |
2380 | (add-after 'check 'run-tests | |
2381 | (lambda _ | |
2382 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") | |
2383 | (delete-file "targets/dist/sis-jhdf5-test.jar") | |
2384 | #t)) | |
2385 | (replace 'install | |
2386 | (install-jars "targets/dist"))))) | |
2387 | (inputs | |
2388 | `(("java-cisd-base" ,java-cisd-base) | |
2389 | ("java-cisd-args4j" ,java-cisd-args4j) | |
2390 | ("java-commons-lang" ,java-commons-lang) | |
2391 | ("java-commons-io" ,java-commons-io) | |
2392 | ("hdf5" ,hdf5) | |
2393 | ("zlib" ,zlib))) | |
2394 | (native-inputs | |
2395 | `(("jdk" ,icedtea-8) | |
2396 | ("java-testng" ,java-testng) | |
2397 | ("java-junit" ,java-junit) | |
2398 | ("java-jmock" ,java-jmock) | |
2399 | ("java-hamcrest-core" ,java-hamcrest-core) | |
2400 | ("build-resources" | |
2401 | ,(origin | |
2402 | (method svn-fetch) | |
2403 | (uri (svn-reference | |
2404 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" | |
2405 | "jhdf5/tags/release/" | |
2406 | (version-major+minor base-version) | |
2407 | ".x/" base-version | |
2408 | "/build_resources/")) | |
2409 | (revision revision))) | |
2410 | (sha256 | |
2411 | (base32 | |
2412 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) | |
2413 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") | |
2414 | (synopsis "Java binding for HDF5") | |
2415 | (description "JHDF5 is a high-level API in Java for reading and writing | |
2416 | HDF5 files, building on the libraries provided by the HDF Group.") | |
2417 | ;; The C sources are under a non-copyleft license, which looks like a | |
2418 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. | |
2419 | (license (list license:asl2.0 | |
2420 | (license:non-copyleft "file://source/c/COPYING")))))) | |
2421 | ||
218d093b RW |
2422 | (define-public java-classpathx-servletapi |
2423 | (package | |
2424 | (name "java-classpathx-servletapi") | |
ae307724 | 2425 | (version "3.0.1") |
218d093b RW |
2426 | (source (origin |
2427 | (method url-fetch) | |
2428 | (uri (string-append "mirror://gnu/classpathx/servletapi/" | |
2429 | "servletapi-" version ".tar.gz")) | |
2430 | (sha256 | |
2431 | (base32 | |
ae307724 | 2432 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
218d093b RW |
2433 | (build-system ant-build-system) |
2434 | (arguments | |
2435 | `(#:tests? #f ; there is no test target | |
2436 | #:build-target "compile" | |
218d093b | 2437 | #:make-flags |
ae307724 | 2438 | (list "-Dbuild.compiler=javac1.8" |
218d093b RW |
2439 | (string-append "-Ddist=" (assoc-ref %outputs "out"))) |
2440 | #:phases | |
2441 | (modify-phases %standard-phases | |
2442 | (replace 'install | |
2443 | (lambda* (#:key make-flags #:allow-other-keys) | |
2444 | (zero? (apply system* `("ant" "dist" ,@make-flags)))))))) | |
2445 | (home-page "https://www.gnu.org/software/classpathx/") | |
2446 | (synopsis "Java servlet API implementation") | |
2447 | (description "This is the GNU servlet API distribution, part of the | |
2448 | ClasspathX project. It provides implementations of version 3.0 of the servlet | |
2449 | API and version 2.1 of the Java ServerPages API.") | |
2450 | (license license:gpl3+))) | |
2451 | ||
5490480c RW |
2452 | (define-public java-swt |
2453 | (package | |
2454 | (name "java-swt") | |
8710d4dd | 2455 | (version "4.7.1a") |
5490480c RW |
2456 | (source |
2457 | ;; The types of many variables and procedures differ in the sources | |
2458 | ;; dependent on whether the target architecture is a 32-bit system or a | |
2459 | ;; 64-bit system. Instead of patching the sources on demand in a build | |
2460 | ;; phase we download either the 32-bit archive (which mostly uses "int" | |
2461 | ;; types) or the 64-bit archive (which mostly uses "long" types). | |
8710d4dd RW |
2462 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
2463 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") | |
5490480c RW |
2464 | (file32 "x86") |
2465 | (file64 "x86_64")) | |
2466 | (let-values (((hash file) | |
2467 | (match (or (%current-target-system) (%current-system)) | |
2468 | ("x86_64-linux" (values hash64 file64)) | |
2469 | (_ (values hash32 file32))))) | |
2470 | (origin | |
2471 | (method url-fetch) | |
2472 | (uri (string-append | |
8710d4dd RW |
2473 | "http://download.eclipse.org/eclipse/downloads/drops4/" |
2474 | "R-" version "-201710090410/swt-" version | |
2475 | "-gtk-linux-" file ".zip")) | |
5490480c RW |
2476 | (sha256 (base32 hash)))))) |
2477 | (build-system ant-build-system) | |
2478 | (arguments | |
2479 | `(#:jar-name "swt.jar" | |
8710d4dd | 2480 | #:jdk ,icedtea-8 |
5490480c RW |
2481 | #:tests? #f ; no "check" target |
2482 | #:phases | |
2483 | (modify-phases %standard-phases | |
2484 | (replace 'unpack | |
2485 | (lambda* (#:key source #:allow-other-keys) | |
2486 | (and (mkdir "swt") | |
2487 | (zero? (system* "unzip" source "-d" "swt")) | |
2488 | (chdir "swt") | |
2489 | (mkdir "src") | |
2490 | (zero? (system* "unzip" "src.zip" "-d" "src"))))) | |
2491 | ;; The classpath contains invalid icecat jars. Since we don't need | |
2492 | ;; anything other than the JDK on the classpath, we can simply unset | |
2493 | ;; it. | |
2494 | (add-after 'configure 'unset-classpath | |
2495 | (lambda _ (unsetenv "CLASSPATH") #t)) | |
2496 | (add-before 'build 'build-native | |
2497 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2498 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
2499 | ;; Build shared libraries. Users of SWT have to set the system | |
2500 | ;; property swt.library.path to the "lib" directory of this | |
2501 | ;; package output. | |
2502 | (mkdir-p lib) | |
2503 | (setenv "OUTPUT_DIR" lib) | |
2504 | (with-directory-excursion "src" | |
2505 | (zero? (system* "bash" "build.sh")))))) | |
2506 | (add-after 'install 'install-native | |
2507 | (lambda* (#:key outputs #:allow-other-keys) | |
2508 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) | |
2509 | (for-each (lambda (file) | |
2510 | (install-file file lib)) | |
2511 | (find-files "." "\\.so$")) | |
2512 | #t)))))) | |
2513 | (inputs | |
8710d4dd | 2514 | `(("gtk" ,gtk+-2) |
5490480c RW |
2515 | ("libxtst" ,libxtst) |
2516 | ("libxt" ,libxt) | |
2517 | ("mesa" ,mesa) | |
2518 | ("glu" ,glu))) | |
2519 | (native-inputs | |
2520 | `(("pkg-config" ,pkg-config) | |
2521 | ("unzip" ,unzip))) | |
2522 | (home-page "https://www.eclipse.org/swt/") | |
2523 | (synopsis "Widget toolkit for Java") | |
2524 | (description | |
2525 | "SWT is a widget toolkit for Java designed to provide efficient, portable | |
2526 | access to the user-interface facilities of the operating systems on which it | |
2527 | is implemented.") | |
2528 | ;; SWT code is licensed under EPL1.0 | |
2529 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 | |
2530 | ;; Cairo bindings contain code under MPL1.1 | |
2531 | ;; XULRunner 1.9 bindings contain code under MPL2.0 | |
2532 | (license (list | |
2533 | license:epl1.0 | |
2534 | license:mpl1.1 | |
2535 | license:mpl2.0 | |
2536 | license:lgpl2.1+)))) | |
2537 | ||
068e476f RJ |
2538 | (define-public java-xz |
2539 | (package | |
2540 | (name "java-xz") | |
92966847 | 2541 | (version "1.6") |
068e476f RJ |
2542 | (source (origin |
2543 | (method url-fetch) | |
2544 | (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip")) | |
2545 | (sha256 | |
2546 | (base32 | |
92966847 | 2547 | "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x")))) |
068e476f RJ |
2548 | (build-system ant-build-system) |
2549 | (arguments | |
2550 | `(#:tests? #f ; There are no tests to run. | |
2551 | #:jar-name ,(string-append "xz-" version ".jar") | |
2552 | #:phases | |
2553 | (modify-phases %standard-phases | |
2554 | ;; The unpack phase enters the "maven" directory by accident. | |
2555 | (add-after 'unpack 'chdir | |
2556 | (lambda _ (chdir "..") #t))))) | |
2557 | (native-inputs | |
2558 | `(("unzip" ,unzip))) | |
d6ddc5ab | 2559 | (home-page "https://tukaani.org/xz/java.html") |
068e476f RJ |
2560 | (synopsis "Implementation of XZ data compression in pure Java") |
2561 | (description "This library aims to be a complete implementation of XZ data | |
2562 | compression in pure Java. Single-threaded streamed compression and | |
2563 | decompression and random access decompression have been fully implemented.") | |
2564 | (license license:public-domain))) | |
04100c3b RW |
2565 | |
2566 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead | |
2567 | ;; of the latest release. | |
2568 | (define-public java-qdox-1.12 | |
2569 | (package | |
2570 | (name "java-qdox") | |
2571 | (version "1.12.1") | |
2572 | (source (origin | |
2573 | (method url-fetch) | |
2574 | (uri (string-append "http://central.maven.org/maven2/" | |
2575 | "com/thoughtworks/qdox/qdox/" version | |
2576 | "/qdox-" version "-sources.jar")) | |
2577 | (sha256 | |
2578 | (base32 | |
2579 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) | |
2580 | (build-system ant-build-system) | |
2581 | (arguments | |
2582 | `(;; Tests require junit | |
2583 | #:tests? #f | |
2584 | #:jar-name "qdox.jar" | |
2585 | #:phases | |
2586 | (modify-phases %standard-phases | |
2587 | (replace 'unpack | |
2588 | (lambda* (#:key source #:allow-other-keys) | |
2589 | (mkdir "src") | |
2590 | (with-directory-excursion "src" | |
2591 | (zero? (system* "jar" "-xf" source))))) | |
2592 | ;; At this point we don't have junit, so we must remove the API | |
2593 | ;; tests. | |
2594 | (add-after 'unpack 'delete-tests | |
2595 | (lambda _ | |
2596 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") | |
2597 | #t))))) | |
2598 | (home-page "http://qdox.codehaus.org/") | |
2599 | (synopsis "Parse definitions from Java source files") | |
2600 | (description | |
2601 | "QDox is a high speed, small footprint parser for extracting | |
2602 | class/interface/method definitions from source files complete with JavaDoc | |
b13cf17f | 2603 | @code{@@tags}. It is designed to be used by active code generators or |
04100c3b RW |
2604 | documentation tools.") |
2605 | (license license:asl2.0))) | |
e7e28510 RW |
2606 | |
2607 | (define-public java-jarjar | |
2608 | (package | |
2609 | (name "java-jarjar") | |
2610 | (version "1.4") | |
2611 | (source (origin | |
2612 | (method url-fetch) | |
2613 | (uri (string-append | |
2614 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" | |
2615 | "code.google.com/jarjar/jarjar-src-" version ".zip")) | |
2616 | (sha256 | |
2617 | (base32 | |
2618 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")))) | |
2619 | (build-system ant-build-system) | |
2620 | (arguments | |
2621 | `(;; Tests require junit, which ultimately depends on this package. | |
2622 | #:tests? #f | |
2623 | #:build-target "jar" | |
2624 | #:phases | |
2625 | (modify-phases %standard-phases | |
2626 | (replace 'install | |
2627 | (lambda* (#:key outputs #:allow-other-keys) | |
2628 | (let ((target (string-append (assoc-ref outputs "out") | |
2629 | "/share/java"))) | |
2630 | (install-file (string-append "dist/jarjar-" ,version ".jar") | |
2631 | target)) | |
2632 | #t))))) | |
2633 | (native-inputs | |
2634 | `(("unzip" ,unzip))) | |
2635 | (home-page "https://code.google.com/archive/p/jarjar/") | |
2636 | (synopsis "Repackage Java libraries") | |
2637 | (description | |
2638 | "Jar Jar Links is a utility that makes it easy to repackage Java | |
2639 | libraries and embed them into your own distribution. Jar Jar Links includes | |
2640 | an Ant task that extends the built-in @code{jar} task.") | |
2641 | (license license:asl2.0))) | |
87c31a21 RW |
2642 | |
2643 | (define-public java-hamcrest-core | |
2644 | (package | |
2645 | (name "java-hamcrest-core") | |
2646 | (version "1.3") | |
2647 | (source (origin | |
2648 | (method url-fetch) | |
00672896 HG |
2649 | (uri (string-append "https://github.com/hamcrest/JavaHamcrest/" |
2650 | "archive/hamcrest-java-" version ".tar.gz")) | |
87c31a21 RW |
2651 | (sha256 |
2652 | (base32 | |
00672896 | 2653 | "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva")) |
87c31a21 RW |
2654 | (modules '((guix build utils))) |
2655 | (snippet | |
2656 | '(begin | |
00672896 HG |
2657 | ;; Delete bundled thirds-party jar archives. |
2658 | (delete-file-recursively "lib") | |
87c31a21 RW |
2659 | #t)))) |
2660 | (build-system ant-build-system) | |
2661 | (arguments | |
2662 | `(#:tests? #f ; Tests require junit | |
a8d3cb62 RW |
2663 | #:modules ((guix build ant-build-system) |
2664 | (guix build utils) | |
2665 | (srfi srfi-1)) | |
87c31a21 | 2666 | #:make-flags (list (string-append "-Dversion=" ,version)) |
fae0b4ca | 2667 | #:test-target "unit-test" |
87c31a21 RW |
2668 | #:build-target "core" |
2669 | #:phases | |
2670 | (modify-phases %standard-phases | |
2671 | ;; Disable unit tests, because they require junit, which requires | |
2672 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" | |
2673 | ;; attribute from the manifest for reproducibility. | |
2674 | (add-before 'configure 'patch-build.xml | |
2675 | (lambda _ | |
2676 | (substitute* "build.xml" | |
2677 | (("unit-test, ") "") | |
2678 | (("\\$\\{build.timestamp\\}") "guix")) | |
2679 | #t)) | |
2680 | ;; Java's "getMethods()" returns methods in an unpredictable order. | |
2681 | ;; To make the output of the generated code deterministic we must | |
2682 | ;; sort the array of methods. | |
2683 | (add-after 'unpack 'make-method-order-deterministic | |
2684 | (lambda _ | |
2685 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" | |
2686 | (("import java\\.util\\.Iterator;" line) | |
2687 | (string-append line "\n" | |
2688 | "import java.util.Arrays; import java.util.Comparator;")) | |
2689 | (("allMethods = cls\\.getMethods\\(\\);" line) | |
2690 | (string-append "_" line | |
2691 | " | |
2692 | private Method[] getSortedMethods() { | |
2693 | Arrays.sort(_allMethods, new Comparator<Method>() { | |
2694 | @Override | |
2695 | public int compare(Method a, Method b) { | |
2696 | return a.toString().compareTo(b.toString()); | |
2697 | } | |
2698 | }); | |
2699 | return _allMethods; | |
2700 | } | |
2701 | ||
2702 | private Method[] allMethods = getSortedMethods();"))))) | |
2703 | (add-before 'build 'do-not-use-bundled-qdox | |
2704 | (lambda* (#:key inputs #:allow-other-keys) | |
2705 | (substitute* "build.xml" | |
2706 | (("lib/generator/qdox-1.12.jar") | |
2707 | (string-append (assoc-ref inputs "java-qdox-1.12") | |
2708 | "/share/java/qdox.jar"))) | |
2709 | #t)) | |
fab959d3 HG |
2710 | ;; build.xml searches for .jar files in this directoy, which |
2711 | ;; we remove from the source archive. | |
2712 | (add-before 'build 'create-dummy-directories | |
2713 | (lambda _ | |
2714 | (mkdir-p "lib/integration") | |
2715 | #t)) | |
87c31a21 RW |
2716 | (replace 'install |
2717 | (lambda* (#:key outputs #:allow-other-keys) | |
a8d3cb62 RW |
2718 | (let* ((target (string-append (assoc-ref outputs "out") |
2719 | "/share/java/")) | |
2720 | (version-suffix ,(string-append "-" version ".jar")) | |
2721 | (install-without-version-suffix | |
2722 | (lambda (jar) | |
2723 | (copy-file jar | |
2724 | (string-append target | |
2725 | (basename jar version-suffix) | |
2726 | ".jar"))))) | |
2727 | (mkdir-p target) | |
2728 | (for-each | |
2729 | install-without-version-suffix | |
2730 | (find-files "build" | |
2731 | (lambda (name _) | |
2732 | (and (string-suffix? ".jar" name) | |
2733 | (not (string-suffix? "-sources.jar" name))))))) | |
2734 | #t))))) | |
87c31a21 RW |
2735 | (native-inputs |
2736 | `(("java-qdox-1.12" ,java-qdox-1.12) | |
2737 | ("java-jarjar" ,java-jarjar))) | |
2738 | (home-page "http://hamcrest.org/") | |
2739 | (synopsis "Library of matchers for building test expressions") | |
2740 | (description | |
2741 | "This package provides a library of matcher objects (also known as | |
2742 | constraints or predicates) allowing @code{match} rules to be defined | |
2743 | declaratively, to be used in other frameworks. Typical scenarios include | |
2744 | testing frameworks, mocking libraries and UI validation rules.") | |
2745 | (license license:bsd-2))) | |
d0184f44 RW |
2746 | |
2747 | (define-public java-junit | |
2748 | (package | |
2749 | (name "java-junit") | |
2750 | (version "4.12") | |
2751 | (source (origin | |
2752 | (method url-fetch) | |
2753 | (uri (string-append "https://github.com/junit-team/junit/" | |
2754 | "archive/r" version ".tar.gz")) | |
2755 | (file-name (string-append name "-" version ".tar.gz")) | |
2756 | (sha256 | |
2757 | (base32 | |
2758 | "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws")) | |
2759 | (modules '((guix build utils))) | |
2760 | (snippet | |
2761 | '(begin | |
2762 | ;; Delete bundled jar archives. | |
2763 | (delete-file-recursively "lib") | |
2764 | #t)))) | |
2765 | (build-system ant-build-system) | |
2766 | (arguments | |
2767 | `(#:tests? #f ; no tests | |
2768 | #:jar-name "junit.jar")) | |
2769 | (inputs | |
2770 | `(("java-hamcrest-core" ,java-hamcrest-core))) | |
2771 | (home-page "http://junit.org/") | |
2772 | (synopsis "Test framework for Java") | |
2773 | (description | |
2774 | "JUnit is a simple framework to write repeatable tests for Java projects. | |
2775 | JUnit provides assertions for testing expected results, test fixtures for | |
2776 | sharing common test data, and test runners for running tests.") | |
2777 | (license license:epl1.0))) | |
9fb20d01 RW |
2778 | |
2779 | (define-public java-plexus-utils | |
2780 | (package | |
2781 | (name "java-plexus-utils") | |
2782 | (version "3.0.24") | |
2783 | (source (origin | |
2784 | (method url-fetch) | |
2785 | (uri (string-append "https://github.com/codehaus-plexus/" | |
2786 | "plexus-utils/archive/plexus-utils-" | |
2787 | version ".tar.gz")) | |
2788 | (sha256 | |
2789 | (base32 | |
2790 | "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js")))) | |
2791 | (build-system ant-build-system) | |
2792 | ;; FIXME: The default build.xml does not include a target to install | |
2793 | ;; javadoc files. | |
2794 | (arguments | |
2795 | `(#:jar-name "plexus-utils.jar" | |
2796 | #:source-dir "src/main" | |
2797 | #:phases | |
2798 | (modify-phases %standard-phases | |
2799 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr | |
2800 | (lambda _ | |
2801 | (substitute* "src/main/java/org/codehaus/plexus/util/\ | |
2802 | cli/shell/BourneShell.java" | |
2803 | (("/bin/sh") (which "sh")) | |
2804 | (("/usr/") (getcwd))) | |
2805 | #t)) | |
2806 | (add-after 'unpack 'fix-or-disable-broken-tests | |
2807 | (lambda _ | |
2808 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" | |
2809 | (substitute* '("cli/CommandlineTest.java" | |
2810 | "cli/shell/BourneShellTest.java") | |
2811 | (("/bin/sh") (which "sh")) | |
2812 | (("/bin/echo") (which "echo"))) | |
2813 | ||
2814 | ;; This test depends on MavenProjectStub, but we don't have | |
2815 | ;; a package for Maven. | |
2816 | (delete-file "introspection/ReflectionValueExtractorTest.java") | |
2817 | ||
2818 | ;; FIXME: The command line tests fail, maybe because they use | |
2819 | ;; absolute paths. | |
2820 | (delete-file "cli/CommandlineTest.java")) | |
2821 | #t))))) | |
2822 | (native-inputs | |
2823 | `(("java-junit" ,java-junit))) | |
2824 | (home-page "http://codehaus-plexus.github.io/plexus-utils/") | |
2825 | (synopsis "Common utilities for the Plexus framework") | |
2826 | (description "This package provides various Java utility classes for the | |
2827 | Plexus framework to ease working with strings, files, command lines, XML and | |
2828 | more.") | |
2829 | (license license:asl2.0))) | |
1e555562 HG |
2830 | |
2831 | (define-public java-plexus-interpolation | |
2832 | (package | |
2833 | (name "java-plexus-interpolation") | |
2834 | (version "1.23") | |
2835 | (source (origin | |
2836 | (method url-fetch) | |
2837 | (uri (string-append "https://github.com/codehaus-plexus/" | |
2838 | "plexus-interpolation/archive/" | |
2839 | "plexus-interpolation-" version ".tar.gz")) | |
2840 | (sha256 | |
2841 | (base32 | |
fd75eb6c | 2842 | "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn")))) |
1e555562 HG |
2843 | (build-system ant-build-system) |
2844 | (arguments | |
2845 | `(#:jar-name "plexus-interpolation.jar" | |
2846 | #:source-dir "src/main")) | |
2847 | (native-inputs | |
2848 | `(("java-junit" ,java-junit) | |
2849 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
2850 | (home-page "http://codehaus-plexus.github.io/plexus-interpolation/") | |
2851 | (synopsis "Java components for interpolating ${} strings and the like") | |
2852 | (description "Plexus interpolator is a modular, flexible interpolation | |
2853 | framework for the expression language style commonly seen in Maven, Plexus, | |
2854 | and other related projects. | |
2855 | ||
2856 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} | |
2857 | package within @code{plexus-utils}, but has been separated in order to allow | |
2858 | these two libraries to vary independently of one another.") | |
2859 | (license license:asl2.0))) | |
8f8ed9aa | 2860 | |
bb27eb0d JL |
2861 | (define-public java-plexus-classworlds |
2862 | (package | |
2863 | (name "java-plexus-classworlds") | |
2864 | (version "2.5.2") | |
2865 | (source (origin | |
2866 | (method url-fetch) | |
2867 | (uri (string-append "https://github.com/codehaus-plexus/" | |
2868 | "plexus-classworlds/archive/plexus-classworlds-" | |
2869 | version ".tar.gz")) | |
2870 | (sha256 | |
2871 | (base32 | |
2872 | "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g")))) | |
2873 | (build-system ant-build-system) | |
2874 | (arguments | |
2875 | `(#:jar-name "plexus-classworlds.jar" | |
2876 | #:source-dir "src/main" | |
2877 | #:tests? #f));; FIXME: we need to generate some resources as in pom.xml | |
2878 | (native-inputs | |
2879 | `(("java-junit" ,java-junit))) | |
2880 | (home-page "http://codehaus-plexus.github.io/plexus-classworlds/") | |
2881 | (synopsis "Java class loader framework") | |
f4548394 TGR |
2882 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
2883 | mechanism of Java. It is especially useful for dynamic loading of application | |
bb27eb0d JL |
2884 | components.") |
2885 | (license license:asl2.0))) | |
2886 | ||
a7ad92ad | 2887 | (define java-plexus-container-default-bootstrap |
0726d4ea JL |
2888 | (package |
2889 | (name "java-plexus-container-default-bootstrap") | |
2890 | (version "1.7.1") | |
2891 | (source (origin | |
2892 | (method url-fetch) | |
2893 | (uri (string-append "https://github.com/codehaus-plexus/plexus-containers" | |
2894 | "/archive/plexus-containers-" version ".tar.gz")) | |
2895 | (sha256 | |
2896 | (base32 | |
2897 | "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc")))) | |
2898 | (build-system ant-build-system) | |
2899 | (arguments | |
2900 | `(#:jar-name "container-default.jar" | |
2901 | #:source-dir "plexus-container-default/src/main/java" | |
2902 | #:test-dir "plexus-container-default/src/test" | |
2903 | #:jdk ,icedtea-8 | |
2904 | #:tests? #f; requires plexus-archiver, which depends on this package | |
2905 | #:phases | |
2906 | (modify-phases %standard-phases | |
2907 | (add-before 'build 'copy-resources | |
2908 | (lambda _ | |
2909 | (copy-recursively | |
2910 | "plexus-container-default/src/main/resources/" | |
2911 | "build/classes") | |
2912 | #t))))) | |
2913 | (inputs | |
2914 | `(("worldclass" ,java-plexus-classworlds) | |
2915 | ("xbean" ,java-geronimo-xbean-reflect) | |
2916 | ("utils" ,java-plexus-utils) | |
2917 | ("junit" ,java-junit) | |
2918 | ("guava" ,java-guava))) | |
2919 | (home-page "https://github.com/codehaus-plexus/plexus-containers") | |
f4548394 | 2920 | (synopsis "Inversion-of-control container") |
0726d4ea | 2921 | (description "Plexus-default-container is Plexus' inversion-of-control |
f4548394 | 2922 | (@dfn{IoC}) container. It is composed of its public API and its default |
0726d4ea JL |
2923 | implementation.") |
2924 | (license license:asl2.0))) | |
2925 | ||
0858b9dc JL |
2926 | (define-public java-plexus-io |
2927 | (package | |
2928 | (name "java-plexus-io") | |
2929 | (version "3.0.0") | |
2930 | (source (origin | |
2931 | (method url-fetch) | |
2932 | (uri (string-append "https://github.com/codehaus-plexus/plexus-io" | |
2933 | "/archive/plexus-io-" version ".tar.gz")) | |
2934 | (sha256 | |
2935 | (base32 | |
2936 | "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw")))) | |
2937 | (build-system ant-build-system) | |
2938 | (arguments | |
2939 | `(#:jar-name "plexus-io.jar" | |
2940 | #:source-dir "src/main/java" | |
2941 | #:test-dir "src/test" | |
2942 | #:jdk ,icedtea-8 | |
2943 | #:phases | |
2944 | (modify-phases %standard-phases | |
2945 | (add-before 'build 'copy-resources | |
2946 | (lambda _ | |
2947 | (mkdir-p "build/classes/META-INF/plexus") | |
2948 | (copy-file "src/main/resources/META-INF/plexus/components.xml" | |
2949 | "build/classes/META-INF/plexus/components.xml") | |
2950 | #t))))) | |
2951 | (inputs | |
2952 | `(("utils" ,java-plexus-utils) | |
2953 | ("commons-io" ,java-commons-io) | |
2954 | ("java-jsr305" ,java-jsr305))) | |
2955 | (native-inputs | |
2956 | `(("junit" ,java-junit) | |
2957 | ("hamcrest" ,java-hamcrest-core) | |
2958 | ("guava" ,java-guava) | |
2959 | ("classworlds" ,java-plexus-classworlds) | |
2960 | ("xbean" ,java-geronimo-xbean-reflect) | |
2961 | ("container-default" ,java-plexus-container-default-bootstrap))) | |
2962 | (home-page "https://github.com/codehaus-plexus/plexus-io") | |
2963 | (synopsis "I/O plexus components") | |
2964 | (description "Plexus IO is a set of plexus components, which are designed | |
2965 | for use in I/O operations. This implementation using plexus components allows | |
2966 | reusing it in maven.") | |
2967 | (license license:asl2.0))) | |
2968 | ||
b51df3ca JL |
2969 | (define-public java-plexus-archiver |
2970 | (package | |
2971 | (name "java-plexus-archiver") | |
2972 | (version "3.5") | |
2973 | (source (origin | |
2974 | (method url-fetch) | |
2975 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" | |
2976 | "/archive/plexus-archiver-" version ".tar.gz")) | |
2977 | (sha256 | |
2978 | (base32 | |
2979 | "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv")))) | |
2980 | (build-system ant-build-system) | |
2981 | (arguments | |
2982 | `(#:jar-name "plexus-archiver.jar" | |
2983 | #:source-dir "src/main/java" | |
2984 | #:jdk ,icedtea-8 | |
2985 | #:test-dir "src/test" | |
2986 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") | |
2987 | #:phases | |
2988 | (modify-phases %standard-phases | |
2989 | (add-before 'check 'remove-failing | |
2990 | (lambda _ | |
2991 | ;; Requires an older version of plexus container | |
2992 | (delete-file | |
2993 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java"))) | |
2994 | (add-before 'build 'copy-resources | |
2995 | (lambda _ | |
2996 | (mkdir-p "build/classes/META-INF/plexus") | |
2997 | (copy-file "src/main/resources/META-INF/plexus/components.xml" | |
2998 | "build/classes/META-INF/plexus/components.xml") | |
2999 | #t))))) | |
3000 | (inputs | |
3001 | `(("utils" ,java-plexus-utils) | |
3002 | ("commons-io" ,java-commons-io) | |
3003 | ("snappy" ,java-iq80-snappy) | |
3004 | ("io" ,java-plexus-io) | |
3005 | ("compress" ,java-commons-compress) | |
3006 | ("container-default" ,java-plexus-container-default-bootstrap) | |
3007 | ("snappy" ,java-snappy) | |
3008 | ("java-jsr305" ,java-jsr305))) | |
3009 | (native-inputs | |
3010 | `(("junit" ,java-junit) | |
3011 | ("classworld" ,java-plexus-classworlds) | |
3012 | ("xbean" ,java-geronimo-xbean-reflect) | |
3013 | ("xz" ,java-tukaani-xz) | |
3014 | ("guava" ,java-guava))) | |
3015 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") | |
3016 | (synopsis "Archiver component of the Plexus project") | |
3017 | (description "Plexus-archiver contains a component to deal with project | |
3018 | archives (jar).") | |
3019 | (license license:asl2.0))) | |
3020 | ||
a0837294 JL |
3021 | (define-public java-plexus-container-default |
3022 | (package | |
3023 | (inherit java-plexus-container-default-bootstrap) | |
3024 | (name "java-plexus-container-default") | |
3025 | (arguments | |
3026 | `(#:jar-name "container-default.jar" | |
3027 | #:source-dir "plexus-container-default/src/main/java" | |
3028 | #:test-dir "plexus-container-default/src/test" | |
3029 | #:test-exclude (list ;"**/*Test.java" | |
3030 | "**/Abstract*.java" | |
3031 | ;; Requires plexus-hierarchy | |
3032 | "**/PlexusHierarchyTest.java" | |
3033 | ;; Failures | |
3034 | "**/ComponentRealmCompositionTest.java" | |
3035 | "**/PlexusContainerTest.java") | |
3036 | #:jdk ,icedtea-8 | |
3037 | #:phases | |
3038 | (modify-phases %standard-phases | |
3039 | (add-before 'build 'copy-resources | |
3040 | (lambda _ | |
3041 | (copy-recursively | |
3042 | "plexus-container-default/src/main/resources/" | |
3043 | "build/classes") | |
3044 | #t)) | |
3045 | (add-before 'check 'fix-paths | |
3046 | (lambda _ | |
3047 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) | |
3048 | (substitute* | |
3049 | (string-append | |
3050 | dir "/plexus/component/composition/" | |
3051 | "ComponentRealmCompositionTest.java") | |
3052 | (("src/test") "plexus-container-default/src/test")) | |
3053 | #t)))))) | |
3054 | (inputs | |
3055 | `(("worldclass" ,java-plexus-classworlds) | |
3056 | ("xbean" ,java-geronimo-xbean-reflect) | |
3057 | ("utils" ,java-plexus-utils) | |
3058 | ("junit" ,java-junit) | |
3059 | ("guava" ,java-guava))) | |
3060 | (native-inputs | |
3061 | `(("archiver" ,java-plexus-archiver) | |
3062 | ("hamcrest" ,java-hamcrest-core))))) | |
3063 | ||
3214afab JL |
3064 | (define-public java-plexus-component-annotations |
3065 | (package | |
3066 | (inherit java-plexus-container-default) | |
3067 | (name "java-plexus-component-annotations") | |
3068 | (arguments | |
3069 | `(#:jar-name "plexus-component-annotations.jar" | |
3070 | #:source-dir "plexus-component-annotations/src/main/java" | |
3071 | #:tests? #f)); no tests | |
3072 | (inputs '()) | |
3073 | (native-inputs '()) | |
3074 | (synopsis "Plexus descriptors generator") | |
3075 | (description "This package is a Maven plugin to generate Plexus descriptors | |
3076 | from source tags and class annotations."))) | |
3077 | ||
4f77ba17 JL |
3078 | (define-public java-plexus-cipher |
3079 | (package | |
3080 | (name "java-plexus-cipher") | |
3081 | (version "1.7") | |
3082 | (source (origin | |
3083 | (method url-fetch) | |
3084 | (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher" | |
3085 | "/archive/plexus-cipher-" version ".tar.gz")) | |
3086 | (sha256 | |
3087 | (base32 | |
3088 | "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3")))) | |
3089 | (build-system ant-build-system) | |
3090 | (arguments | |
3091 | `(#:jar-name "plexus-cipher.jar" | |
3092 | #:source-dir "src/main/java" | |
3093 | #:jdk ,icedtea-8 | |
3094 | #:tests? #f; FIXME: requires sisu-inject-bean | |
3095 | #:phases | |
3096 | (modify-phases %standard-phases | |
3097 | (add-before 'build 'copy-resources | |
3098 | (lambda _ | |
3099 | (copy-recursively "src/main/resources" "build/classes") | |
3100 | (mkdir-p "build/classes/META-INF/sisu") | |
3101 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
3102 | (lambda _ | |
3103 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) | |
3104 | #t))))) | |
3105 | (inputs | |
3106 | `(("java-cdi-api" ,java-cdi-api) | |
3107 | ("java-javax-inject" ,java-javax-inject))) | |
3108 | (home-page "https://github.com/sonatype/plexus-cipher") | |
3109 | (synopsis "Encryption/decryption Component") | |
3110 | (description "Plexus-cipher contains a component to deal with encryption | |
3111 | and decryption.") | |
3112 | (license license:asl2.0))) | |
3113 | ||
239126d4 JL |
3114 | (define-public java-plexus-compiler-api |
3115 | (package | |
3116 | (name "java-plexus-compiler-api") | |
3117 | (version "2.8.2") | |
3118 | (source (origin | |
3119 | (method url-fetch) | |
3120 | (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler" | |
3121 | "/archive/plexus-compiler-" version ".tar.gz")) | |
3122 | (sha256 | |
3123 | (base32 | |
3124 | "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k")))) | |
3125 | (build-system ant-build-system) | |
3126 | (arguments | |
3127 | `(#:jar-name "plexus-compiler-api.jar" | |
3128 | #:source-dir "plexus-compiler-api/src/main/java" | |
3129 | #:jdk ,icedtea-8 | |
3130 | #:test-dir "plexus-compiler-api/src/test")) | |
3131 | (inputs | |
3132 | `(("java-plexus-container-default" ,java-plexus-container-default) | |
3133 | ("java-plexus-util" ,java-plexus-utils))) | |
3134 | (native-inputs | |
3135 | `(("java-junit" ,java-junit))) | |
3136 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") | |
3137 | (synopsis "Plexus Compilers component's API to manipulate compilers") | |
3138 | (description "This package contains the API used by components to manipulate | |
3139 | compilers.") | |
3140 | (license (list license:asl2.0 | |
3141 | license:expat)))) | |
3142 | ||
f8a519fa JL |
3143 | (define-public java-plexus-compiler-javac |
3144 | (package | |
3145 | (inherit java-plexus-compiler-api) | |
3146 | (name "java-plexus-compiler-javac") | |
3147 | (arguments | |
3148 | `(#:jar-name "plexus-compiler-javac.jar" | |
3149 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" | |
3150 | #:jdk ,icedtea-8 | |
3151 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. | |
3152 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test")) | |
3153 | (inputs | |
3154 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
3155 | ("java-plexus-utils" ,java-plexus-utils) | |
3156 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3157 | (native-inputs | |
3158 | `(("java-junit" ,java-junit))) | |
3159 | (synopsis "Javac Compiler support for Plexus Compiler component") | |
3160 | (description "This package contains the Javac Compiler support for Plexus | |
3161 | Compiler component."))) | |
3162 | ||
0aa85081 JL |
3163 | (define-public java-plexus-sec-dispatcher |
3164 | (package | |
3165 | (name "java-plexus-sec-dispatcher") | |
3166 | (version "1.4") ;; Newest release listed at the Maven Central Repository. | |
3167 | (source (origin | |
3168 | ;; This project doesn't tag releases or publish tarballs, so we take | |
3169 | ;; the "prepare release plexus-sec-dispatcher-1.4" git commit. | |
3170 | (method url-fetch) | |
3171 | (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/" | |
3172 | "archive/7db8f88048.tar.gz")) | |
3173 | (sha256 | |
3174 | (base32 | |
3175 | "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp")) | |
3176 | (file-name (string-append name "-" version ".tar.gz")))) | |
3177 | (arguments | |
3178 | `(#:jar-name "plexus-sec-dispatcher.jar" | |
3179 | #:source-dir "src/main/java" | |
3180 | #:jdk ,icedtea-8 | |
3181 | #:phases | |
3182 | (modify-phases %standard-phases | |
3183 | (add-before 'build 'generate-models | |
3184 | (lambda* (#:key inputs #:allow-other-keys) | |
3185 | (define (modello-single-mode file version mode) | |
3186 | (zero? (system* "java" | |
3187 | "org.codehaus.modello.ModelloCli" | |
3188 | file mode "src/main/java" version | |
3189 | "false" "true"))) | |
3190 | (let ((file "src/main/mdo/settings-security.mdo")) | |
3191 | (and | |
3192 | (modello-single-mode file "1.0.0" "java") | |
3193 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
3194 | (modello-single-mode file "1.0.0" "xpp3-writer"))))) | |
3195 | (add-before 'build 'generate-components.xml | |
3196 | (lambda _ | |
3197 | (mkdir-p "build/classes/META-INF/plexus") | |
3198 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
3199 | (lambda _ | |
3200 | (display | |
3201 | "<component-set>\n | |
3202 | <components>\n | |
3203 | <component>\n | |
3204 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n | |
3205 | <role-hint>default</role-hint>\n | |
3206 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n | |
3207 | <description></description>\n | |
3208 | <requirements>\n | |
3209 | <requirement>\n | |
3210 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n | |
3211 | <field-name>_cipher</field-name>\n | |
3212 | </requirement>\n | |
3213 | <requirement>\n | |
3214 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n | |
3215 | <field-name>_decryptors</field-name>\n | |
3216 | </requirement>\n | |
3217 | </requirements>\n | |
3218 | <configuration>\n | |
3219 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n | |
3220 | </configuration>\n | |
3221 | </component>\n | |
3222 | </components>\n | |
3223 | </component-set>\n"))))) | |
3224 | (add-before 'check 'fix-paths | |
3225 | (lambda _ | |
3226 | (copy-recursively "src/test/resources" "target")))))) | |
3227 | (inputs | |
3228 | `(("java-plexus-cipher" ,java-plexus-cipher))) | |
3229 | (native-inputs | |
3230 | `(("java-modello-core" ,java-modello-core) | |
3231 | ;; for modello: | |
3232 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3233 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3234 | ("java-plexus-utils" ,java-plexus-utils) | |
3235 | ("java-guava" ,java-guava) | |
3236 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
3237 | ("java-sisu-build-api" ,java-sisu-build-api) | |
3238 | ;; modello plugins: | |
3239 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | |
3240 | ("java-modellop-plugins-xml" ,java-modello-plugins-xml) | |
3241 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | |
3242 | ;; for tests | |
3243 | ("java-junit" ,java-junit))) | |
3244 | (build-system ant-build-system) | |
3245 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") | |
3246 | (synopsis "Plexus Security Dispatcher Component") | |
3247 | (description "This package is the Plexus Security Dispatcher Component. | |
3248 | This component decrypts a string passed to it.") | |
3249 | (license license:asl2.0))) | |
3250 | ||
8f524749 JL |
3251 | (define-public java-sisu-build-api |
3252 | (package | |
3253 | (name "java-sisu-build-api") | |
3254 | (version "0.0.7") | |
3255 | (source (origin | |
3256 | (method url-fetch) | |
3257 | (uri (string-append "https://github.com/sonatype/sisu-build-api/" | |
3258 | "archive/plexus-build-api-" version ".tar.gz")) | |
3259 | (sha256 | |
3260 | (base32 | |
3261 | "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2")))) | |
3262 | (build-system ant-build-system) | |
3263 | (arguments | |
3264 | `(#:jar-name "sisu-build-api.jar" | |
3265 | #:source-dir "src/main/java" | |
3266 | #:jdk ,icedtea-8 | |
3267 | #:tests? #f; FIXME: how to run the tests? | |
3268 | #:phases | |
3269 | (modify-phases %standard-phases | |
3270 | (add-before 'build 'copy-resources | |
3271 | (lambda _ | |
3272 | (copy-recursively "src/main/resources" "build/classes") | |
3273 | (substitute* (find-files "build/classes") | |
3274 | (("\\$\\{project.version\\}") ,version)) | |
3275 | #t)) | |
3276 | (add-before 'build 'generate-plexus-compontent | |
3277 | (lambda _ | |
3278 | (mkdir-p "build/classes/META-INF/plexus") | |
3279 | ;; This file is required for plexus to inject this package. | |
3280 | ;; FIXME: how is it generated? | |
3281 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
3282 | (lambda _ | |
3283 | (display | |
3284 | "<component-set>\n | |
3285 | <components>\n | |
3286 | <component>\n | |
3287 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n | |
3288 | <role-hint>default</role-hint>\n | |
3289 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n | |
3290 | <description>Filesystem based non-incremental build context implementation\n | |
3291 | which behaves as if all files were just created.</description>\n | |
3292 | </component>\n | |
3293 | </components>\n | |
3294 | </component-set>\n"))) | |
3295 | #t))))) | |
3296 | (inputs | |
3297 | `(("java-plexus-utils" ,java-plexus-utils) | |
3298 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3299 | (home-page "https://github.com/sonatype/sisu-build-api/") | |
3300 | (synopsis "Base build API for maven") | |
3301 | (description "This package contains the base build API for maven and | |
3302 | a default implementation of it. This API is about scanning files in a | |
3303 | project and determining what files need to be rebuilt.") | |
3304 | (license license:asl2.0))) | |
3305 | ||
b26c8b61 JL |
3306 | (define-public java-modello-core |
3307 | (package | |
3308 | (name "java-modello-core") | |
3309 | (version "1.9.1") | |
3310 | (source (origin | |
3311 | (method url-fetch) | |
3312 | (uri (string-append "https://github.com/codehaus-plexus/modello" | |
3313 | "/archive/modello-" version ".tar.gz")) | |
3314 | (sha256 | |
3315 | (base32 | |
3316 | "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh")))) | |
3317 | (build-system ant-build-system) | |
3318 | (arguments | |
3319 | `(#:jar-name "modello-core.jar" | |
3320 | #:source-dir "modello-core/src/main/java" | |
3321 | #:test-dir "modello-core/src/test" | |
3322 | #:main-class "org.codehaus.modello.ModelloCli" | |
3323 | #:jdk ,icedtea-8 | |
3324 | #:phases | |
3325 | (modify-phases %standard-phases | |
3326 | (add-before 'build 'copy-resources | |
3327 | (lambda _ | |
3328 | (mkdir-p "build/classes/META-INF/plexus") | |
3329 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" | |
3330 | "build/classes/META-INF/plexus/components.xml") | |
3331 | #t)) | |
3332 | (add-before 'check 'fix-tests | |
3333 | (lambda _ | |
3334 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" | |
3335 | (substitute* '("modello/core/DefaultModelloCoreTest.java" | |
3336 | "modello/core/io/ModelReaderTest.java") | |
3337 | (("src/test") "modello-core/src/test"))) | |
3338 | #t))))) | |
3339 | (inputs | |
3340 | `(("java-plexus-utils" ,java-plexus-utils) | |
3341 | ("java-plexus-container-default" ,java-plexus-container-default) | |
3342 | ("java-sisu-build-api" ,java-sisu-build-api))) | |
3343 | (native-inputs | |
3344 | `(("java-junit" ,java-junit) | |
3345 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
3346 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
3347 | ("java-guava" ,java-guava))) | |
3348 | (home-page "http://codehaus-plexus.github.io/modello/") | |
3349 | (synopsis "Framework for code generation from a simple model") | |
3350 | (description "Modello is a framework for code generation from a simple model. | |
3351 | ||
3352 | Modello generates code from a simple model format: based on a plugin | |
3353 | architecture, various types of code and descriptors can be generated from the | |
3354 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, | |
3355 | XSD and documentation.") | |
3356 | (license (list | |
3357 | license:expat | |
3358 | ;; Although this package uses only files licensed under expat, | |
3359 | ;; other parts of the source are licensed under different | |
3360 | ;; licenses. We include them to be inherited by other packages. | |
3361 | license:asl2.0 | |
3362 | ;; Some files in modello-plugin-java are licensed under a | |
3363 | ;; 5-clause BSD license. | |
3364 | (license:non-copyleft | |
3365 | (string-append "file:///modello-plugins/modello-plugin-java/" | |
3366 | "src/main/java/org/codehaus/modello/plugin/" | |
3367 | "java/javasource/JNaming.java")))))) | |
3368 | ||
fc620bef JL |
3369 | (define-public java-modello-plugins-java |
3370 | (package | |
3371 | (inherit java-modello-core) | |
3372 | (name "java-modello-plugins-java") | |
3373 | (arguments | |
3374 | `(#:jar-name "modello-plugins-java.jar" | |
3375 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" | |
3376 | #:test-dir "modello-plugins/modello-plugin-java/src/test" | |
3377 | #:jdk ,icedtea-8 | |
3378 | #:tests? #f; requires maven-model, which depends on this package | |
3379 | #:phases | |
3380 | (modify-phases %standard-phases | |
3381 | (add-before 'build 'copy-resources | |
3382 | (lambda _ | |
3383 | (mkdir-p "build/classes") | |
3384 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" | |
3385 | "build/classes") | |
3386 | #t))))) | |
3387 | (inputs | |
3388 | `(("java-modello-core" ,java-modello-core) | |
3389 | ,@(package-inputs java-modello-core))) | |
3390 | (synopsis "Modello Java Plugin") | |
3391 | (description "Modello Java Plugin generates Java objects for the model."))) | |
3392 | ||
a0ce95ba JL |
3393 | (define-public java-modello-plugins-xml |
3394 | (package | |
3395 | (inherit java-modello-core) | |
3396 | (name "java-modello-plugins-xml") | |
3397 | (arguments | |
3398 | `(#:jar-name "modello-plugins-xml.jar" | |
3399 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" | |
3400 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" | |
3401 | #:jdk ,icedtea-8 | |
3402 | #:phases | |
3403 | (modify-phases %standard-phases | |
3404 | (add-before 'build 'copy-resources | |
3405 | (lambda _ | |
3406 | (mkdir-p "build/classes") | |
3407 | (copy-recursively | |
3408 | "modello-plugins/modello-plugin-xml/src/main/resources" | |
3409 | "build/classes") | |
3410 | #t)) | |
3411 | (add-before 'check 'fix-paths | |
3412 | (lambda _ | |
3413 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" | |
3414 | (substitute* | |
3415 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" | |
3416 | (("src/test") "modello-plugins/modello-plugin-xml/src/test")))))))) | |
3417 | (inputs | |
3418 | `(("java-modello-core" ,java-modello-core) | |
3419 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
3420 | ,@(package-inputs java-modello-core))) | |
3421 | (synopsis "Modello XML Plugin") | |
3422 | (description "Modello XML Plugin contains shared code for every plugins | |
3423 | working on XML representation of the model."))) | |
3424 | ||
e4708560 JL |
3425 | (define-public java-modello-test |
3426 | (package | |
3427 | (inherit java-modello-core) | |
3428 | (name "java-modello-test") | |
3429 | (arguments | |
3430 | `(#:jar-name "modello-test.jar" | |
3431 | #:source-dir "modello-test/src/main/java" | |
3432 | #:tests? #f; no tests | |
3433 | #:jdk ,icedtea-8)) | |
3434 | (inputs | |
3435 | `(("java-plexus-utils" ,java-plexus-utils) | |
3436 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
3437 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) | |
3438 | ("java-plexus-container-default" ,java-plexus-container-default))) | |
3439 | (synopsis "Modello test package") | |
3440 | (description "The modello test package contains the basis to create | |
3441 | Modello generator unit-tests, including sample models and xml files to test | |
3442 | every feature for every plugin."))) | |
3443 | ||
36607d3b JL |
3444 | (define-public java-modello-plugins-xpp3 |
3445 | (package | |
3446 | (inherit java-modello-core) | |
3447 | (name "java-modello-plugins-xpp3") | |
3448 | (arguments | |
3449 | `(#:jar-name "modello-plugins-xpp3.jar" | |
3450 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" | |
3451 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" | |
3452 | ;; One of the test dependencies is maven-model which depends on this package. | |
3453 | #:tests? #f | |
3454 | #:jdk ,icedtea-8 | |
3455 | #:phases | |
3456 | (modify-phases %standard-phases | |
3457 | (add-before 'build 'copy-resources | |
3458 | (lambda _ | |
3459 | (mkdir-p "build/classes") | |
3460 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" | |
3461 | "build/classes") | |
3462 | #t))))) | |
3463 | (inputs | |
3464 | `(("java-modello-core" ,java-modello-core) | |
3465 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
3466 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
3467 | ,@(package-inputs java-modello-core))) | |
3468 | (native-inputs | |
3469 | `(("java-xmlunit" ,java-xmlunit) | |
3470 | ("java-modello-test" ,java-modello-test) | |
3471 | ,@(package-native-inputs java-modello-core))) | |
3472 | (synopsis "Modello XPP3 Plugin") | |
3473 | (description "The modello XPP3 plugin generates XML readers and writers based | |
3474 | on the XPP3 API (XML Pull Parser)."))) | |
3475 | ||
8f8ed9aa RW |
3476 | (define-public java-asm |
3477 | (package | |
3478 | (name "java-asm") | |
d0e9ded7 | 3479 | (version "6.0") |
8f8ed9aa RW |
3480 | (source (origin |
3481 | (method url-fetch) | |
3482 | (uri (string-append "http://download.forge.ow2.org/asm/" | |
3483 | "asm-" version ".tar.gz")) | |
3484 | (sha256 | |
3485 | (base32 | |
d0e9ded7 | 3486 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
8f8ed9aa | 3487 | (build-system ant-build-system) |
d0e9ded7 GB |
3488 | (propagated-inputs |
3489 | `(("java-aqute-bndlib" ,java-aqute-bndlib))) | |
8f8ed9aa RW |
3490 | (arguments |
3491 | `(#:build-target "compile" | |
3492 | ;; The tests require an old version of Janino, which no longer compiles | |
3493 | ;; with the JDK7. | |
3494 | #:tests? #f | |
d0e9ded7 GB |
3495 | #:make-flags |
3496 | (list | |
3497 | ;; We don't need these extra ant tasks, but the build system asks us to | |
3498 | ;; provide a path anyway. | |
3499 | "-Dobjectweb.ant.tasks.path=dummy-path" | |
3500 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and | |
3501 | ;; used during the build automatically by ant-build-system, but | |
3502 | ;; java-asm's build.xml fails unless we provide something here. | |
3503 | "-Dbiz.aQute.bnd.path=dummy-path") | |
8f8ed9aa RW |
3504 | #:phases |
3505 | (modify-phases %standard-phases | |
3506 | (add-before 'install 'build-jars | |
3507 | (lambda* (#:key make-flags #:allow-other-keys) | |
3508 | ;; We cannot use the "jar" target because it depends on a couple | |
3509 | ;; of unpackaged, complicated tools. | |
3510 | (mkdir "dist") | |
3511 | (zero? (system* "jar" | |
3512 | "-cf" (string-append "dist/asm-" ,version ".jar") | |
3513 | "-C" "output/build/tmp" ".")))) | |
3514 | (replace 'install | |
3515 | (install-jars "dist"))))) | |
3516 | (native-inputs | |
3517 | `(("java-junit" ,java-junit))) | |
3518 | (home-page "http://asm.ow2.org/") | |
3519 | (synopsis "Very small and fast Java bytecode manipulation framework") | |
3520 | (description "ASM is an all purpose Java bytecode manipulation and | |
3521 | analysis framework. It can be used to modify existing classes or dynamically | |
3522 | generate classes, directly in binary form. The provided common | |
3523 | transformations and analysis algorithms allow to easily assemble custom | |
3524 | complex transformations and code analysis tools.") | |
3525 | (license license:bsd-3))) | |
607fe24a RW |
3526 | |
3527 | (define-public java-cglib | |
3528 | (package | |
3529 | (name "java-cglib") | |
3530 | (version "3.2.4") | |
3531 | (source (origin | |
3532 | (method url-fetch) | |
3533 | (uri (string-append | |
3534 | "https://github.com/cglib/cglib/archive/RELEASE_" | |
3535 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version) | |
3536 | ".tar.gz")) | |
3537 | (file-name (string-append "cglib-" version ".tar.gz")) | |
3538 | (sha256 | |
3539 | (base32 | |
3540 | "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q")))) | |
3541 | (build-system ant-build-system) | |
3542 | (arguments | |
3543 | `(;; FIXME: tests fail because junit runs | |
3544 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem | |
3545 | ;; to describe a test at all. | |
3546 | #:tests? #f | |
3547 | #:jar-name "cglib.jar" | |
3548 | #:phases | |
3549 | (modify-phases %standard-phases | |
3550 | (add-after 'unpack 'chdir | |
3551 | (lambda _ (chdir "cglib") #t))))) | |
3552 | (inputs | |
3553 | `(("java-asm" ,java-asm) | |
3554 | ("java-junit" ,java-junit))) | |
3555 | (home-page "https://github.com/cglib/cglib/") | |
3556 | (synopsis "Java byte code generation library") | |
3557 | (description "The byte code generation library CGLIB is a high level API | |
3558 | to generate and transform Java byte code.") | |
3559 | (license license:asl2.0))) | |
33e34bfe RW |
3560 | |
3561 | (define-public java-objenesis | |
3562 | (package | |
3563 | (name "java-objenesis") | |
3564 | (version "2.5.1") | |
3565 | (source (origin | |
3566 | (method url-fetch) | |
3567 | (uri (string-append "https://github.com/easymock/objenesis/" | |
3568 | "archive/" version ".tar.gz")) | |
3569 | (file-name (string-append "objenesis-" version ".tar.gz")) | |
3570 | (sha256 | |
3571 | (base32 | |
3572 | "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6")))) | |
3573 | (build-system ant-build-system) | |
3574 | (arguments | |
3575 | `(#:jar-name "objenesis.jar" | |
3576 | #:source-dir "main/src/" | |
3577 | #:test-dir "main/src/test/")) | |
3578 | (native-inputs | |
3579 | `(("java-junit" ,java-junit) | |
3580 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3581 | (home-page "http://objenesis.org/") | |
3582 | (synopsis "Bypass the constructor when creating an object") | |
3583 | (description "Objenesis is a small Java library that serves one purpose: | |
3584 | to instantiate a new object of a particular class. It is common to see | |
3585 | restrictions in libraries stating that classes must require a default | |
3586 | constructor. Objenesis aims to overcome these restrictions by bypassing the | |
3587 | constructor on object instantiation.") | |
3588 | (license license:asl2.0))) | |
ae589876 RW |
3589 | |
3590 | (define-public java-easymock | |
3591 | (package | |
3592 | (name "java-easymock") | |
3593 | (version "3.4") | |
3594 | (source (origin | |
3595 | (method url-fetch) | |
3596 | (uri (string-append "https://github.com/easymock/easymock/" | |
3597 | "archive/easymock-" version ".tar.gz")) | |
3598 | (sha256 | |
3599 | (base32 | |
3600 | "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi")))) | |
3601 | (build-system ant-build-system) | |
3602 | (arguments | |
3603 | `(#:jar-name "easymock.jar" | |
3604 | #:source-dir "core/src/main" | |
3605 | #:test-dir "core/src/test" | |
3606 | #:phases | |
3607 | (modify-phases %standard-phases | |
3608 | ;; FIXME: Android support requires the following packages to be | |
3609 | ;; available: com.google.dexmaker.stock.ProxyBuilder | |
3610 | (add-after 'unpack 'delete-android-support | |
3611 | (lambda _ | |
3612 | (with-directory-excursion "core/src/main/java/org/easymock/internal" | |
3613 | (substitute* "MocksControl.java" | |
3614 | (("AndroidSupport.isAndroid\\(\\)") "false") | |
3615 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) | |
3616 | (delete-file "AndroidClassProxyFactory.java")) | |
3617 | #t)) | |
3618 | (add-after 'unpack 'delete-broken-tests | |
3619 | (lambda _ | |
3620 | (with-directory-excursion "core/src/test/java/org/easymock" | |
3621 | ;; This test depends on dexmaker. | |
3622 | (delete-file "tests2/ClassExtensionHelperTest.java") | |
3623 | ||
3624 | ;; This is not a test. | |
3625 | (delete-file "tests/BaseEasyMockRunnerTest.java") | |
3626 | ||
3627 | ;; This test should be executed with a different runner... | |
3628 | (delete-file "tests2/EasyMockAnnotationsTest.java") | |
3629 | ;; ...but deleting it means that we also have to delete these | |
3630 | ;; dependent files. | |
3631 | (delete-file "tests2/EasyMockRunnerTest.java") | |
3632 | (delete-file "tests2/EasyMockRuleTest.java") | |
3633 | ||
3634 | ;; This test fails because the file "easymock.properties" does | |
3635 | ;; not exist. | |
3636 | (delete-file "tests2/EasyMockPropertiesTest.java")) | |
3637 | #t))))) | |
3638 | (inputs | |
3639 | `(("java-asm" ,java-asm) | |
3640 | ("java-cglib" ,java-cglib) | |
3641 | ("java-objenesis" ,java-objenesis))) | |
3642 | (native-inputs | |
3643 | `(("java-junit" ,java-junit) | |
3644 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3645 | (home-page "http://easymock.org") | |
3646 | (synopsis "Java library providing mock objects for unit tests") | |
3647 | (description "EasyMock is a Java library that provides an easy way to use | |
3648 | mock objects in unit testing.") | |
3649 | (license license:asl2.0))) | |
7aa37023 | 3650 | |
f12ad6c7 RW |
3651 | (define-public java-jmock-1 |
3652 | (package | |
3653 | (name "java-jmock") | |
3654 | (version "1.2.0") | |
3655 | (source (origin | |
3656 | (method url-fetch) | |
3657 | (uri (string-append "https://github.com/jmock-developers/" | |
3658 | "jmock-library/archive/" version ".tar.gz")) | |
3659 | (file-name (string-append "jmock-" version ".tar.gz")) | |
3660 | (sha256 | |
3661 | (base32 | |
3662 | "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0")))) | |
3663 | (build-system ant-build-system) | |
3664 | (arguments | |
3665 | `(#:build-target "jars" | |
3666 | #:test-target "run.tests" | |
3667 | #:phases | |
3668 | (modify-phases %standard-phases | |
3669 | (replace 'install (install-jars "build"))))) | |
3670 | (home-page "http://www.jmock.org") | |
3671 | (synopsis "Mock object library for test-driven development") | |
3672 | (description "JMock is a library that supports test-driven development of | |
3673 | Java code with mock objects. Mock objects help you design and test the | |
3674 | interactions between the objects in your programs. | |
3675 | ||
3676 | The jMock library | |
3677 | ||
3678 | @itemize | |
3679 | @item makes it quick and easy to define mock objects | |
3680 | @item lets you precisely specify the interactions between | |
3681 | your objects, reducing the brittleness of your tests | |
3682 | @item plugs into your favourite test framework | |
3683 | @item is easy to extend. | |
3684 | @end itemize\n") | |
3685 | (license license:bsd-3))) | |
3686 | ||
045124ae JL |
3687 | (define-public java-jmock |
3688 | (package | |
3689 | (inherit java-jmock-1) | |
3690 | (name "java-jmock") | |
3691 | (version "2.8.2") | |
3692 | (source (origin | |
3693 | (method url-fetch) | |
3694 | (uri (string-append "https://github.com/jmock-developers/" | |
3695 | "jmock-library/archive/" version ".tar.gz")) | |
3696 | (file-name (string-append name "-" version ".tar.gz")) | |
3697 | (sha256 | |
3698 | (base32 | |
3699 | "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0")))) | |
3700 | (inputs | |
3701 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
3702 | ("java-asm" ,java-asm) | |
3703 | ("java-bsh" ,java-bsh) | |
3704 | ("java-junit" ,java-junit))) | |
3705 | (native-inputs | |
3706 | `(("cglib" ,java-cglib))) | |
3707 | (arguments | |
3708 | `(#:jar-name "java-jmock.jar" | |
3709 | #:source-dir "jmock/src/main/java" | |
3710 | #:test-dir "jmock/src/test")))) | |
3711 | ||
25436c6d JL |
3712 | (define-public java-jmock-junit4 |
3713 | (package | |
3714 | (inherit java-jmock) | |
3715 | (name "java-jmock-junit4") | |
3716 | (arguments | |
3717 | `(#:jar-name "java-jmock-junit4.jar" | |
3718 | #:source-dir "jmock-junit4/src/main/java" | |
3719 | #:test-dir "jmock-junit4/src/test")) | |
3720 | (inputs | |
3721 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
3722 | ("java-asm" ,java-asm) | |
3723 | ("java-bsh" ,java-bsh) | |
3724 | ("java-jmock" ,java-jmock) | |
3725 | ("java-jumit" ,java-junit))))) | |
3726 | ||
e84b899d JL |
3727 | (define-public java-jmock-legacy |
3728 | (package | |
3729 | (inherit java-jmock) | |
3730 | (name "java-jmock-legacy") | |
3731 | (arguments | |
3732 | `(#:jar-name "java-jmock-legacy.jar" | |
3733 | #:source-dir "jmock-legacy/src/main/java" | |
3734 | #:test-dir "jmock-legacy/src/test" | |
3735 | #:phases | |
3736 | (modify-phases %standard-phases | |
3737 | (add-before 'check 'copy-tests | |
3738 | (lambda _ | |
3739 | ;; This file is a dependancy of some tests | |
3740 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) | |
3741 | (copy-file (string-append "jmock/src/test/java/" file) | |
3742 | (string-append "jmock-legacy/src/test/java/" file)) | |
3743 | #t)))))) | |
3744 | (inputs | |
3745 | `(("java-hamcrest-all" ,java-hamcrest-all) | |
3746 | ("java-objenesis" ,java-objenesis) | |
3747 | ("java-cglib" ,java-cglib) | |
3748 | ("java-jmock" ,java-jmock) | |
3749 | ("java-asm" ,java-asm) | |
3750 | ("java-bsh" ,java-bsh) | |
3751 | ("java-junit" ,java-junit))) | |
3752 | (native-inputs | |
3753 | `(("java-jmock-junit4" ,java-jmock-junit4))))) | |
3754 | ||
439c59da RW |
3755 | (define-public java-hamcrest-all |
3756 | (package (inherit java-hamcrest-core) | |
3757 | (name "java-hamcrest-all") | |
3758 | (arguments | |
bfc007e1 RW |
3759 | `(#:jdk ,icedtea-8 |
3760 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) | |
3761 | ((#:build-target _) "bigjar") | |
3762 | ((#:phases phases) | |
3763 | `(modify-phases ,phases | |
3764 | ;; Some build targets override the classpath, so we need to patch | |
3765 | ;; the build.xml to ensure that required dependencies are on the | |
3766 | ;; classpath. | |
3767 | (add-after 'unpack 'patch-classpath-for-integration | |
3768 | (lambda* (#:key inputs #:allow-other-keys) | |
3769 | (substitute* "build.xml" | |
3770 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) | |
3771 | (string-join | |
3772 | (cons line | |
3773 | (append | |
3774 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") | |
3775 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") | |
3776 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) | |
3777 | ";"))) | |
3778 | #t))))))) | |
439c59da RW |
3779 | (inputs |
3780 | `(("java-junit" ,java-junit) | |
3781 | ("java-jmock" ,java-jmock-1) | |
3782 | ("java-easymock" ,java-easymock) | |
439c59da RW |
3783 | ,@(package-inputs java-hamcrest-core))))) |
3784 | ||
7aa37023 RW |
3785 | (define-public java-jopt-simple |
3786 | (package | |
3787 | (name "java-jopt-simple") | |
3788 | (version "5.0.3") | |
3789 | (source (origin | |
3790 | (method url-fetch) | |
3791 | (uri (string-append "http://repo1.maven.org/maven2/" | |
3792 | "net/sf/jopt-simple/jopt-simple/" | |
3793 | version "/jopt-simple-" | |
3794 | version "-sources.jar")) | |
3795 | (sha256 | |
3796 | (base32 | |
3797 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) | |
3798 | (build-system ant-build-system) | |
3799 | (arguments | |
3800 | `(#:tests? #f ; there are no tests | |
3801 | #:jar-name "jopt-simple.jar")) | |
3802 | (home-page "https://pholser.github.io/jopt-simple/") | |
3803 | (synopsis "Java library for parsing command line options") | |
3804 | (description "JOpt Simple is a Java library for parsing command line | |
3805 | options, such as those you might pass to an invocation of @code{javac}. In | |
3806 | the interest of striving for simplicity, as closely as possible JOpt Simple | |
3807 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and | |
3808 | GNU @code{getopt_long}. It also aims to make option parser configuration and | |
3809 | retrieval of options and their arguments simple and expressive, without being | |
3810 | overly clever.") | |
3811 | (license license:expat))) | |
840969e8 RW |
3812 | |
3813 | (define-public java-commons-math3 | |
3814 | (package | |
3815 | (name "java-commons-math3") | |
3816 | (version "3.6.1") | |
3817 | (source (origin | |
3818 | (method url-fetch) | |
3819 | (uri (string-append "mirror://apache/commons/math/source/" | |
3820 | "commons-math3-" version "-src.tar.gz")) | |
3821 | (sha256 | |
3822 | (base32 | |
3823 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) | |
3824 | (build-system ant-build-system) | |
3825 | (arguments | |
3826 | `(#:build-target "jar" | |
3827 | #:test-target "test" | |
3828 | #:make-flags | |
3829 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
3830 | (junit (assoc-ref %build-inputs "java-junit"))) | |
3831 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
3832 | (string-append "-Dhamcrest.jar=" hamcrest | |
3833 | "/share/java/hamcrest-core.jar"))) | |
3834 | #:phases | |
3835 | (modify-phases %standard-phases | |
3836 | ;; We want to build the jar in the build phase and run the tests | |
3837 | ;; later in a separate phase. | |
3838 | (add-after 'unpack 'untangle-targets | |
3839 | (lambda _ | |
3840 | (substitute* "build.xml" | |
3841 | (("name=\"jar\" depends=\"test\"") | |
3842 | "name=\"jar\" depends=\"compile\"")) | |
3843 | #t)) | |
3844 | ;; There is no install target. | |
3845 | (replace 'install | |
3846 | (install-jars "target"))))) | |
3847 | (native-inputs | |
3848 | `(("java-junit" ,java-junit) | |
3849 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3850 | (home-page "http://commons.apache.org/math/") | |
3851 | (synopsis "Apache Commons mathematics library") | |
3852 | (description "Commons Math is a library of lightweight, self-contained | |
3853 | mathematics and statistics components addressing the most common problems not | |
3854 | available in the Java programming language or Commons Lang.") | |
3855 | (license license:asl2.0))) | |
62c9bfaa RW |
3856 | |
3857 | (define-public java-jmh | |
3858 | (package | |
3859 | (name "java-jmh") | |
3860 | (version "1.17.5") | |
3861 | (source (origin | |
3862 | (method hg-fetch) | |
3863 | (uri (hg-reference | |
3864 | (url "http://hg.openjdk.java.net/code-tools/jmh/") | |
3865 | (changeset version))) | |
3866 | (file-name (string-append name "-" version "-checkout")) | |
3867 | (sha256 | |
3868 | (base32 | |
3869 | "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) | |
3870 | (build-system ant-build-system) | |
3871 | (arguments | |
3872 | `(#:jar-name "jmh-core.jar" | |
3873 | #:source-dir "jmh-core/src/main" | |
3874 | #:test-dir "jmh-core/src/test" | |
3875 | #:phases | |
3876 | (modify-phases %standard-phases | |
3877 | ;; This seems to be a bug in the JDK. It may not be necessary in | |
3878 | ;; future versions of the JDK. | |
3879 | (add-after 'unpack 'fix-bug | |
3880 | (lambda _ | |
3881 | (with-directory-excursion | |
3882 | "jmh-core/src/main/java/org/openjdk/jmh/runner/options" | |
3883 | (substitute* '("IntegerValueConverter.java" | |
3884 | "ThreadsValueConverter.java") | |
3885 | (("public Class<Integer> valueType") | |
3886 | "public Class<? extends Integer> valueType"))) | |
3887 | #t))))) | |
3888 | (inputs | |
3889 | `(("java-jopt-simple" ,java-jopt-simple) | |
3890 | ("java-commons-math3" ,java-commons-math3))) | |
3891 | (native-inputs | |
3892 | `(("java-junit" ,java-junit) | |
3893 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
3894 | (home-page "http://openjdk.java.net/projects/code-tools/jmh/") | |
3895 | (synopsis "Benchmark harness for the JVM") | |
3896 | (description "JMH is a Java harness for building, running, and analysing | |
3897 | nano/micro/milli/macro benchmarks written in Java and other languages | |
f4548394 | 3898 | targeting the JVM.") |
62c9bfaa RW |
3899 | ;; GPLv2 only |
3900 | (license license:gpl2))) | |
56ebb4e9 RW |
3901 | |
3902 | (define-public java-commons-collections4 | |
3903 | (package | |
3904 | (name "java-commons-collections4") | |
3905 | (version "4.1") | |
3906 | (source (origin | |
3907 | (method url-fetch) | |
3908 | (uri (string-append "mirror://apache/commons/collections/source/" | |
3909 | "commons-collections4-" version "-src.tar.gz")) | |
3910 | (sha256 | |
3911 | (base32 | |
3912 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) | |
3913 | (build-system ant-build-system) | |
3914 | (arguments | |
3915 | `(#:test-target "test" | |
3916 | #:make-flags | |
3917 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
3918 | (junit (assoc-ref %build-inputs "java-junit")) | |
3919 | (easymock (assoc-ref %build-inputs "java-easymock"))) | |
3920 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
3921 | (string-append "-Dhamcrest.jar=" hamcrest | |
3922 | "/share/java/hamcrest-core.jar") | |
3923 | (string-append "-Deasymock.jar=" easymock | |
3924 | "/share/java/easymock.jar"))) | |
3925 | #:phases | |
3926 | (modify-phases %standard-phases | |
3927 | (replace 'install | |
3928 | (install-jars "target"))))) | |
3929 | (native-inputs | |
3930 | `(("java-junit" ,java-junit) | |
3931 | ("java-hamcrest-core" ,java-hamcrest-core) | |
3932 | ("java-easymock" ,java-easymock))) | |
3933 | (home-page "http://commons.apache.org/collections/") | |
3934 | (synopsis "Collections framework") | |
3935 | (description "The Java Collections Framework is the recognised standard | |
3936 | for collection handling in Java. Commons-Collections seek to build upon the | |
3937 | JDK classes by providing new interfaces, implementations and utilities. There | |
3938 | are many features, including: | |
3939 | ||
3940 | @itemize | |
3941 | @item @code{Bag} interface for collections that have a number of copies of | |
3942 | each object | |
3943 | @item @code{BidiMap} interface for maps that can be looked up from value to | |
3944 | key as well and key to value | |
3945 | @item @code{MapIterator} interface to provide simple and quick iteration over | |
3946 | maps | |
3947 | @item Transforming decorators that alter each object as it is added to the | |
3948 | collection | |
3949 | @item Composite collections that make multiple collections look like one | |
3950 | @item Ordered maps and sets that retain the order elements are added in, | |
3951 | including an LRU based map | |
3952 | @item Reference map that allows keys and/or values to be garbage collected | |
3953 | under close control | |
3954 | @item Many comparator implementations | |
3955 | @item Many iterator implementations | |
3956 | @item Adapter classes from array and enumerations to collections | |
3957 | @item Utilities to test or create typical set-theory properties of collections | |
3958 | such as union, intersection, and closure. | |
3959 | @end itemize\n") | |
3960 | (license license:asl2.0))) | |
6af63e65 | 3961 | |
229a9864 JL |
3962 | (define-public java-commons-collections |
3963 | (package | |
3964 | (inherit java-commons-collections4) | |
3965 | (name "java-commons-collections") | |
3966 | (version "3.2.2") | |
3967 | (source (origin | |
3968 | (method url-fetch) | |
3969 | (uri (string-append "mirror://apache/commons/collections/source/" | |
3970 | "commons-collections-" version "-src.tar.gz")) | |
3971 | (sha256 | |
3972 | (base32 | |
3973 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")))) | |
3974 | (arguments | |
3975 | (substitute-keyword-arguments (package-arguments java-commons-collections4) | |
3976 | ((#:phases phases) | |
3977 | `(modify-phases ,phases | |
3978 | ;; The manifest is required by the build procedure | |
3979 | (add-before 'build 'add-manifest | |
3980 | (lambda _ | |
3981 | (mkdir-p "build/conf") | |
3982 | (call-with-output-file "build/conf/MANIFEST.MF" | |
3983 | (lambda (file) | |
3984 | (format file "Manifest-Version: 1.0\n"))))) | |
3985 | (replace 'install | |
3986 | (install-jars "build")))))))) | |
3987 | ||
5aa2f3f4 JL |
3988 | (define java-commons-collections-test-classes |
3989 | (package | |
3990 | (inherit java-commons-collections) | |
3991 | (arguments | |
3992 | `(#:jar-name "commons-collections-test-classes.jar" | |
3993 | #:source-dir "src/test" | |
3994 | #:tests? #f)) | |
3995 | (inputs | |
3996 | `(("collection" ,java-commons-collections))))) | |
3997 | ||
3998 | (define-public java-commons-beanutils | |
3999 | (package | |
4000 | (name "java-commons-beanutils") | |
4001 | (version "1.9.3") | |
4002 | (source (origin | |
4003 | (method url-fetch) | |
4004 | (uri (string-append "mirror://apache/commons/beanutils/source/" | |
4005 | "commons-beanutils-" version "-src.tar.gz")) | |
4006 | (sha256 | |
4007 | (base32 | |
4008 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) | |
4009 | (build-system ant-build-system) | |
4010 | (arguments | |
4011 | `(#:test-target "test" | |
4012 | #:tests? #f | |
4013 | #:phases | |
4014 | (modify-phases %standard-phases | |
4015 | (replace 'install | |
4016 | (lambda* (#:key outputs #:allow-other-keys) | |
4017 | (rename-file (string-append "dist/commons-beanutils-" ,version | |
4018 | "-SNAPSHOT.jar") | |
4019 | "commons-beanutils.jar") | |
4020 | (install-file "commons-beanutils.jar" | |
4021 | (string-append (assoc-ref outputs "out") "/share/java/")) | |
4022 | #t))))) | |
4023 | (inputs | |
4024 | `(("logging" ,java-commons-logging-minimal) | |
4025 | ("collections" ,java-commons-collections))) | |
4026 | (native-inputs | |
4027 | `(("junit" ,java-junit) | |
4028 | ("collections-test" ,java-commons-collections-test-classes))) | |
4029 | (home-page "http://commons.apache.org/beanutils/") | |
4030 | (synopsis "Dynamically set or get properties in Java") | |
4031 | (description "BeanUtils provides a simplified interface to reflection and | |
4032 | introspection to set or get dynamically determined properties through their | |
4033 | setter and getter method.") | |
4034 | (license license:asl2.0))) | |
4035 | ||
6af63e65 HG |
4036 | (define-public java-commons-io |
4037 | (package | |
4038 | (name "java-commons-io") | |
4039 | (version "2.5") | |
4040 | (source | |
4041 | (origin | |
4042 | (method url-fetch) | |
4043 | (uri (string-append "mirror://apache/commons/io/source/" | |
4044 | "commons-io-" version "-src.tar.gz")) | |
4045 | (sha256 | |
4046 | (base32 | |
4047 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) | |
4048 | (build-system ant-build-system) | |
4049 | (outputs '("out" "doc")) | |
4050 | (arguments | |
4051 | `(#:test-target "test" | |
4052 | #:make-flags | |
4053 | (list (string-append "-Djunit.jar=" | |
4054 | (assoc-ref %build-inputs "java-junit") | |
4055 | "/share/java/junit.jar")) | |
4056 | #:phases | |
4057 | (modify-phases %standard-phases | |
4058 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4059 | (replace 'install (install-jars "target")) | |
4060 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4061 | (native-inputs | |
4062 | `(("java-junit" ,java-junit) | |
4063 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4064 | (home-page "http://commons.apache.org/io/") | |
4065 | (synopsis "Common useful IO related classes") | |
4066 | (description "Commons-IO contains utility classes, stream implementations, | |
4067 | file filters and endian classes.") | |
4068 | (license license:asl2.0))) | |
d631b5f3 HG |
4069 | |
4070 | (define-public java-commons-lang | |
4071 | (package | |
4072 | (name "java-commons-lang") | |
4073 | (version "2.6") | |
4074 | (source | |
4075 | (origin | |
4076 | (method url-fetch) | |
4077 | (uri (string-append "mirror://apache/commons/lang/source/" | |
4078 | "commons-lang-" version "-src.tar.gz")) | |
4079 | (sha256 | |
4080 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) | |
4081 | (build-system ant-build-system) | |
4082 | (outputs '("out" "doc")) | |
4083 | (arguments | |
4084 | `(#:test-target "test" | |
e5a96113 | 4085 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
d631b5f3 HG |
4086 | #:phases |
4087 | (modify-phases %standard-phases | |
4088 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4089 | (add-before 'check 'disable-failing-test | |
4090 | (lambda _ | |
4091 | ;; Disable a failing test | |
4092 | (substitute* "src/test/java/org/apache/commons/lang/\ | |
4093 | time/FastDateFormatTest.java" | |
4094 | (("public void testFormat\\(\\)") | |
4095 | "public void disabled_testFormat()")) | |
4096 | #t)) | |
4097 | (replace 'install (install-jars "target")) | |
4098 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4099 | (native-inputs | |
4100 | `(("java-junit" ,java-junit))) | |
4101 | (home-page "http://commons.apache.org/lang/") | |
4102 | (synopsis "Extension of the java.lang package") | |
4103 | (description "The Commons Lang components contains a set of Java classes | |
4104 | that provide helper methods for standard Java classes, especially those found | |
4105 | in the @code{java.lang} package in the Sun JDK. The following classes are | |
4106 | included: | |
4107 | ||
4108 | @itemize | |
4109 | @item StringUtils - Helper for @code{java.lang.String}. | |
4110 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets | |
4111 | of characters such as @code{[a-z]} and @code{[abcdez]}. | |
4112 | @item RandomStringUtils - Helper for creating randomised strings. | |
4113 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
4114 | @item NumberRange - A range of numbers with an upper and lower bound. | |
4115 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
4116 | @item SerializationUtils - Helper for serializing objects. | |
4117 | @item SystemUtils - Utility class defining the Java system properties. | |
4118 | @item NestedException package - A sub-package for the creation of nested | |
4119 | exceptions. | |
4120 | @item Enum package - A sub-package for the creation of enumerated types. | |
4121 | @item Builder package - A sub-package for the creation of @code{equals}, | |
4122 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
4123 | @end itemize\n") | |
4124 | (license license:asl2.0))) | |
82e18864 HG |
4125 | |
4126 | (define-public java-commons-lang3 | |
4127 | (package | |
4128 | (name "java-commons-lang3") | |
4129 | (version "3.4") | |
4130 | (source | |
4131 | (origin | |
4132 | (method url-fetch) | |
4133 | (uri (string-append "mirror://apache/commons/lang/source/" | |
4134 | "commons-lang3-" version "-src.tar.gz")) | |
4135 | (sha256 | |
4136 | (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg")))) | |
4137 | (build-system ant-build-system) | |
4138 | (outputs '("out" "doc")) | |
4139 | (arguments | |
4140 | `(#:test-target "test" | |
4141 | #:make-flags | |
4142 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all")) | |
4143 | (junit (assoc-ref %build-inputs "java-junit")) | |
4144 | (easymock (assoc-ref %build-inputs "java-easymock")) | |
4145 | (io (assoc-ref %build-inputs "java-commons-io"))) | |
4146 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
4147 | (string-append "-Dhamcrest.jar=" hamcrest | |
4148 | "/share/java/hamcrest-all.jar") | |
4149 | (string-append "-Dcommons-io.jar=" io | |
4150 | "/share/java/commons-io-" | |
4151 | ,(package-version java-commons-io) | |
4152 | "-SNAPSHOT.jar") | |
4153 | (string-append "-Deasymock.jar=" easymock | |
4154 | "/share/java/easymock.jar"))) | |
4155 | #:phases | |
4156 | (modify-phases %standard-phases | |
4157 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
4158 | (replace 'install (install-jars "target")) | |
4159 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | |
4160 | (native-inputs | |
4161 | `(("java-junit" ,java-junit) | |
4162 | ("java-commons-io" ,java-commons-io) | |
4163 | ("java-hamcrest-all" ,java-hamcrest-all) | |
4164 | ("java-easymock" ,java-easymock))) | |
4165 | (home-page "http://commons.apache.org/lang/") | |
4166 | (synopsis "Extension of the java.lang package") | |
4167 | (description "The Commons Lang components contains a set of Java classes | |
4168 | that provide helper methods for standard Java classes, especially those found | |
4169 | in the @code{java.lang} package. The following classes are included: | |
4170 | ||
4171 | @itemize | |
4172 | @item StringUtils - Helper for @code{java.lang.String}. | |
4173 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of | |
4174 | characters such as @code{[a-z]} and @code{[abcdez]}. | |
4175 | @item RandomStringUtils - Helper for creating randomised strings. | |
4176 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. | |
4177 | @item NumberRange - A range of numbers with an upper and lower bound. | |
4178 | @item ObjectUtils - Helper for @code{java.lang.Object}. | |
4179 | @item SerializationUtils - Helper for serializing objects. | |
4180 | @item SystemUtils - Utility class defining the Java system properties. | |
4181 | @item NestedException package - A sub-package for the creation of nested | |
4182 | exceptions. | |
4183 | @item Enum package - A sub-package for the creation of enumerated types. | |
4184 | @item Builder package - A sub-package for the creation of @code{equals}, | |
4185 | @code{hashCode}, @code{compareTo} and @code{toString} methods. | |
4186 | @end itemize\n") | |
4187 | (license license:asl2.0))) | |
1c188f4e | 4188 | |
0d4a0d60 RW |
4189 | (define-public java-jsr305 |
4190 | (package | |
4191 | (name "java-jsr305") | |
4192 | (version "3.0.1") | |
4193 | (source (origin | |
4194 | (method url-fetch) | |
4195 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4196 | "com/google/code/findbugs/" | |
4197 | "jsr305/" version "/jsr305-" | |
4198 | version "-sources.jar")) | |
4199 | (sha256 | |
4200 | (base32 | |
4201 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) | |
4202 | (build-system ant-build-system) | |
4203 | (arguments | |
4204 | `(#:tests? #f ; no tests included | |
4205 | #:jar-name "jsr305.jar")) | |
4206 | (home-page "http://findbugs.sourceforge.net/") | |
4207 | (synopsis "Annotations for the static analyzer called findbugs") | |
4208 | (description "This package provides annotations for the findbugs package. | |
4209 | It provides packages in the @code{javax.annotations} namespace.") | |
4210 | (license license:asl2.0))) | |
4211 | ||
4f3e47ea RW |
4212 | (define-public java-guava |
4213 | (package | |
4214 | (name "java-guava") | |
4215 | ;; This is the last release of Guava that can be built with Java 7. | |
4216 | (version "20.0") | |
4217 | (source (origin | |
4218 | (method url-fetch) | |
4219 | (uri (string-append "https://github.com/google/guava/" | |
4220 | "releases/download/v" version | |
4221 | "/guava-" version "-sources.jar")) | |
4222 | (sha256 | |
4223 | (base32 | |
4224 | "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr")))) | |
4225 | (build-system ant-build-system) | |
4226 | (arguments | |
4227 | `(#:tests? #f ; no tests included | |
4228 | #:jar-name "guava.jar" | |
4229 | #:phases | |
4230 | (modify-phases %standard-phases | |
4231 | (add-after 'unpack 'trim-sources | |
4232 | (lambda _ | |
4233 | (with-directory-excursion "src/com/google/common" | |
4234 | ;; Remove annotations to avoid extra dependencies: | |
4235 | ;; * "j2objc" annotations are used when converting Java to | |
4236 | ;; Objective C; | |
4237 | ;; * "errorprone" annotations catch common Java mistakes at | |
4238 | ;; compile time; | |
4239 | ;; * "IgnoreJRERequirement" is used for Android. | |
4240 | (substitute* (find-files "." "\\.java$") | |
4241 | (("import com.google.j2objc.*") "") | |
4242 | (("import com.google.errorprone.annotation.*") "") | |
4243 | (("import org.codehaus.mojo.animal_sniffer.*") "") | |
4244 | (("@CanIgnoreReturnValue") "") | |
4245 | (("@LazyInit") "") | |
4246 | (("@WeakOuter") "") | |
4247 | (("@RetainedWith") "") | |
4248 | (("@Weak") "") | |
4249 | (("@ForOverride") "") | |
4250 | (("@J2ObjCIncompatible") "") | |
4251 | (("@IgnoreJRERequirement") ""))) | |
4252 | #t))))) | |
4253 | (inputs | |
4254 | `(("java-jsr305" ,java-jsr305))) | |
4255 | (home-page "https://github.com/google/guava") | |
4256 | (synopsis "Google core libraries for Java") | |
4257 | (description "Guava is a set of core libraries that includes new | |
4258 | collection types (such as multimap and multiset), immutable collections, a | |
4259 | graph library, functional types, an in-memory cache, and APIs/utilities for | |
4260 | concurrency, I/O, hashing, primitives, reflection, string processing, and much | |
4261 | more!") | |
4262 | (license license:asl2.0))) | |
4263 | ||
af8f8281 RW |
4264 | ;; The java-commons-logging package provides adapters to many different |
4265 | ;; logging frameworks. To avoid an excessive dependency graph we try to build | |
4266 | ;; it with only a minimal set of adapters. | |
4267 | (define-public java-commons-logging-minimal | |
4268 | (package | |
4269 | (name "java-commons-logging-minimal") | |
4270 | (version "1.2") | |
4271 | (source (origin | |
4272 | (method url-fetch) | |
4273 | (uri (string-append "mirror://apache/commons/logging/source/" | |
4274 | "commons-logging-" version "-src.tar.gz")) | |
4275 | (sha256 | |
4276 | (base32 | |
4277 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) | |
4278 | (build-system ant-build-system) | |
4279 | (arguments | |
4280 | `(#:tests? #f ; avoid dependency on logging frameworks | |
4281 | #:jar-name "commons-logging-minimal.jar" | |
4282 | #:phases | |
4283 | (modify-phases %standard-phases | |
4284 | (add-after 'unpack 'delete-adapters-and-tests | |
4285 | (lambda _ | |
4286 | ;; Delete all adapters except for NoOpLog, SimpleLog, and | |
4287 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl | |
4288 | ;; is used by applications; SimpleLog is the only actually usable | |
4289 | ;; implementation that does not depend on another logging | |
4290 | ;; framework. | |
4291 | (for-each | |
4292 | (lambda (file) | |
4293 | (delete-file (string-append | |
4294 | "src/main/java/org/apache/commons/logging/impl/" file))) | |
4295 | (list "Jdk13LumberjackLogger.java" | |
4296 | "WeakHashtable.java" | |
4297 | "Log4JLogger.java" | |
4298 | "ServletContextCleaner.java" | |
4299 | "Jdk14Logger.java" | |
4300 | "AvalonLogger.java" | |
4301 | "LogKitLogger.java")) | |
4302 | (delete-file-recursively "src/test") | |
4303 | #t))))) | |
4304 | (home-page "http://commons.apache.org/logging/") | |
4305 | (synopsis "Common API for logging implementations") | |
4306 | (description "The Logging package is a thin bridge between different | |
4307 | logging implementations. A library that uses the commons-logging API can be | |
4308 | used with any logging implementation at runtime.") | |
4309 | (license license:asl2.0))) | |
4310 | ||
90e65abe RW |
4311 | ;; This is the last release of the 1.x series. |
4312 | (define-public java-mockito-1 | |
4313 | (package | |
4314 | (name "java-mockito") | |
4315 | (version "1.10.19") | |
4316 | (source (origin | |
4317 | (method url-fetch) | |
4318 | (uri (string-append "http://repo1.maven.org/maven2/" | |
4319 | "org/mockito/mockito-core/" version | |
4320 | "/mockito-core-" version "-sources.jar")) | |
4321 | (sha256 | |
4322 | (base32 | |
4323 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) | |
4324 | (build-system ant-build-system) | |
4325 | (arguments | |
4326 | `(#:jar-name "mockito.jar" | |
4327 | #:tests? #f ; no tests included | |
4328 | ;; FIXME: patch-and-repack does not support jars, so we have to apply | |
4329 | ;; patches in build phases. | |
4330 | #:phases | |
4331 | (modify-phases %standard-phases | |
4332 | ;; Mockito was developed against a different version of hamcrest, | |
4333 | ;; which does not require matcher implementations to provide an | |
4334 | ;; implementation of the "describeMismatch" method. We add this | |
4335 | ;; simple definition to pass the build with our version of hamcrest. | |
4336 | (add-after 'unpack 'fix-hamcrest-build-error | |
4337 | (lambda _ | |
4338 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" | |
4339 | (("public Matcher getActualMatcher\\(\\) .*" line) | |
4340 | (string-append " | |
4341 | public void describeMismatch(Object item, Description description) { | |
4342 | actualMatcher.describeMismatch(item, description); | |
4343 | }" | |
4344 | line))) | |
4345 | #t)) | |
4346 | ;; Mockito bundles cglib. We have a cglib package, so let's use | |
4347 | ;; that instead. | |
4348 | (add-after 'unpack 'use-system-libraries | |
4349 | (lambda _ | |
4350 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" | |
4351 | (substitute* '("CGLIBHacker.java" | |
4352 | "CglibMockMaker.java" | |
4353 | "ClassImposterizer.java" | |
4354 | "DelegatingMockitoMethodProxy.java" | |
4355 | "MethodInterceptorFilter.java" | |
4356 | "MockitoNamingPolicy.java" | |
4357 | "SerializableMockitoMethodProxy.java" | |
4358 | "SerializableNoOp.java") | |
4359 | (("import org.mockito.cglib") "import net.sf.cglib"))) | |
4360 | #t))))) | |
4361 | (inputs | |
4362 | `(("java-junit" ,java-junit) | |
4363 | ("java-objenesis" ,java-objenesis) | |
4364 | ("java-cglib" ,java-cglib) | |
4365 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4366 | (home-page "http://mockito.org") | |
4367 | (synopsis "Mockito is a mock library for Java") | |
4368 | (description "Mockito is a mocking library for Java which lets you write | |
4369 | tests with a clean and simple API. It generates mocks using reflection, and | |
4370 | it records all mock invocations, including methods arguments.") | |
4371 | (license license:asl2.0))) | |
4372 | ||
4f4d2e47 RW |
4373 | (define-public java-httpcomponents-httpcore |
4374 | (package | |
4375 | (name "java-httpcomponents-httpcore") | |
4376 | (version "4.4.6") | |
4377 | (source (origin | |
4378 | (method url-fetch) | |
4379 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" | |
4380 | "source/httpcomponents-core-" | |
4381 | version "-src.tar.gz")) | |
4382 | (sha256 | |
4383 | (base32 | |
4384 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) | |
4385 | (build-system ant-build-system) | |
4386 | (arguments | |
4387 | `(#:jar-name "httpcomponents-httpcore.jar" | |
4388 | #:phases | |
4389 | (modify-phases %standard-phases | |
4390 | (add-after 'unpack 'chdir | |
4391 | (lambda _ (chdir "httpcore") #t))))) | |
4392 | (inputs | |
4393 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
4394 | ("java-commons-lang3" ,java-commons-lang3))) | |
4395 | (native-inputs | |
4396 | `(("java-junit" ,java-junit) | |
4397 | ("java-mockito" ,java-mockito-1))) | |
4398 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") | |
4399 | (synopsis "Low level HTTP transport components") | |
4400 | (description "HttpCore is a set of low level HTTP transport components | |
4401 | that can be used to build custom client and server side HTTP services with a | |
4402 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
4403 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
4404 | NIO. | |
4405 | ||
4406 | This package provides the blocking I/O model library.") | |
4407 | (license license:asl2.0))) | |
4408 | ||
3a068b43 RW |
4409 | (define-public java-httpcomponents-httpcore-nio |
4410 | (package (inherit java-httpcomponents-httpcore) | |
4411 | (name "java-httpcomponents-httpcore-nio") | |
4412 | (arguments | |
4413 | `(#:jar-name "httpcomponents-httpcore-nio.jar" | |
4414 | #:phases | |
4415 | (modify-phases %standard-phases | |
4416 | (add-after 'unpack 'chdir | |
4417 | (lambda _ (chdir "httpcore-nio") #t))))) | |
4418 | (inputs | |
4419 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4420 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4421 | ,@(package-inputs java-httpcomponents-httpcore))) | |
4422 | (description "HttpCore is a set of low level HTTP transport components | |
4423 | that can be used to build custom client and server side HTTP services with a | |
4424 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based | |
4425 | on the classic Java I/O and non-blocking, event driven I/O model based on Java | |
4426 | NIO. | |
4427 | ||
4428 | This package provides the non-blocking I/O model library based on Java | |
4429 | NIO."))) | |
4430 | ||
e1dd78f6 RW |
4431 | (define-public java-httpcomponents-httpcore-ab |
4432 | (package (inherit java-httpcomponents-httpcore) | |
4433 | (name "java-httpcomponents-httpcore-ab") | |
4434 | (arguments | |
4435 | `(#:jar-name "httpcomponents-httpcore-ab.jar" | |
4436 | #:phases | |
4437 | (modify-phases %standard-phases | |
4438 | (add-after 'unpack 'chdir | |
4439 | (lambda _ (chdir "httpcore-ab") #t))))) | |
4440 | (inputs | |
4441 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4442 | ("java-commons-cli" ,java-commons-cli) | |
4443 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4444 | ,@(package-inputs java-httpcomponents-httpcore))) | |
4445 | (synopsis "Apache HttpCore benchmarking tool") | |
4446 | (description "This package provides the HttpCore benchmarking tool. It is | |
4447 | an Apache AB clone based on HttpCore."))) | |
4448 | ||
14a671d8 RW |
4449 | (define-public java-httpcomponents-httpclient |
4450 | (package | |
4451 | (name "java-httpcomponents-httpclient") | |
4452 | (version "4.5.3") | |
4453 | (source (origin | |
4454 | (method url-fetch) | |
4455 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" | |
4456 | "source/httpcomponents-client-" | |
4457 | version "-src.tar.gz")) | |
4458 | (sha256 | |
4459 | (base32 | |
4460 | "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1")))) | |
4461 | (build-system ant-build-system) | |
4462 | (arguments | |
4463 | `(#:jar-name "httpcomponents-httpclient.jar" | |
4464 | #:phases | |
4465 | (modify-phases %standard-phases | |
4466 | (add-after 'unpack 'chdir | |
4467 | (lambda _ (chdir "httpclient") #t))))) | |
4468 | (inputs | |
4469 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
4470 | ("java-commons-codec" ,java-commons-codec) | |
4471 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4472 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4473 | ("java-mockito" ,java-mockito-1) | |
4474 | ("java-junit" ,java-junit))) | |
4475 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") | |
4476 | (synopsis "HTTP client library for Java") | |
4477 | (description "Although the @code{java.net} package provides basic | |
4478 | functionality for accessing resources via HTTP, it doesn't provide the full | |
4479 | flexibility or functionality needed by many applications. @code{HttpClient} | |
4480 | seeks to fill this void by providing an efficient, up-to-date, and | |
4481 | feature-rich package implementing the client side of the most recent HTTP | |
4482 | standards and recommendations.") | |
4483 | (license license:asl2.0))) | |
4484 | ||
cbce5de2 RW |
4485 | (define-public java-httpcomponents-httpmime |
4486 | (package (inherit java-httpcomponents-httpclient) | |
4487 | (name "java-httpcomponents-httpmime") | |
4488 | (arguments | |
4489 | `(#:jar-name "httpcomponents-httpmime.jar" | |
4490 | #:phases | |
4491 | (modify-phases %standard-phases | |
4492 | (add-after 'unpack 'chdir | |
4493 | (lambda _ (chdir "httpmime") #t))))) | |
4494 | (inputs | |
4495 | `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
4496 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
4497 | ("java-junit" ,java-junit) | |
4498 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
4499 | ||
4b34c21f RW |
4500 | (define-public java-commons-net |
4501 | (package | |
4502 | (name "java-commons-net") | |
4503 | (version "3.6") | |
4504 | (source (origin | |
4505 | (method url-fetch) | |
4506 | (uri (string-append "mirror://apache/commons/net/source/" | |
4507 | "commons-net-" version "-src.tar.gz")) | |
4508 | (sha256 | |
4509 | (base32 | |
4510 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) | |
4511 | (build-system ant-build-system) | |
4512 | (arguments | |
4513 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which | |
4514 | ;; should be "resources/examples/examples.properties"), but gets "null" | |
4515 | ;; instead. | |
4516 | #:tests? #f | |
4517 | #:jar-name "commons-net.jar")) | |
4518 | (native-inputs | |
4519 | `(("java-junit" ,java-junit) | |
4520 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
4521 | (home-page "http://commons.apache.org/net/") | |
4522 | (synopsis "Client library for many basic Internet protocols") | |
4523 | (description "The Apache Commons Net library implements the client side of | |
4524 | many basic Internet protocols. The purpose of the library is to provide | |
4525 | fundamental protocol access, not higher-level abstractions.") | |
4526 | (license license:asl2.0))) | |
4527 | ||
808cb58f RW |
4528 | (define-public java-jsch |
4529 | (package | |
4530 | (name "java-jsch") | |
4531 | (version "0.1.54") | |
4532 | (source (origin | |
4533 | (method url-fetch) | |
4534 | (uri (string-append "mirror://sourceforge/jsch/jsch/" | |
4535 | version "/jsch-" version ".zip")) | |
4536 | (sha256 | |
4537 | (base32 | |
4538 | "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb")))) | |
4539 | (build-system ant-build-system) | |
4540 | (arguments | |
4541 | `(#:build-target "dist" | |
4542 | #:tests? #f ; no tests included | |
4543 | #:phases | |
4544 | (modify-phases %standard-phases | |
4545 | (replace 'install (install-jars "dist"))))) | |
4546 | (native-inputs | |
4547 | `(("unzip" ,unzip))) | |
4548 | (home-page "http://www.jcraft.com/jsch/") | |
4549 | (synopsis "Pure Java implementation of SSH2") | |
4550 | (description "JSch is a pure Java implementation of SSH2. JSch allows you | |
4551 | to connect to an SSH server and use port forwarding, X11 forwarding, file | |
4552 | transfer, etc., and you can integrate its functionality into your own Java | |
4553 | programs.") | |
4554 | (license license:bsd-3))) | |
4555 | ||
a6244698 RW |
4556 | (define-public java-commons-compress |
4557 | (package | |
4558 | (name "java-commons-compress") | |
4559 | (version "1.13") | |
4560 | (source (origin | |
4561 | (method url-fetch) | |
4562 | (uri (string-append "mirror://apache/commons/compress/source/" | |
4563 | "commons-compress-" version "-src.tar.gz")) | |
4564 | (sha256 | |
4565 | (base32 | |
4566 | "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) | |
4567 | (build-system ant-build-system) | |
4568 | (arguments | |
4569 | `(#:jar-name "commons-compress.jar" | |
4570 | #:phases | |
4571 | (modify-phases %standard-phases | |
4572 | (add-after 'unpack 'delete-bad-tests | |
4573 | (lambda _ | |
4574 | (with-directory-excursion "src/test/java/org/apache/commons/compress/" | |
4575 | ;; FIXME: These tests really should not fail. Maybe they are | |
4576 | ;; indicative of problems with our Java packaging work. | |
4577 | ||
4578 | ;; This test fails with a null pointer exception. | |
4579 | (delete-file "archivers/sevenz/SevenZOutputFileTest.java") | |
4580 | ;; This test fails to open test resources. | |
4581 | (delete-file "archivers/zip/ExplodeSupportTest.java") | |
4582 | ||
4583 | ;; FIXME: This test adds a dependency on powermock, which is hard to | |
4584 | ;; package at this point. | |
4585 | ;; https://github.com/powermock/powermock | |
4586 | (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) | |
4587 | #t))))) | |
4588 | (inputs | |
4589 | `(("java-junit" ,java-junit) | |
4590 | ("java-hamcrest-core" ,java-hamcrest-core) | |
4591 | ("java-mockito" ,java-mockito-1) | |
4592 | ("java-xz" ,java-xz))) | |
4593 | (home-page "https://commons.apache.org/proper/commons-compress/") | |
4594 | (synopsis "Java library for working with compressed files") | |
4595 | (description "The Apache Commons Compress library defines an API for | |
4596 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, | |
4597 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") | |
4598 | (license license:asl2.0))) | |
4599 | ||
51263ff5 JL |
4600 | (define-public java-commons-csv |
4601 | (package | |
4602 | (name "java-commons-csv") | |
4603 | (version "1.4") | |
4604 | (source (origin | |
4605 | (method url-fetch) | |
4606 | (uri (string-append "mirror://apache/commons/csv/source/" | |
4607 | "commons-csv-" version "-src.tar.gz")) | |
4608 | (sha256 | |
4609 | (base32 | |
4610 | "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij")))) | |
4611 | (build-system ant-build-system) | |
4612 | (arguments | |
4613 | `(#:jar-name "commons-csv.jar" | |
4614 | #:source-dir "src/main/java" | |
4615 | #:tests? #f)); FIXME: requires java-h2 | |
4616 | (inputs | |
4617 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
4618 | ("java-commons-io" ,java-commons-io) | |
4619 | ("java-commons-lang3" ,java-commons-lang3) | |
4620 | ("junit" ,java-junit))) | |
4621 | (home-page "https://commons.apache.org/proper/commons-csv/") | |
4622 | (synopsis "Read and write CSV documents") | |
4623 | (description "Commons CSV reads and writes files in variations of the Comma | |
4624 | Separated Value (CSV) format. The most common CSV formats are predefined in the | |
4625 | CSVFormat class: | |
4626 | ||
4627 | @itemize | |
4628 | @item Microsoft Excel | |
4629 | @item Informix UNLOAD | |
4630 | @item Informix UNLOAD CSV | |
4631 | @item MySQL | |
4632 | @item RFC 4180 | |
4633 | @item TDF | |
4634 | @end itemize | |
4635 | ||
4636 | Custom formats can be created using a fluent style API.") | |
4637 | (license license:asl2.0))) | |
4638 | ||
6ee6d0b5 RW |
4639 | (define-public java-osgi-annotation |
4640 | (package | |
4641 | (name "java-osgi-annotation") | |
4642 | (version "6.0.0") | |
4643 | (source (origin | |
4644 | (method url-fetch) | |
4645 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4646 | "org/osgi/org.osgi.annotation/" version "/" | |
4647 | "org.osgi.annotation-" version "-sources.jar")) | |
4648 | (sha256 | |
4649 | (base32 | |
4650 | "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) | |
4651 | (build-system ant-build-system) | |
4652 | (arguments | |
4653 | `(#:tests? #f ; no tests | |
4654 | #:jar-name "osgi-annotation.jar")) | |
c353d014 | 4655 | (home-page "https://www.osgi.org") |
6ee6d0b5 RW |
4656 | (synopsis "Annotation module of OSGi framework") |
4657 | (description | |
4658 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
4659 | and service platform for the Java programming language. This package contains | |
4660 | the OSGi annotation module, providing additional services to help dynamic | |
4661 | components.") | |
4662 | (license license:asl2.0))) | |
4663 | ||
37e2e5d4 RW |
4664 | (define-public java-osgi-core |
4665 | (package | |
4666 | (name "java-osgi-core") | |
4667 | (version "6.0.0") | |
4668 | (source (origin | |
4669 | (method url-fetch) | |
4670 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4671 | "org/osgi/org.osgi.core/" version "/" | |
4672 | "org.osgi.core-" version "-sources.jar")) | |
4673 | (sha256 | |
4674 | (base32 | |
4675 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) | |
4676 | (build-system ant-build-system) | |
4677 | (arguments | |
4678 | `(#:tests? #f ; no tests | |
4679 | #:jar-name "osgi-core.jar")) | |
4680 | (inputs | |
4681 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
c353d014 | 4682 | (home-page "https://www.osgi.org") |
37e2e5d4 RW |
4683 | (synopsis "Core module of OSGi framework") |
4684 | (description | |
4685 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
4686 | and service platform for the Java programming language. This package contains | |
4687 | the OSGi Core module.") | |
4688 | (license license:asl2.0))) | |
4689 | ||
8af92c8f RW |
4690 | (define-public java-osgi-service-event |
4691 | (package | |
4692 | (name "java-osgi-service-event") | |
4693 | (version "1.3.1") | |
4694 | (source (origin | |
4695 | (method url-fetch) | |
4696 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4697 | "org/osgi/org.osgi.service.event/" | |
4698 | version "/org.osgi.service.event-" | |
4699 | version "-sources.jar")) | |
4700 | (sha256 | |
4701 | (base32 | |
4702 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) | |
4703 | (build-system ant-build-system) | |
4704 | (arguments | |
4705 | `(#:tests? #f ; no tests | |
4706 | #:jar-name "osgi-service-event.jar")) | |
4707 | (inputs | |
4708 | `(("java-osgi-annotation" ,java-osgi-annotation) | |
4709 | ("java-osgi-core" ,java-osgi-core))) | |
c353d014 | 4710 | (home-page "https://www.osgi.org") |
8af92c8f RW |
4711 | (synopsis "OSGi service event module") |
4712 | (description | |
4713 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
4714 | and service platform for the Java programming language. This package contains | |
4715 | the OSGi @code{org.osgi.service.event} module.") | |
4716 | (license license:asl2.0))) | |
4717 | ||
674e93a0 RW |
4718 | (define-public java-eclipse-osgi |
4719 | (package | |
4720 | (name "java-eclipse-osgi") | |
4721 | (version "3.11.3") | |
4722 | (source (origin | |
4723 | (method url-fetch) | |
4724 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4725 | "org/eclipse/platform/org.eclipse.osgi/" | |
4726 | version "/org.eclipse.osgi-" | |
4727 | version "-sources.jar")) | |
4728 | (sha256 | |
4729 | (base32 | |
4730 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) | |
4731 | (build-system ant-build-system) | |
4732 | (arguments | |
4733 | `(#:tests? #f ; no tests included | |
4734 | #:jar-name "eclipse-equinox-osgi.jar")) | |
4735 | (inputs | |
4736 | `(("java-osgi-annotation" ,java-osgi-annotation))) | |
4737 | (home-page "http://www.eclipse.org/equinox/") | |
4738 | (synopsis "Eclipse Equinox OSGi framework") | |
4739 | (description "This package provides an implementation of the OSGi Core | |
4740 | specification.") | |
4741 | (license license:epl1.0))) | |
4742 | ||
81b55b1e RW |
4743 | (define-public java-eclipse-equinox-common |
4744 | (package | |
4745 | (name "java-eclipse-equinox-common") | |
4746 | (version "3.8.0") | |
4747 | (source (origin | |
4748 | (method url-fetch) | |
4749 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4750 | "org/eclipse/platform/org.eclipse.equinox.common/" | |
4751 | version "/org.eclipse.equinox.common-" | |
4752 | version "-sources.jar")) | |
4753 | (sha256 | |
4754 | (base32 | |
4755 | "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc")))) | |
4756 | (build-system ant-build-system) | |
4757 | (arguments | |
4758 | `(#:tests? #f ; no tests included | |
4759 | #:jar-name "eclipse-equinox-common.jar")) | |
4760 | (inputs | |
4761 | `(("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4762 | (home-page "http://www.eclipse.org/equinox/") | |
4763 | (synopsis "Common Eclipse runtime") | |
4764 | (description "This package provides the common Eclipse runtime.") | |
4765 | (license license:epl1.0))) | |
4766 | ||
90368ad9 RW |
4767 | (define-public java-eclipse-core-jobs |
4768 | (package | |
4769 | (name "java-eclipse-core-jobs") | |
4770 | (version "3.8.0") | |
4771 | (source (origin | |
4772 | (method url-fetch) | |
4773 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4774 | "org/eclipse/platform/org.eclipse.core.jobs/" | |
4775 | version "/org.eclipse.core.jobs-" | |
4776 | version "-sources.jar")) | |
4777 | (sha256 | |
4778 | (base32 | |
4779 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) | |
4780 | (build-system ant-build-system) | |
4781 | (arguments | |
4782 | `(#:tests? #f ; no tests included | |
4783 | #:jar-name "eclipse-core-jobs.jar")) | |
4784 | (inputs | |
4785 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4786 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4787 | (home-page "http://www.eclipse.org/equinox/") | |
4788 | (synopsis "Eclipse jobs mechanism") | |
4789 | (description "This package provides the Eclipse jobs mechanism.") | |
4790 | (license license:epl1.0))) | |
4791 | ||
fbaf09eb RW |
4792 | (define-public java-eclipse-equinox-registry |
4793 | (package | |
4794 | (name "java-eclipse-equinox-registry") | |
4795 | (version "3.6.100") | |
4796 | (source (origin | |
4797 | (method url-fetch) | |
4798 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4799 | "org/eclipse/platform/org.eclipse.equinox.registry/" | |
4800 | version "/org.eclipse.equinox.registry-" | |
4801 | version "-sources.jar")) | |
4802 | (sha256 | |
4803 | (base32 | |
4804 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) | |
4805 | (build-system ant-build-system) | |
4806 | (arguments | |
4807 | `(#:tests? #f ; no tests included | |
4808 | #:jar-name "eclipse-equinox-registry.jar")) | |
4809 | (inputs | |
4810 | `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
4811 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4812 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4813 | (home-page "http://www.eclipse.org/equinox/") | |
4814 | (synopsis "Eclipse extension registry support") | |
4815 | (description "This package provides support for the Eclipse extension | |
4816 | registry.") | |
4817 | (license license:epl1.0))) | |
4818 | ||
65214c87 RW |
4819 | (define-public java-eclipse-equinox-app |
4820 | (package | |
4821 | (name "java-eclipse-equinox-app") | |
4822 | (version "1.3.400") | |
4823 | (source (origin | |
4824 | (method url-fetch) | |
4825 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4826 | "org/eclipse/platform/org.eclipse.equinox.app/" | |
4827 | version "/org.eclipse.equinox.app-" | |
4828 | version "-sources.jar")) | |
4829 | (sha256 | |
4830 | (base32 | |
4831 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) | |
4832 | (build-system ant-build-system) | |
4833 | (arguments | |
4834 | `(#:tests? #f ; no tests included | |
4835 | #:jar-name "eclipse-equinox-app.jar")) | |
4836 | (inputs | |
4837 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4838 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
4839 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
4840 | ("java-osgi-service-event" ,java-osgi-service-event))) | |
4841 | (home-page "http://www.eclipse.org/equinox/") | |
4842 | (synopsis "Equinox application container") | |
4843 | (description "This package provides the Equinox application container for | |
4844 | Eclipse.") | |
4845 | (license license:epl1.0))) | |
4846 | ||
3f970214 RW |
4847 | (define-public java-eclipse-equinox-preferences |
4848 | (package | |
4849 | (name "java-eclipse-equinox-preferences") | |
4850 | (version "3.6.1") | |
4851 | (source (origin | |
4852 | (method url-fetch) | |
4853 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4854 | "org/eclipse/platform/org.eclipse.equinox.preferences/" | |
4855 | version "/org.eclipse.equinox.preferences-" | |
4856 | version "-sources.jar")) | |
4857 | (sha256 | |
4858 | (base32 | |
4859 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) | |
4860 | (build-system ant-build-system) | |
4861 | (arguments | |
4862 | `(#:tests? #f ; no tests included | |
4863 | #:jar-name "eclipse-equinox-preferences.jar")) | |
4864 | (inputs | |
4865 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4866 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
4867 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4868 | (home-page "http://www.eclipse.org/equinox/") | |
4869 | (synopsis "Eclipse preferences mechanism") | |
4870 | (description "This package provides the Eclipse preferences mechanism with | |
4871 | the module @code{org.eclipse.equinox.preferences}.") | |
4872 | (license license:epl1.0))) | |
4873 | ||
4ad3d4f3 RW |
4874 | (define-public java-eclipse-core-contenttype |
4875 | (package | |
4876 | (name "java-eclipse-core-contenttype") | |
4877 | (version "3.5.100") | |
4878 | (source (origin | |
4879 | (method url-fetch) | |
4880 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4881 | "org/eclipse/platform/org.eclipse.core.contenttype/" | |
4882 | version "/org.eclipse.core.contenttype-" | |
4883 | version "-sources.jar")) | |
4884 | (sha256 | |
4885 | (base32 | |
4886 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) | |
4887 | (build-system ant-build-system) | |
4888 | (arguments | |
4889 | `(#:tests? #f ; no tests included | |
4890 | #:jar-name "eclipse-core-contenttype.jar")) | |
4891 | (inputs | |
4892 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4893 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
4894 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
4895 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4896 | (home-page "http://www.eclipse.org/") | |
4897 | (synopsis "Eclipse content mechanism") | |
4898 | (description "This package provides the Eclipse content mechanism in the | |
4899 | @code{org.eclipse.core.contenttype} module.") | |
4900 | (license license:epl1.0))) | |
4901 | ||
6a7f7e49 RW |
4902 | (define-public java-eclipse-core-runtime |
4903 | (package | |
4904 | (name "java-eclipse-core-runtime") | |
4905 | (version "3.12.0") | |
4906 | (source (origin | |
4907 | (method url-fetch) | |
4908 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4909 | "org/eclipse/platform/org.eclipse.core.runtime/" | |
4910 | version "/org.eclipse.core.runtime-" | |
4911 | version "-sources.jar")) | |
4912 | (sha256 | |
4913 | (base32 | |
4914 | "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya")))) | |
4915 | (build-system ant-build-system) | |
4916 | (arguments | |
4917 | `(#:tests? #f ; no tests included | |
4918 | #:jar-name "eclipse-core-runtime.jar")) | |
4919 | (inputs | |
4920 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
4921 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
4922 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
4923 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4924 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
4925 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
4926 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4927 | (home-page "https://www.eclipse.org/") | |
4928 | (synopsis "Eclipse core runtime") | |
4929 | (description "This package provides the Eclipse core runtime with the | |
4930 | module @code{org.eclipse.core.runtime}.") | |
4931 | (license license:epl1.0))) | |
4932 | ||
b3806a15 RW |
4933 | (define-public java-eclipse-core-filesystem |
4934 | (package | |
4935 | (name "java-eclipse-core-filesystem") | |
4936 | (version "1.6.1") | |
4937 | (source (origin | |
4938 | (method url-fetch) | |
4939 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4940 | "org/eclipse/platform/org.eclipse.core.filesystem/" | |
4941 | version "/org.eclipse.core.filesystem-" | |
4942 | version "-sources.jar")) | |
4943 | (sha256 | |
4944 | (base32 | |
4945 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) | |
4946 | (build-system ant-build-system) | |
4947 | (arguments | |
4948 | `(#:tests? #f ; no tests included | |
4949 | #:jar-name "eclipse-core-filesystem.jar")) | |
4950 | (inputs | |
4951 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4952 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
4953 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4954 | (home-page "https://www.eclipse.org/") | |
4955 | (synopsis "Eclipse core file system") | |
4956 | (description "This package provides the Eclipse core file system with the | |
4957 | module @code{org.eclipse.core.filesystem}.") | |
4958 | (license license:epl1.0))) | |
4959 | ||
e96060de RW |
4960 | (define-public java-eclipse-core-expressions |
4961 | (package | |
4962 | (name "java-eclipse-core-expressions") | |
4963 | (version "3.5.100") | |
4964 | (source (origin | |
4965 | (method url-fetch) | |
4966 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4967 | "org/eclipse/platform/org.eclipse.core.expressions/" | |
4968 | version "/org.eclipse.core.expressions-" | |
4969 | version "-sources.jar")) | |
4970 | (sha256 | |
4971 | (base32 | |
4972 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) | |
4973 | (build-system ant-build-system) | |
4974 | (arguments | |
4975 | `(#:tests? #f ; no tests included | |
4976 | #:jar-name "eclipse-core-expressions.jar")) | |
4977 | (inputs | |
4978 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
4979 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
4980 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
4981 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
4982 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
4983 | (home-page "https://www.eclipse.org/") | |
4984 | (synopsis "Eclipse core expression language") | |
4985 | (description "This package provides the Eclipse core expression language | |
4986 | with the @code{org.eclipse.core.expressions} module.") | |
4987 | (license license:epl1.0))) | |
4988 | ||
e8d0f7c8 RW |
4989 | (define-public java-eclipse-core-variables |
4990 | (package | |
4991 | (name "java-eclipse-core-variables") | |
4992 | (version "3.3.0") | |
4993 | (source (origin | |
4994 | (method url-fetch) | |
4995 | (uri (string-append "https://repo1.maven.org/maven2/" | |
4996 | "org/eclipse/platform/org.eclipse.core.variables/" | |
4997 | version "/org.eclipse.core.variables-" | |
4998 | version "-sources.jar")) | |
4999 | (sha256 | |
5000 | (base32 | |
5001 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) | |
5002 | (build-system ant-build-system) | |
5003 | (arguments | |
5004 | `(#:tests? #f ; no tests included | |
5005 | #:jar-name "eclipse-core-variables.jar")) | |
5006 | (inputs | |
5007 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5008 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5009 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5010 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5011 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5012 | (home-page "https://www.eclipse.org/platform") | |
5013 | (synopsis "Eclipse core variables") | |
5014 | (description "This package provides the Eclipse core variables module | |
5015 | @code{org.eclipse.core.variables}.") | |
5016 | (license license:epl1.0))) | |
5017 | ||
7c3d479e RW |
5018 | (define-public java-eclipse-ant-core |
5019 | (package | |
5020 | (name "java-eclipse-ant-core") | |
5021 | (version "3.4.100") | |
5022 | (source (origin | |
5023 | (method url-fetch) | |
5024 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5025 | "org/eclipse/platform/org.eclipse.ant.core/" | |
5026 | version "/org.eclipse.ant.core-" | |
5027 | version "-sources.jar")) | |
5028 | (sha256 | |
5029 | (base32 | |
5030 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) | |
5031 | (build-system ant-build-system) | |
5032 | (arguments | |
5033 | `(#:tests? #f ; no tests included | |
5034 | #:jar-name "eclipse-ant-core.jar")) | |
5035 | (inputs | |
5036 | `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5037 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5038 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5039 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5040 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5041 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5042 | ("java-eclipse-core-variables" ,java-eclipse-core-variables) | |
5043 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5044 | (home-page "https://www.eclipse.org/platform") | |
5045 | (synopsis "Ant build tool core libraries") | |
5046 | (description "This package provides the ant build tool core libraries with | |
5047 | the module @code{org.eclipse.ant.core}.") | |
5048 | (license license:epl1.0))) | |
5049 | ||
6636f638 RW |
5050 | (define-public java-eclipse-core-resources |
5051 | (package | |
5052 | (name "java-eclipse-core-resources") | |
5053 | (version "3.11.1") | |
5054 | (source (origin | |
5055 | (method url-fetch) | |
5056 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5057 | "org/eclipse/platform/org.eclipse.core.resources/" | |
5058 | version "/org.eclipse.core.resources-" | |
5059 | version "-sources.jar")) | |
5060 | (sha256 | |
5061 | (base32 | |
5062 | "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l")))) | |
5063 | (build-system ant-build-system) | |
5064 | (arguments | |
5065 | `(#:tests? #f ; no tests included | |
5066 | #:jar-name "eclipse-core-resources.jar")) | |
5067 | (inputs | |
5068 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5069 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5070 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5071 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5072 | ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) | |
5073 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5074 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5075 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5076 | ("java-eclipse-ant-core" ,java-eclipse-ant-core) | |
5077 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5078 | (home-page "https://www.eclipse.org/") | |
5079 | (synopsis "Eclipse core resource management") | |
5080 | (description "This package provides the Eclipse core resource management | |
5081 | module @code{org.eclipse.core.resources}.") | |
5082 | (license license:epl1.0))) | |
5083 | ||
afb5858d RW |
5084 | (define-public java-eclipse-compare-core |
5085 | (package | |
5086 | (name "java-eclipse-compare-core") | |
5087 | (version "3.6.0") | |
5088 | (source (origin | |
5089 | (method url-fetch) | |
5090 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5091 | "org/eclipse/platform/org.eclipse.compare.core/" | |
5092 | version "/org.eclipse.compare.core-" | |
5093 | version "-sources.jar")) | |
5094 | (sha256 | |
5095 | (base32 | |
5096 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) | |
5097 | (build-system ant-build-system) | |
5098 | (arguments | |
5099 | `(#:tests? #f ; no tests included | |
5100 | #:jar-name "eclipse-compare-core.jar")) | |
5101 | (inputs | |
5102 | `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5103 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5104 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5105 | ("java-icu4j" ,java-icu4j))) | |
5106 | (home-page "https://www.eclipse.org/") | |
5107 | (synopsis "Eclipse core compare support") | |
5108 | (description "This package provides the Eclipse core compare support | |
5109 | module @code{org.eclipse.compare.core}.") | |
5110 | (license license:epl1.0))) | |
5111 | ||
1bb191fc RW |
5112 | (define-public java-eclipse-team-core |
5113 | (package | |
5114 | (name "java-eclipse-team-core") | |
5115 | (version "3.8.0") | |
5116 | (source (origin | |
5117 | (method url-fetch) | |
5118 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5119 | "org/eclipse/platform/org.eclipse.team.core/" | |
5120 | version "/org.eclipse.team.core-" | |
5121 | version "-sources.jar")) | |
5122 | (sha256 | |
5123 | (base32 | |
5124 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) | |
5125 | (build-system ant-build-system) | |
5126 | (arguments | |
5127 | `(#:tests? #f ; no tests included | |
5128 | #:jar-name "eclipse-team-core.jar")) | |
5129 | (inputs | |
5130 | `(("java-eclipse-compare-core" ,java-eclipse-compare-core) | |
5131 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5132 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5133 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5134 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
5135 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5136 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5137 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5138 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5139 | ("java-eclipse-osgi" ,java-eclipse-osgi))) | |
5140 | (home-page "https://www.eclipse.org/platform") | |
5141 | (synopsis "Eclipse team support core") | |
5142 | (description "This package provides the Eclipse team support core module | |
5143 | @code{org.eclipse.team.core}.") | |
5144 | (license license:epl1.0))) | |
5145 | ||
31342529 RW |
5146 | (define-public java-eclipse-core-commands |
5147 | (package | |
5148 | (name "java-eclipse-core-commands") | |
5149 | (version "3.8.1") | |
5150 | (source (origin | |
5151 | (method url-fetch) | |
5152 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5153 | "org/eclipse/platform/org.eclipse.core.commands/" | |
5154 | version "/org.eclipse.core.commands-" | |
5155 | version "-sources.jar")) | |
5156 | (sha256 | |
5157 | (base32 | |
5158 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) | |
5159 | (build-system ant-build-system) | |
5160 | (arguments | |
5161 | `(#:tests? #f ; no tests included | |
5162 | #:jar-name "eclipse-core-commands.jar")) | |
5163 | (inputs | |
5164 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) | |
5165 | (home-page "https://www.eclipse.org/platform") | |
5166 | (synopsis "Eclipse core commands") | |
5167 | (description "This package provides Eclipse core commands in the module | |
5168 | @code{org.eclipse.core.commands}.") | |
5169 | (license license:epl1.0))) | |
5170 | ||
bf96acf7 RW |
5171 | (define-public java-eclipse-text |
5172 | (package | |
5173 | (name "java-eclipse-text") | |
5174 | (version "3.6.0") | |
5175 | (source (origin | |
5176 | (method url-fetch) | |
5177 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5178 | "org/eclipse/platform/org.eclipse.text/" | |
5179 | version "/org.eclipse.text-" | |
5180 | version "-sources.jar")) | |
5181 | (sha256 | |
5182 | (base32 | |
5183 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) | |
5184 | (build-system ant-build-system) | |
5185 | (arguments | |
5186 | `(#:tests? #f ; no tests included | |
5187 | #:jar-name "eclipse-text.jar" | |
5188 | #:phases | |
5189 | (modify-phases %standard-phases | |
5190 | ;; When creating a new category we must make sure that the new list | |
5191 | ;; matches List<Position>. By default it seems to be too generic | |
5192 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. | |
5193 | ;; Without this we get this error: | |
5194 | ;; | |
5195 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: | |
5196 | ;; error: method put in interface Map<K,V> cannot be applied to given types; | |
5197 | ;; [javac] fPositions.put(category, new ArrayList<>()); | |
5198 | ;; [javac] ^ | |
5199 | ;; [javac] required: String,List<Position> | |
5200 | ;; [javac] found: String,ArrayList<Object> | |
5201 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted | |
5202 | ;; to List<Position> by method invocation conversion | |
5203 | ;; [javac] where K,V are type-variables: | |
5204 | ;; [javac] K extends Object declared in interface Map | |
5205 | ;; [javac] V extends Object declared in interface Map | |
5206 | ;; | |
5207 | ;; I don't know if this is a good fix. I suspect it is not, but it | |
5208 | ;; seems to work. | |
5209 | (add-after 'unpack 'fix-compilation-error | |
5210 | (lambda _ | |
5211 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" | |
5212 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") | |
5213 | "Positions.put(category, new ArrayList<Position>());")) | |
5214 | #t))))) | |
5215 | (inputs | |
5216 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5217 | ("java-eclipse-core-commands" ,java-eclipse-core-commands) | |
5218 | ("java-icu4j" ,java-icu4j))) | |
5219 | (home-page "http://www.eclipse.org/platform") | |
5220 | (synopsis "Eclipse text library") | |
5221 | (description "Platform Text is part of the Platform UI project and | |
5222 | provides the basic building blocks for text and text editors within Eclipse | |
5223 | and contributes the Eclipse default text editor.") | |
5224 | (license license:epl1.0))) | |
5225 | ||
c24d11b7 RW |
5226 | (define-public java-eclipse-jdt-core |
5227 | (package | |
5228 | (name "java-eclipse-jdt-core") | |
5229 | (version "3.12.3") | |
5230 | (source (origin | |
5231 | (method url-fetch) | |
5232 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5233 | "org/eclipse/jdt/org.eclipse.jdt.core/" | |
5234 | version "/org.eclipse.jdt.core-" | |
5235 | version "-sources.jar")) | |
5236 | (sha256 | |
5237 | (base32 | |
5238 | "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j")))) | |
5239 | (build-system ant-build-system) | |
5240 | (arguments | |
5241 | `(#:tests? #f ; no tests included | |
5242 | #:jar-name "eclipse-jdt-core.jar")) | |
5243 | (inputs | |
5244 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) | |
5245 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) | |
5246 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) | |
5247 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) | |
5248 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) | |
5249 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) | |
5250 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) | |
5251 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) | |
5252 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) | |
5253 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
5254 | ("java-eclipse-text" ,java-eclipse-text))) | |
5255 | (home-page "https://www.eclipse.org/jdt") | |
5256 | (synopsis "Java development tools core libraries") | |
5257 | (description "This package provides the core libraries of the Eclipse Java | |
5258 | development tools.") | |
5259 | (license license:epl1.0))) | |
5260 | ||
a5cdcf6c RW |
5261 | (define-public java-javax-mail |
5262 | (package | |
5263 | (name "java-javax-mail") | |
5264 | (version "1.5.6") | |
5265 | (source (origin | |
5266 | (method url-fetch) | |
5267 | (uri (string-append "https://repo1.maven.org/maven2/" | |
5268 | "com/sun/mail/javax.mail/" | |
5269 | version "/javax.mail-" | |
5270 | version "-sources.jar")) | |
5271 | (sha256 | |
5272 | (base32 | |
5273 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) | |
5274 | (build-system ant-build-system) | |
5275 | (arguments | |
5276 | `(#:tests? #f ; no tests | |
5277 | #:jar-name "javax-mail.jar")) | |
5278 | (home-page "https://javamail.java.net") | |
5279 | (synopsis "Reference implementation of the JavaMail API") | |
5280 | (description | |
5281 | "This package provides versions of the JavaMail API implementation, IMAP, | |
5282 | SMTP, and POP3 service providers, some examples, and documentation for the | |
5283 | JavaMail API.") | |
5284 | ;; GPLv2 only with "classpath exception". | |
5285 | (license license:gpl2))) | |
5286 | ||
0e660c4d RW |
5287 | (define-public java-log4j-api |
5288 | (package | |
5289 | (name "java-log4j-api") | |
5290 | (version "2.4.1") | |
5291 | (source (origin | |
5292 | (method url-fetch) | |
5293 | (uri (string-append "mirror://apache/logging/log4j/" version | |
5294 | "/apache-log4j-" version "-src.tar.gz")) | |
5295 | (sha256 | |
5296 | (base32 | |
5297 | "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) | |
5298 | (build-system ant-build-system) | |
5299 | (arguments | |
5300 | `(#:tests? #f ; tests require unpackaged software | |
5301 | #:jar-name "log4j-api.jar" | |
5302 | #:make-flags | |
5303 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
5304 | "/share/java")) | |
5305 | #:phases | |
5306 | (modify-phases %standard-phases | |
5307 | (add-after 'unpack 'enter-dir | |
5308 | (lambda _ (chdir "log4j-api") #t)) | |
5309 | ;; FIXME: The tests require additional software that has not been | |
5310 | ;; packaged yet, such as | |
5311 | ;; * org.apache.maven | |
5312 | ;; * org.apache.felix | |
5313 | (add-after 'enter-dir 'delete-tests | |
5314 | (lambda _ (delete-file-recursively "src/test") #t))))) | |
5315 | (inputs | |
5316 | `(("java-osgi-core" ,java-osgi-core) | |
5317 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5318 | ("java-junit" ,java-junit))) | |
5319 | (home-page "http://logging.apache.org/log4j/2.x/") | |
5320 | (synopsis "API module of the Log4j logging framework for Java") | |
5321 | (description | |
5322 | "This package provides the API module of the Log4j logging framework for | |
5323 | Java.") | |
5324 | (license license:asl2.0))) | |
5325 | ||
dfef4231 JL |
5326 | (define-public java-log4j-core |
5327 | (package | |
5328 | (inherit java-log4j-api) | |
5329 | (name "java-log4j-core") | |
5330 | (inputs | |
5331 | `(("java-osgi-core" ,java-osgi-core) | |
5332 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5333 | ("java-log4j-api" ,java-log4j-api) | |
5334 | ("java-mail" ,java-mail) | |
5335 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) | |
5336 | ("java-lmax-disruptor" ,java-lmax-disruptor) | |
5337 | ("java-kafka" ,java-kafka-clients) | |
5338 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
5339 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
5340 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
5341 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
5342 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) | |
5343 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) | |
5344 | ("java-commons-compress" ,java-commons-compress) | |
5345 | ("java-commons-csv" ,java-commons-csv) | |
5346 | ("java-jeromq" ,java-jeromq) | |
5347 | ("java-junit" ,java-junit))) | |
5348 | (native-inputs | |
5349 | `(("hamcrest" ,java-hamcrest-all) | |
5350 | ("java-commons-io" ,java-commons-io) | |
5351 | ("java-commons-lang3" ,java-commons-lang3) | |
5352 | ("slf4j" ,java-slf4j-api))) | |
5353 | (arguments | |
5354 | `(#:tests? #f ; tests require more dependencies | |
5355 | #:test-dir "src/test" | |
5356 | #:source-dir "src/main/java" | |
5357 | #:jar-name "log4j-core.jar" | |
5358 | #:jdk ,icedtea-8 | |
5359 | #:make-flags | |
5360 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") | |
5361 | "/share/java")) | |
5362 | #:phases | |
5363 | (modify-phases %standard-phases | |
5364 | (add-after 'unpack 'enter-dir | |
5365 | (lambda _ (chdir "log4j-core") #t))))) | |
5366 | (synopsis "Core component of the Log4j framework") | |
5367 | (description "This package provides the core component of the Log4j | |
5368 | logging framework for Java."))) | |
5369 | ||
2caf873e JL |
5370 | (define-public java-log4j-1.2-api |
5371 | (package | |
5372 | (inherit java-log4j-api) | |
5373 | (name "java-log4j-1.2-api") | |
5374 | (arguments | |
5375 | `(#:jar-name "java-log4j-1.2-api.jar" | |
5376 | #:source-dir "log4j-1.2-api/src/main/java" | |
5377 | #:jdk ,icedtea-8 | |
5378 | ;; Tests require maven-model (and other maven subprojects), which is a | |
5379 | ;; cyclic dependency. | |
5380 | #:tests? #f)) | |
5381 | (inputs | |
5382 | `(("log4j-api" ,java-log4j-api) | |
5383 | ("log4j-core" ,java-log4j-core) | |
5384 | ("osgi-core" ,java-osgi-core) | |
5385 | ("eclipse-osgi" ,java-eclipse-osgi) | |
5386 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) | |
5387 | ||
1c188f4e HG |
5388 | (define-public java-commons-cli |
5389 | (package | |
5390 | (name "java-commons-cli") | |
5391 | (version "1.3.1") | |
5392 | (source (origin | |
5393 | (method url-fetch) | |
5394 | (uri (string-append "mirror://apache/commons/cli/source/" | |
5395 | "commons-cli-" version "-src.tar.gz")) | |
5396 | (sha256 | |
5397 | (base32 | |
5398 | "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl")))) | |
5399 | (build-system ant-build-system) | |
5400 | ;; TODO: javadoc | |
5401 | (arguments | |
5402 | `(#:jar-name "commons-cli.jar")) | |
5403 | (native-inputs | |
5404 | `(("java-junit" ,java-junit) | |
5405 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5406 | (home-page "http://commons.apache.org/cli/") | |
5407 | (synopsis "Command line arguments and options parsing library") | |
5408 | (description "The Apache Commons CLI library provides an API for parsing | |
5409 | command line options passed to programs. It is also able to print help | |
5410 | messages detailing the options available for a command line tool. | |
5411 | ||
5412 | Commons CLI supports different types of options: | |
5413 | ||
5414 | @itemize | |
5415 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) | |
5416 | @item GNU like long options (ie. du --human-readable --max-depth=1) | |
5417 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) | |
5418 | @item Short options with value attached (ie. gcc -O2 foo.c) | |
5419 | @item long options with single hyphen (ie. ant -projecthelp) | |
5420 | @end itemize | |
5421 | ||
5422 | This is a part of the Apache Commons Project.") | |
5423 | (license license:asl2.0))) | |
0a8519bc HG |
5424 | |
5425 | (define-public java-commons-codec | |
5426 | (package | |
5427 | (name "java-commons-codec") | |
5428 | (version "1.10") | |
5429 | (source (origin | |
5430 | (method url-fetch) | |
5431 | (uri (string-append "mirror://apache/commons/codec/source/" | |
5432 | "commons-codec-" version "-src.tar.gz")) | |
5433 | (sha256 | |
5434 | (base32 | |
5435 | "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65")))) | |
5436 | (build-system ant-build-system) | |
5437 | (outputs '("out" "doc")) | |
5438 | (arguments | |
5439 | `(#:test-target "test" | |
5440 | #:make-flags | |
5441 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) | |
5442 | (junit (assoc-ref %build-inputs "java-junit"))) | |
5443 | (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") | |
5444 | (string-append "-Dhamcrest.jar=" hamcrest | |
5445 | "/share/java/hamcrest-core.jar") | |
5446 | ;; Do not append version to jar. | |
5447 | "-Dfinal.name=commons-codec")) | |
5448 | #:phases | |
5449 | (modify-phases %standard-phases | |
5450 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
5451 | (replace 'install (install-jars "dist")) | |
5452 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
5453 | (native-inputs | |
5454 | `(("java-junit" ,java-junit) | |
5455 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5456 | (home-page "http://commons.apache.org/codec/") | |
5457 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") | |
5458 | (description "The codec package contains simple encoder and decoders for | |
5459 | various formats such as Base64 and Hexadecimal. In addition to these widely | |
5460 | used encoders and decoders, the codec package also maintains a collection of | |
5461 | phonetic encoding utilities. | |
5462 | ||
5463 | This is a part of the Apache Commons Project.") | |
5464 | (license license:asl2.0))) | |
7d91c1b9 HG |
5465 | |
5466 | (define-public java-commons-daemon | |
5467 | (package | |
5468 | (name "java-commons-daemon") | |
5469 | (version "1.0.15") | |
5470 | (source (origin | |
5471 | (method url-fetch) | |
5472 | (uri (string-append "mirror://apache/commons/daemon/source/" | |
5473 | "commons-daemon-" version "-src.tar.gz")) | |
5474 | (sha256 | |
5475 | (base32 | |
5476 | "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi")))) | |
5477 | (build-system ant-build-system) | |
5478 | (arguments | |
5479 | `(#:test-target "test" | |
5480 | #:phases | |
5481 | (modify-phases %standard-phases | |
5482 | (add-after 'build 'build-javadoc ant-build-javadoc) | |
5483 | (replace 'install (install-jars "dist")) | |
5484 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) | |
5485 | (native-inputs | |
5486 | `(("java-junit" ,java-junit))) | |
5487 | (home-page "http://commons.apache.org/daemon/") | |
5488 | (synopsis "Library to launch Java applications as daemons") | |
5489 | (description "The Daemon package from Apache Commons can be used to | |
5490 | implement Java applications which can be launched as daemons. For example the | |
5491 | program will be notified about a shutdown so that it can perform cleanup tasks | |
5492 | before its process of execution is destroyed by the operation system. | |
5493 | ||
5494 | This package contains the Java library. You will also need the actual binary | |
5495 | for your architecture which is provided by the jsvc package. | |
5496 | ||
5497 | This is a part of the Apache Commons Project.") | |
5498 | (license license:asl2.0))) | |
9f68e74a | 5499 | |
eb270ecf RW |
5500 | (define-public java-javaewah |
5501 | (package | |
5502 | (name "java-javaewah") | |
5503 | (version "1.1.6") | |
5504 | (source (origin | |
5505 | (method url-fetch) | |
5506 | (uri (string-append "https://github.com/lemire/javaewah/" | |
5507 | "archive/JavaEWAH-" version ".tar.gz")) | |
5508 | (sha256 | |
5509 | (base32 | |
5510 | "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b")))) | |
5511 | (build-system ant-build-system) | |
5512 | (arguments `(#:jar-name "javaewah.jar")) | |
5513 | (inputs | |
5514 | `(("java-junit" ,java-junit) | |
5515 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5516 | (home-page "https://github.com/lemire/javaewah") | |
5517 | (synopsis "Compressed alternative to the Java @code{BitSet} class") | |
5518 | (description "This is a word-aligned compressed variant of the Java | |
5519 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like | |
5520 | compression scheme. It can be used to implement bitmap indexes. | |
5521 | ||
5522 | The goal of word-aligned compression is not to achieve the best compression, | |
5523 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU | |
5524 | cycles, maybe at the expense of storage. However, the EWAH scheme is always | |
5525 | more efficient storage-wise than an uncompressed bitmap (as implemented in the | |
5526 | @code{BitSet} class by Sun).") | |
5527 | ;; GPL2.0 derivates are explicitly allowed. | |
5528 | (license license:asl2.0))) | |
5529 | ||
f8e4d022 RW |
5530 | (define-public java-slf4j-api |
5531 | (package | |
5532 | (name "java-slf4j-api") | |
5533 | (version "1.7.25") | |
5534 | (source (origin | |
5535 | (method url-fetch) | |
5536 | (uri (string-append "https://www.slf4j.org/dist/slf4j-" | |
5537 | version ".tar.gz")) | |
5538 | (sha256 | |
5539 | (base32 | |
5540 | "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb")) | |
5541 | (modules '((guix build utils))) | |
5542 | ;; Delete bundled jars. | |
5543 | (snippet | |
5544 | '(begin | |
5545 | (for-each delete-file (find-files "." "\\.jar$")) | |
5546 | #t)))) | |
5547 | (build-system ant-build-system) | |
5548 | (arguments | |
dcf7a8a6 | 5549 | `(#:jar-name "slf4j-api.jar" |
f8e4d022 | 5550 | #:source-dir "slf4j-api/src/main" |
dcf7a8a6 JL |
5551 | #:test-dir "slf4j-api/src/test" |
5552 | #:phases | |
5553 | (modify-phases %standard-phases | |
5554 | (add-after 'build 'regenerate-jar | |
5555 | (lambda _ | |
5556 | ;; pom.xml ignores these files in the jar creation process. If we don't, | |
5557 | ;; we get the error "This code should have never made it into slf4j-api.jar" | |
5558 | (delete-file-recursively "build/classes/org/slf4j/impl") | |
5559 | (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C" | |
5560 | "build/classes" ".")))) | |
5561 | (add-before 'check 'dont-test-abstract-classes | |
5562 | (lambda _ | |
5563 | ;; abstract classes are not meant to be run with junit | |
5564 | (substitute* "build.xml" | |
5565 | (("<include name=\"\\*\\*/\\*Test.java\" />") | |
5566 | (string-append "<include name=\"**/*Test.java\" />" | |
5567 | "<exclude name=\"**/MultithreadedInitializationTest" | |
5568 | ".java\" />")))))))) | |
f8e4d022 RW |
5569 | (inputs |
5570 | `(("java-junit" ,java-junit) | |
5571 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
5572 | (home-page "https://www.slf4j.org/") | |
5573 | (synopsis "Simple logging facade for Java") | |
5574 | (description "The Simple Logging Facade for Java (SLF4J) serves as a | |
5575 | simple facade or abstraction for various logging | |
5576 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) | |
5577 | allowing the end user to plug in the desired logging framework at deployment | |
5578 | time.") | |
5579 | (license license:expat))) | |
5580 | ||
88f256a1 TD |
5581 | (define-public java-slf4j-simple |
5582 | (package | |
5583 | (name "java-slf4j-simple") | |
5584 | (version "1.7.25") | |
5585 | (source (package-source java-slf4j-api)) | |
5586 | (build-system ant-build-system) | |
5587 | (arguments | |
5588 | `(#:jar-name "slf4j-simple.jar" | |
5589 | #:source-dir "slf4j-simple/src/main" | |
5590 | #:test-dir "slf4j-simple/src/test" | |
5591 | #:phases | |
5592 | (modify-phases %standard-phases | |
5593 | ;; The tests need some test classes from slf4j-api | |
5594 | (add-before 'check 'build-slf4j-api-test-helpers | |
5595 | (lambda _ | |
5596 | ;; Add current dir to CLASSPATH ... | |
5597 | (setenv "CLASSPATH" | |
5598 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) | |
5599 | ;; ... and build test helper classes here: | |
5600 | (zero? | |
5601 | (apply system* | |
5602 | `("javac" "-d" "." | |
5603 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))) | |
5604 | (inputs | |
5605 | `(("java-junit" ,java-junit) | |
5606 | ("java-hamcrest-core" ,java-hamcrest-core) | |
5607 | ("java-slf4j-api" ,java-slf4j-api))) | |
5608 | (home-page "https://www.slf4j.org/") | |
5609 | (synopsis "Simple implementation of simple logging facade for Java") | |
5610 | (description "SLF4J binding for the Simple implementation, which outputs | |
5611 | all events to System.err. Only messages of level INFO and higher are | |
5612 | printed.") | |
5613 | (license license:expat))) | |
5614 | ||
9f68e74a JL |
5615 | (define-public antlr2 |
5616 | (package | |
5617 | (name "antlr2") | |
5618 | (version "2.7.7") | |
5619 | (source (origin | |
5620 | (method url-fetch) | |
5621 | (uri (string-append "http://www.antlr2.org/download/antlr-" | |
5622 | version ".tar.gz")) | |
5623 | (sha256 | |
5624 | (base32 | |
5625 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) | |
5626 | (modules '((guix build utils))) | |
5627 | (snippet | |
5628 | '(begin | |
5629 | (delete-file "antlr.jar") | |
5630 | (substitute* "lib/cpp/antlr/CharScanner.hpp" | |
5631 | (("#include <map>") | |
5632 | (string-append | |
6d225e89 RW |
5633 | "#include <map>\n" |
5634 | "#define EOF (-1)\n" | |
5635 | "#include <strings.h>"))) | |
9f68e74a | 5636 | (substitute* "configure" |
6d225e89 RW |
5637 | (("/bin/sh") "sh")) |
5638 | #t)))) | |
9f68e74a JL |
5639 | (build-system gnu-build-system) |
5640 | (arguments | |
6d225e89 | 5641 | `(#:tests? #f ; no test target |
3ad90395 RW |
5642 | #:imported-modules ((guix build ant-build-system) |
5643 | (guix build syscalls) | |
5644 | ,@%gnu-build-system-modules) | |
5645 | #:modules (((guix build ant-build-system) #:prefix ant:) | |
5646 | (guix build gnu-build-system) | |
5647 | (guix build utils)) | |
9f68e74a JL |
5648 | #:phases |
5649 | (modify-phases %standard-phases | |
5650 | (add-after 'install 'strip-jar-timestamps | |
3ad90395 | 5651 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
9f68e74a JL |
5652 | (add-after 'configure 'fix-bin-ls |
5653 | (lambda _ | |
3ad90395 RW |
5654 | (substitute* (find-files "." "Makefile") |
5655 | (("/bin/ls") "ls")) | |
5656 | #t))))) | |
9f68e74a JL |
5657 | (native-inputs |
5658 | `(("which" ,which) | |
5659 | ("zip" ,zip) | |
5660 | ("java" ,icedtea "jdk"))) | |
5661 | (inputs | |
5662 | `(("java" ,icedtea))) | |
5663 | (home-page "http://www.antlr2.org") | |
5664 | (synopsis "Framework for constructing recognizers, compilers, and translators") | |
5665 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
5666 | is a language tool that provides a framework for constructing recognizers, | |
5667 | compilers, and translators from grammatical descriptions containing Java, C#, | |
5668 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
5669 | tree walking, and translation.") | |
5670 | (license license:public-domain))) | |
a0f15eff | 5671 | |
e44112e1 | 5672 | (define-public java-stringtemplate-3 |
a0f15eff | 5673 | (package |
e44112e1 | 5674 | (name "java-stringtemplate") |
a0f15eff JL |
5675 | (version "3.2.1") |
5676 | (source (origin | |
5677 | (method url-fetch) | |
5678 | (uri (string-append "https://github.com/antlr/website-st4/raw/" | |
5679 | "gh-pages/download/stringtemplate-" | |
5680 | version ".tar.gz")) | |
5681 | (sha256 | |
5682 | (base32 | |
5683 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) | |
5684 | (build-system ant-build-system) | |
5685 | (arguments | |
129d926d | 5686 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
2fcda6d2 | 5687 | #:test-dir "test" |
b101b4e8 RW |
5688 | #:modules ((guix build ant-build-system) |
5689 | (guix build utils) | |
5690 | (srfi srfi-1)) | |
a0f15eff JL |
5691 | #:phases |
5692 | (modify-phases %standard-phases | |
2fcda6d2 RW |
5693 | (add-before 'check 'fix-tests |
5694 | (lambda _ | |
5695 | (substitute* "build.xml" | |
5696 | (("\\$\\{test.home\\}/java") | |
5697 | "${test.home}/org")) | |
5698 | #t)) | |
a0f15eff JL |
5699 | (add-before 'build 'generate-grammar |
5700 | (lambda _ | |
b101b4e8 RW |
5701 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
5702 | (every (lambda (file) | |
5703 | (format #t "~a\n" file) | |
5704 | (zero? (system* "antlr" file))) | |
5705 | '("template.g" "angle.bracket.template.g" "action.g" | |
5706 | "eval.g" "group.g" "interface.g")))))))) | |
a0f15eff | 5707 | (native-inputs |
2fcda6d2 RW |
5708 | `(("antlr" ,antlr2) |
5709 | ("java-junit" ,java-junit))) | |
a0f15eff JL |
5710 | (home-page "http://www.stringtemplate.org") |
5711 | (synopsis "Template engine to generate formatted text output") | |
5712 | (description "StringTemplate is a java template engine (with ports for C#, | |
5713 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, | |
5714 | or any other formatted text output. StringTemplate is particularly good at | |
5715 | code generators, multiple site skins, and internationalization / localization. | |
5716 | StringTemplate also powers ANTLR.") | |
5717 | (license license:bsd-3))) | |
4ad8aed7 JL |
5718 | |
5719 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on | |
5720 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar | |
5721 | ;; files and uses antlr3 at runtime. The latest version requires a recent version | |
5722 | ;; of antlr3 at runtime. | |
5723 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. | |
5724 | ;; This version of ST4 is sufficient for the latest antlr3. | |
5725 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build | |
5726 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked | |
5727 | ;; against the latest ST4. | |
5728 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an | |
5729 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses | |
5730 | ;; only grammar files with the antlr2 syntax. | |
5731 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. | |
5732 | ||
64b7efc0 | 5733 | (define-public java-stringtemplate |
407df789 | 5734 | (package (inherit java-stringtemplate-3) |
64b7efc0 | 5735 | (name "java-stringtemplate") |
4ad8aed7 JL |
5736 | (version "4.0.8") |
5737 | (source (origin | |
5738 | (method url-fetch) | |
5739 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" | |
5740 | version ".tar.gz")) | |
5741 | (file-name (string-append name "-" version ".tar.gz")) | |
5742 | (sha256 | |
5743 | (base32 | |
5744 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) | |
5745 | (build-system ant-build-system) | |
5746 | (arguments | |
6db77c7c RW |
5747 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
5748 | #:tests? #f ; FIXME: tests fail for unknown reasons | |
5749 | #:test-dir "test" | |
f4aa4cfe RW |
5750 | #:modules ((guix build ant-build-system) |
5751 | (guix build utils) | |
5752 | (srfi srfi-1)) | |
4ad8aed7 JL |
5753 | #:phases |
5754 | (modify-phases %standard-phases | |
6db77c7c RW |
5755 | (add-before 'check 'fix-test-target |
5756 | (lambda _ | |
5757 | (substitute* "build.xml" | |
5758 | (("\\$\\{test.home\\}/java") "${test.home}/") | |
5759 | (("\\*Test.java") "Test*.java")) | |
5760 | #t)) | |
4ad8aed7 | 5761 | (add-before 'build 'generate-grammar |
f4aa4cfe RW |
5762 | (lambda _ |
5763 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" | |
5764 | (every (lambda (file) | |
5765 | (format #t "~a\n" file) | |
5766 | (zero? (system* "antlr3" file))) | |
5767 | '("STParser.g" "Group.g" "CodeGenerator.g")))))))) | |
4ad8aed7 JL |
5768 | (inputs |
5769 | `(("antlr3" ,antlr3-bootstrap) | |
5770 | ("antlr2" ,antlr2) | |
6db77c7c RW |
5771 | ("java-stringtemplate" ,java-stringtemplate-3) |
5772 | ("java-junit" ,java-junit))))) | |
4ad8aed7 | 5773 | |
1345eeb0 | 5774 | (define java-stringtemplate-4.0.6 |
64b7efc0 | 5775 | (package (inherit java-stringtemplate) |
1345eeb0 | 5776 | (name "java-stringtemplate") |
4ad8aed7 JL |
5777 | (version "4.0.6") |
5778 | (source (origin | |
5779 | (method url-fetch) | |
5780 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" | |
5781 | version ".tar.gz")) | |
5782 | (file-name (string-append name "-" version ".tar.gz")) | |
5783 | (sha256 | |
5784 | (base32 | |
5785 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) | |
5786 | (inputs | |
5787 | `(("antlr3" ,antlr3-3.3) | |
5788 | ("antlr2" ,antlr2) | |
e44112e1 | 5789 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
4ad8aed7 JL |
5790 | |
5791 | (define-public antlr3 | |
5792 | (package | |
5793 | (name "antlr3") | |
5794 | (version "3.5.2") | |
5795 | (source (origin | |
5796 | (method url-fetch) | |
5797 | (uri (string-append "https://github.com/antlr/antlr3/archive/" | |
5798 | version ".tar.gz")) | |
5799 | (file-name (string-append name "-" version ".tar.gz")) | |
5800 | (sha256 | |
5801 | (base32 | |
fd75eb6c | 5802 | "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6")))) |
4ad8aed7 JL |
5803 | (build-system ant-build-system) |
5804 | (arguments | |
5805 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
5806 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" | |
5807 | #:tests? #f | |
5808 | #:phases | |
5809 | (modify-phases %standard-phases | |
5810 | (add-after 'install 'bin-install | |
5811 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
5812 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
5813 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
5814 | (mkdir-p bin) | |
5815 | (with-output-to-file (string-append bin "/antlr3") | |
5816 | (lambda _ | |
5817 | (display | |
5818 | (string-append "#!" (which "sh") "\n" | |
5819 | "java -cp " jar "/" ,name "-" ,version ".jar:" | |
5820 | (string-concatenate | |
5821 | (find-files (assoc-ref inputs "stringtemplate") | |
5822 | ".*\\.jar")) | |
5823 | ":" | |
5824 | (string-concatenate | |
5825 | (find-files (assoc-ref inputs "stringtemplate4") | |
5826 | ".*\\.jar")) | |
5827 | ":" | |
5828 | (string-concatenate | |
5829 | (find-files (string-append | |
5830 | (assoc-ref inputs "antlr") | |
5831 | "/lib") | |
5832 | ".*\\.jar")) | |
5833 | " org.antlr.Tool $*")))) | |
5834 | (chmod (string-append bin "/antlr3") #o755)))) | |
5835 | (add-before 'build 'generate-grammar | |
5836 | (lambda _ | |
5837 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") | |
5838 | (for-each (lambda (file) | |
5839 | (display file) | |
5840 | (newline) | |
5841 | (system* "antlr3" file)) | |
5842 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" | |
5843 | "AssignTokenTypesWalker.g" | |
5844 | "ActionTranslator.g" "TreeToNFAConverter.g" | |
5845 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" | |
5846 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) | |
5847 | (substitute* "ANTLRParser.java" | |
5848 | (("public Object getTree") "public GrammarAST getTree")) | |
5849 | (substitute* "ANTLRv3Parser.java" | |
5850 | (("public Object getTree") "public CommonTree getTree")) | |
5851 | (chdir "../../../../../java") | |
5852 | (system* "antlr" "-o" "org/antlr/tool" | |
5853 | "org/antlr/tool/serialize.g") | |
5854 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" | |
5855 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; | |
5856 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) | |
5857 | (substitute* "org/antlr/tool/ErrorManager.java" | |
5858 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) | |
5859 | (chdir "../../../.."))) | |
5860 | (add-before 'build 'fix-build-xml | |
5861 | (lambda _ | |
5862 | (substitute* "build.xml" | |
5863 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
5864 | <fileset dir=\"tool/src/main/resources\"> | |
5865 | <include name=\"**/*.stg\"/> | |
5866 | <include name=\"**/*.st\"/> | |
5867 | <include name=\"**/*.sti\"/> | |
5868 | <include name=\"**/STLexer.tokens\"/> | |
5869 | </fileset> | |
5870 | </copy><exec"))))))) | |
5871 | (native-inputs | |
5872 | `(("antlr" ,antlr2) | |
5873 | ("antlr3" ,antlr3-bootstrap))) | |
5874 | (inputs | |
5875 | `(("junit" ,java-junit) | |
e44112e1 | 5876 | ("stringtemplate" ,java-stringtemplate-3) |
64b7efc0 | 5877 | ("stringtemplate4" ,java-stringtemplate))) |
4ad8aed7 | 5878 | (propagated-inputs |
e44112e1 | 5879 | `(("stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 | 5880 | ("antlr" ,antlr2) |
1345eeb0 | 5881 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
4ad8aed7 JL |
5882 | (home-page "http://www.antlr3.org") |
5883 | (synopsis "Framework for constructing recognizers, compilers, and translators") | |
5884 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) | |
5885 | is a language tool that provides a framework for constructing recognizers, | |
5886 | compilers, and translators from grammatical descriptions containing Java, C#, | |
5887 | C++, or Python actions. ANTLR provides excellent support for tree construction, | |
5888 | tree walking, and translation.") | |
5889 | (license license:bsd-3))) | |
5890 | ||
5891 | (define antlr3-bootstrap | |
5892 | (package | |
5893 | (inherit antlr3) | |
5894 | (name "antlr3-bootstrap") | |
5895 | (native-inputs | |
5896 | `(("antlr" ,antlr2) | |
5897 | ("antlr3" ,antlr3-3.3))) | |
5898 | (inputs | |
5899 | `(("junit" ,java-junit))))) | |
5900 | ||
5901 | (define antlr3-3.3 | |
5902 | (package | |
5903 | (inherit antlr3) | |
5904 | (name "antlr3") | |
5905 | (version "3.3") | |
5906 | (source (origin | |
5907 | (method url-fetch) | |
5908 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
5909 | "gh-pages/download/antlr-" | |
5910 | version ".tar.gz")) | |
5911 | (sha256 | |
5912 | (base32 | |
48c86220 GB |
5913 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
5914 | (patches | |
5915 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) | |
4ad8aed7 JL |
5916 | (arguments |
5917 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
a9540107 RW |
5918 | #:source-dir (string-join '("tool/src/main/java" |
5919 | "runtime/Java/src/main/java" | |
5920 | "tool/src/main/antlr2" | |
5921 | "tool/src/main/antlr3") | |
5922 | ":") | |
5923 | #:tests? #f ; FIXME: tests seem to require maven plugin | |
5924 | #:modules ((guix build ant-build-system) | |
5925 | (guix build utils) | |
5926 | (srfi srfi-1)) | |
4ad8aed7 JL |
5927 | #:phases |
5928 | (modify-phases %standard-phases | |
5929 | (add-after 'install 'bin-install | |
5930 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
a9540107 RW |
5931 | (let* ((out (assoc-ref outputs "out")) |
5932 | (jar (string-append out "/share/java")) | |
5933 | (bin (string-append out "/bin"))) | |
4ad8aed7 JL |
5934 | (mkdir-p bin) |
5935 | (with-output-to-file (string-append bin "/antlr3") | |
5936 | (lambda _ | |
5937 | (display | |
a9540107 RW |
5938 | (string-append |
5939 | "#!" (which "sh") "\n" | |
5940 | "java -cp " jar "/antlr3-3.3.jar:" | |
5941 | (string-join | |
5942 | (append (find-files (assoc-ref inputs "java-stringtemplate") | |
5943 | ".*\\.jar$") | |
5944 | (find-files (string-append (assoc-ref inputs "antlr") | |
5945 | "/lib") | |
5946 | ".*\\.jar$")) | |
5947 | ":") | |
5948 | " org.antlr.Tool $*")))) | |
5949 | (chmod (string-append bin "/antlr3") #o755) | |
5950 | #t))) | |
4ad8aed7 JL |
5951 | (add-before 'build 'generate-grammar |
5952 | (lambda _ | |
4ad8aed7 JL |
5953 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
5954 | (("import org.antlr.grammar.v2.\\*;") | |
5955 | "import org.antlr.grammar.v2.*;\n | |
5956 | import org.antlr.grammar.v2.TreeToNFAConverter;\n | |
5957 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n | |
a9540107 RW |
5958 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
5959 | (and | |
5960 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" | |
5961 | (every (lambda (file) | |
5962 | (format #t "~a\n" file) | |
5963 | (zero? (system* "antlr" file))) | |
5964 | '("antlr.g" "antlr.print.g" "assign.types.g" | |
5965 | "buildnfa.g" "codegen.g" "define.g"))) | |
5966 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" | |
5967 | (every (lambda (file) | |
5968 | (format #t "~a\n" file) | |
5969 | (zero? (system* "antlr3" file))) | |
5970 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" | |
5971 | "ANTLRv3Tree.g")))))) | |
4ad8aed7 JL |
5972 | (add-before 'build 'fix-build-xml |
5973 | (lambda _ | |
5974 | (substitute* "build.xml" | |
5975 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
5976 | <fileset dir=\"tool/src/main/resources\"> | |
5977 | <include name=\"**/*.stg\"/> | |
5978 | <include name=\"**/*.st\"/> | |
5979 | <include name=\"**/*.sti\"/> | |
5980 | <include name=\"**/STLexer.tokens\"/> | |
5981 | </fileset> | |
a9540107 RW |
5982 | </copy><exec")) |
5983 | #t))))) | |
4ad8aed7 JL |
5984 | (native-inputs |
5985 | `(("antlr" ,antlr2) | |
5986 | ("antlr3" ,antlr3-3.1))) | |
5987 | (inputs | |
5988 | `(("junit" ,java-junit))) | |
5989 | (propagated-inputs | |
e44112e1 | 5990 | `(("java-stringtemplate" ,java-stringtemplate-3) |
4ad8aed7 JL |
5991 | ("antlr" ,antlr2) |
5992 | ("antlr3" ,antlr3-3.1))))) | |
5993 | ||
5994 | (define antlr3-3.1 | |
5995 | (package | |
5996 | (inherit antlr3) | |
4ad8aed7 JL |
5997 | (version "3.1") |
5998 | (source (origin | |
5999 | (method url-fetch) | |
6000 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" | |
6001 | "gh-pages/download/antlr-" | |
6002 | version ".tar.gz")) | |
6003 | (sha256 | |
6004 | (base32 | |
4c763b4d GB |
6005 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
6006 | (patches | |
6007 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) | |
4ad8aed7 | 6008 | (arguments |
ec32bc98 | 6009 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
4ad8aed7 JL |
6010 | #:source-dir "src:runtime/Java/src" |
6011 | #:tests? #f | |
6012 | #:phases | |
6013 | (modify-phases %standard-phases | |
6014 | (add-after 'install 'bin-install | |
6015 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
6016 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) | |
6017 | (bin (string-append (assoc-ref outputs "out") "/bin"))) | |
6018 | (mkdir-p bin) | |
6019 | (with-output-to-file (string-append bin "/antlr3") | |
6020 | (lambda _ | |
6021 | (display | |
6022 | (string-append "#!" (which "sh") "\n" | |
6023 | "java -cp " jar "/antlr3-3.1-3.1.jar:" | |
6024 | (string-concatenate | |
6025 | (find-files (assoc-ref inputs "stringtemplate") | |
6026 | ".*\\.jar")) | |
6027 | ":" | |
6028 | (string-concatenate | |
6029 | (find-files (string-append | |
6030 | (assoc-ref inputs "antlr") | |
6031 | "/lib") | |
6032 | ".*\\.jar")) | |
6033 | " org.antlr.Tool $*")))) | |
6034 | (chmod (string-append bin "/antlr3") #o755)))) | |
6035 | (add-before 'build 'generate-grammar | |
6036 | (lambda _ | |
6037 | (let ((dir "src/org/antlr/tool/")) | |
6038 | (for-each (lambda (file) | |
6039 | (display file) | |
6040 | (newline) | |
13f38d31 | 6041 | (invoke "antlr" "-o" dir (string-append dir file))) |
4ad8aed7 JL |
6042 | '("antlr.g" "antlr.print.g" "assign.types.g" |
6043 | "buildnfa.g" "define.g"))) | |
6044 | (format #t "codegen.g\n") | |
13f38d31 RW |
6045 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
6046 | "src/org/antlr/codegen/codegen.g") | |
6047 | #t)) | |
4ad8aed7 JL |
6048 | (add-before 'build 'fix-build-xml |
6049 | (lambda _ | |
6050 | (substitute* "build.xml" | |
6051 | (("<exec") "<copy todir=\"${classes.dir}\"> | |
6052 | <fileset dir=\"src\"> | |
6053 | <include name=\"**/*.stg\"/> | |
6054 | <include name=\"**/*.st\"/> | |
6055 | <include name=\"**/*.sti\"/> | |
6056 | <include name=\"**/STLexer.tokens\"/> | |
6057 | </fileset> | |
6058 | </copy><exec"))))))) | |
6059 | (native-inputs | |
6060 | `(("antlr" ,antlr2))) | |
6061 | (inputs | |
6062 | `(("junit" ,java-junit))) | |
6063 | (propagated-inputs | |
e44112e1 | 6064 | `(("stringtemplate" ,java-stringtemplate-3))))) |
d44bcd7a | 6065 | |
742242a5 GB |
6066 | (define-public java-commons-cli-1.2 |
6067 | ;; This is a bootstrap dependency for Maven2. | |
6068 | (package | |
6069 | (inherit java-commons-cli) | |
6070 | (version "1.2") | |
6071 | (source (origin | |
6072 | (method url-fetch) | |
6073 | (uri (string-append "mirror://apache/commons/cli/source/" | |
6074 | "commons-cli-" version "-src.tar.gz")) | |
6075 | (sha256 | |
6076 | (base32 | |
6077 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) | |
6078 | (arguments | |
6079 | `(#:jar-name "commons-cli.jar" | |
6080 | #:phases | |
6081 | (modify-phases %standard-phases | |
6082 | (add-before 'check 'fix-build-xml | |
6083 | (lambda* (#:key inputs #:allow-other-keys) | |
6084 | (substitute* "build.xml" | |
6085 | (("dir=\"\\$\\{test.home\\}/java\"") | |
6086 | "dir=\"${test.home}\"")) | |
6087 | #t))))) | |
6088 | (native-inputs | |
6089 | `(("java-junit" ,java-junit))))) | |
30deadee JL |
6090 | |
6091 | (define-public java-microemulator-cldc | |
6092 | (package | |
6093 | (name "java-microemulator-cldc") | |
6094 | (version "2.0.4") | |
6095 | (source (origin | |
6096 | (method url-fetch) | |
6097 | (uri (string-append "https://github.com/barteo/microemu/archive/" | |
6098 | "microemulator_" | |
6099 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
6100 | version) | |
6101 | ".tar.gz")) | |
6102 | (file-name (string-append name "-" version ".tar.gz")) | |
6103 | (sha256 | |
6104 | (base32 | |
6105 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) | |
6106 | (build-system ant-build-system) | |
6107 | (arguments | |
6108 | `(#:jar-name "microemulator-cldc.jar" | |
6109 | #:source-dir "microemu-cldc/src/main/java" | |
6110 | #:tests? #f)); Requires even older software | |
6111 | (home-page "https://github.com/barteo/microemu") | |
6112 | (synopsis "J2ME CLDC emulator") | |
6113 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP | |
6114 | Emulator. It allows to demonstrate MIDlet based applications in web browser | |
6115 | applet and can be run as a standalone java application.") | |
6116 | (license (list license:asl2.0 | |
6117 | ;; or altenatively: | |
6118 | license:lgpl2.1+)))) | |
8e2f3e5e JL |
6119 | |
6120 | (define-public java-datanucleus-javax-persistence | |
6121 | (package | |
6122 | (name "java-datanucleus-javax-persistence") | |
6123 | (version "2.2.0") | |
6124 | (source (origin | |
6125 | (method url-fetch) | |
6126 | (uri (string-append "https://github.com/datanucleus/" | |
6127 | "javax.persistence/archive/javax.persistence-" | |
6128 | version "-release.tar.gz")) | |
6129 | (sha256 | |
6130 | (base32 | |
6131 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) | |
6132 | (build-system ant-build-system) | |
6133 | (arguments | |
6134 | `(#:jar-name "java-datanucleus-javax-persistence.jar" | |
6135 | #:jdk ,icedtea-8 | |
6136 | #:source-dir "src/main/java" | |
6137 | #:tests? #f)); no tests | |
6138 | (home-page "https://github.com/datanucleus/javax.persistence") | |
6139 | (synopsis "JPA API") | |
6140 | (description "This package contains a clean definition of JPA API intended | |
6141 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API | |
6142 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification | |
6143 | used to generate this API.") | |
6144 | (license (list license:edl1.0 license:epl1.0)))) | |
3240ddbf JL |
6145 | |
6146 | (define-public java-osgi-cmpn | |
6147 | (package | |
6148 | (name "java-osgi-cmpn") | |
6149 | (version "6.0.0") | |
6150 | (source (origin | |
6151 | (method url-fetch) | |
6152 | (uri (string-append "http://central.maven.org/maven2/" | |
6153 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" | |
6154 | version "-sources.jar")) | |
6155 | (sha256 | |
6156 | (base32 | |
6157 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) | |
6158 | (build-system ant-build-system) | |
6159 | (arguments | |
6160 | `(#:jar-name "osgi-cmpn.jar" | |
6161 | #:tests? #f)); no tests | |
6162 | (inputs | |
6163 | `(("annotation" ,java-osgi-annotation) | |
6164 | ("core" ,java-osgi-core) | |
6165 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) | |
6166 | ("microemulator" ,java-microemulator-cldc) | |
6167 | ("servlet" ,java-classpathx-servletapi))) | |
c353d014 | 6168 | (home-page "https://www.osgi.org") |
3240ddbf JL |
6169 | (synopsis "Compendium specification module of OSGi framework") |
6170 | (description | |
6171 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6172 | and service platform for the Java programming language. This package contains | |
6173 | the compendium specification module, providing interfaces and classes for use | |
6174 | in compiling bundles.") | |
6175 | (license license:asl2.0))) | |
747c7574 JL |
6176 | |
6177 | (define-public java-osgi-service-component-annotations | |
6178 | (package | |
6179 | (name "java-osgi-service-component-annotations") | |
6180 | (version "1.3.0") | |
6181 | (source (origin | |
6182 | (method url-fetch) | |
6183 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6184 | "org.osgi.service.component.annotations/" | |
6185 | version "/org.osgi.service.component.annotations-" | |
6186 | version "-sources.jar")) | |
6187 | (sha256 | |
6188 | (base32 | |
6189 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) | |
6190 | (build-system ant-build-system) | |
6191 | (arguments | |
6192 | `(#:jar-name "osgi-service-component-annotations.jar" | |
6193 | #:tests? #f)); no tests | |
6194 | (inputs | |
6195 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6196 | (home-page "https://www.osgi.org") |
747c7574 JL |
6197 | (synopsis "Support annotations for osgi-service-component") |
6198 | (description | |
6199 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6200 | and service platform for the Java programming language. This package contains | |
6201 | the support annotations for osgi-service-component.") | |
6202 | (license license:asl2.0))) | |
999b5fb4 JL |
6203 | |
6204 | (define-public java-osgi-dto | |
6205 | (package | |
6206 | (name "java-osgi-dto") | |
6207 | (version "1.0.0") | |
6208 | (source (origin | |
6209 | (method url-fetch) | |
6210 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6211 | "org.osgi.dto/" version "/org.osgi.dto-" | |
6212 | version "-sources.jar")) | |
6213 | (sha256 | |
6214 | (base32 | |
6215 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) | |
6216 | (build-system ant-build-system) | |
6217 | (arguments | |
6218 | `(#:jar-name "osgi-dto.jar" | |
6219 | #:tests? #f)); no tests | |
6220 | (inputs | |
6221 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6222 | (home-page "https://www.osgi.org") |
999b5fb4 JL |
6223 | (synopsis "Data Transfer Objects") |
6224 | (description | |
6225 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6226 | and service platform for the Java programming language. This package contains | |
6227 | the Data Transfer Objects. It is easily serializable having only public fields | |
6228 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, | |
6229 | Map and array aggregates may also be used. The aggregates must only hold | |
6230 | objects of the listed types or aggregates.") | |
6231 | (license license:asl2.0))) | |
c304ce6a JL |
6232 | |
6233 | (define-public java-osgi-resource | |
6234 | (package | |
6235 | (name "java-osgi-resource") | |
6236 | (version "1.0.0") | |
6237 | (source (origin | |
6238 | (method url-fetch) | |
6239 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6240 | "org.osgi.resource/" | |
6241 | version "/org.osgi.resource-" | |
6242 | version "-sources.jar")) | |
6243 | (sha256 | |
6244 | (base32 | |
6245 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) | |
6246 | (build-system ant-build-system) | |
6247 | (arguments | |
6248 | `(#:jar-name "osgi-resource.jar" | |
6249 | #:tests? #f)); no tests | |
6250 | (inputs | |
6251 | `(("annotation" ,java-osgi-annotation) | |
6252 | ("dto" ,java-osgi-dto))) | |
c353d014 | 6253 | (home-page "https://www.osgi.org") |
c304ce6a JL |
6254 | (synopsis "OSGI Resource") |
6255 | (description | |
6256 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6257 | and service platform for the Java programming language. This package contains | |
6258 | the definition of common types in osgi packages.") | |
6259 | (license license:asl2.0))) | |
c2b14516 JL |
6260 | |
6261 | (define-public java-osgi-namespace-contract | |
6262 | (package | |
6263 | (name "java-osgi-namespace-contract") | |
6264 | (version "1.0.0") | |
6265 | (source (origin | |
6266 | (method url-fetch) | |
6267 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6268 | "org.osgi.namespace.contract/" | |
6269 | version "/org.osgi.namespace.contract-" | |
6270 | version "-sources.jar")) | |
6271 | (sha256 | |
6272 | (base32 | |
6273 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) | |
6274 | (build-system ant-build-system) | |
6275 | (inputs | |
6276 | `(("resource" ,java-osgi-resource) | |
6277 | ("annotation" ,java-osgi-annotation))) | |
6278 | (arguments | |
6279 | `(#:jar-name "osgi-namespace-contract.jar" | |
6280 | #:tests? #f)); no tests | |
c353d014 | 6281 | (home-page "https://www.osgi.org") |
c2b14516 JL |
6282 | (synopsis "Contract Capability and Requirement Namespace") |
6283 | (description | |
6284 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6285 | and service platform for the Java programming language. This package contains | |
6286 | the names for the attributes and directives for a namespace with contracts.") | |
6287 | (license license:asl2.0))) | |
f809c963 JL |
6288 | |
6289 | (define-public java-osgi-namespace-extender | |
6290 | (package | |
6291 | (name "java-osgi-namespace-extender") | |
6292 | (version "1.0.1") | |
6293 | (source (origin | |
6294 | (method url-fetch) | |
6295 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6296 | "org.osgi.namespace.extender/" | |
6297 | version "/org.osgi.namespace.extender-" | |
6298 | version "-sources.jar")) | |
6299 | (sha256 | |
6300 | (base32 | |
6301 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) | |
6302 | (build-system ant-build-system) | |
6303 | (inputs | |
6304 | `(("resource" ,java-osgi-resource) | |
6305 | ("annotation" ,java-osgi-annotation))) | |
6306 | (arguments | |
6307 | `(#:jar-name "osgi-namespace-extendent.jar" | |
6308 | #:tests? #f)); no tests | |
c353d014 | 6309 | (home-page "https://www.osgi.org") |
f809c963 JL |
6310 | (synopsis "Extender Capability and Requirement Namespace") |
6311 | (description | |
6312 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6313 | and service platform for the Java programming language. This package contains | |
b784962d JL |
6314 | the names for the attributes and directives for an extender namespace.") |
6315 | (license license:asl2.0))) | |
6316 | ||
6317 | (define-public java-osgi-namespace-service | |
6318 | (package | |
6319 | (name "java-osgi-namespace-service") | |
6320 | (version "1.0.0") | |
6321 | (source (origin | |
6322 | (method url-fetch) | |
6323 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6324 | "org.osgi.namespace.service/" | |
6325 | version "/org.osgi.namespace.service-" | |
6326 | version "-sources.jar")) | |
6327 | (sha256 | |
6328 | (base32 | |
6329 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) | |
6330 | (build-system ant-build-system) | |
6331 | (inputs | |
6332 | `(("resource" ,java-osgi-resource) | |
6333 | ("annotation" ,java-osgi-annotation))) | |
6334 | (arguments | |
6335 | `(#:jar-name "osgi-namespace-service.jar" | |
6336 | #:tests? #f)); no tests | |
c353d014 | 6337 | (home-page "https://www.osgi.org") |
b784962d JL |
6338 | (synopsis "Service Capability and Requirement Namespace") |
6339 | (description | |
6340 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6341 | and service platform for the Java programming language. This package contains | |
6342 | the names for the attributes and directives for a service namespace.") | |
f809c963 | 6343 | (license license:asl2.0))) |
0f0c5218 JL |
6344 | |
6345 | (define-public java-osgi-util-function | |
6346 | (package | |
6347 | (name "java-osgi-util-function") | |
6348 | (version "1.0.0") | |
6349 | (source (origin | |
6350 | (method url-fetch) | |
6351 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6352 | "org.osgi.util.function/" | |
6353 | version "/org.osgi.util.function-" | |
6354 | version "-sources.jar")) | |
6355 | (sha256 | |
6356 | (base32 | |
6357 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) | |
6358 | (build-system ant-build-system) | |
6359 | (arguments | |
6360 | `(#:jar-name "osgi-util-function.jar" | |
6361 | #:tests? #f)); no tests | |
6362 | (inputs | |
6363 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6364 | (home-page "https://www.osgi.org") |
0f0c5218 JL |
6365 | (synopsis "OSGI Util Function") |
6366 | (description | |
6367 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6368 | and service platform for the Java programming language. This package contains | |
6369 | an interface for a function that accepts a single argument and produces a result.") | |
6370 | (license license:asl2.0))) | |
27103135 JL |
6371 | |
6372 | (define-public java-osgi-util-promise | |
6373 | (package | |
6374 | (name "java-osgi-util-promise") | |
6375 | (version "1.0.0") | |
6376 | (source (origin | |
6377 | (method url-fetch) | |
6378 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6379 | "org.osgi.util.promise/" | |
6380 | version "/org.osgi.util.promise-" | |
6381 | version "-sources.jar")) | |
6382 | (sha256 | |
6383 | (base32 | |
6384 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) | |
6385 | (build-system ant-build-system) | |
6386 | (arguments | |
6387 | `(#:jar-name "osgi-util-promise.jar" | |
6388 | #:tests? #f)); no tests | |
6389 | (inputs | |
6390 | `(("annotation" ,java-osgi-annotation) | |
6391 | ("function" ,java-osgi-util-function))) | |
c353d014 | 6392 | (home-page "https://www.osgi.org") |
27103135 JL |
6393 | (synopsis "Promise of a value") |
6394 | (description | |
6395 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6396 | and service platform for the Java programming language. This package contains | |
6397 | an interface and utilitary classes for promises. A Promise represents a future | |
6398 | value. It handles the interactions for asynchronous processing.") | |
6399 | (license license:asl2.0))) | |
2b1fdb2b JL |
6400 | |
6401 | (define-public java-osgi-service-metatype-annotations | |
6402 | (package | |
6403 | (name "java-osgi-service-metatype-annotations") | |
6404 | (version "1.3.0") | |
6405 | (source (origin | |
6406 | (method url-fetch) | |
6407 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6408 | "org.osgi.service.metatype.annotations/" | |
6409 | version "/org.osgi.service.metatype.annotations-" | |
6410 | version "-sources.jar")) | |
6411 | (sha256 | |
6412 | (base32 | |
6413 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) | |
6414 | (build-system ant-build-system) | |
6415 | (arguments | |
6416 | `(#:jar-name "osgi-service-metatype-annotations.jar" | |
6417 | #:tests? #f)); no tests | |
6418 | (inputs | |
6419 | `(("annotation" ,java-osgi-annotation))) | |
c353d014 | 6420 | (home-page "https://www.osgi.org") |
2b1fdb2b JL |
6421 | (synopsis "Support annotations for metatype") |
6422 | (description | |
6423 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6424 | and service platform for the Java programming language. This package contains | |
6425 | the support annotations for metatype.") | |
6426 | (license license:asl2.0))) | |
a13acfbe JL |
6427 | |
6428 | (define-public java-osgi-service-repository | |
6429 | (package | |
6430 | (name "java-osgi-service-repository") | |
6431 | (version "1.1.0") | |
6432 | (source (origin | |
6433 | (method url-fetch) | |
6434 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6435 | "org.osgi.service.repository/" | |
6436 | version "/org.osgi.service.repository-" | |
6437 | version "-sources.jar")) | |
6438 | (sha256 | |
6439 | (base32 | |
6440 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) | |
6441 | (build-system ant-build-system) | |
6442 | (arguments | |
6443 | `(#:jar-name "osgi-service-repository.jar" | |
6444 | #:tests? #f)); no tests | |
6445 | (inputs | |
6446 | `(("annotation" ,java-osgi-annotation) | |
6447 | ("promise" ,java-osgi-util-promise) | |
6448 | ("resource" ,java-osgi-resource))) | |
c353d014 | 6449 | (home-page "https://www.osgi.org") |
a13acfbe JL |
6450 | (synopsis "OSGI service repository") |
6451 | (description | |
6452 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6453 | and service platform for the Java programming language. This package contains | |
6454 | a repository service that contains resources.") | |
6455 | (license license:asl2.0))) | |
dfd91541 JL |
6456 | |
6457 | (define-public java-osgi-framework | |
6458 | (package | |
6459 | (name "java-osgi-framework") | |
6460 | (version "1.8.0") | |
6461 | (source (origin | |
6462 | (method url-fetch) | |
6463 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6464 | "org.osgi.framework/" version "/org.osgi.framework-" | |
6465 | version "-sources.jar")) | |
6466 | (sha256 | |
6467 | (base32 | |
6468 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) | |
6469 | (build-system ant-build-system) | |
6470 | (arguments | |
6471 | `(#:jar-name "osgi-framework.jar" | |
6472 | #:tests? #f)); no tests | |
6473 | (inputs | |
6474 | `(("annotation" ,java-osgi-annotation) | |
6475 | ("resource" ,java-osgi-resource) | |
6476 | ("dto" ,java-osgi-dto))) | |
c353d014 | 6477 | (home-page "https://www.osgi.org") |
dfd91541 JL |
6478 | (synopsis "OSGi framework") |
6479 | (description | |
6480 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6481 | and service platform for the Java programming language.") | |
6482 | (license license:asl2.0))) | |
98c9f16c JL |
6483 | |
6484 | (define-public java-osgi-service-log | |
6485 | (package | |
6486 | (name "java-osgi-service-log") | |
6487 | (version "1.3.0") | |
6488 | (source (origin | |
6489 | (method url-fetch) | |
6490 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6491 | "org.osgi.service.log/" | |
6492 | version "/org.osgi.service.log-" | |
6493 | version "-sources.jar")) | |
6494 | (sha256 | |
6495 | (base32 | |
6496 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) | |
6497 | (build-system ant-build-system) | |
6498 | (arguments | |
6499 | `(#:jar-name "osgi-service-log.jar" | |
6500 | #:tests? #f)); no tests | |
6501 | (inputs | |
6502 | `(("java-osgi-framework" ,java-osgi-framework))) | |
c353d014 | 6503 | (home-page "https://www.osgi.org") |
98c9f16c JL |
6504 | (synopsis "Provides methods for bundles to write messages to the log") |
6505 | (description | |
6506 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6507 | and service platform for the Java programming language. This package contains | |
6508 | the log service.") | |
6509 | (license license:asl2.0))) | |
dd76d44b JL |
6510 | |
6511 | (define-public java-osgi-service-jdbc | |
6512 | (package | |
6513 | (name "java-osgi-service-jdbc") | |
6514 | (version "1.0.0") | |
6515 | (source (origin | |
6516 | (method url-fetch) | |
6517 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6518 | "org.osgi.service.jdbc/" | |
6519 | version "/org.osgi.service.jdbc-" | |
6520 | version "-sources.jar")) | |
6521 | (sha256 | |
6522 | (base32 | |
6523 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) | |
6524 | (build-system ant-build-system) | |
6525 | (arguments | |
6526 | `(#:jar-name "osgi-service-jdbc.jar" | |
6527 | #:tests? #f)); no tests | |
c353d014 | 6528 | (home-page "https://www.osgi.org") |
dd76d44b JL |
6529 | (synopsis "Factory for JDBC connection factories") |
6530 | (description | |
6531 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6532 | and service platform for the Java programming language. This package contains | |
6533 | a factory for JDBC connection factories. There are 3 preferred connection | |
6534 | factories for getting JDBC connections: | |
6535 | ||
6536 | @itemize | |
6537 | @item @code{javax.sql.DataSource}; | |
6538 | @item @code{javax.sql.ConnectionPoolDataSource}; | |
6539 | @item @code{javax.sql.XADataSource}. | |
6540 | @end itemize") | |
6541 | (license license:asl2.0))) | |
291d3f22 JL |
6542 | |
6543 | (define-public java-osgi-service-resolver | |
6544 | (package | |
6545 | (name "java-osgi-service-resolver") | |
6546 | (version "1.0.1") | |
6547 | (source (origin | |
6548 | (method url-fetch) | |
6549 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6550 | "org.osgi.service.resolver/" | |
6551 | version "/org.osgi.service.resolver-" | |
6552 | version "-sources.jar")) | |
6553 | (sha256 | |
6554 | (base32 | |
6555 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) | |
6556 | (build-system ant-build-system) | |
6557 | (arguments | |
6558 | `(#:jar-name "osgi-service-resolver.jar" | |
6559 | #:tests? #f)); no tests | |
6560 | (inputs | |
6561 | `(("annotation" ,java-osgi-annotation) | |
6562 | ("resource" ,java-osgi-resource))) | |
c353d014 | 6563 | (home-page "https://www.osgi.org") |
291d3f22 JL |
6564 | (synopsis "OSGI Resolver service") |
6565 | (description | |
6566 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6567 | and service platform for the Java programming language. This package contains | |
6568 | a resolver service that resolves the specified resources in the context supplied | |
6569 | by the caller.") | |
6570 | (license license:asl2.0))) | |
1884bb81 JL |
6571 | |
6572 | (define-public java-osgi-util-tracker | |
6573 | (package | |
6574 | (name "java-osgi-util-tracker") | |
6575 | (version "1.5.1") | |
6576 | (source (origin | |
6577 | (method url-fetch) | |
6578 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6579 | "org.osgi.util.tracker/" | |
6580 | version "/org.osgi.util.tracker-" | |
6581 | version "-sources.jar")) | |
6582 | (sha256 | |
6583 | (base32 | |
6584 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) | |
6585 | (build-system ant-build-system) | |
6586 | (arguments | |
6587 | `(#:jar-name "osgi-util-tracker.jar" | |
6588 | #:tests? #f)); no tests | |
6589 | (inputs | |
6590 | `(("framework" ,java-osgi-framework) | |
6591 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 6592 | (home-page "https://www.osgi.org") |
1884bb81 JL |
6593 | (synopsis "Bundle tracking") |
6594 | (description | |
6595 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6596 | and service platform for the Java programming language. This package contains | |
6597 | bundle tracking utility classes.") | |
6598 | (license license:asl2.0))) | |
fb9c48b8 JL |
6599 | |
6600 | (define-public java-osgi-service-cm | |
6601 | (package | |
6602 | (name "java-osgi-service-cm") | |
6603 | (version "1.5.0") | |
6604 | (source (origin | |
6605 | (method url-fetch) | |
6606 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6607 | "org.osgi.service.cm/" | |
6608 | version "/org.osgi.service.cm-" | |
6609 | version "-sources.jar")) | |
6610 | (sha256 | |
6611 | (base32 | |
6612 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) | |
6613 | (build-system ant-build-system) | |
6614 | (arguments | |
6615 | `(#:jar-name "osgi-service-cm.jar" | |
6616 | #:tests? #f)); no tests | |
6617 | (inputs | |
6618 | `(("framework" ,java-osgi-framework) | |
6619 | ("annotation" ,java-osgi-annotation))) | |
c353d014 | 6620 | (home-page "https://www.osgi.org") |
fb9c48b8 JL |
6621 | (synopsis "OSGI Configuration Management") |
6622 | (description | |
6623 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6624 | and service platform for the Java programming language. This package contains | |
6625 | utility classes for the configuration of services.") | |
6626 | (license license:asl2.0))) | |
500aac75 JL |
6627 | |
6628 | (define-public java-osgi-service-packageadmin | |
6629 | (package | |
6630 | (name "java-osgi-service-packageadmin") | |
6631 | (version "1.2.0") | |
6632 | (source (origin | |
6633 | (method url-fetch) | |
6634 | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
6635 | "org.osgi.service.packageadmin/" | |
6636 | version "/org.osgi.service.packageadmin-" | |
6637 | version "-sources.jar")) | |
6638 | (sha256 | |
6639 | (base32 | |
6640 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) | |
6641 | (build-system ant-build-system) | |
6642 | (arguments | |
6643 | `(#:jar-name "osgi-service-packageadmin.jar" | |
6644 | #:tests? #f)); no tests | |
6645 | (inputs | |
6646 | `(("framework" ,java-osgi-framework))) | |
c353d014 | 6647 | (home-page "https://www.osgi.org") |
500aac75 JL |
6648 | (synopsis "OSGI Package Administration") |
6649 | (description | |
6650 | "OSGi, for Open Services Gateway initiative framework, is a module system | |
6651 | and service platform for the Java programming language. This package contains | |
6652 | the packageadmin service.") | |
6653 | (license license:asl2.0))) | |
77a4f1ae JL |
6654 | |
6655 | (define-public java-ops4j-base-lang | |
6656 | (package | |
6657 | (name "java-ops4j-base-lang") | |
6658 | (version "1.5.0") | |
6659 | (source (origin | |
6660 | (method url-fetch) | |
6661 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" | |
6662 | "archive/base-" version ".tar.gz")) | |
6663 | (sha256 | |
6664 | (base32 | |
6665 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) | |
6666 | (build-system ant-build-system) | |
6667 | (arguments | |
6668 | `(#:jar-name "java-ops4j-base-lang.jar" | |
6669 | #:source-dir "ops4j-base-lang/src/main/java" | |
6670 | #:tests? #f; no tests | |
6671 | #:phases | |
6672 | (modify-phases %standard-phases | |
6673 | (add-before 'build 'add-test-file | |
6674 | (lambda _ | |
6675 | ;; That file is required by a test in ops4j-pax-exam-core-spi | |
6676 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") | |
6677 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" | |
6678 | (lambda _ | |
6679 | (display | |
6680 | (string-append | |
6681 | "version=" ,version "\n" | |
6682 | "groupId=org.ops4j.base" | |
6683 | "artifactId=ops4j-base-lang\n"))))))))) | |
6684 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") | |
6685 | (synopsis "Utility classes and extensions to be used in OPS4J projects") | |
6686 | (description "OPS4J stands for Open Participation Software for Java. This | |
6687 | package contains utilities and extensions related to @code{java.lang}.") | |
6688 | (license license:asl2.0))) | |
b2353495 JL |
6689 | |
6690 | (define-public java-ops4j-base-monitors | |
6691 | (package | |
6692 | (inherit java-ops4j-base-lang) | |
6693 | (name "java-ops4j-base-monitors") | |
6694 | (arguments | |
6695 | `(#:jar-name "java-ops4j-base-monitors.jar" | |
6696 | #:source-dir "ops4j-base-monitors/src/main/java" | |
6697 | #:tests? #f)); no tests | |
6698 | (inputs | |
6699 | `(("lang" ,java-ops4j-base-lang))) | |
6700 | (description "OPS4J stands for Open Participation Software for Java. This | |
6701 | package contains utilities and extensions related to monitoring."))) | |
322d349a JL |
6702 | |
6703 | (define-public java-ops4j-base-io | |
6704 | (package | |
6705 | (inherit java-ops4j-base-lang) | |
6706 | (name "java-ops4j-base-io") | |
6707 | (arguments | |
6708 | `(#:jar-name "java-ops4j-base-io.jar" | |
6709 | #:source-dir "ops4j-base-io/src/main/java" | |
6710 | #:test-dir "ops4j-base-io/src/test" | |
6711 | #:test-exclude | |
6712 | (list "**/ListerTest.java"))) | |
6713 | (inputs | |
6714 | `(("lang" ,java-ops4j-base-monitors) | |
6715 | ("lang" ,java-ops4j-base-lang))) | |
6716 | (native-inputs | |
6717 | `(("junit" ,java-junit) | |
6718 | ("hamcrest" ,java-hamcrest-core))) | |
6719 | (description "OPS4J stands for Open Participation Software for Java. This | |
6720 | package contains utilities and extensions related to handling streams and files."))) | |
559919c1 JL |
6721 | |
6722 | (define-public java-ops4j-base-util | |
6723 | (package | |
6724 | (inherit java-ops4j-base-lang) | |
6725 | (name "java-ops4j-base-util") | |
6726 | (arguments | |
6727 | `(#:jar-name "java-ops4j-base-util.jar" | |
6728 | #:source-dir "ops4j-base-util/src/main/java" | |
6729 | #:test-dir "ops4j-base-util/src/test")) | |
6730 | (inputs | |
6731 | `(("lang" ,java-ops4j-base-lang))) | |
6732 | (native-inputs | |
6733 | `(("junit" ,java-junit))) | |
6734 | (description "OPS4J stands for Open Participation Software for Java. This | |
6735 | package contains utilities and extensions related to environment, i18n and | |
6736 | mime types."))) | |
60dcec7a JL |
6737 | |
6738 | (define-public java-ops4j-base-util-property | |
6739 | (package | |
6740 | (inherit java-ops4j-base-lang) | |
6741 | (name "java-ops4j-base-util-property") | |
6742 | (arguments | |
6743 | `(#:jar-name "java-ops4j-base-util-property.jar" | |
6744 | #:source-dir "ops4j-base-util-property/src/main/java" | |
6745 | #:tests? #f)); no tests | |
6746 | (inputs | |
6747 | `(("lang" ,java-ops4j-base-lang) | |
6748 | ("util" ,java-ops4j-base-util))) | |
6749 | (description "OPS4J stands for Open Participation Software for Java. This | |
6750 | package contains utilities and extensions related to resolving properties from | |
6751 | different sources."))) | |
0edf8cf0 JL |
6752 | |
6753 | (define-public java-ops4j-base-store | |
6754 | (package | |
6755 | (inherit java-ops4j-base-lang) | |
6756 | (name "java-ops4j-base-store") | |
6757 | (arguments | |
6758 | `(#:jar-name "java-ops4j-base-store.jar" | |
6759 | #:source-dir "ops4j-base-store/src/main/java" | |
6760 | #:tests? #f)); no tests | |
6761 | (inputs | |
6762 | `(("lang" ,java-ops4j-base-lang) | |
6763 | ("slf4j" ,java-slf4j-api) | |
6764 | ("io" ,java-ops4j-base-io))) | |
6765 | (description "OPS4J stands for Open Participation Software for Java. This | |
6766 | package contains utilities for storing and retrieving data from an | |
6767 | @code{InputStream}."))) | |
214fcd8a JL |
6768 | |
6769 | (define-public java-ops4j-base-spi | |
6770 | (package | |
6771 | (inherit java-ops4j-base-lang) | |
6772 | (name "java-ops4j-base-spi") | |
6773 | (arguments | |
6774 | `(#:jar-name "java-ops4j-base-spi.jar" | |
6775 | #:source-dir "ops4j-base-spi/src/main/java" | |
6776 | #:test-dir "ops4j-base-spi/src/test")) | |
6777 | (native-inputs | |
6778 | `(("junit" ,java-junit) | |
6779 | ("hamcrest" ,java-hamcrest-core))) | |
6780 | (description "OPS4J stands for Open Participation Software for Java. This | |
6781 | package contains utilities for obtaining services via the Java SE 6 | |
6782 | @code{ServiceLoader}."))) | |
e1edf42e JL |
6783 | |
6784 | (define-public java-aqute-bnd-annotation | |
6785 | (package | |
6786 | (name "java-aqute-bnd-annotation") | |
2cac8891 | 6787 | (version "3.5.0") |
e1edf42e JL |
6788 | (source (origin |
6789 | (method url-fetch) | |
6790 | (uri (string-append "https://github.com/bndtools/bnd/archive/" | |
6791 | version ".REL.tar.gz")) | |
6792 | (file-name (string-append name "-" version ".tar.gz")) | |
6793 | (sha256 | |
6794 | (base32 | |
2cac8891 | 6795 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
e1edf42e JL |
6796 | (build-system ant-build-system) |
6797 | (arguments | |
6798 | `(#:jar-name "java-aqute-bnd-annotation.jar" | |
6799 | #:source-dir "biz.aQute.bnd.annotation/src" | |
6800 | #:tests? #f)); empty test dir | |
6801 | (home-page "http://bnd.bndtools.org/") | |
6802 | (synopsis "Tools for OSGi") | |
6803 | (description "Bnd is a swiss army knife for OSGi, it creates manifest | |
6804 | headers based on analyzing the class code, it verifies the project settings, | |
6805 | it manages project dependencies, gives diffs jars, and much more.") | |
6806 | (license license:asl2.0))) | |
60ba2978 JL |
6807 | |
6808 | (define-public java-aqute-libg | |
6809 | (package | |
6810 | (inherit java-aqute-bnd-annotation) | |
6811 | (name "java-aqute-libg") | |
6812 | (arguments | |
6813 | `(#:jar-name "java-aqute-libg.jar" | |
6814 | #:source-dir "aQute.libg/src" | |
6815 | #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory | |
6816 | (inputs | |
6817 | `(("slf4j" ,java-slf4j-api) | |
6818 | ("osgi-annot" ,java-osgi-annotation) | |
6819 | ("java-osgi-cmpn" ,java-osgi-cmpn) | |
6820 | ("osgi" ,java-osgi-core))))) | |
5f26a131 JL |
6821 | |
6822 | (define-public java-aqute-bndlib | |
6823 | (package | |
6824 | (inherit java-aqute-bnd-annotation) | |
6825 | (name "java-aqute-bndlib") | |
6826 | (arguments | |
6827 | `(#:jar-name "java-bndlib.jar" | |
6828 | #:source-dir "biz.aQute.bndlib/src" | |
6829 | #:tests? #f)); no tests | |
6830 | (inputs | |
6831 | `(("slf4j" ,java-slf4j-api) | |
6832 | ("osgi-annot" ,java-osgi-annotation) | |
6833 | ("java-aqute-libg" ,java-aqute-libg) | |
6834 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) | |
6835 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) | |
6836 | ("java-osgi-service-repository" ,java-osgi-service-repository) | |
6837 | ("java-osgi-service-log" ,java-osgi-service-log) | |
6838 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) | |
6839 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) | |
6840 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) | |
6841 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) | |
6842 | ("promise" ,java-osgi-util-promise) | |
6843 | ("osgi" ,java-osgi-core))))) | |
25aef81d JL |
6844 | |
6845 | (define-public java-ops4j-pax-tinybundles | |
6846 | (package | |
6847 | (name "java-ops4j-pax-tinybundles") | |
6848 | (version "2.1.1") | |
6849 | (source (origin | |
6850 | (method url-fetch) | |
6851 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" | |
6852 | "archive/tinybundles-" version ".tar.gz")) | |
6853 | (sha256 | |
6854 | (base32 | |
6855 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) | |
6856 | (arguments | |
6857 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" | |
6858 | #:source-dir "src/main/java" | |
6859 | #:test-exclude | |
6860 | ;; Abstract base classes for other tests | |
6861 | (list "**/BndTest.java" "**/CoreTest.java") | |
6862 | #:phases | |
6863 | (modify-phases %standard-phases | |
6864 | (add-before 'check 'fix-version | |
6865 | (lambda _ | |
6866 | ;; This test has a reference to an old version of bndlib we are not | |
6867 | ;; packaging. It uses the version referenced in pom.xml. We replace | |
6868 | ;; it with our own version. | |
6869 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" | |
0f277802 GB |
6870 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
6871 | ,(package-version java-aqute-bndlib)))))))) | |
25aef81d JL |
6872 | (inputs |
6873 | `(("lang" ,java-ops4j-base-lang) | |
6874 | ("io" ,java-ops4j-base-io) | |
6875 | ("store" ,java-ops4j-base-store) | |
6876 | ("slf4j" ,java-slf4j-api) | |
6877 | ("libg" ,java-aqute-libg) | |
6878 | ("bndlib" ,java-aqute-bndlib))) | |
6879 | (native-inputs | |
6880 | `(("junit" ,java-junit) | |
6881 | ("hamcrest" ,java-hamcrest-core) | |
6882 | ("log4j" ,java-log4j-api) | |
6883 | ("bndannotation" ,java-aqute-bnd-annotation) | |
6884 | ("framework" ,java-osgi-framework))) | |
6885 | (build-system ant-build-system) | |
6886 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") | |
6887 | (synopsis "Java APIs to create OSGi related artifacts") | |
6888 | (description "Tinybundles is all about creating OSGi related artifacts like | |
6889 | Bundles, Fragments and Deployment Packages with Java Api. It is very convinient | |
6890 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the | |
6891 | other hand, this library can be a foundation of real end user tools that need | |
6892 | to create those artifacts.") | |
6893 | (license license:asl2.0))) | |
e179add0 JL |
6894 | |
6895 | (define-public java-ops4j-pax-exam-core | |
6896 | (package | |
6897 | (name "java-ops4j-pax-exam-core") | |
6898 | (version "4.11.0") | |
6899 | (source (origin | |
6900 | (method url-fetch) | |
6901 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" | |
6902 | "archive/exam-reactor-" version ".tar.gz")) | |
6903 | (sha256 | |
6904 | (base32 | |
6905 | "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g")))) | |
6906 | (arguments | |
6907 | `(#:jar-name "java-ops4j-pax-exam-core.jar" | |
6908 | #:source-dir "core/pax-exam/src/main/java" | |
6909 | #:test-dir "core/pax-exam/src/test")) | |
6910 | (inputs | |
6911 | `(("slf4j" ,java-slf4j-api) | |
6912 | ("lang" ,java-ops4j-base-lang) | |
6913 | ("io" ,java-ops4j-base-io) | |
6914 | ("util-property" ,java-ops4j-base-util-property) | |
6915 | ("util-store" ,java-ops4j-base-store) | |
6916 | ("java-osgi-core" ,java-osgi-core))) | |
6917 | (native-inputs | |
6918 | `(("junit" ,java-junit) | |
6919 | ("hamcrest" ,java-hamcrest-core))) | |
6920 | (build-system ant-build-system) | |
6921 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") | |
6922 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") | |
6923 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets | |
6924 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and | |
6925 | the system under test at the same time.") | |
6926 | (license license:asl2.0))) | |
7a7c2b75 JL |
6927 | |
6928 | (define-public java-ops4j-pax-exam-core-spi | |
6929 | (package | |
6930 | (inherit java-ops4j-pax-exam-core) | |
6931 | (name "java-ops4j-pax-exam-core-spi") | |
6932 | (arguments | |
6933 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" | |
6934 | #:source-dir "src/main/java" | |
6935 | #:test-exclude | |
6936 | (list | |
6937 | ;; Abstract base class, not a test | |
6938 | "**/BaseStagedReactorTest.java" | |
6939 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump | |
6940 | "**/WarBuilderTest.java") | |
6941 | #:phases | |
6942 | (modify-phases %standard-phases | |
6943 | (add-before 'configure 'chdir | |
6944 | (lambda _ | |
6945 | ;; Tests assume we are in this directory | |
6946 | (chdir "core/pax-exam-spi"))) | |
6947 | (add-before 'check 'fix-tests | |
6948 | (lambda _ | |
6949 | ;; One test checks that this file is present. | |
6950 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") | |
6951 | (with-output-to-file | |
6952 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" | |
6953 | (lambda _ | |
6954 | (display | |
6955 | (string-append "artifactId = pax-exam-spi\n" | |
6956 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) | |
6957 | ;; Maven puts compilation results in the target directory, while we | |
6958 | ;; put them in the build directory. | |
6959 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" | |
6960 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" | |
6961 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") | |
6962 | (("target") "build")) | |
6963 | ;; One test is expected to fail, but it doesn't throw the expected exception | |
6964 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" | |
6965 | (("AssertionError") "IllegalArgumentException"))))))) | |
6966 | (inputs | |
6967 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) | |
6968 | ("lang" ,java-ops4j-base-lang) | |
6969 | ("monitors" ,java-ops4j-base-monitors) | |
6970 | ("store" ,java-ops4j-base-store) | |
6971 | ("io" ,java-ops4j-base-io) | |
6972 | ("spi" ,java-ops4j-base-spi) | |
6973 | ("osgi" ,java-osgi-core) | |
6974 | ("slf4j" ,java-slf4j-api) | |
6975 | ("tinybundles" ,java-ops4j-pax-tinybundles))) | |
6976 | (native-inputs | |
6977 | `(("mockito" ,java-mockito-1) | |
6978 | ("junit" ,java-junit) | |
6979 | ("hamcrest" ,java-hamcrest-core) | |
6980 | ("cglib" ,java-cglib) | |
6981 | ("objenesis" ,java-objenesis) | |
6982 | ("asm" ,java-asm))))) | |
4496d77f JL |
6983 | |
6984 | (define-public java-ops4j-pax-exam-core-junit | |
6985 | (package | |
6986 | (inherit java-ops4j-pax-exam-core) | |
6987 | (name "java-ops4j-pax-exam-core-junit") | |
6988 | (arguments | |
6989 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" | |
6990 | #:source-dir "drivers/pax-exam-junit4/src/main/java" | |
6991 | #:tests? #f)); no tests | |
6992 | (inputs | |
6993 | `(("junit" ,java-junit) | |
6994 | ("slf4j" ,java-slf4j-api) | |
6995 | ("core" ,java-ops4j-pax-exam-core) | |
6996 | ("spi" ,java-ops4j-pax-exam-core-spi))) | |
6997 | (native-inputs '()))) | |
cb05f60d JL |
6998 | |
6999 | (define-public java-fasterxml-jackson-annotations | |
7000 | (package | |
7001 | (name "java-fasterxml-jackson-annotations") | |
93dceea4 | 7002 | (version "2.9.4") |
cb05f60d JL |
7003 | (source (origin |
7004 | (method url-fetch) | |
7005 | (uri (string-append "https://github.com/FasterXML/" | |
7006 | "jackson-annotations/archive/" | |
7007 | "jackson-annotations-" version ".tar.gz")) | |
7008 | (sha256 | |
7009 | (base32 | |
93dceea4 | 7010 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
cb05f60d JL |
7011 | (build-system ant-build-system) |
7012 | (arguments | |
7013 | `(#:jar-name "jackson-annotations.jar" | |
7014 | #:source-dir "src/main/java" | |
7015 | #:test-dir "src/test")) | |
7016 | (native-inputs | |
7017 | `(("junit" ,java-junit))) | |
7018 | (home-page "https://github.com/FasterXML/jackson-annotations") | |
7019 | (synopsis "General purpose annotations for the Jackson Data Processor") | |
7020 | (description "This package contains general purpose annotations for the | |
7021 | Jackson Data Processor, used on value and handler types. The only annotations | |
7022 | not included are ones that require dependency to the Databind package.") | |
7023 | (license license:asl2.0))) | |
0b5481df JL |
7024 | |
7025 | (define-public java-fasterxml-jackson-core | |
7026 | (package | |
7027 | (name "java-fasterxml-jackson-core") | |
38a0fc38 | 7028 | (version "2.9.4") |
0b5481df JL |
7029 | (source (origin |
7030 | (method url-fetch) | |
7031 | (uri (string-append "https://github.com/FasterXML/" | |
7032 | "jackson-core/archive/" | |
7033 | "jackson-core-" version ".tar.gz")) | |
7034 | (sha256 | |
7035 | (base32 | |
38a0fc38 | 7036 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
0b5481df JL |
7037 | (build-system ant-build-system) |
7038 | (arguments | |
7039 | `(#:jar-name "jackson-core.jar" | |
7040 | #:source-dir "src/main/java" | |
7041 | #:test-dir "src/test" | |
7042 | #:test-exclude | |
7043 | (list | |
7044 | ;; Expected failure. pom.xml excludes these | |
7045 | "**/failing/**" | |
7046 | ;; Base classes that have no constructor for junit | |
7047 | "**/BaseTest.java" | |
7048 | "**/ConcurrencyReadTest.java" | |
7049 | "**/ManualCharAccessTest.java" | |
7050 | "**/ManualCharAccessTest.java" | |
7051 | "**/TrailingCommasTest.java" | |
7052 | "**/AsyncMissingValuesInObjectTest.java" | |
7053 | "**/AsyncMissingValuesInArrayTest.java") | |
7054 | #:phases | |
7055 | (modify-phases %standard-phases | |
7056 | (add-before 'configure 'generate-PackageVersion.java | |
7057 | (lambda _ | |
7058 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") | |
7059 | (in (string-append out ".in"))) | |
7060 | (copy-file in out) | |
7061 | (substitute* out | |
7062 | (("@package@") "com.fasterxml.jackson.core.json") | |
7063 | (("@projectversion@") ,version) | |
7064 | (("@projectgroupid@") "com.fasterxml.jackson.core") | |
7065 | (("@projectartifactid@") "jackson-core"))))) | |
7066 | (add-before 'build 'copy-resources | |
7067 | (lambda _ | |
7068 | (copy-recursively "src/main/resources" | |
7069 | "build/classes"))) | |
7070 | (add-before 'check 'copy-test-resources | |
7071 | (lambda _ | |
7072 | (copy-recursively "src/test/resources" | |
7073 | "build/test-classes")))))) | |
7074 | (native-inputs | |
7075 | `(("junit" ,java-junit) | |
7076 | ("hamcrest" ,java-hamcrest-core))) | |
7077 | (home-page "https://github.com/FasterXML/jackson-core") | |
7078 | (synopsis "") | |
7079 | (description "") | |
7080 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
f234c7a0 JL |
7081 | |
7082 | (define-public java-fasterxml-jackson-databind | |
7083 | (package | |
7084 | (name "java-fasterxml-jackson-databind") | |
3c1edff5 | 7085 | (version "2.9.4") |
f234c7a0 JL |
7086 | (source (origin |
7087 | (method url-fetch) | |
7088 | (uri (string-append "https://github.com/FasterXML/" | |
7089 | "jackson-databind/archive/" | |
7090 | "jackson-databind-" version ".tar.gz")) | |
7091 | (sha256 | |
7092 | (base32 | |
3c1edff5 | 7093 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
f234c7a0 JL |
7094 | (build-system ant-build-system) |
7095 | (arguments | |
7096 | `(#:jar-name "jackson-databind.jar" | |
7097 | #:source-dir "src/main/java" | |
7098 | #:tests? #f; requires javax.measures for which I can't find a free implementation | |
7099 | #:phases | |
7100 | (modify-phases %standard-phases | |
7101 | (add-before 'configure 'generate-PackageVersion.java | |
7102 | (lambda _ | |
7103 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") | |
7104 | (in (string-append out ".in"))) | |
7105 | (copy-file in out) | |
7106 | (substitute* out | |
7107 | (("@package@") "com.fasterxml.jackson.databind.cfg") | |
7108 | (("@projectversion@") ,version) | |
7109 | (("@projectgroupid@") "com.fasterxml.jackson.databind") | |
7110 | (("@projectartifactid@") "jackson-databind"))))) | |
7111 | (add-before 'build 'copy-resources | |
7112 | (lambda _ | |
7113 | (copy-recursively "src/main/resources" "build/classes")))))) | |
7114 | (inputs | |
7115 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7116 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core))) | |
7117 | (home-page "https://github.com/FasterXML/jackson-databind") | |
7118 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") | |
7119 | (description "This package contains the general-purpose data-binding | |
7120 | functionality and tree-model for Jackson Data Processor. It builds on core | |
7121 | streaming parser/generator package, and uses Jackson Annotations for | |
7122 | configuration.") | |
7123 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
d57d8b89 JL |
7124 | |
7125 | (define-public java-fasterxml-jackson-modules-base-jaxb | |
7126 | (package | |
7127 | (name "java-fasterxml-jackson-modules-base-jaxb") | |
07207211 | 7128 | (version "2.9.4") |
d57d8b89 JL |
7129 | (source (origin |
7130 | (method url-fetch) | |
7131 | (uri (string-append "https://github.com/FasterXML/" | |
7132 | "jackson-modules-base/archive/" | |
7133 | "jackson-modules-base-" version ".tar.gz")) | |
7134 | (sha256 | |
7135 | (base32 | |
07207211 | 7136 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
d57d8b89 JL |
7137 | (build-system ant-build-system) |
7138 | (arguments | |
7139 | `(#:jar-name "jackson-modules-base-jaxb.jar" | |
7140 | #:source-dir "jaxb/src/main/java" | |
7141 | #:test-dir "jaxb/src/test" | |
7142 | #:test-exclude | |
7143 | ;; Base class for tests | |
7144 | (list "**/BaseJaxbTest.java") | |
7145 | #:phases | |
7146 | (modify-phases %standard-phases | |
7147 | (add-before 'configure 'generate-PackageVersion.java | |
7148 | (lambda _ | |
7149 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" | |
7150 | "jackson/module/jaxb/PackageVersion.java")) | |
7151 | (in (string-append out ".in"))) | |
7152 | (copy-file in out) | |
7153 | (substitute* out | |
7154 | (("@package@") "com.fasterxml.jackson.module.jaxb") | |
7155 | (("@projectversion@") ,version) | |
7156 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") | |
7157 | (("@projectartifactid@") "jackson-module-jaxb"))))) | |
7158 | (add-before 'build 'copy-resources | |
7159 | (lambda _ | |
7160 | (copy-recursively "jaxb/src/main/resources" "build/classes")))))) | |
7161 | (inputs | |
7162 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7163 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
7164 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) | |
7165 | (native-inputs | |
7166 | `(("java-junit" ,java-junit))) | |
7167 | (home-page "https://github.com/FasterXML/jackson-modules-base") | |
7168 | (synopsis "Jaxb annotations jackson module") | |
7169 | (description "This package is the jaxb annotations module for jackson.") | |
7170 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
0f296d37 JL |
7171 | |
7172 | (define-public java-snakeyaml | |
7173 | (package | |
7174 | (name "java-snakeyaml") | |
7175 | (version "1.18") | |
7176 | (source (origin | |
7177 | (method url-fetch) | |
7178 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" | |
7179 | version ".tar.gz")) | |
307856cd | 7180 | (file-name (string-append name "-" version ".tar.gz")) |
0f296d37 JL |
7181 | (sha256 |
7182 | (base32 | |
7183 | "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg")))) | |
7184 | (build-system ant-build-system) | |
7185 | (arguments | |
7186 | `(#:jar-name "java-snakeyaml.jar" | |
7187 | #:source-dir "src/main/java" | |
7188 | ;; Tests require velocity, a cyclic dependency, and | |
7189 | ;; java-spring-framework-context which is not packaged. | |
7190 | #:tests? #f)) | |
7191 | (home-page "https://bitbucket.org/asomov/snakeyaml") | |
7192 | (synopsis "YAML processor") | |
7193 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") | |
7194 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
087c8fd2 JL |
7195 | |
7196 | (define-public java-fasterxml-jackson-dataformat-yaml | |
7197 | (package | |
7198 | (name "java-fasterxml-jackson-dataformat-yaml") | |
1f2be88f | 7199 | (version "2.9.4") |
087c8fd2 JL |
7200 | (source (origin |
7201 | (method url-fetch) | |
7202 | (uri (string-append "https://github.com/FasterXML/" | |
7203 | "jackson-dataformats-text/archive/" | |
7204 | "jackson-dataformats-text-" version ".tar.gz")) | |
7205 | (sha256 | |
7206 | (base32 | |
1f2be88f | 7207 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
087c8fd2 JL |
7208 | (build-system ant-build-system) |
7209 | (arguments | |
7210 | `(#:jar-name "jackson-dataformat-yaml.jar" | |
7211 | #:source-dir "yaml/src/main/java" | |
7212 | #:test-dir "yaml/src/test" | |
7213 | #:test-exclude (list "**/failing/**.java") | |
7214 | #:phases | |
7215 | (modify-phases %standard-phases | |
7216 | (add-before 'configure 'generate-PackageVersion.java | |
7217 | (lambda _ | |
7218 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") | |
7219 | (in (string-append out ".in"))) | |
7220 | (copy-file in out) | |
7221 | (substitute* out | |
7222 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") | |
7223 | (("@projectversion@") ,version) | |
7224 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") | |
7225 | (("@projectartifactid@") "jackson-dataformat-yaml")))))))) | |
7226 | (inputs | |
7227 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7228 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) | |
7229 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) | |
7230 | ("java-snakeyaml" ,java-snakeyaml))) | |
7231 | (native-inputs | |
7232 | `(("junit" ,java-junit) | |
7233 | ("hamcrest" ,java-hamcrest-core) | |
7234 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) | |
7235 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) | |
7236 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) | |
7237 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") | |
7238 | (synopsis "Yaml backend for Jackson") | |
7239 | (description "Dataformat backends are used to support format alternatives | |
7240 | to JSON, supported by default. This is done by sub-classing Jackson core | |
7241 | abstractions.") | |
7242 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
6fd07b98 JL |
7243 | |
7244 | (define-public java-stax2-api | |
7245 | (package | |
7246 | (name "java-stax2-api") | |
7247 | (version "4.0.0") | |
7248 | (source (origin | |
7249 | (method url-fetch) | |
7250 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" | |
7251 | "stax2-api-" version ".tar.gz")) | |
7252 | (sha256 | |
7253 | (base32 | |
7254 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) | |
7255 | (build-system ant-build-system) | |
7256 | (arguments | |
7257 | `(#:jar-name "java-stax2-api.jar" | |
7258 | #:source-dir "src/main/java" | |
7259 | #:tests? #f)); no tests | |
7260 | (home-page "https://github.com/FasterXML/stax2-api") | |
7261 | (synopsis "Stax2 API") | |
7262 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds | |
7263 | significant new functionalities, such as full-featured bi-direction validation | |
7264 | interface and high-performance Typed Access API.") | |
7265 | (license license:bsd-2))) | |
40f193f3 JL |
7266 | |
7267 | (define-public java-woodstox-core | |
7268 | (package | |
7269 | (name "java-woodstox-core") | |
7270 | (version "5.0.3") | |
7271 | (source (origin | |
7272 | (method url-fetch) | |
7273 | (uri (string-append "https://github.com/FasterXML/woodstox/archive/" | |
7274 | "woodstox-core-" version ".tar.gz")) | |
7275 | (sha256 | |
7276 | (base32 | |
7277 | "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4")))) | |
7278 | (build-system ant-build-system) | |
7279 | (arguments | |
7280 | `(#:jar-name "woodstox.jar" | |
7281 | #:test-exclude | |
7282 | (list "**/Base*.java" "failing/**") | |
7283 | #:phases | |
7284 | (modify-phases %standard-phases | |
7285 | (add-before 'build 'remove-msv-dep | |
7286 | (lambda _ | |
7287 | ;; we don't need osgi, and it depends on msv | |
7288 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") | |
7289 | ;; msv's latest release is from 2011 and we don't need it | |
7290 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") | |
7291 | (delete-file-recursively "src/test/java/wstxtest/osgi") | |
7292 | (delete-file-recursively "src/test/java/wstxtest/msv"))) | |
7293 | (add-before 'build 'copy-resources | |
7294 | (lambda _ | |
7295 | (copy-recursively "src/main/resources" "build/classes")))))) | |
7296 | (inputs | |
7297 | `(("stax2" ,java-stax2-api))) | |
7298 | (native-inputs | |
7299 | `(("junit" ,java-junit))) | |
7300 | (home-page "https://github.com/FasterXML/woodstox") | |
7301 | (synopsis "Stax XML API implementation") | |
7302 | (description "Woodstox is a stax XML API implementation.") | |
7303 | (license license:asl2.0))) | |
262a4d33 JL |
7304 | |
7305 | (define-public java-fasterxml-jackson-dataformat-xml | |
7306 | (package | |
7307 | (name "java-fasterxml-jackson-dataformat-xml") | |
f3bbe029 | 7308 | (version "2.9.4") |
262a4d33 JL |
7309 | (source (origin |
7310 | (method url-fetch) | |
7311 | (uri (string-append "https://github.com/FasterXML/" | |
7312 | "jackson-dataformat-xml/archive/" | |
7313 | "jackson-dataformat-xml-" version ".tar.gz")) | |
7314 | (sha256 | |
7315 | (base32 | |
f3bbe029 | 7316 | "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq")))) |
262a4d33 JL |
7317 | (build-system ant-build-system) |
7318 | (arguments | |
7319 | `(#:jar-name "jackson-dataformat-xml.jar" | |
7320 | #:source-dir "src/main/java" | |
7321 | #:test-exclude | |
7322 | (list "**/failing/**") | |
7323 | #:phases | |
7324 | (modify-phases %standard-phases | |
7325 | (add-before 'configure 'generate-PackageVersion.java | |
7326 | (lambda _ | |
7327 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") | |
7328 | (in (string-append out ".in"))) | |
7329 | (copy-file in out) | |
7330 | (newline) | |
7331 | (substitute* out | |
7332 | (("@package@") "com.fasterxml.jackson.dataformat.xml") | |
7333 | (("@projectversion@") ,version) | |
7334 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") | |
7335 | (("@projectartifactid@") "jackson-dataformat-xml"))))) | |
7336 | (add-before 'build 'copy-resources | |
7337 | (lambda _ | |
7338 | (copy-recursively "src/main/resources" "build/classes")))))) | |
7339 | (inputs | |
7340 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) | |
7341 | ("jackson-core" ,java-fasterxml-jackson-core) | |
7342 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) | |
7343 | ("jackson-databind" ,java-fasterxml-jackson-databind) | |
7344 | ("stax2-api" ,java-stax2-api) | |
7345 | ("woodstox" ,java-woodstox-core))) | |
7346 | (native-inputs | |
7347 | `(("junit" ,java-junit) | |
7348 | ("hamcrest" ,java-hamcrest-core))) | |
7349 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") | |
7350 | (synopsis "Read and write XML") | |
7351 | (description "This package contains Jackson extension component for reading | |
7352 | and writing XML encoded data. | |
7353 | ||
7354 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" | |
7355 | approach (that is, no support is added for \"Schema-first\" approach). Support | |
7356 | for JAXB annotations is provided by JAXB annotation module; this module | |
7357 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, | |
7358 | @code{JsonFactory}) as well as small number of higher level overrides needed to | |
7359 | make data-binding work.") | |
7360 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | |
90a127c7 JL |
7361 | |
7362 | (define-public java-hdrhistogram | |
7363 | (package | |
7364 | (name "java-hdrhistogram") | |
7365 | (version "2.1.9") | |
7366 | (source (origin | |
7367 | (method url-fetch) | |
7368 | (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/" | |
7369 | "archive/HdrHistogram-" version ".tar.gz")) | |
7370 | (sha256 | |
7371 | (base32 | |
7372 | "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv")))) | |
7373 | (build-system ant-build-system) | |
7374 | (arguments | |
7375 | `(#:jar-name "java-hdrhistogram.jar" | |
7376 | #:source-dir "src/main/java" | |
7377 | #:phases | |
7378 | (modify-phases %standard-phases | |
7379 | (add-before 'configure 'set-version | |
7380 | (lambda _ | |
7381 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") | |
7382 | (template (string-append version-java ".template"))) | |
7383 | (copy-file template version-java) | |
7384 | (substitute* version-java | |
7385 | (("\\$VERSION\\$") ,version) | |
7386 | (("\\$BUILD_TIME\\$") "0")) | |
7387 | #t)))))) | |
7388 | (native-inputs | |
7389 | `(("junit" ,java-junit) | |
7390 | ("hamcrest" ,java-hamcrest-core))) | |
7391 | (home-page "https://hdrhistogram.github.io/HdrHistogram") | |
7392 | (synopsis "High dynamic range histogram") | |
7393 | (description "Hdrhistogram allows to create histograms that support | |
7394 | recording and analyzing sampled data value counts across a configurable integer | |
7395 | value range with configurable value precision within the range. Value precision | |
7396 | is expressed as the number of significant digits in the value recording, and | |
7397 | provides control over value quantization behavior across the value range and | |
7398 | the subsequent value resolution at any given level.") | |
7399 | (license license:public-domain))) | |
5d104a27 | 7400 | |
c5ff11dc RW |
7401 | (define-public java-cofoja |
7402 | (package | |
7403 | (name "java-cofoja") | |
7404 | (version "1.3") | |
7405 | (source (origin | |
7406 | (method git-fetch) | |
7407 | (uri (git-reference | |
7408 | (url "https://github.com/nhatminhle/cofoja.git") | |
7409 | (commit (string-append "v" version)))) | |
7410 | (file-name (string-append "java-cofoja-" version "-checkout")) | |
7411 | (sha256 | |
7412 | (base32 | |
7413 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) | |
7414 | (build-system ant-build-system) | |
7415 | (arguments | |
7416 | `(#:build-target "dist" | |
7417 | #:test-target "test" | |
7418 | #:jdk ,icedtea-8 | |
7419 | #:make-flags | |
7420 | (list "-Ddist.dir=dist") | |
7421 | #:modules ((guix build ant-build-system) | |
7422 | (guix build java-utils) | |
7423 | (guix build utils) | |
7424 | (srfi srfi-1) | |
7425 | (ice-9 match)) | |
7426 | #:phases | |
7427 | (modify-phases %standard-phases | |
7428 | ;; The bulid system ignores the class path the ant-build-system sets | |
7429 | ;; up and instead expects to find all dependencies in the "lib" | |
7430 | ;; directory. | |
7431 | (add-after 'unpack 'create-libdir | |
7432 | (lambda* (#:key inputs #:allow-other-keys) | |
7433 | (mkdir-p "lib") | |
7434 | (for-each | |
7435 | (lambda (file) | |
7436 | (let ((target (string-append "lib/" (basename file)))) | |
7437 | (unless (file-exists? target) | |
7438 | (symlink file target)))) | |
7439 | (append-map (match-lambda | |
7440 | ((label . dir) | |
7441 | (find-files dir "\\.jar$"))) | |
7442 | inputs)) | |
7443 | #t)) | |
7444 | (replace 'install (install-jars "dist"))))) | |
7445 | (inputs | |
7446 | `(("java-asm" ,java-asm))) | |
7447 | (native-inputs | |
7448 | `(("java-junit" ,java-junit))) | |
7449 | (home-page "https://github.com/nhatminhle/cofoja") | |
7450 | (synopsis "Contracts for Java") | |
7451 | (description "Contracts for Java, or Cofoja for short, is a contract | |
7452 | programming framework and test tool for Java, which uses annotation processing | |
7453 | and bytecode instrumentation to provide run-time checking. (In particular, | |
7454 | this is not a static analysis tool.)") | |
7455 | (license license:lgpl3+))) | |
7456 | ||
5d104a27 JL |
7457 | (define-public java-aopalliance |
7458 | (package | |
7459 | (name "java-aopalliance") | |
7460 | (version "1.0") | |
7461 | (source (origin | |
7462 | (method git-fetch) | |
7463 | ;; Note: this git repository is not official, but contains the | |
7464 | ;; source code that is in the CVS repository. Downloading the | |
7465 | ;; tarball from sourceforge is undeterministic, and the cvs download | |
7466 | ;; fails. | |
7467 | (uri (git-reference | |
7468 | (url "https://github.com/hoverruan/aopalliance") | |
7469 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) | |
7470 | (file-name (string-append name "-" version)) | |
7471 | (sha256 | |
7472 | (base32 | |
7473 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) | |
7474 | (build-system ant-build-system) | |
7475 | (arguments | |
7476 | `(#:jar-name "java-aopalliance.jar" | |
7477 | #:jdk ,icedtea-8 | |
7478 | #:tests? #f; no tests | |
7479 | #:source-dir "aopalliance/src/main")) | |
7480 | (home-page "http://aopalliance.sourceforge.net") | |
7481 | (synopsis "Aspect-Oriented Programming") | |
7482 | (description "The AOP Alliance project is a joint project between several | |
7483 | software engineering people who are interested in Aspect-Oriented Programming | |
7484 | (AOP) and Java.") | |
7485 | (license license:public-domain))) | |
454536e0 JL |
7486 | |
7487 | (define-public java-javax-inject | |
7488 | (package | |
7489 | (name "java-javax-inject") | |
7490 | (version "tck-1") | |
7491 | (source (origin | |
7492 | (method url-fetch) | |
7493 | (uri (string-append "https://github.com/javax-inject/javax-inject/" | |
7494 | "archive/javax.inject-" version ".tar.gz")) | |
7495 | (sha256 | |
7496 | (base32 | |
7497 | "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0")))) | |
7498 | (build-system ant-build-system) | |
7499 | (arguments | |
7500 | `(#:jar-name "java-javax-inject.jar" | |
7501 | #:jdk ,icedtea-8 | |
7502 | #:tests? #f)); no tests | |
7503 | (home-page "http://github.com/javax-inject/javax-inject") | |
7504 | (synopsis "JSR-330: Dependency Injection for Java") | |
7505 | (description "This package specifies a means for obtaining objects in such | |
7506 | a way as to maximize reusability, testability and maintainability compared to | |
7507 | traditional approaches such as constructors, factories, and service locators | |
7508 | (e.g., JNDI). This process, known as dependency injection, is beneficial to | |
7509 | most nontrivial applications. | |
7510 | ||
7511 | Many types depend on other types. For example, a @var{Stopwatch} might depend | |
7512 | on a @var{TimeSource}. The types on which a type depends are known as its | |
7513 | dependencies. The process of finding an instance of a dependency to use at run | |
7514 | time is known as resolving the dependency. If no such instance can be found, | |
7515 | the dependency is said to be unsatisfied, and the application is broken.") | |
7516 | (license license:asl2.0))) | |
5766984b JL |
7517 | |
7518 | (define-public java-guice | |
7519 | (package | |
7520 | (name "java-guice") | |
7521 | (version "4.1") | |
7522 | (source (origin | |
7523 | (method url-fetch) | |
7524 | (uri (string-append "https://github.com/google/guice/archive/" | |
7525 | version ".tar.gz")) | |
7526 | (file-name (string-append name "-" version ".tar.gz")) | |
7527 | (sha256 | |
7528 | (base32 | |
7529 | "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp")))) | |
7530 | (build-system ant-build-system) | |
7531 | (arguments | |
7532 | `(#:jar-name "java-guice.jar" | |
7533 | #:jdk ,icedtea-8 | |
7534 | #:tests? #f; FIXME: tests are not in a java sub directory | |
7535 | #:source-dir "core/src")) | |
7536 | (inputs | |
7537 | `(("guava" ,java-guava) | |
7538 | ("java-cglib" ,java-cglib) | |
7539 | ("java-aopalliance" ,java-aopalliance) | |
7540 | ("java-javax-inject" ,java-javax-inject) | |
7541 | ("java-asm" ,java-asm))) | |
7542 | (home-page "https://github.com/google/guice") | |
7543 | (synopsis "Lightweight dependency injection framework") | |
7544 | (description "Guice is a lightweight dependency injection framework fo | |
7545 | Java 6 and above.") | |
7546 | (license license:asl2.0))) | |
ec4e8ad7 JL |
7547 | |
7548 | (define-public java-guice-servlet | |
7549 | (package | |
7550 | (inherit java-guice) | |
7551 | (name "java-guice-servlet") | |
7552 | (arguments | |
7553 | `(#:jar-name "guice-servlet.jar" | |
7554 | #:source-dir "extensions/servlet/src/" | |
7555 | #:jdk ,icedtea-8 | |
7556 | #:tests? #f)); FIXME: not in a java subdir | |
7557 | (inputs | |
7558 | `(("guice" ,java-guice) | |
7559 | ("servlet" ,java-tomcat) | |
7560 | ,@(package-inputs java-guice))))) | |
b12fe1e5 JL |
7561 | |
7562 | (define-public java-assertj | |
7563 | (package | |
7564 | (name "java-assertj") | |
7565 | (version "3.8.0") | |
7566 | (source (origin | |
7567 | (method url-fetch) | |
7568 | (uri (string-append "https://github.com/joel-costigliola/" | |
7569 | "assertj-core/archive/" | |
7570 | "assertj-core-" version ".tar.gz")) | |
7571 | (sha256 | |
7572 | (base32 | |
7573 | "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz")))) | |
7574 | (build-system ant-build-system) | |
7575 | (arguments | |
7576 | `(#:jar-name "java-assertj.jar" | |
7577 | #:jdk ,icedtea-8 | |
7578 | #:source-dir "src/main/java" | |
7579 | #:tests? #f)); depends on tng-junit which depends on assertj | |
7580 | (inputs | |
7581 | `(("cglib" ,java-cglib) | |
7582 | ("junit" ,java-junit) | |
7583 | ("hamcrest" ,java-hamcrest-core))) | |
7584 | (native-inputs | |
7585 | `(("mockito" ,java-mockito-1))) | |
7586 | (home-page "https://joel-costigliola.github.io/assertj/index.html") | |
7587 | (synopsis "Fluent assertions for java") | |
7588 | (description "AssertJ core is a Java library that provides a fluent | |
7589 | interface for writing assertions. Its main goal is to improve test code | |
7590 | readability and make maintenance of tests easier.") | |
7591 | (license license:asl2.0))) | |
6768e0a7 JL |
7592 | |
7593 | (define-public java-jboss-javassist | |
7594 | (package | |
7595 | (name "java-jboss-javassist") | |
7596 | (version "3.21.0") | |
7597 | (source (origin | |
7598 | (method url-fetch) | |
7599 | (uri (string-append "https://github.com/jboss-javassist/javassist/" | |
7600 | "archive/rel_" | |
7601 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
7602 | "_ga.tar.gz")) | |
7603 | (sha256 | |
7604 | (base32 | |
7605 | "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf")))) | |
7606 | (build-system ant-build-system) | |
7607 | (arguments | |
7608 | `(#:jar-name "java-jboss-javassist.jar" | |
7609 | #:jdk ,icedtea-8 | |
7610 | #:source-dir "src/main" | |
7611 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 | |
7612 | #:phases | |
7613 | (modify-phases %standard-phases | |
7614 | (add-before 'configure 'remove-binary | |
7615 | (lambda _ | |
7616 | (delete-file "javassist.jar") | |
7617 | #t))))) | |
7618 | (native-inputs | |
7619 | `(("junit" ,java-junit))) | |
7620 | (home-page "https://github.com/jboss-javassist/javassist") | |
7621 | (synopsis "Java bytecode engineering toolkit") | |
7622 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode | |
7623 | manipulation simple. It is a class library for editing bytecodes in Java; it | |
7624 | enables Java programs to define a new class at runtime and to modify a class | |
7625 | file when the JVM loads it.") | |
7626 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. | |
a6dd06d0 JL |
7627 | |
7628 | (define-public java-jcommander | |
7629 | (package | |
7630 | (name "java-jcommander") | |
7631 | (version "1.71") | |
7632 | (source (origin | |
7633 | (method url-fetch) | |
7634 | (uri (string-append "https://github.com/cbeust/jcommander/archive/" | |
7635 | version ".tar.gz")) | |
7636 | (file-name (string-append name "-" version ".tar.gz")) | |
7637 | (sha256 | |
7638 | (base32 | |
7639 | "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx")))) | |
7640 | (build-system ant-build-system) | |
7641 | (arguments | |
7642 | `(#:jar-name "java-jcommander.jar" | |
7643 | #:jdk ,icedtea-8 | |
7644 | #:tests? #f; requires testng which depends on jcommander | |
7645 | #:source-dir "src/main/java")) | |
7646 | (home-page "http://jcommander.org") | |
7647 | (synopsis "Command line parameters parser") | |
7648 | (description "JCommander is a very small Java framework that makes it | |
7649 | trivial to parse command line parameters. Parameters are declared with | |
7650 | annotations.") | |
7651 | (license license:asl2.0))) | |
11bc385b JL |
7652 | |
7653 | (define-public java-bsh | |
7654 | (package | |
7655 | (name "java-bsh") | |
7656 | (version "2.0b6") | |
7657 | (source (origin | |
7658 | (method url-fetch) | |
7659 | (uri (string-append "https://github.com/beanshell/beanshell/archive/" | |
7660 | version ".tar.gz")) | |
7661 | (file-name (string-append name "-" version ".tar.gz")) | |
7662 | (sha256 | |
7663 | (base32 | |
7664 | "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv")))) | |
7665 | (build-system ant-build-system) | |
7666 | (arguments | |
7667 | `(#:build-target "jarall" | |
7668 | #:test-target "junit-tests-all" | |
7669 | #:phases | |
7670 | (modify-phases %standard-phases | |
7671 | (replace 'install | |
7672 | (lambda* (#:key outputs #:allow-other-keys) | |
7673 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) | |
7674 | (mkdir-p share) | |
7675 | (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar")) | |
7676 | #t)))))) | |
7677 | (home-page "http://beanshell.org/") | |
7678 | (synopsis "Lightweight Scripting for Java") | |
7679 | (description "BeanShell is a small, free, embeddable Java source | |
7680 | interpreter with object scripting language features, written in Java. | |
7681 | BeanShell dynamically executes standard Java syntax and extends it with common | |
7682 | scripting conveniences such as loose types, commands, and method closures like | |
7683 | those in Perl and JavaScript.") | |
7684 | (license license:asl2.0))) | |
7a343e97 JL |
7685 | |
7686 | (define-public java-fest-util | |
7687 | (package | |
7688 | (name "java-fest-util") | |
7689 | (version "1.2.5") | |
7690 | (source (origin | |
7691 | (method url-fetch) | |
7692 | (uri (string-append "https://github.com/alexruiz/fest-util/" | |
7693 | "archive/fest-util-" version ".tar.gz")) | |
7694 | (sha256 | |
7695 | (base32 | |
7696 | "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8")))) | |
7697 | (build-system ant-build-system) | |
7698 | (arguments | |
7699 | `(#:jar-name "java-fest-util.jar" | |
7700 | #:source-dir "src/main/java")) | |
7701 | (native-inputs | |
7702 | `(("junit" ,java-junit) | |
7703 | ("hamcrest" ,java-hamcrest-core))) | |
7704 | (home-page "https://github.com/alexruiz/fest-util") | |
7705 | (synopsis "FEST common utilities") | |
7706 | (description "Common utilities used in all FEST module.") | |
7707 | (license license:asl2.0))) | |
3c6c8358 JL |
7708 | |
7709 | (define-public java-fest-test | |
7710 | (package | |
7711 | (name "java-fest-test") | |
7712 | (version "2.1.0") | |
7713 | (source (origin | |
7714 | (method url-fetch) | |
7715 | (uri (string-append "https://github.com/alexruiz/fest-test/" | |
7716 | "archive/fest-test-" version ".tar.gz")) | |
7717 | (sha256 | |
7718 | (base32 | |
7719 | "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g")))) | |
7720 | (build-system ant-build-system) | |
7721 | (arguments | |
7722 | `(#:jar-name "java-fest-test.jar" | |
7723 | #:source-dir "src/main/java" | |
7724 | #:tests? #f)); no tests | |
7725 | (inputs | |
7726 | `(("junit" ,java-junit))) | |
7727 | (home-page "https://github.com/alexruiz/fest-test") | |
7728 | (synopsis "Common FEST testing infrastructure") | |
7729 | (description "Fest-test contains the common FEST testing infrastructure.") | |
7730 | (license license:asl2.0))) | |
ca98e448 JL |
7731 | |
7732 | (define-public java-fest-assert | |
7733 | (package | |
7734 | (name "java-fest-assert") | |
7735 | (version "2.0M10") | |
7736 | (source (origin | |
7737 | (method url-fetch) | |
7738 | (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/" | |
7739 | "archive/fest-assert-core-" version ".tar.gz")) | |
7740 | (sha256 | |
7741 | (base32 | |
7742 | "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw")))) | |
7743 | (build-system ant-build-system) | |
7744 | (arguments | |
7745 | `(#:jar-name "java-fest-assert.jar" | |
7746 | #:source-dir "src/main/java" | |
7747 | #:test-exclude | |
7748 | (list | |
7749 | "**/Abstract*.java" | |
7750 | "**/*BaseTest.java" | |
7751 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses | |
7752 | "**/MessageFormatter_format_Test.java" | |
7753 | "**/internal/*/*_assert*_Test.java"))) | |
7754 | (inputs | |
7755 | `(("java-fest-util" ,java-fest-util))) | |
7756 | (native-inputs | |
7757 | `(("java-junit" ,java-junit) | |
7758 | ("java-fest-test" ,java-fest-test) | |
7759 | ("java-hamcrest-core" ,java-hamcrest-core) | |
7760 | ("java-mockito" ,java-mockito-1) | |
7761 | ("java-cglib" ,java-cglib) | |
7762 | ("java-objenesis" ,java-objenesis) | |
7763 | ("java-asm" ,java-asm))) | |
7764 | (home-page "https://github.com/alexruiz/fest-assert-2.x") | |
7765 | (synopsis "FEST fluent assertions") | |
7766 | (description "FEST-Assert provides a fluent interface for assertions.") | |
7767 | (license license:asl2.0))) | |
0442d897 JL |
7768 | |
7769 | (define-public java-testng | |
7770 | (package | |
7771 | (name "java-testng") | |
3422e10e | 7772 | (version "6.14.3") |
0442d897 | 7773 | (source (origin |
36b39d16 RW |
7774 | (method git-fetch) |
7775 | (uri (git-reference | |
7776 | (url "https://github.com/cbeust/testng.git") | |
7777 | (commit version))) | |
7778 | (file-name (string-append name "-" version "-checkout")) | |
0442d897 JL |
7779 | (sha256 |
7780 | (base32 | |
3422e10e | 7781 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
0442d897 JL |
7782 | (build-system ant-build-system) |
7783 | (arguments | |
7784 | `(#:jdk ,icedtea-8; java.util.function | |
7785 | #:jar-name "java-testng.jar" | |
7786 | #:source-dir "src/main/java" | |
7787 | #:phases | |
7788 | (modify-phases %standard-phases | |
36b39d16 RW |
7789 | ;; FIXME: I don't know why these tests fail |
7790 | (add-after 'unpack 'delete-failing-tests | |
7791 | (lambda _ | |
7792 | (substitute* "src/test/resources/testng.xml" | |
7793 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") | |
7794 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")) | |
7795 | #t)) | |
7796 | ;; We don't have groovy | |
7797 | (add-after 'unpack 'delete-groovy-tests | |
7798 | (lambda _ | |
7799 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") | |
7800 | (substitute* "src/test/resources/testng.xml" | |
7801 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")) | |
7802 | #t)) | |
0442d897 JL |
7803 | (add-before 'build 'copy-resources |
7804 | (lambda _ | |
7805 | (copy-recursively "src/main/resources" "build/classes") | |
7806 | #t)) | |
7807 | (add-before 'check 'copy-test-resources | |
7808 | (lambda _ | |
7809 | (copy-recursively "src/test/resources" "build/test-classes") | |
7810 | #t)) | |
7811 | (replace 'check | |
7812 | (lambda _ | |
7813 | (system* "ant" "compile-tests") | |
7814 | ;; we don't have groovy | |
7815 | (substitute* "src/test/resources/testng.xml" | |
7816 | (("<class name=\"test.groovy.GroovyTest\" />") "")) | |
7817 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") | |
7818 | ":build/classes" | |
7819 | ":build/test-classes") | |
7820 | "-Dtest.resources.dir=src/test/resources" | |
7821 | "org.testng.TestNG" "src/test/resources/testng.xml"))))))) | |
7822 | (propagated-inputs | |
7823 | `(("junit" ,java-junit) | |
7824 | ("java-jsr305" ,java-jsr305) | |
7825 | ("java-bsh" ,java-bsh) | |
7826 | ("java-jcommander" ,java-jcommander) | |
7827 | ("java-guice" ,java-guice) | |
7828 | ("snakeyaml" ,java-snakeyaml))) | |
7829 | (native-inputs | |
7830 | `(("guava" ,java-guava) | |
7831 | ("java-javax-inject" ,java-javax-inject) | |
7832 | ("java-hamcrest" ,java-hamcrest-all) | |
7833 | ("java-assertj" ,java-assertj) | |
36b39d16 | 7834 | ("java-mockito" ,java-mockito-1) |
0442d897 JL |
7835 | ("cglib" ,java-cglib) |
7836 | ("asm" ,java-asm) | |
7837 | ("aopalliance" ,java-aopalliance))) | |
7838 | (home-page "http://testng.org") | |
7839 | (synopsis "Testing framework") | |
7840 | (description "TestNG is a testing framework inspired from JUnit and NUnit | |
7841 | but introducing some new functionalities that make it more powerful and easier | |
7842 | to use.") | |
7843 | (license license:asl2.0))) | |
1717a7de JL |
7844 | |
7845 | (define-public java-jnacl | |
3e87923a RW |
7846 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
7847 | (revision "2")) | |
7848 | (package | |
7849 | (name "java-jnacl") | |
7850 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) | |
7851 | (source (origin | |
7852 | (method git-fetch) | |
7853 | (uri (git-reference | |
7854 | (url "https://github.com/neilalexander/jnacl.git") | |
7855 | (commit commit))) | |
6c34ad73 | 7856 | (file-name (git-file-name name version)) |
3e87923a RW |
7857 | (sha256 |
7858 | (base32 | |
7859 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) | |
7860 | (build-system ant-build-system) | |
7861 | (arguments | |
8c7d32e0 | 7862 | `(#:jar-name "jnacl.jar" |
3e87923a RW |
7863 | #:source-dir "src/main/java" |
7864 | #:jdk ,icedtea-8 | |
7865 | #:phases | |
7866 | (modify-phases %standard-phases | |
7867 | (add-before 'build 'fix-tests | |
7868 | (lambda _ | |
7869 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" | |
7870 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") | |
7871 | (("assertions.Assertions") "assertions.api.Assertions")) | |
7872 | #t)) | |
7873 | (replace 'check | |
7874 | (lambda _ | |
7875 | (invoke "ant" "compile-tests") | |
7876 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
7877 | ":build/classes" | |
7878 | ":build/test-classes") | |
7879 | "org.testng.TestNG" "-testclass" | |
7880 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") | |
7881 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
7882 | ":build/classes" | |
7883 | ":build/test-classes") | |
7884 | "org.testng.TestNG" "-testclass" | |
7885 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class") | |
7886 | #t))))) | |
7887 | (native-inputs | |
7888 | `(("java-testng" ,java-testng) | |
7889 | ("java-fest-util" ,java-fest-util) | |
7890 | ("java-fest-assert" ,java-fest-assert))) | |
7891 | (home-page "https://github.com/neilalexander/jnacl") | |
7892 | (synopsis "Java implementation of NaCl") | |
7893 | (description "Pure Java implementation of the NaCl: Networking and | |
1717a7de | 7894 | Cryptography library.") |
3e87923a | 7895 | (license license:bsd-2)))) |
eaf3cb7a JL |
7896 | |
7897 | (define-public java-mvel2 | |
7898 | (package | |
7899 | (name "java-mvel2") | |
7900 | (version "2.3.1") | |
7901 | (source (origin | |
7902 | (method url-fetch) | |
7903 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" | |
7904 | version ".Final.tar.gz")) | |
7905 | (sha256 | |
7906 | (base32 | |
7907 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) | |
7908 | (build-system ant-build-system) | |
7909 | (arguments | |
7910 | `(#:jar-name "mvel2.jar" | |
7911 | #:source-dir "src/main/java" | |
7912 | #:test-exclude | |
7913 | (list "**/Abstract*.java" | |
7914 | ;; Base class with no tests | |
7915 | "**/MVELThreadTest.java") | |
7916 | #:phases | |
7917 | (modify-phases %standard-phases | |
7918 | (add-after 'install 'install-bin | |
7919 | (lambda* (#:key outputs #:allow-other-keys) | |
7920 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
7921 | (mkdir-p bin) | |
7922 | (with-output-to-file (string-append bin "/mvel2") | |
7923 | (lambda _ | |
7924 | (display | |
7925 | (string-append | |
7926 | "#!" (which "bash") "\n" | |
7927 | "if [ \"$#\" -ne \"2\" ]; then\n" | |
7928 | "echo 'Usage: mvel2 <script> <out.dir>'\n" | |
7929 | "exit\n" | |
7930 | "fi\n" | |
7931 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") | |
7932 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" | |
7933 | " org.mvel2.sh.Main $1")))) | |
7934 | (chmod (string-append bin "/mvel2") #o755)) | |
7935 | #t))))) | |
7936 | (native-inputs | |
7937 | `(("junit" ,java-junit) | |
7938 | ("hamcrest" ,java-hamcrest-core))) | |
7939 | (home-page "https://github.com/mvel/mvel") | |
7940 | (synopsis "MVFLEX Expression Language") | |
7941 | (description "MVEL has largely been inspired by Java syntax, but has some | |
7942 | fundamental differences aimed at making it more efficient as an expression | |
7943 | language, such as operators that directly support collection, array and string | |
7944 | matching, as well as regular expressions. MVEL is used to evaluate expressions | |
7945 | written using Java syntax. | |
7946 | ||
7947 | In addition to the expression language, MVEL serves as a templating language for | |
7948 | configuration and string construction.") | |
7949 | (license license:asl2.0))) | |
d54d7d31 | 7950 | |
9e325e8c RW |
7951 | (define-public java-commons-jexl-2 |
7952 | (package | |
7953 | (name "java-commons-jexl") | |
7954 | (version "2.1.1") | |
7955 | (source (origin | |
7956 | (method url-fetch) | |
7957 | (uri (string-append "mirror://apache/commons/jexl/source/" | |
7958 | "commons-jexl-" version "-src.tar.gz")) | |
7959 | (sha256 | |
7960 | (base32 | |
7961 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) | |
7962 | (build-system ant-build-system) | |
7963 | (arguments | |
7964 | `(#:jar-name "commons-jexl-2.jar" | |
7965 | #:jdk ,icedtea-8 | |
7966 | #:source-dir "src/main/java" | |
7967 | #:phases | |
7968 | (modify-phases %standard-phases | |
7969 | (add-before 'check 'disable-broken-tests | |
7970 | (lambda* (#:key inputs #:allow-other-keys) | |
7971 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" | |
7972 | (substitute* "ArithmeticTest.java" | |
7973 | (("asserter.assertExpression\\(\"3 / 0\"") "//") | |
7974 | (("asserter.assertExpression\\(\"imanull") "//")) | |
7975 | ;; This test fails with "ambiguous method invocation" | |
7976 | (delete-file "CacheTest.java") | |
7977 | ;; This test doesn't have access to the temp directory | |
7978 | (substitute* "ClassCreatorTest.java" | |
7979 | (("java.io.tmpdir") "user.dir")) | |
7980 | ;; This test fails in trying to detect whether it can run. | |
7981 | (substitute* "ClassCreator.java" | |
7982 | (("boolean canRun =.*") "boolean canRun = false;\n")) | |
7983 | ;; ...and these tests depend on it. | |
7984 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") | |
7985 | (delete-file "scripting/JexlScriptEngineTest.java")) | |
7986 | #t)) | |
7987 | (add-before 'build 'run-javacc | |
7988 | (lambda _ | |
7989 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" | |
080d0b60 RW |
7990 | (invoke "java" "jjtree" "Parser.jjt") |
7991 | (invoke "java" "javacc" "Parser.jj")) | |
7992 | #t))))) | |
9e325e8c RW |
7993 | (inputs |
7994 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) | |
7995 | (native-inputs | |
7996 | `(("java-junit" ,java-junit) | |
7997 | ("java-hamcrest-core" ,java-hamcrest-core) | |
7998 | ("javacc" ,javacc-4))) | |
7999 | (home-page "https://commons.apache.org/proper/commons-jexl/") | |
8000 | (synopsis "Java Expression Language ") | |
8001 | (description "JEXL is a library intended to facilitate the implementation | |
8002 | of dynamic and scripting features in applications and frameworks written in | |
8003 | Java. JEXL implements an Expression Language based on some extensions to the | |
8004 | JSTL Expression Language supporting most of the constructs seen in | |
8005 | shell-script or ECMAScript. Its goal is to expose scripting features usable | |
8006 | by technical operatives or consultants working with enterprise platforms.") | |
8007 | (license license:asl2.0))) | |
8008 | ||
d54d7d31 JL |
8009 | (define-public java-lz4 |
8010 | (package | |
8011 | (name "java-lz4") | |
8012 | (version "1.4.0") | |
8013 | (source (origin | |
8014 | (method url-fetch) | |
8015 | (uri (string-append "https://github.com/lz4/lz4-java/archive/" | |
8016 | version ".tar.gz")) | |
8017 | (file-name (string-append name "-" version ".tar.gz")) | |
8018 | (sha256 | |
8019 | (base32 | |
8020 | "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54")))) | |
8021 | (build-system ant-build-system) | |
8022 | (arguments | |
8023 | `(#:jar-name "lz4.jar" | |
8024 | #:jdk ,icedtea-8 | |
8025 | #:source-dir "src/java:src/java-unsafe" | |
8026 | #:tests? #f; FIXME: requires more dependencies | |
8027 | #:phases | |
8028 | (modify-phases %standard-phases | |
8029 | (add-before 'configure 'generate-source | |
8030 | (lambda _ | |
8031 | (with-directory-excursion "src/build/source_templates" | |
1b6bc516 RW |
8032 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
8033 | #t))))) | |
d54d7d31 JL |
8034 | (native-inputs |
8035 | `(("mvel" ,java-mvel2))) | |
8036 | (home-page "https://jpountz.github.io/lz4-java") | |
8037 | (synopsis "Compression algorithm") | |
8038 | (description "LZ4 - Java is a Java port of the popular lz4 compression | |
8039 | algorithms and xxHash hashing algorithm.") | |
8040 | (license license:asl2.0))) | |
62315865 JL |
8041 | |
8042 | (define-public java-bouncycastle-bcprov | |
8043 | (package | |
8044 | (name "java-bouncycastle-bcprov") | |
8045 | (version "1.58") | |
8046 | (source (origin | |
8047 | (method url-fetch) | |
8048 | (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz") | |
8049 | (sha256 | |
8050 | (base32 | |
8051 | "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n")))) | |
8052 | (build-system ant-build-system) | |
8053 | (arguments | |
8054 | `(#:jar-name "bouncycastle-bcprov.jar" | |
8055 | #:tests? #f; no tests | |
8056 | #:source-dir "src" | |
8057 | #:phases | |
8058 | (modify-phases %standard-phases | |
8059 | (add-before 'configure 'unzip-src | |
8060 | (lambda _ | |
8061 | (mkdir-p "src") | |
8062 | (with-directory-excursion "src" | |
9be4b9fa RW |
8063 | (invoke "unzip" "../src.zip")) |
8064 | #t))))) | |
62315865 JL |
8065 | (native-inputs |
8066 | `(("unzip" ,unzip) | |
8067 | ("junit" ,java-junit))) | |
8068 | (home-page "https://www.bouncycastle.org") | |
8069 | (synopsis "Cryptographic library") | |
8070 | (description "Bouncy Castle Provider (bcprov) is a cryptographic library | |
8071 | for the Java programming language.") | |
8072 | (license license:expat))) | |
31208367 JL |
8073 | |
8074 | (define-public java-bouncycastle-bcpkix | |
8075 | (package | |
8076 | (name "java-bouncycastle-bcpkix") | |
8077 | (version "1.58") | |
8078 | (source (origin | |
8079 | (method url-fetch) | |
8080 | (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz") | |
8081 | (sha256 | |
8082 | (base32 | |
8083 | "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2")))) | |
8084 | (build-system ant-build-system) | |
8085 | (arguments | |
8086 | `(#:jar-name "bouncycastle-bcpkix.jar" | |
8087 | #:tests? #f; no tests | |
8088 | #:source-dir "src" | |
8089 | #:phases | |
8090 | (modify-phases %standard-phases | |
8091 | (add-before 'configure 'unzip-src | |
8092 | (lambda _ | |
8093 | (mkdir-p "src") | |
8094 | (with-directory-excursion "src" | |
201084ac RW |
8095 | (invoke "unzip" "../src.zip")) |
8096 | #t))))) | |
31208367 JL |
8097 | (native-inputs |
8098 | `(("unzip" ,unzip) | |
8099 | ("junit" ,java-junit))) | |
8100 | (inputs | |
8101 | `(("bcprov" ,java-bouncycastle-bcprov))) | |
8102 | (home-page "https://www.bouncycastle.org") | |
8103 | (synopsis "Cryptographic library") | |
8104 | (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP, | |
8105 | CMP, and CRMF.") | |
8106 | (license license:expat))) | |
a53d9ac0 JL |
8107 | |
8108 | (define-public java-lmax-disruptor | |
8109 | (package | |
8110 | (name "java-lmax-disruptor") | |
8111 | (version "3.3.7") | |
8112 | (source (origin | |
8113 | (method url-fetch) | |
8114 | (uri (string-append "https://github.com/LMAX-Exchange/disruptor/" | |
8115 | "archive/" version ".tar.gz")) | |
8116 | (file-name (string-append name "-" version ".tar.gz")) | |
8117 | (sha256 | |
8118 | (base32 | |
8119 | "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g")))) | |
8120 | (build-system ant-build-system) | |
8121 | (arguments | |
8122 | `(#:jar-name "java-lmax-disruptor.jar" | |
8123 | #:jdk ,icedtea-8 | |
8124 | #:tests? #f)); tests hang | |
8125 | (inputs | |
8126 | `(("junit" ,java-junit) | |
8127 | ("java-hdrhistogram" ,java-hdrhistogram) | |
8128 | ("java-jmock" ,java-jmock) | |
8129 | ("java-jmock-legacy" ,java-jmock-legacy) | |
8130 | ("java-jmock-junit4" ,java-jmock-junit4) | |
8131 | ("java-hamcrest-all" ,java-hamcrest-all))) | |
8132 | (native-inputs | |
8133 | `(("cglib" ,java-cglib) | |
8134 | ("objenesis" ,java-objenesis) | |
8135 | ("asm" ,java-asm))) | |
8136 | (home-page "https://www.lmax.com/disruptor") | |
8137 | (synopsis "High performance inter-thread communication") | |
8138 | (description "LMAX Disruptor is a software pattern and software component | |
8139 | for high performance inter-thread communication that avoids the need for | |
8140 | message queues or resource locking.") | |
8141 | (license license:asl2.0))) | |
5619556b | 8142 | |
5e3abfc8 RW |
8143 | (define-public java-commons-bcel |
8144 | (package | |
8145 | (name "java-commons-bcel") | |
8146 | (version "6.1") | |
8147 | (source (origin | |
8148 | (method url-fetch) | |
8149 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" | |
8150 | version "-src.tar.gz")) | |
8151 | (sha256 | |
8152 | (base32 | |
8153 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) | |
8154 | (build-system ant-build-system) | |
8155 | (arguments | |
8156 | `(#:jar-name "bcel.jar" | |
8157 | #:jdk ,icedtea-8 | |
8158 | #:source-dir "src/main/java" | |
8159 | #:test-dir "src/test/java" | |
8160 | ;; FIXME: Tests require the unpackaged jna. | |
8161 | #:tests? #f)) | |
8162 | (home-page "https://commons.apache.org/proper/commons-bcel/") | |
8163 | (synopsis "Byte code engineering library") | |
8164 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is | |
8165 | intended to give users a convenient way to analyze, create, and | |
8166 | manipulate (binary) Java class files. Classes are represented by objects | |
8167 | which contain all the symbolic information of the given class: methods, fields | |
8168 | and byte code instructions, in particular. | |
8169 | ||
8170 | Such objects can be read from an existing file, be transformed by a | |
8171 | program (e.g. a class loader at run-time) and written to a file again. An | |
8172 | even more interesting application is the creation of classes from scratch at | |
8173 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful | |
8174 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format | |
8175 | of Java @code{.class} files.") | |
8176 | (license license:asl2.0))) | |
8177 | ||
5619556b JL |
8178 | (define-public java-xerial-core |
8179 | (package | |
8180 | (name "java-xerial-core") | |
8181 | (version "2.1") | |
8182 | (source (origin | |
8183 | (method url-fetch) | |
8184 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" | |
8185 | version ".tar.gz")) | |
8186 | (file-name (string-append name "-" version ".tar.gz")) | |
8187 | (sha256 | |
8188 | (base32 | |
8189 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) | |
8190 | (build-system ant-build-system) | |
8191 | (arguments | |
8192 | `(#:jar-name "xerial-core.jar" | |
8193 | #:source-dir "xerial-core/src/main/java" | |
8194 | #:test-dir "xerial-core/src/test" | |
8195 | #:phases | |
8196 | (modify-phases %standard-phases | |
8197 | (add-before 'build 'copy-resources | |
8198 | (lambda _ | |
8199 | (copy-recursively "xerial-core/src/main/resources" | |
8200 | "build/classes") | |
8201 | #t))))) | |
8202 | (native-inputs | |
8203 | `(("junit" ,java-junit) | |
8204 | ("hamcrest" ,java-hamcrest-core))) | |
8205 | (home-page "https://github.com/xerial/xerial-java") | |
f4548394 | 8206 | (synopsis "Data management libraries for Java") |
5619556b | 8207 | (description "Xerial is a set of data management libraries for the Java |
f4548394 | 8208 | programming language. The ultimate goal of the Xerial project is to manage |
5619556b JL |
8209 | everything as database, including class objects, text format data, data |
8210 | streams, etc.") | |
8211 | (license license:asl2.0))) | |
8d6a4815 JL |
8212 | |
8213 | (define-public java-powermock-reflect | |
8214 | (package | |
8215 | (name "java-powermock-reflect") | |
8216 | (version "1.7.3") | |
8217 | (source (origin | |
8218 | (method url-fetch) | |
8219 | (uri (string-append "https://github.com/powermock/powermock/" | |
8220 | "archive/powermock-" version ".tar.gz")) | |
8221 | (file-name (string-append name "-" version ".tar.gz")) | |
8222 | (sha256 | |
8223 | (base32 | |
8224 | "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy")) | |
8225 | (patches | |
8226 | (search-patches "java-powermock-fix-java-files.patch")))) | |
8227 | (build-system ant-build-system) | |
8228 | (arguments | |
8229 | `(#:jar-name "java-powermock-reflect.jar" | |
8230 | #:jdk ,icedtea-8 | |
8231 | #:source-dir "powermock-reflect/src/main/java" | |
8232 | #:test-dir "powermock-reflect/src/test")) | |
8233 | (inputs | |
8234 | `(("java-objenesis" ,java-objenesis))) | |
8235 | (native-inputs | |
8236 | `(("junit" ,java-junit) | |
8237 | ("cglib" ,java-cglib) | |
8238 | ("asm" ,java-asm) | |
8239 | ("hamcrest" ,java-hamcrest-core) | |
8240 | ("assertj" ,java-assertj))) | |
8241 | (home-page "https://github.com/powermock/powermock") | |
8242 | (synopsis "Mock library extension framework") | |
8243 | (description "PowerMock is a framework that extends other mock libraries | |
8244 | such as EasyMock with more powerful capabilities. PowerMock uses a custom | |
8245 | classloader and bytecode manipulation to enable mocking of static methods, | |
8246 | constructors, final classes and methods, private methods, removal of static | |
8247 | initializers and more. By using a custom classloader no changes need to be | |
8248 | done to the IDE or continuous integration servers which simplifies adoption.") | |
8249 | (license license:asl2.0))) | |
d4a4d5da JL |
8250 | |
8251 | (define-public java-powermock-core | |
8252 | (package | |
8253 | (inherit java-powermock-reflect) | |
8254 | (name "java-powermock-core") | |
8255 | (arguments | |
8256 | `(#:jar-name "java-powermock-core.jar" | |
8257 | #:source-dir "powermock-core/src/main/java" | |
8258 | #:test-dir "powermock-core/src/test" | |
8259 | #:tests? #f; requires powermock-api | |
59e0021c JL |
8260 | #:jdk ,icedtea-8 |
8261 | #:phases | |
8262 | (modify-phases %standard-phases | |
8263 | (add-before 'build 'copy-resources | |
8264 | (lambda _ | |
8265 | (copy-recursively "powermock-core/src/main/resources" | |
8266 | "build/classes")))))) | |
d4a4d5da JL |
8267 | (inputs |
8268 | `(("reflect" ,java-powermock-reflect) | |
8269 | ("javassist" ,java-jboss-javassist))) | |
8270 | (native-inputs | |
8271 | `(("junit" ,java-junit) | |
8272 | ("assertj" ,java-assertj) | |
8273 | ("mockito" ,java-mockito-1))))) | |
2d5d65d7 JL |
8274 | |
8275 | (define-public java-powermock-api-support | |
8276 | (package | |
8277 | (inherit java-powermock-reflect) | |
8278 | (name "java-powermock-api-support") | |
8279 | (build-system ant-build-system) | |
8280 | (arguments | |
8281 | `(#:jar-name "java-powermock-api-support.jar" | |
8282 | #:jdk ,icedtea-8 | |
8283 | #:source-dir "powermock-api/powermock-api-support/src/main/java" | |
8284 | #:tests? #f)); no tests | |
8285 | (inputs | |
8286 | `(("core" ,java-powermock-core) | |
8287 | ("reflect" ,java-powermock-reflect))))) | |
6c21d46c JL |
8288 | |
8289 | (define-public java-powermock-modules-junit4-common | |
8290 | (package | |
8291 | (inherit java-powermock-reflect) | |
8292 | (name "java-powermock-modules-junit4-common") | |
8293 | (build-system ant-build-system) | |
8294 | (arguments | |
8295 | `(#:jar-name "java-powermock-modules-junit4-common.jar" | |
8296 | #:jdk ,icedtea-8 | |
8297 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" | |
8298 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) | |
8299 | (inputs | |
8300 | `(("core" ,java-powermock-core) | |
8301 | ("easymock" ,java-easymock) | |
8302 | ("reflect" ,java-powermock-reflect) | |
8303 | ("hamcrest" ,java-hamcrest-core) | |
8304 | ("cglib" ,java-cglib))))) | |
33db1681 JL |
8305 | |
8306 | (define-public java-powermock-modules-junit4 | |
8307 | (package | |
8308 | (inherit java-powermock-reflect) | |
8309 | (name "java-powermock-modules-junit4") | |
8310 | (build-system ant-build-system) | |
8311 | (arguments | |
8312 | `(#:jar-name "java-powermock-modules-junit4.jar" | |
8313 | #:jdk ,icedtea-8 | |
8314 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" | |
1124683d JL |
8315 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
8316 | #:phases | |
8317 | (modify-phases %standard-phases | |
8318 | (add-before 'build 'fix-junit-detection | |
8319 | (lambda _ | |
8320 | ;; Our junit version is 4.12-SNAPSHOT | |
8321 | (substitute* (find-files "powermock-modules/powermock-module-junit4" | |
8322 | "PowerMockJUnit4MethodValidator.java") | |
8323 | (("4.12") "4.12-SNAPSHOT"))))))) | |
33db1681 JL |
8324 | (inputs |
8325 | `(("core" ,java-powermock-core) | |
8326 | ("reflect" ,java-powermock-reflect) | |
8327 | ("common" ,java-powermock-modules-junit4-common) | |
8328 | ("cglib" ,java-cglib))) | |
8329 | (native-inputs | |
8330 | `(("easymock" ,java-easymock) | |
8331 | ("hamcrest" ,java-hamcrest-core) | |
8332 | ("objenesis" ,java-objenesis) | |
8333 | ("asm" ,java-asm) | |
8334 | ("junit" ,java-junit))))) | |
4d508975 JL |
8335 | |
8336 | (define-public java-powermock-api-easymock | |
8337 | (package | |
8338 | (inherit java-powermock-reflect) | |
8339 | (name "java-powermock-api-easymock") | |
8340 | (build-system ant-build-system) | |
8341 | (arguments | |
8342 | `(#:jar-name "java-powermock-api-easymock.jar" | |
8343 | #:jdk ,icedtea-8 | |
8344 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" | |
8345 | #:tests? #f; no tests | |
8346 | #:phases | |
8347 | (modify-phases %standard-phases | |
8348 | (add-before 'build 'fix-file | |
8349 | (lambda _ | |
8350 | ;; FIXME: This looks wrong, but it fixes a build error. | |
8351 | (with-directory-excursion "powermock-api/powermock-api-easymock" | |
8352 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" | |
8353 | (("classLoader instanceof MockClassLoader") "false") | |
8354 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) | |
8355 | #t))))) | |
8356 | (inputs | |
8357 | `(("core" ,java-powermock-core) | |
8358 | ("easymock" ,java-easymock) | |
8359 | ("reflect" ,java-powermock-reflect) | |
8360 | ("support" ,java-powermock-api-support) | |
8361 | ("cglib" ,java-cglib))))) | |
5fb3e822 JL |
8362 | |
8363 | (define-public java-jboss-jms-api-spec | |
8364 | (package | |
8365 | (name "java-jboss-jms-api-spec") | |
8366 | (version "2.0") | |
8367 | (source (origin | |
8368 | (method url-fetch) | |
8369 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" | |
8370 | "archive/jboss-jms-api_" version | |
8371 | "_spec-1.0.1.Final.tar.gz")) | |
8372 | (sha256 | |
8373 | (base32 | |
8374 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) | |
8375 | (build-system ant-build-system) | |
8376 | (arguments | |
8377 | `(#:jar-name "java-jboss-jms-api_spec.jar" | |
8378 | #:jdk ,icedtea-8 | |
8379 | #:source-dir "." | |
8380 | #:tests? #f)); no tests | |
8381 | (home-page "https://github.com/jboss/jboss-jms-api_spec") | |
8382 | (synopsis "Java Message Service API specification") | |
8383 | (description "Java Message Service (JMS) API is used to send messages | |
8384 | messages between two or more clients. It is a messaging standard that allows | |
8385 | application components to create, send, receive, and read messages.") | |
8386 | ; either gpl2 only with GPL Classpath Exception, or cddl. | |
8387 | (license (list license:gpl2 license:cddl1.0)))) | |
3ff47c66 JL |
8388 | |
8389 | (define-public java-mail | |
8390 | (package | |
8391 | (name "java-mail") | |
8392 | (version "1.6.0") | |
8393 | (source (origin | |
8394 | (method url-fetch) | |
8395 | (uri (string-append "https://github.com/javaee/javamail/archive/" | |
8396 | "JAVAMAIL-1_6_0.tar.gz")) | |
8397 | (sha256 | |
8398 | (base32 | |
8399 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) | |
8400 | (build-system ant-build-system) | |
8401 | (arguments | |
8402 | `(#:jar-name "java-mail.jar" | |
8403 | #:jdk ,icedtea-8 | |
8404 | #:source-dir "mail/src/main/java" | |
8405 | #:test-dir "mail/src/test" | |
8406 | #:test-exclude | |
8407 | (list "**/CollectorFormatterTest.java" | |
8408 | "**/CompactFormatterTest.java" | |
8409 | "**/DurationFilterTest.java" | |
8410 | "**/MailHandlerTest.java" | |
8411 | "**/GetLocalAddressTest.java" | |
8412 | ;; FIXME: both end with: | |
8413 | ;; java.lang.ClassNotFoundException: | |
8414 | ;; javax.mail.internet.MimeMultipartParseTest | |
8415 | "**/MimeMultipartParseTest.java" | |
8416 | "**/SearchTermSerializationTest.java") | |
8417 | #:phases | |
8418 | (modify-phases %standard-phases | |
8419 | (add-before 'configure 'move-version.java | |
8420 | (lambda _ | |
8421 | (copy-file "mail/src/main/resources/javax/mail/Version.java" | |
218d1dde RW |
8422 | "mail/src/main/java/javax/mail/Version.java") |
8423 | #t)) | |
3ff47c66 JL |
8424 | (add-before 'build 'copy-resources |
8425 | (lambda _ | |
8426 | (copy-recursively "mail/src/main/resources/META-INF" | |
8427 | "build/classes/META-INF") | |
8428 | #t))))) | |
8429 | (native-inputs | |
8430 | `(("junit" ,java-junit) | |
8431 | ("hamcrest" ,java-hamcrest-core))) | |
8432 | (home-page "https://javaee.github.io/javamail/") | |
8433 | (synopsis "Mail-related functionnalities in Java") | |
8434 | (description "The JavaMail API provides a platform-independent and | |
8435 | protocol-independent framework to build mail and messaging applications.") | |
8436 | ;; General Public License Version 2 only ("GPL") or the Common Development | |
8437 | ;; and Distribution License("CDDL") | |
8438 | (license (list license:cddl1.1 | |
8439 | license:gpl2)))); with classpath exception | |
217b20e4 JL |
8440 | |
8441 | (define-public java-jeromq | |
8442 | (package | |
8443 | (name "java-jeromq") | |
4aa0a1df | 8444 | (version "0.4.3") |
217b20e4 | 8445 | (source (origin |
4aa0a1df RW |
8446 | (method git-fetch) |
8447 | (uri (git-reference | |
8448 | (url "https://github.com/zeromq/jeromq.git") | |
8449 | (commit (string-append "v" version)))) | |
8450 | (file-name (string-append name "-" version "-checkout")) | |
217b20e4 JL |
8451 | (sha256 |
8452 | (base32 | |
594bd3a0 GB |
8453 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
8454 | (patches (search-patches "java-jeromq-fix-tests.patch")))) | |
217b20e4 JL |
8455 | (build-system ant-build-system) |
8456 | (arguments | |
8457 | `(#:jar-name "java-jeromq.jar" | |
8458 | #:source-dir "src/main/java" | |
8459 | #:jdk ,icedtea-8 | |
8460 | #:test-exclude | |
8461 | (list | |
8462 | "**/Abstract*.java" | |
8463 | ;; Requires network | |
8464 | "**/ZBeaconTest.java" | |
8465 | ;; Failures | |
4aa0a1df | 8466 | "**/DealerSpecTest.java" |
217b20e4 | 8467 | "**/CustomDecoderTest.java" |
594bd3a0 GB |
8468 | "**/CustomEncoderTest.java" |
8469 | "**/ConnectRidTest.java" | |
8470 | "**/ReqSpecTest.java" | |
8471 | "**/PushPullSpecTest.java" | |
8472 | "**/PubSubHwmTest.java" | |
8473 | "**/RouterSpecTest.java" | |
8474 | "**/ProxyTest.java"))) | |
217b20e4 JL |
8475 | (inputs |
8476 | `(("java-jnacl" ,java-jnacl))) | |
8477 | (native-inputs | |
8478 | `(("java-hamcrest-core" ,java-hamcrest-core) | |
8479 | ("junit" ,java-junit))) | |
8480 | (home-page "http://zeromq.org/bindings:java") | |
8481 | (synopsis "Java binding for 0MQ") | |
8482 | (description "Jeromq provides the java bindings for 0MQ.") | |
8483 | (license license:mpl2.0))) | |
46c6905a JL |
8484 | |
8485 | (define-public java-kafka-clients | |
8486 | (package | |
8487 | (name "java-kafka-clients") | |
8488 | (version "1.0.0") | |
8489 | (source (origin | |
8490 | (method url-fetch) | |
8491 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" | |
8492 | version "-src.tgz")) | |
8493 | (sha256 | |
8494 | (base32 | |
8495 | "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq")))) | |
8496 | (build-system ant-build-system) | |
8497 | (arguments | |
8498 | `(#:jar-name "java-kafka-clients.jar" | |
8499 | #:jdk ,icedtea-8 | |
8500 | #:source-dir "clients/src/main/java" | |
8501 | #:test-dir "clients/src/test" | |
8502 | #:test-exclude | |
8503 | (list | |
8504 | ;; This file does not contain a class | |
8505 | "**/IntegrationTest.java" | |
8506 | ;; Requires network | |
8507 | "**/ClientUtilsTest.java" | |
8508 | ;; End with errors that seem related to our powermock | |
8509 | "**/KafkaProducerTest.java" | |
8510 | "**/BufferPoolTest.java"))) | |
8511 | (inputs | |
8512 | `(("java-slf4j-api" ,java-slf4j-api) | |
8513 | ("java-lz4" ,java-lz4))) | |
8514 | (native-inputs | |
8515 | `(("junit" ,java-junit) | |
8516 | ("hamcrest" ,java-hamcrest-all) | |
8517 | ("objenesis" ,java-objenesis) | |
8518 | ("asm" ,java-asm) | |
8519 | ("cglib" ,java-cglib) | |
8520 | ("javassist" ,java-jboss-javassist) | |
8521 | ("snappy" ,java-snappy) | |
8522 | ("easymock" ,java-easymock) | |
8523 | ("powermock" ,java-powermock-core) | |
8524 | ("powermock-easymock" ,java-powermock-api-easymock) | |
8525 | ("powermock-junit4-common" ,java-powermock-modules-junit4-common) | |
8526 | ("powermock-junit4" ,java-powermock-modules-junit4) | |
8527 | ("powermock-support" ,java-powermock-api-support) | |
8528 | ("bouncycastle" ,java-bouncycastle-bcprov) | |
8529 | ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix))) | |
8530 | (home-page "https://kafka.apache.org") | |
8531 | (synopsis "Distributed streaming platform") | |
8532 | (description "Kafka is a distributed streaming platform, which means: | |
8533 | @itemize | |
8534 | @item it can publish and subscribe to streams of records; | |
8535 | @item it can store streams of records in a fault-tolerant way; | |
8536 | @item it can process streams of records as they occur. | |
8537 | @end itemize") | |
8538 | ;; Either cddl or gpl2 only. | |
8539 | (license (list license:cddl1.1; actually cddl1.1 | |
8540 | license:gpl2)))); with classpath exception | |
0b54e190 JL |
8541 | |
8542 | (define-public java-jdom | |
8543 | (package | |
8544 | (name "java-jdom") | |
8545 | (version "1.1.3") | |
8546 | (source (origin | |
8547 | (method url-fetch) | |
8548 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" | |
8549 | version ".tar.gz")) | |
8550 | (sha256 | |
8551 | (base32 | |
8552 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) | |
8553 | (build-system ant-build-system) | |
8554 | (arguments | |
8555 | `(#:build-target "package" | |
8556 | #:tests? #f; tests are run as part of the build process | |
8557 | #:phases | |
8558 | (modify-phases %standard-phases | |
8559 | (replace 'install | |
8560 | (install-jars "build"))))) | |
8561 | (home-page "http://jdom.org/") | |
8562 | (synopsis "Access, manipulate, and output XML data") | |
8563 | (description "Java-based solution for accessing, manipulating, and | |
8564 | outputting XML data from Java code.") | |
8565 | (license license:bsd-4))) | |
78745d33 JL |
8566 | |
8567 | (define-public java-geronimo-xbean-reflect | |
8568 | (package | |
8569 | (name "java-geronimo-xbean-reflect") | |
8570 | (version "4.5") | |
8571 | (source (origin | |
8572 | (method svn-fetch) | |
8573 | (uri (svn-reference | |
8574 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") | |
8575 | (revision 1807396))) | |
8576 | (file-name (string-append name "-" version)) | |
8577 | (sha256 | |
8578 | (base32 | |
8579 | "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja")))) | |
8580 | (build-system ant-build-system) | |
8581 | (arguments | |
8582 | `(#:jar-name "geronimo-xbean-reflect.jar" | |
8583 | #:source-dir "xbean-reflect/src/main/java" | |
8584 | #:test-dir "xbean-reflect/src/test" | |
8585 | #:jdk ,icedtea-8 | |
8586 | #:test-exclude | |
8587 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" | |
8588 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" | |
8589 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") | |
8590 | #:phases | |
8591 | (modify-phases %standard-phases | |
8592 | (add-before 'build 'fix-source | |
8593 | (lambda _ | |
8594 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) | |
8595 | ;; org.apache.xbean.asm6 is actually repackaged java-asm | |
8596 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") | |
8597 | (("org.apache.xbean.asm5") "org.objectweb.asm")) | |
8598 | #t)))))) | |
8599 | (inputs | |
8600 | `(("asm" ,java-asm) | |
8601 | ("log4j" ,java-log4j-api) | |
8602 | ("log4j-1.2" ,java-log4j-1.2-api) | |
8603 | ("log4j-core" ,java-log4j-core) | |
8604 | ("logging" ,java-commons-logging-minimal))) | |
8605 | (native-inputs | |
8606 | `(("junit" ,java-junit))) | |
8607 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") | |
8608 | (synopsis "Dependency injection helper") | |
8609 | (description "Xbean-reflect provides very flexible ways to create objects | |
8610 | and graphs of objects for dependency injection frameworks") | |
8611 | (license license:asl2.0))) | |
09c44196 | 8612 | |
3fda539b JL |
8613 | (define-public java-geronimo-xbean-bundleutils |
8614 | (package | |
8615 | (inherit java-geronimo-xbean-reflect) | |
8616 | (name "java-geronimo-xbean-bundleutils") | |
8617 | (arguments | |
8618 | `(#:jar-name "geronimo-xbean-bundleutils.jar" | |
8619 | #:source-dir "xbean-bundleutils/src/main/java" | |
8620 | #:test-dir "xbean-bundleutils/src/test" | |
8621 | #:phases | |
8622 | (modify-phases %standard-phases | |
8623 | (add-before 'build 'fix-java | |
8624 | (lambda _ | |
8625 | ;; We use a more recent version of osgi, so this file requires | |
8626 | ;; more interface method implementations. | |
8627 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" | |
8628 | (("import org.osgi.framework.ServiceRegistration;") | |
8629 | "import org.osgi.framework.ServiceRegistration; | |
8630 | import org.osgi.framework.ServiceFactory; | |
8631 | import java.util.Collection; | |
8632 | import org.osgi.framework.ServiceObjects;") | |
8633 | (("public Bundle getBundle\\(\\)") | |
8634 | "@Override | |
8635 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { | |
8636 | throw new UnsupportedOperationException(); | |
8637 | } | |
8638 | @Override | |
8639 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, | |
8640 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { | |
8641 | throw new UnsupportedOperationException(); | |
8642 | } | |
8643 | public Bundle getBundle()")) | |
8644 | #t))))) | |
8645 | (inputs | |
8646 | `(("java-slf4j" ,java-slf4j-api) | |
8647 | ("java-asm" ,java-asm) | |
8648 | ("java-osgi-framework" ,java-osgi-framework) | |
8649 | ("java-eclipse-osgi" ,java-eclipse-osgi) | |
8650 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) | |
0cb9ce32 JL |
8651 | |
8652 | (define-public java-geronimo-xbean-asm-util | |
8653 | (package | |
8654 | (inherit java-geronimo-xbean-reflect) | |
8655 | (name "java-geronimo-xbean-asm-util") | |
8656 | (arguments | |
8657 | `(#:jar-name "geronimo-xbean-asm-util.jar" | |
8658 | #:source-dir "xbean-asm-util/src/main/java" | |
8659 | #:tests? #f)); no tests | |
8660 | (inputs | |
8661 | `(("java-asm" ,java-asm))) | |
8662 | (native-inputs '()))) | |
8d510f65 JL |
8663 | |
8664 | (define-public java-geronimo-xbean-finder | |
8665 | (package | |
8666 | (inherit java-geronimo-xbean-reflect) | |
8667 | (name "java-geronimo-xbean-finder") | |
8668 | (arguments | |
8669 | `(#:jar-name "geronimo-xbean-finder.jar" | |
8670 | #:source-dir "xbean-finder/src/main/java" | |
8671 | #:test-dir "xbean-finder/src/test")) | |
8672 | (inputs | |
8673 | `(("java-slf4j-api" ,java-slf4j-api) | |
8674 | ("java-asm" ,java-asm) | |
8675 | ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils) | |
8676 | ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util) | |
8677 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin) | |
8678 | ("java-osgi-framework" ,java-osgi-framework))) | |
8679 | (native-inputs | |
8680 | `(("java-junit" ,java-junit) | |
8681 | ("java-hamcrest-core" ,java-hamcrest-core))))) | |
3fda539b | 8682 | |
09c44196 JL |
8683 | (define-public java-gson |
8684 | (package | |
8685 | (name "java-gson") | |
8686 | (version "2.8.2") | |
8687 | (source (origin | |
8688 | (method url-fetch) | |
8689 | (uri (string-append "https://github.com/google/gson/archive/" | |
8690 | "gson-parent-" version ".tar.gz")) | |
8691 | (sha256 | |
8692 | (base32 | |
8693 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) | |
8694 | (build-system ant-build-system) | |
8695 | (arguments | |
8696 | `(#:jar-name "gson.jar" | |
8697 | #:source-dir "gson/src/main/java" | |
8698 | #:test-dir "gson/src/test")) | |
8699 | (native-inputs | |
8700 | `(("java-junit" ,java-junit) | |
8701 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
8702 | (home-page "https://github.com/google/gson") | |
8703 | (synopsis "Java serialization/deserialization library from/to JSON") | |
8704 | (description "Gson is a Java library that can be used to convert Java | |
8705 | Objects into their JSON representation. It can also be used to convert a JSON | |
8706 | string to an equivalent Java object. Gson can work with arbitrary Java objects | |
8707 | including pre-existing objects that you do not have source-code of.") | |
8708 | (license license:asl2.0))) | |
335aa20b JL |
8709 | |
8710 | (define-public java-hawtjni | |
8711 | (package | |
8712 | (name "java-hawtjni") | |
8713 | (version "1.15") | |
8714 | (source (origin | |
8715 | (method url-fetch) | |
8716 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" | |
8717 | "hawtjni-project-" version ".tar.gz")) | |
8718 | (sha256 | |
8719 | (base32 | |
8720 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) | |
8721 | (build-system ant-build-system) | |
8722 | (arguments | |
8723 | `(#:jar-name "hawtjni.jar" | |
8724 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" | |
8725 | #:tests? #f; no tests | |
8726 | #:phases | |
8727 | (modify-phases %standard-phases | |
8728 | (add-before 'build 'build-native | |
8729 | (lambda* (#:key inputs #:allow-other-keys) | |
6338ea9a RW |
8730 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
8731 | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
8732 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" | |
8733 | "-fPIC" "-O2" include) | |
8734 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" | |
8735 | "-fPIC" "-O2" include) | |
8736 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" | |
8737 | "hawtjni.o" "hawtjni-callback.o"))) | |
8738 | #t)) | |
335aa20b JL |
8739 | (add-after 'install 'install-native |
8740 | (lambda* (#:key outputs #:allow-other-keys) | |
8741 | (let* ((out (assoc-ref outputs "out")) | |
8742 | (lib (string-append out "/lib")) | |
8743 | (inc (string-append out "/include"))) | |
335aa20b | 8744 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
6338ea9a RW |
8745 | (install-file "libhawtjni.so" lib) |
8746 | (install-file "hawtjni.h" inc))) | |
335aa20b JL |
8747 | #t))))) |
8748 | (inputs | |
8749 | `(("java-commons-cli" ,java-commons-cli) | |
8750 | ("java-asm" ,java-asm) | |
8751 | ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder))) | |
8752 | (home-page "https://fusesource.github.io/hawtjni/") | |
8753 | (synopsis "JNI code generator") | |
8754 | (description "HawtJNI is a code generator that produces the JNI code needed | |
8755 | to implement Java native methods. It is based on the jnigen code generator | |
8756 | that is part of the SWT Tools project.") | |
8757 | (license license:asl2.0))) | |
d0c62afa JL |
8758 | |
8759 | (define-public java-jansi-native | |
8760 | (package | |
8761 | (name "java-jansi-native") | |
8762 | (version "1.7") | |
8763 | (source (origin | |
8764 | (method url-fetch) | |
8765 | (uri (string-append "https://github.com/fusesource/jansi-native/" | |
8766 | "archive/jansi-native-" version ".tar.gz")) | |
8767 | (sha256 | |
8768 | (base32 | |
8769 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) | |
8770 | (build-system ant-build-system) | |
8771 | (arguments | |
8772 | `(#:jar-name "jansi-native.jar" | |
8773 | #:source-dir "src/main/java" | |
8774 | #:tests? #f; no tests | |
8775 | #:phases | |
8776 | (modify-phases %standard-phases | |
8777 | (add-before 'build 'build-native | |
8778 | (lambda* (#:key inputs #:allow-other-keys) | |
8779 | ;; there are more required files for windows in windows/ | |
8780 | (with-directory-excursion "src/main/native-package/src" | |
8781 | (substitute* "jansi_ttyname.c" | |
8782 | (("#include \"jansi_.*") "")) | |
e85c1bf6 RW |
8783 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
8784 | (string-append "-I" (assoc-ref inputs "java-hawtjni") | |
8785 | "/include") | |
8786 | (string-append "-I" (assoc-ref inputs "jdk") | |
8787 | "/include/linux") | |
8788 | "-fPIC" "-O2") | |
8789 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o") | |
8790 | #t))) | |
d0c62afa JL |
8791 | (add-before 'build 'install-native |
8792 | (lambda _ | |
8793 | (let ((dir (string-append "build/classes/META-INF/native/" | |
8794 | ,(match (%current-system) | |
8795 | ((or "i686-linux" "armhf-linux") | |
8796 | "linux32") | |
8797 | ((or "x86_64-linux" "aarch64-linux") | |
8798 | "linux64"))))) | |
8799 | (install-file "src/main/native-package/src/libjansi.so" dir)) | |
8800 | #t)) | |
8801 | (add-after 'install 'install-native | |
8802 | (lambda* (#:key outputs #:allow-other-keys) | |
d0c62afa JL |
8803 | (install-file "src/main/native-package/src/jansi.h" |
8804 | (string-append (assoc-ref outputs "out") "/include")) | |
8805 | #t))))) | |
8806 | (inputs | |
8807 | `(("java-hawtjni" ,java-hawtjni))) | |
8808 | (home-page "https://fusesource.github.io/jansi/") | |
8809 | (synopsis "Native library for jansi") | |
3d6925ef RW |
8810 | (description "This package provides the native library for jansi, a small |
8811 | Java library that allows you to use ANSI escape sequences to format your | |
8812 | console output.") | |
d0c62afa | 8813 | (license license:asl2.0))) |
a87ea1ad JL |
8814 | |
8815 | (define-public java-jansi | |
8816 | (package | |
8817 | (name "java-jansi") | |
8818 | (version "1.16") | |
8819 | (source (origin | |
8820 | (method url-fetch) | |
8821 | (uri (string-append "https://github.com/fusesource/jansi/archive/" | |
8822 | "jansi-project-" version ".tar.gz")) | |
8823 | (sha256 | |
8824 | (base32 | |
8825 | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) | |
8826 | (build-system ant-build-system) | |
8827 | (arguments | |
8828 | `(#:jar-name "jansi.jar" | |
8829 | #:source-dir "jansi/src/main/java" | |
8830 | #:test-dir "jansi/src/test" | |
8831 | #:phases | |
8832 | (modify-phases %standard-phases | |
8833 | (add-after 'check 'clear-term | |
8834 | (lambda _ | |
8835 | (zero? (system* "echo" "-e" "\\e[0m"))))))) | |
8836 | (inputs | |
8837 | `(("java-jansi-native" ,java-jansi-native))) | |
8838 | (native-inputs | |
8839 | `(("java-junit" ,java-junit) | |
8840 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
8841 | (home-page "https://fusesource.github.io/jansi/") | |
8842 | (synopsis "Portable ANSI escape sequences") | |
8843 | (description "Jansi is a Java library that allows you to use ANSI escape | |
8844 | sequences to format your console output which works on every platform.") | |
8845 | (license license:asl2.0))) | |
cc061329 JL |
8846 | |
8847 | (define-public java-jboss-el-api-spec | |
8848 | (package | |
8849 | (name "java-jboss-el-api-spec") | |
8850 | (version "3.0") | |
8851 | (source (origin | |
8852 | (method url-fetch) | |
8853 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" | |
8854 | "archive/jboss-el-api_" version | |
8855 | "_spec-1.0.7.Final.tar.gz")) | |
8856 | (sha256 | |
8857 | (base32 | |
8858 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) | |
8859 | (build-system ant-build-system) | |
8860 | (arguments | |
8861 | `(#:jar-name "java-jboss-el-api_spec.jar" | |
8862 | #:jdk ,icedtea-8)) | |
8863 | (inputs | |
8864 | `(("java-junit" ,java-junit))) | |
8865 | (home-page "https://github.com/jboss/jboss-el-api_spec") | |
8866 | (synopsis "JSR-341 expression language 3.0 API") | |
8867 | (description "This package contains an implementation of the JSR-341 | |
8868 | specification for the expression language 3.0. It implements an expression | |
8869 | language inspired by ECMAScript and XPath. This language is used with | |
8870 | JavaServer Pages (JSP).") | |
8871 | ;; Either GPL2 only or CDDL. | |
8872 | (license (list license:gpl2 license:cddl1.1)))) | |
cc03a786 JL |
8873 | |
8874 | (define-public java-jboss-interceptors-api-spec | |
8875 | (package | |
8876 | (name "java-jboss-interceptors-api-spec") | |
8877 | (version "1.2") | |
8878 | (source (origin | |
8879 | (method url-fetch) | |
8880 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" | |
8881 | "archive/jboss-interceptors-api_" version | |
8882 | "_spec-1.0.0.Final.tar.gz")) | |
8883 | (sha256 | |
8884 | (base32 | |
8885 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) | |
8886 | (build-system ant-build-system) | |
8887 | (arguments | |
8888 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" | |
8889 | #:jdk ,icedtea-8 | |
8890 | #:source-dir "." | |
8891 | #:tests? #f)); no tests | |
8892 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") | |
8893 | (synopsis "Interceptors 1.2 API classes from JSR 318") | |
8894 | (description "Java-jboss-interceptors-api-spec implements the Interceptors | |
8895 | API. Interceptors are used to interpose on business method invocations and | |
8896 | specific events.") | |
8897 | ;; Either GPL2 only or CDDL. | |
8898 | (license (list license:gpl2 license:cddl1.1)))) | |
a10a451c JL |
8899 | |
8900 | (define-public java-cdi-api | |
8901 | (package | |
8902 | (name "java-cdi-api") | |
8903 | (version "2.0") | |
8904 | (source (origin | |
8905 | (method url-fetch) | |
8906 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" | |
8907 | version ".tar.gz")) | |
8908 | (file-name (string-append name "-" version ".tar.gz")) | |
8909 | (sha256 | |
8910 | (base32 | |
8911 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) | |
8912 | (build-system ant-build-system) | |
8913 | (arguments | |
8914 | `(#:source-dir "api/src/main/java" | |
8915 | #:jar-name "java-cdi-api.jar" | |
8916 | #:test-dir "api/src/test" | |
8917 | #:jdk ,icedtea-8 | |
8918 | #:tests? #f)); Tests fail because we don't have a CDI provider yet | |
8919 | (inputs | |
8920 | `(("java-javax-inject" ,java-javax-inject) | |
8921 | ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) | |
8922 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) | |
8923 | (native-inputs | |
8924 | `(("java-testng" ,java-testng) | |
8925 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
8926 | (home-page "http://cdi-spec.org/") | |
8927 | (synopsis "Contexts and Dependency Injection APIs") | |
8928 | (description "Java-cdi-api contains the required APIs for Contexts and | |
8929 | Dependency Injection (CDI).") | |
8930 | (license license:asl2.0))) | |
d57fd728 JL |
8931 | |
8932 | (define-public java-joda-convert | |
8933 | (package | |
8934 | (name "java-joda-convert") | |
8935 | (version "1.9.2") | |
8936 | (source (origin | |
8937 | (method url-fetch) | |
8938 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" | |
8939 | version ".tar.gz")) | |
8940 | (file-name (string-append name "-" version ".tar.gz")) | |
8941 | (sha256 | |
8942 | (base32 | |
8943 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) | |
8944 | (build-system ant-build-system) | |
8945 | (arguments | |
8946 | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
8947 | #:source-dir "src/main/java" | |
8948 | #:test-include (list "**/Test*.java") | |
8949 | ;; Contains only interfaces and base classes (no test) | |
8950 | #:test-exclude (list "**/test*/**.java"))) | |
8951 | (inputs | |
8952 | `(("java-guava" ,java-guava))) | |
8953 | (native-inputs | |
8954 | `(("java-junit" ,java-junit) | |
8955 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
8956 | (home-page "http://www.joda.org/joda-convert/") | |
8957 | (synopsis "Conversion between Objects and Strings") | |
8958 | (description "Joda-Convert provides a small set of classes to aid | |
8959 | conversion between Objects and Strings. It is not intended to tackle the | |
8960 | wider problem of Object to Object transformation.") | |
8961 | (license license:asl2.0))) | |
0158ea8a JL |
8962 | |
8963 | (define-public java-joda-time | |
8964 | (package | |
8965 | (name "java-joda-time") | |
8966 | (version "2.9.9") | |
8967 | (source (origin | |
8968 | (method url-fetch) | |
8969 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" | |
8970 | version ".tar.gz")) | |
8971 | (file-name (string-append name "-" version ".tar.gz")) | |
8972 | (sha256 | |
8973 | (base32 | |
8974 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) | |
8975 | (build-system ant-build-system) | |
8976 | (arguments | |
8977 | `(#:jar-name "java-joda-time.jar" | |
8978 | #:source-dir "src/main/java" | |
8979 | #:test-include (list "**/Test*.java") | |
8980 | ;; There is no runnable test in these files | |
8981 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") | |
8982 | #:phases | |
8983 | (modify-phases %standard-phases | |
8984 | (add-after 'build 'build-resources | |
8985 | (lambda _ | |
8986 | (mkdir-p "build/classes/org/joda/time/tz/data") | |
8987 | (mkdir-p "build/classes/org/joda/time/format") | |
6d0368eb JL |
8988 | ;; This will produce the following exception: |
8989 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" | |
8990 | ;; which is normal, because it doesn't exist yet. It still generates | |
8991 | ;; the same file as in the binary one can find on maven. | |
8992 | (invoke "java" "-cp" | |
8993 | (string-append "build/classes:" (getenv "CLASSPATH")) | |
8994 | "org.joda.time.tz.ZoneInfoCompiler" | |
8995 | "-src" "src/main/java/org/joda/time/tz/src" | |
8996 | "-dst" "build/classes/org/joda/time/tz/data" | |
8997 | "africa" "antarctica" "asia" "australasia" | |
8998 | "europe" "northamerica" "southamerica" | |
8999 | "pacificnew" "etcetera" "backward" "systemv") | |
0158ea8a JL |
9000 | (for-each (lambda (f) |
9001 | (copy-file f (string-append | |
9002 | "build/classes/org/joda/time/format/" | |
9003 | (basename f)))) | |
9004 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) | |
9005 | #t)) | |
9006 | (add-before 'install 'regenerate-jar | |
9007 | (lambda _ | |
9008 | ;; We need to regenerate the jar file to add generated data. | |
9009 | (delete-file "build/jar/java-joda-time.jar") | |
6d0368eb | 9010 | (invoke "ant" "jar"))) |
0158ea8a JL |
9011 | (add-before 'check 'copy-test-resources |
9012 | (lambda _ | |
9013 | (mkdir-p "build/test-classes/org/joda/time/tz/data") | |
9014 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" | |
9015 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") | |
9016 | (copy-recursively "src/test/resources" "build/test-classes") | |
9017 | #t))))) | |
9018 | (inputs | |
9019 | `(("java-joda-convert" ,java-joda-convert))) | |
9020 | (native-inputs | |
9021 | `(("java-junit" ,java-junit) | |
9022 | ("java-hamcrest-core" ,java-hamcrest-core) | |
9023 | ("tzdata" ,tzdata))) | |
9024 | (home-page "http://www.joda.org/joda-time/") | |
9025 | (synopsis "Replacement for the Java date and time classes") | |
9026 | (description "Joda-Time is a replacement for the Java date and time | |
9027 | classes prior to Java SE 8.") | |
9028 | (license license:asl2.0))) | |
6d0368eb JL |
9029 | |
9030 | (define-public java-xerces | |
9031 | (package | |
9032 | (name "java-xerces") | |
9033 | (version "2.11.0") | |
9034 | (source | |
9035 | (origin | |
9036 | (method url-fetch) | |
9037 | (uri (string-append "mirror://apache/xerces/j/source/" | |
9038 | "Xerces-J-src." version ".tar.gz")) | |
9039 | (sha256 | |
9040 | (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm")) | |
9041 | (patches (search-patches | |
9042 | "java-xerces-xjavac_taskdef.patch" | |
9043 | "java-xerces-build_dont_unzip.patch" | |
9044 | "java-xerces-bootclasspath.patch")))) | |
9045 | (build-system ant-build-system) | |
9046 | (arguments | |
9047 | `(#:tests? #f;; Test files are not present | |
9048 | #:test-target "test" | |
9049 | #:jdk ,icedtea-8 | |
9050 | #:phases | |
9051 | (modify-phases %standard-phases | |
9052 | (add-after 'unpack 'create-build.properties | |
9053 | (lambda* (#:key inputs #:allow-other-keys) | |
9054 | (let ((jaxp (assoc-ref inputs "java-jaxp")) | |
9055 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) | |
9056 | (with-output-to-file "build.properties" | |
9057 | (lambda _ | |
9058 | (format #t | |
9059 | "jar.jaxp = ~a/share/java/jaxp.jar~@ | |
9060 | jar.apis-ext = ~a/share/java/jaxp.jar~@ | |
9061 | jar.resolver = ~a/share/java/xml-resolver.jar~%" | |
9062 | jaxp jaxp resolver))) | |
9063 | ;; Make xerces use our version of jaxp in tests | |
9064 | (substitute* "build.xml" | |
9065 | (("xml-apis.jar") | |
9066 | (string-append jaxp "/share/java/jaxp.jar")) | |
9067 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") | |
9068 | "${jar.apis}"))) | |
9069 | #t)) | |
9070 | (replace 'install (install-jars "build"))))) | |
9071 | (inputs | |
9072 | `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) | |
9073 | ("java-jaxp" ,java-jaxp))) | |
9074 | (home-page "https://xerces.apache.org/xerces2-j/") | |
9075 | (synopsis "Validating XML parser for Java with DOM level 3 support") | |
9076 | (description "The Xerces2 Java parser is the reference implementation of | |
9077 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema | |
9078 | processor. | |
9079 | ||
9080 | Xerces2-J supports the following standards and APIs: | |
9081 | ||
9082 | @itemize | |
9083 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation | |
9084 | @item Namespaces in XML Recommendation | |
9085 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and | |
9086 | Range Recommendations | |
9087 | @item Simple API for XML (SAX) 2.0.1 Core and Extension | |
9088 | @item Java APIs for XML Processing (JAXP) 1.2.01 | |
9089 | @item XML Schema 1.0 Structures and Datatypes Recommendations | |
9090 | @item Experimental implementation of the Document Object Model (DOM) Level 3 | |
9091 | Core and Load/Save Working Drafts | |
9092 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C | |
9093 | Candidate Recommendation | |
9094 | @end itemize | |
9095 | ||
9096 | Xerces is now able to parse documents written according to the XML 1.1 | |
9097 | Candidate Recommendation, except that it does not yet provide an option to | |
9098 | enable normalization checking as described in section 2.13 of this | |
9099 | specification. It also handles namespaces according to the XML Namespaces 1.1 | |
9100 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if | |
9101 | the DOM level 3 load/save API's are in use.") | |
9102 | (license license:asl2.0))) | |
e06bf428 JL |
9103 | |
9104 | (define-public java-jline | |
9105 | (package | |
9106 | (name "java-jline") | |
9107 | (version "1.0") | |
9108 | (source (origin | |
9109 | (method url-fetch) | |
9110 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" | |
9111 | version ".tar.gz")) | |
9112 | (sha256 | |
9113 | (base32 | |
9114 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) | |
9115 | (build-system ant-build-system) | |
9116 | (arguments | |
9117 | `(#:jar-name "jline.jar" | |
9118 | #:source-dir "src/main/java" | |
9119 | #:test-dir "src/test" | |
9120 | #:phases | |
9121 | (modify-phases %standard-phases | |
9122 | (add-before 'build 'copy-resources | |
9123 | (lambda _ | |
9124 | (copy-recursively "src/main/resources" "build/classes") | |
9125 | #t))))) | |
9126 | (native-inputs | |
9127 | `(("java-junit" ,java-junit))) | |
9128 | (home-page "https://jline.github.io") | |
9129 | (synopsis "Console input handling library") | |
9130 | (description "JLine is a Java library for handling console input. It is | |
9131 | similar in functionality to BSD editline and GNU readline but with additional | |
9132 | features that bring it on par with the Z shell line editor.") | |
9133 | (license license:bsd-3))) | |
7ac4f054 JL |
9134 | |
9135 | (define-public java-xmlunit | |
9136 | (package | |
9137 | (name "java-xmlunit") | |
9138 | (version "2.5.1") | |
9139 | (source (origin | |
9140 | (method url-fetch) | |
9141 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" | |
9142 | version ".tar.gz")) | |
9143 | (file-name (string-append name "-" version ".tar.gz")) | |
9144 | (sha256 | |
9145 | (base32 | |
9146 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) | |
9147 | (build-system ant-build-system) | |
9148 | (arguments | |
9149 | `(#:jar-name "java-xmlunit.jar" | |
9150 | #:source-dir "xmlunit-core/src/main/java" | |
9151 | #:test-dir "xmlunit-core/src/test" | |
9152 | #:phases | |
9153 | (modify-phases %standard-phases | |
9154 | (add-before 'check 'copy-test-resources | |
9155 | (lambda* (#:key inputs #:allow-other-keys) | |
9156 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") | |
9157 | #t))))) | |
9158 | (native-inputs | |
9159 | `(("java-junit" ,java-junit) | |
9160 | ("java-mockito-1" ,java-mockito-1) | |
9161 | ("java-hamcrest-all" ,java-hamcrest-all) | |
9162 | ("java-objenesis" ,java-objenesis) | |
9163 | ("java-asm" ,java-asm) | |
9164 | ("java-cglib" ,java-cglib) | |
9165 | ("resources" | |
9166 | ,(origin | |
9167 | (method git-fetch) | |
9168 | (uri (git-reference | |
9169 | (url "https://github.com/xmlunit/test-resources.git") | |
9170 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) | |
9171 | (file-name "java-xmlunit-test-resources") | |
9172 | (sha256 | |
9173 | (base32 | |
9174 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) | |
9175 | (home-page "http://www.xmlunit.org/") | |
9176 | (synopsis "XML output testing") | |
9177 | (description "XMLUnit provides you with the tools to verify the XML you | |
9178 | emit is the one you want to create. It provides helpers to validate against | |
9179 | an XML Schema, assert the values of XPath queries or compare XML documents | |
9180 | against expected outcomes.") | |
9181 | (license license:asl2.0))) | |
73a1f10a JL |
9182 | |
9183 | (define-public java-xmlunit-legacy | |
9184 | (package | |
9185 | (inherit java-xmlunit) | |
9186 | (name "java-xmlunit-legacy") | |
9187 | (arguments | |
9188 | `(#:jar-name "java-xmlunit-legacy.jar" | |
9189 | #:source-dir "xmlunit-legacy/src/main/java" | |
9190 | #:test-dir "xmlunit-legacy/src/test")) | |
9191 | (inputs | |
9192 | `(("java-xmlunit" ,java-xmlunit) | |
9193 | ("java-junit" ,java-junit))) | |
9194 | (native-inputs | |
9195 | `(("java-mockito-1" ,java-mockito-1))))) | |
93abc975 RW |
9196 | |
9197 | (define-public java-openchart2 | |
9198 | (package | |
9199 | (name "java-openchart2") | |
9200 | (version "1.4.3") | |
9201 | (source (origin | |
9202 | (method url-fetch) | |
9203 | (uri (string-append "http://download.approximatrix.com/openchart2/" | |
9204 | "openchart2-" version ".source.zip")) | |
9205 | (sha256 | |
9206 | (base32 | |
9207 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) | |
9208 | (build-system ant-build-system) | |
9209 | (arguments | |
9210 | `(#:test-target "test" | |
9211 | #:phases | |
9212 | (modify-phases %standard-phases | |
9213 | (add-after 'unpack 'fix-junit-errors | |
9214 | (lambda _ | |
9215 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" | |
9216 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" | |
9217 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" | |
9218 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" | |
9219 | "model/DefaultChartDataModelConstraintsTest.java" | |
9220 | "model/MultiScatterDataModelConstraintsTest.java" | |
9221 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") | |
9222 | (("(assertEquals[^;]+);" before _) | |
9223 | (string-append (string-drop-right before 2) ", 1E-6);")))) | |
9224 | #t)) | |
9225 | (replace 'install (install-jars "."))))) | |
9226 | (native-inputs | |
9227 | `(("unzip" ,unzip) | |
9228 | ("java-junit" ,java-junit) | |
9229 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
9230 | (home-page "http://approximatrix.com/products/openchart2/") | |
9231 | (synopsis "Simple plotting for Java") | |
9232 | (description "Openchart2 provides a simple, yet powerful, interface for | |
9233 | Java programmers to create two-dimensional charts and plots. The library | |
9234 | features an assortment of graph styles, including advanced scatter plots, bar | |
9235 | graphs, and pie charts.") | |
9236 | (license license:lgpl2.1+))) |