java.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. |
5 | ;;; |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
9 | ;;; your option) any later version. |
10 | ;;; |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | ;;; GNU General Public License for more details. |
15 | ;;; |
16 | ;;; You should have received a copy of the GNU General Public License |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18 | |
19 | (define-module (more packages java) |
20 | #:use-module ((guix licenses) #:prefix license:) |
21 | #:use-module (gnu packages) |
22 | #:use-module (guix packages) |
23 | #:use-module (guix download) |
24 | #:use-module (guix git-download) |
25 | #:use-module (guix svn-download) |
26 | #:use-module (guix utils) |
27 | #:use-module (guix build-system ant) |
28 | #:use-module (guix build-system gnu) |
29 | #:use-module (guix build-system trivial) |
30 | #:use-module (gnu packages autotools) |
31 | #:use-module (gnu packages base) |
32 | #:use-module (gnu packages zip) |
33 | #:use-module (gnu packages java)) |
34 | |
35 | (define-public josm |
36 | (package |
37 | (name "josm") |
38 | (version "12039") |
39 | (source (origin |
40 | (method svn-fetch) |
41 | ;;(uri (git-reference |
42 | ;; (url "https://github.com/openstreetmap/josm.git") |
43 | ;; (commit version))) |
44 | (uri (svn-reference |
45 | (url "https://svn.openstreetmap.org/applications/editors/josm") |
46 | (revision 12039))) |
47 | (sha256 |
48 | (base32 |
49 | ;;"17ih97kf6g6ly8gz6dbc3jzh22gamra4anbwcsxivhq7dw5z3a6n")) |
50 | "1sq35askhvg85ghj7q34adxny7dwacz7xx6sbc1l5g0khcck7vql")) |
51 | (file-name (string-append name "-" version)))) |
52 | (build-system ant-build-system) |
53 | (arguments |
54 | `(#:build-target "dist" |
55 | #:tests? #f |
56 | #:jdk ,icedtea-8 |
57 | #:phases |
58 | (modify-phases %standard-phases |
59 | (add-before 'build 'fix-compiler |
60 | (lambda* _ |
61 | (with-output-to-file "REVISION.XML" |
62 | (lambda _ |
63 | (display |
64 | (string-append "<info><entry><commit revision=\"" ,version "\">" |
65 | "<date>1970-01-01 00:00:00 +0000</date>" |
66 | "</commit></entry></info>")))) |
67 | (substitute* "build.xml" |
68 | (("UNKNOWN") ,version) |
69 | (("<touch.*epsg.output.*") "<mkdir dir=\"${epsg.output}/..\" /><touch file=\"${epsg.output}\"/>\n") |
70 | ((".*com.google.errorprone.ErrorProneAntCompilerAdapter.*") "") |
71 | (("compiler=\"[^\"]*\" ") "")))) |
72 | (replace 'install |
73 | (lambda* (#:key outputs inputs #:allow-other-keys) |
74 | (let* ((out (assoc-ref outputs "out")) |
75 | (bin (string-append out "/bin")) |
76 | (lib (string-append out "/lib/josm"))) |
77 | (mkdir-p bin) |
78 | (mkdir-p lib) |
79 | (copy-file "dist/josm-custom.jar" |
80 | (string-append lib "/josm.jar")) |
81 | (with-output-to-file (string-append bin "/josm") |
82 | (lambda _ |
83 | (display |
84 | (string-append "#!/bin/sh\n" |
85 | (assoc-ref inputs "jdk") "/bin/java" |
86 | " -jar " lib "/josm.jar")))) |
87 | (chmod (string-append bin "/josm") #o755))))))) |
88 | (home-page "https://josm.openstreetmap.de") |
89 | (synopsis "OSM editor") |
90 | (description "OSM editor.") |
91 | (license license:gpl2+))) |
92 | |
93 | (define-public java-icu4j |
94 | (package |
95 | (name "java-icu4j") |
96 | (version "58.2") |
97 | (source (origin |
98 | (method url-fetch) |
99 | (uri (string-append |
100 | "http://download.icu-project.org/files/icu4j/" version |
101 | "/icu4j-" |
102 | (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) |
103 | ".tgz")) |
104 | (sha256 |
105 | (base32 |
106 | "1mvqjlc3cbaraa0bv0vyl44xf0x6n81inqsh69bl7f88iycfpns9")))) |
107 | (build-system ant-build-system) |
108 | (arguments |
109 | `(#:tests? #f ; Requires java-ivy that we don't have yet. |
110 | #:phases |
111 | (modify-phases %standard-phases |
112 | ;; icu4j archive contains its sources directly at the top, not in |
113 | ;; a subdirectory as usual. |
114 | (add-after 'unpack 'chdir |
115 | (lambda _ |
116 | (chdir ".."))) |
117 | (replace 'install |
118 | (lambda* (#:key outputs #:allow-other-keys) |
119 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
120 | (mkdir-p share) |
121 | (copy-file "icu4j-charset.jar" (string-append share "/icu4j-charset.jar")) |
122 | (copy-file "icu4j.jar" (string-append share "/icu4j.jar")))))))) |
123 | (home-page "http://site.icu-project.org/") |
124 | (synopsis "") |
125 | (description "") |
126 | (license license:x11))) |
127 | |
128 | (define-public java-treelayout |
129 | (package |
130 | (name "java-treelayout") |
131 | (version "1.0.3") |
132 | (source (origin |
133 | (method url-fetch) |
134 | (uri (string-append |
135 | "https://github.com/abego/treelayout/archive/v" version |
136 | ".tar.gz")) |
137 | (file-name (string-append name "-" version ".tar.gz")) |
138 | (sha256 |
139 | (base32 |
140 | "0djdw7j66lqjx8bx9zja0hsx10c6nsj3z0z20jmavwfr6bpp0345")))) |
141 | (build-system ant-build-system) |
142 | (arguments |
143 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
144 | #:tests? #f |
145 | #:phases |
146 | (modify-phases %standard-phases |
147 | ;; icu4j archive contains its sources directly at the top, not in |
148 | ;; a subdirectory as usual. |
149 | (add-after 'unpack 'chdir |
150 | (lambda _ |
151 | (chdir "org.abego.treelayout")))))) |
152 | (inputs |
153 | `(("junit" ,java-junit))) |
154 | (home-page "http://treelayout.sourceforge.net") |
155 | (synopsis "") |
156 | (description "") |
157 | (license license:bsd-3))) |
158 | |
159 | (define-public java-commons-cli |
160 | (package |
161 | (name "java-commons-cli") |
162 | (version "1.4") |
163 | (source (origin |
164 | (method url-fetch) |
165 | (uri (string-append "http://mirrors.ircam.fr/pub/apache/commons/" |
166 | "cli/source/commons-cli-" version "-src.tar.gz")) |
167 | (file-name (string-append name "-" version ".tar.gz")) |
168 | (sha256 |
169 | (base32 |
170 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
171 | (build-system ant-build-system) |
172 | (arguments |
173 | `(#:jar-name "commons-cli-1.4.jar" |
174 | #:tests? #f)) |
175 | (native-inputs |
176 | `(("junit" ,java-junit))) |
177 | (home-page "https://commons.apache.org/proper/commons-cli") |
178 | (synopsis "Java API for parsing command line options passed to programs") |
179 | (description "Apache Commons CLI library provides an API for parsing command |
180 | line options passed to programs. It's also able to print help messages detailing |
181 | the options available for a command line tool.") |
182 | (license license:asl2.0))) |
183 | |
184 | (define-public java-asm |
185 | (package |
186 | (name "java-asm") |
187 | (version "5.2") |
188 | (source (origin |
189 | (method url-fetch) |
190 | (uri (string-append "http://download.forge.ow2.org/asm/asm-" |
191 | version ".tar.gz")) |
192 | (file-name (string-append name "-" version ".tar.gz")) |
193 | (sha256 |
194 | (base32 |
195 | "0kxvmv5275rnjl7jv0442k3wjnq03ngkb7sghs78avf45pzm4qgr")))) |
196 | (build-system ant-build-system) |
197 | (arguments |
198 | `(#:jar-name "asm-5.2.jar" |
199 | #:tests? #f)) |
200 | (native-inputs |
201 | `(("junit" ,java-junit))) |
202 | (home-page "") |
203 | (synopsis "") |
204 | (description "") |
205 | (license license:asl2.0))) |
206 | |
207 | (define-public java-jsr305 |
208 | (package |
209 | (name "java-jsr305") |
210 | (version "3.0.2") |
211 | (source (origin |
212 | (method git-fetch) |
213 | (uri (git-reference |
214 | (url "https://github.com/amaembo/jsr-305.git") |
215 | (commit "d7734b13c61492982784560ed5b4f4bd6cf9bb2c"))) |
216 | (file-name (string-append name "-" version)) |
217 | (sha256 |
218 | (base32 |
219 | "1wk159136pgc6i54drbq2whazfmdilvfqlxj3k19s9dfwbayf621")))) |
220 | (build-system ant-build-system) |
221 | (arguments |
222 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
223 | #:src-dir "ri/src/main/java" |
224 | #:tests? #f)) |
225 | (home-page "https://github.com/amaembo/jsr-305") |
226 | (synopsis "") |
227 | (description "") |
228 | (license license:bsd-3))) |
229 | |
230 | (define-public java-checker-framework |
231 | (package |
232 | (name "java-checker-framework") |
233 | (version "2.1.10") |
234 | (source (origin |
235 | (method url-fetch) |
236 | (uri (string-append "https://github.com/typetools/checker-framework/" |
237 | "archive/checker-framework-" version ".tar.gz")) |
238 | (file-name (string-append name "-" version ".tar.gz")) |
239 | (sha256 |
240 | (base32 |
241 | "1infq1hr53zi9bd81v90rn3iripbinb3w145m3xblq8yvnfrxy20")))) |
242 | (build-system ant-build-system) |
243 | (arguments |
244 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
245 | #:src-dir "dataflow/src:javacutil/src" |
246 | #:jdk ,icedtea-8 |
247 | #:tests? #f)) |
248 | (home-page "https://checkerframework.org") |
249 | (synopsis "") |
250 | (description "") |
251 | (license license:gpl2))); with classpath exception |
252 | |
253 | (define-public java-javapoet |
254 | (package |
255 | (name "java-javapoet") |
256 | (version "1.8.0") |
257 | (source (origin |
258 | (method url-fetch) |
259 | (uri (string-append "https://github.com/square/javapoet/archive/javapoet-" |
260 | version ".tar.gz")) |
261 | (file-name (string-append name "-" version ".tar.gz")) |
262 | (sha256 |
263 | (base32 |
264 | "0xpjbh8wcyj9yd9hb936ia5g6l2q1jlyqjvwcc290cwjrz7crb93")))) |
265 | (build-system ant-build-system) |
266 | (arguments |
267 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
268 | #:src-dir "src/main/java" |
269 | #:jdk ,icedtea-8 |
270 | #:tests? #f)) |
271 | (home-page "https://github.com/square/javapoet") |
272 | (synopsis "") |
273 | (description "") |
274 | (license license:asl2.0))) |
275 | |
276 | (define-public java-auto-value |
277 | (package |
278 | (name "java-auto-value") |
279 | (version "1.4.1") |
280 | (source (origin |
281 | (method url-fetch) |
282 | (uri (string-append "https://github.com/google/auto/archive/auto-value-" |
283 | version ".tar.gz")) |
284 | (file-name (string-append name "-" version ".tar.gz")) |
285 | (sha256 |
286 | (base32 |
287 | "1qd59bwa56bynsdxfbgm40i7ndrj599wflza214kzigk16nprc1m")))) |
288 | (build-system ant-build-system) |
289 | (arguments |
290 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
291 | #:src-dir "value/src/main/java:common/src/main/java:service/src/main/java" |
292 | #:jdk ,icedtea-8 |
293 | #:tests? #f)) |
294 | (inputs |
295 | `(("guava" ,java-guava) |
296 | ("javapoet" ,java-javapoet))) |
297 | (home-page "https://github.com/google/auto/tree/master/value") |
298 | (synopsis "") |
299 | (description "") |
300 | (license license:asl2.0))) |
301 | |
302 | ;; https://github.com/KengoTODA/java-diff-utils ? |
303 | ;; com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE |
304 | ;; com.sun.source.tree.PackageTree |
305 | ;; com.sun.tools.javac.tree.JCTree.JCPackageDecl |
306 | (define-public java-error-prone |
307 | (package |
308 | (name "java-error-prone") |
309 | (version "2.0.19") |
310 | (source (origin |
311 | (method url-fetch) |
312 | (uri (string-append "https://github.com/google/error-prone/archive/v" |
313 | version ".tar.gz")) |
314 | (file-name (string-append name "-" version ".tar.gz")) |
315 | (patches (search-patches "java-error-prone-add-build.xml.patch")) |
316 | (sha256 |
317 | (base32 |
318 | "00igy7a6aylswxdcklj9021g2s8bvsvrysagqyd8cibm4pimxrnk")))) |
319 | (build-system ant-build-system) |
320 | (arguments |
321 | `(#:tests? #f |
322 | #:jdk ,icedtea-8 |
323 | #:phases |
324 | (modify-phases %standard-phases |
325 | (add-before 'build 'copy-internal |
326 | (lambda _ |
327 | (mkdir-p "ant/src/main/java/com/google/errorprone/internal") |
328 | (copy-file |
329 | "core/src/main/java/com/google/errorprone/internal/NonDelegatingClassLoader.java" |
330 | "ant/src/main/java/com/google/errorprone/internal/NonDelegatingClassLoader.java")))))) |
331 | (inputs |
332 | `(("java-jsr305" ,java-jsr305) |
333 | ("java-auto-value" ,java-auto-value) |
334 | ("java-checker-framework" ,java-checker-framework) |
335 | ("java-guava" ,java-guava))) |
336 | (home-page "https://github.com/google/guava") |
337 | (synopsis "") |
338 | (description "") |
339 | (license license:asl2.0))) |
340 | |
341 | (define-public java-error-prone-annotations |
342 | (package |
343 | (inherit java-error-prone) |
344 | (name "java-error-prone-annotations") |
345 | (version "2.0.19") |
346 | (arguments |
347 | `(#:tests? #f |
348 | #:jar-name (string-append ,name "-" ,version ".jar") |
349 | #:src-dir "annotations/src")) |
350 | (inputs |
351 | `(("java-jsr305" ,java-jsr305))))) |
352 | |
353 | (define-public java-j2objc |
354 | (package |
355 | (name "java-j2objc") |
356 | (version "1.3.1") |
357 | (source (origin |
358 | (method url-fetch) |
359 | (uri (string-append "https://github.com/google/j2objc/archive/" |
360 | version ".tar.gz")) |
361 | (file-name (string-append name "-" version ".tar.gz")) |
362 | (patches (search-patches "java-j2objc-add-build.xml.patch")) |
363 | (sha256 |
364 | (base32 |
365 | "0d5spbr1whw2afg6mknyr7ifm6xivn3bbvnzjxva2zzkyq944hv0")))) |
366 | (build-system ant-build-system) |
367 | (arguments |
368 | `(#:tests? #f)) |
369 | (home-page "http://j2objc.org") |
370 | (synopsis "") |
371 | (description "") |
372 | (license license:asl2.0))) |
373 | |
374 | (define-public java-j2objc-annotations |
375 | (package |
376 | (inherit java-j2objc) |
377 | (name "java-j2objc-annotations") |
378 | (version "1.3.1") |
379 | (arguments |
380 | `(#:tests? #f |
381 | #:jar-name (string-append ,name "-" ,version ".jar") |
382 | #:src-dir "annotations/src/main/java")))) |
383 | |
384 | (define-public java-animal-sniffer |
385 | (package |
386 | (name "java-animal-sniffer") |
387 | (version "1.15") |
388 | (source (origin |
389 | (method url-fetch) |
390 | (uri (string-append "https://github.com/mojohaus/animal-sniffer/" |
391 | "archive/animal-sniffer-parent-" |
392 | version ".tar.gz")) |
393 | (patches (search-patches "java-animal-sniffer-add-build.xml.patch")) |
394 | (file-name (string-append name "-" version ".tar.gz")) |
395 | (sha256 |
396 | (base32 |
397 | "1350yl003y1fjzdwis0dg5jhi5kggk2sxnkv9821z5janw4p986m")))) |
398 | (build-system ant-build-system) |
399 | (arguments |
400 | `(#:tests? #f)) |
401 | (home-page "http://www.mojohaus.org/animal-sniffer") |
402 | (synopsis "") |
403 | (description "") |
404 | (license license:asl2.0))) |
405 | |
406 | (define-public java-animal-sniffer-annotations |
407 | (package |
408 | (inherit java-animal-sniffer) |
409 | (name "java-animal-sniffer-annotations") |
410 | (version "1.15") |
411 | (arguments |
412 | `(#:tests? #f |
413 | #:jar-name (string-append ,name "-" ,version ".jar") |
414 | #:src-dir "animal-sniffer-annotations/src/main/java")))) |
415 | |
416 | (define-public java-guava |
417 | (package |
418 | (name "java-guava") |
419 | (version "20.0") |
420 | (source (origin |
421 | (method url-fetch) |
422 | (uri (string-append "https://github.com/google/guava/archive/v" |
423 | version ".tar.gz")) |
424 | (file-name (string-append name "-" version ".tar.gz")) |
425 | (sha256 |
426 | (base32 |
427 | "1kasavj973iblj1fj35gzbywhkljrnbjpymgqyqaibbbmmbzff8s")))) |
428 | (build-system ant-build-system) |
429 | (arguments |
430 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
431 | #:src-dir "guava/src" |
432 | #:tests? #f)) |
433 | (inputs |
434 | `(("java-jsr305" ,java-jsr305) |
435 | ("java-j2objc-annotations" ,java-j2objc-annotations) |
436 | ("java-animal-sniffer-annotations" ,java-animal-sniffer-annotations) |
437 | ("java-error-prone-annotations" ,java-error-prone-annotations))) |
438 | (home-page "https://github.com/google/guava") |
439 | (synopsis "") |
440 | (description "") |
441 | (license license:asl2.0))) |
442 | |
443 | (define-public java-joda-convert |
444 | (package |
445 | (name "java-joda-convert") |
446 | (version "1.8.1") |
447 | (source (origin |
448 | (method url-fetch) |
449 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" |
450 | version ".tar.gz")) |
451 | (file-name (string-append name "-" version ".tar.gz")) |
452 | (sha256 |
453 | (base32 |
454 | "1di9chp0pgvd2gxsmdaxhldwns9a2ss9705jmn97mdd69cg5zcnc")))) |
455 | (build-system ant-build-system) |
456 | (arguments |
457 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
458 | #:src-dir "src/main/java" |
459 | #:tests? #f)) |
460 | (inputs |
461 | `(("java-google-collect" ,java-google-collect))) |
462 | (native-inputs |
463 | `(("junit" ,java-junit))) |
464 | (home-page "") |
465 | (synopsis "") |
466 | (description "") |
467 | (license license:asl2.0))) |
468 | |
469 | (define-public java-joda-time |
470 | (package |
471 | (name "java-joda-time") |
472 | (version "2.9.9") |
473 | (source (origin |
474 | (method url-fetch) |
475 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" |
476 | version ".tar.gz")) |
477 | (file-name (string-append name "-" version ".tar.gz")) |
478 | (sha256 |
479 | (base32 |
480 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) |
481 | (build-system ant-build-system) |
482 | (arguments |
483 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
484 | #:src-dir "src/main/java" |
485 | #:tests? #f)) |
486 | (inputs |
487 | `(("java-joda-convert" ,java-joda-convert))) |
488 | (native-inputs |
489 | `(("junit" ,java-junit))) |
490 | (home-page "") |
491 | (synopsis "") |
492 | (description "") |
493 | (license license:asl2.0))) |
494 | |
495 | (define-public java-xstream |
496 | (package |
497 | (name "java-xstream") |
498 | (version "1.4.9") |
499 | (source (origin |
500 | (method url-fetch) |
501 | (uri (string-append "https://repo1.maven.org/maven2/com/thoughtworks" |
502 | "/xstream/xstream-distribution/" version |
503 | "/xstream-distribution-" version "-src.zip")) |
504 | (file-name (string-append name "-" version ".zip")) |
505 | (sha256 |
506 | (base32 |
507 | "1cq9j9h839wc6pkrgd9bd7y94a3zrj1j741i134izqs9xx2b54fi")))) |
508 | (build-system ant-build-system) |
509 | (arguments |
510 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
511 | #:tests? #f |
512 | #:src-dir "xstream/src/java")) |
513 | (native-inputs |
514 | `(("unzip" ,unzip))) |
515 | (home-page "https://x-stream.github.io") |
516 | (synopsis "") |
517 | (description "") |
518 | (license license:x11))) |
519 | |
520 | (define-public java-jsonp |
521 | (package |
522 | (name "java-jsonp") |
523 | (version "1.0.4") |
524 | (source (origin |
525 | (method git-fetch) |
526 | (uri (git-reference |
527 | (url "git://java.net/jsonp~git") |
528 | (commit "a586e706aea82dc80fb05bdf59f2a25150ee1801"))) |
529 | (file-name (string-append name "-" version)) |
530 | (sha256 |
531 | (base32 |
532 | "01r4syivcywpvxkr1hn0az9316pr7qpnx154zzzw0nijfmdlbw7n")))) |
533 | (build-system ant-build-system) |
534 | (arguments |
535 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
536 | #:tests? #f |
537 | #:src-dir "api/src")) |
538 | (home-page "https://jsonp.java.net") |
539 | (synopsis "") |
540 | (description "") |
541 | (license (list license:gpl2 |
542 | ;; actually CDDL 1.1 |
543 | license:cddl1.0)))) |
544 | |
545 | ;; Can only be built with gradle. |
546 | (define-public groovy |
547 | (package |
548 | (name "groovy") |
549 | (version "2.4.10") |
550 | (source (origin |
551 | (method url-fetch) |
552 | (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" |
553 | "2_4_10.tar.gz")) |
554 | (file-name (string-append name "-" version ".tar.gz")) |
555 | (sha256 |
556 | (base32 |
557 | "0wapzqwpx4bh2fsqpzf3haakjz6wvfjx1vd9a4spavhlrjqk2pbb")))) |
558 | (build-system ant-build-system) |
559 | (arguments |
560 | `(#:jar-name "groovy.jar" |
561 | #:tests? #f)) |
562 | (native-inputs |
563 | `(("junit" ,java-junit))) |
564 | (inputs |
565 | `(("commons-cli" ,java-commons-cli) |
566 | ("antlr" ,antlr3) |
567 | ("asm" ,java-asm))) |
568 | (home-page "") |
569 | (synopsis "") |
570 | (description "") |
571 | (license license:asl2.0))) |
572 | |
573 | ;; requires jline, javax.servlet, org.fusesource.jansi, org.livetribe, |
574 | ;; com.thoughtworks.xstream, org.apache.ivy, bsf |
575 | ;; antlr |
576 | (define-public groovy-1.8.9 |
577 | (package |
578 | (inherit groovy) |
579 | (name "groovy") |
580 | (version "1.8.9") |
581 | (source (origin |
582 | (method url-fetch) |
583 | (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" |
584 | "1_8_9.tar.gz")) |
585 | (file-name (string-append name "-" version ".tar.gz")) |
586 | (sha256 |
587 | (base32 |
588 | "16z3jv5yw11wwwzbs6x41g83gqazhngg30ys2kpy7cpfm3rsqi71")))) |
589 | (arguments |
590 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
591 | #:tests? #f |
592 | #:src-dir "src/main")))) |
593 | |
594 | |
595 | ;; antlr2 is used to generate some java files in other packages. This is an old |
596 | ;; package, it is not maintained anymore. It also contains the definition |
597 | ;; for CommonTree and maybe other classes, so it is still required by more |
598 | ;; recent antlr versions. |
599 | ;; |
600 | ;; antlr3.5 requires an antlr3 generator and ST4. Unfortunately, ST4 requires |
601 | ;; an antlr3 generator. We use antlr3-3.1 that can be built with ST3 and antlr2 |
602 | ;; to build the intermediate antlr3-3.3 that requires only an antlr3 generator. |
603 | ;; This intermediate antlr3 is used to build a version of ST4 that do not depend |
604 | ;; on recent antlr3. Then this version is used to build the latest antlr3, |
605 | ;; which is used to build the latest ST4, which is used as a dependency of the |
606 | ;; latest antlr3. |
607 | ;; |
608 | ;; Then we can use the latest versions of ST4 and antlr3 to build antlr4. |
609 | (define-public antlr2 |
610 | (package |
611 | (name "antlr2") |
612 | (version "2.7.7") |
613 | (source (origin |
614 | (method url-fetch) |
615 | (uri (string-append "http://www.antlr2.org/download/antlr-" |
616 | version ".tar.gz")) |
617 | (sha256 |
618 | (base32 |
619 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) |
620 | (modules '((guix build utils))) |
621 | (snippet |
622 | '(begin |
623 | (delete-file "antlr.jar") |
624 | (substitute* "configure" |
625 | (("/bin/sh") "sh")))))) |
626 | (build-system gnu-build-system) |
627 | (arguments |
628 | `(#:tests? #f |
629 | #:phases |
630 | (modify-phases %standard-phases |
631 | (add-after 'configure 'fix-bin-ls |
632 | (lambda _ |
633 | (for-each (lambda (file) |
634 | (substitute* file |
635 | (("/bin/ls") "ls"))) |
636 | (find-files "Makefile"))))))) |
637 | (native-inputs |
638 | `(("which" ,which) |
639 | ("java" ,icedtea "jdk"))) |
640 | (propagated-inputs |
641 | `(("java" ,icedtea "jdk"))) |
642 | (inputs |
643 | `(("java" ,icedtea))) |
644 | (home-page "http://www.antlr2.org") |
645 | (synopsis "") |
646 | (description "") |
647 | (license license:public-domain))) |
648 | |
649 | (define-public stringtemplate3 |
650 | (package |
651 | (name "stringtemplate3") |
652 | (version "3.2.1") |
653 | (source (origin |
654 | (method url-fetch) |
655 | (uri (string-append "https://github.com/antlr/website-st4/raw/" |
656 | "gh-pages/download/stringtemplate-" |
657 | version ".tar.gz")) |
658 | (sha256 |
659 | (base32 |
660 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) |
661 | (build-system ant-build-system) |
662 | (arguments |
663 | `(#:jar-name "stringtemplate-3.2.1.jar" |
664 | #:tests? #f |
665 | #:phases |
666 | (modify-phases %standard-phases |
667 | (add-before 'build 'generate-grammar |
668 | (lambda _ |
669 | (let ((dir "src/org/antlr/stringtemplate/language/")) |
670 | (for-each (lambda (file) |
671 | (display file) |
672 | (newline) |
673 | (system* "antlr" "-o" dir (string-append dir file))) |
674 | '("template.g" "angle.bracket.template.g" "action.g" |
675 | "eval.g" "group.g" "interface.g")))))))) |
676 | (native-inputs |
677 | `(("antlr" ,antlr2))) |
678 | (home-page "http://www.stringtemplate.org") |
679 | (synopsis "") |
680 | (description "") |
681 | (license license:bsd-3))) |
682 | |
683 | (define-public antlr3-temp |
684 | (package |
685 | (name "antlr3-temp") |
686 | (version "3.5.2") |
687 | (source (origin |
688 | (method url-fetch) |
689 | (uri (string-append "https://github.com/antlr/antlr3/archive/" |
690 | version ".tar.gz")) |
691 | (file-name (string-append name "-" version ".tar.gz")) |
692 | (sha256 |
693 | (base32 |
694 | "07zff5frmjd53rnqdx31h0pmswz1lv0p2lp28cspfszh25ysz6sj")))) |
695 | (build-system ant-build-system) |
696 | (arguments |
697 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
698 | #:src-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" |
699 | #:tests? #f |
700 | #:phases |
701 | (modify-phases %standard-phases |
702 | (add-after 'install 'bin-install |
703 | (lambda* (#:key inputs outputs #:allow-other-keys) |
704 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
705 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
706 | (mkdir-p bin) |
707 | (with-output-to-file (string-append bin "/antlr3") |
708 | (lambda _ |
709 | (display |
710 | (string-append "#!/bin/sh\n" |
711 | "java -cp " jar "/" ,name "-" ,version ".jar:" |
712 | (string-concatenate |
713 | (find-files (assoc-ref inputs "stringtemplate") |
714 | ".*\\.jar")) |
715 | ":" |
716 | (string-concatenate |
717 | (find-files (assoc-ref inputs "stringtemplate4") |
718 | ".*\\.jar")) |
719 | ":" |
720 | (string-concatenate |
721 | (find-files (string-append (assoc-ref inputs "antlr") "/lib") |
722 | ".*\\.jar")) |
723 | " org.antlr.Tool $*")))) |
724 | (chmod (string-append bin "/antlr3") #o755)))) |
725 | (add-before 'build 'generate-grammar |
726 | (lambda _ |
727 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") |
728 | (for-each (lambda (file) |
729 | (display file) |
730 | (newline) |
731 | (system* "antlr3" file)) |
732 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" |
733 | "AssignTokenTypesWalker.g" |
734 | "ActionTranslator.g" "TreeToNFAConverter.g" |
735 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" |
736 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) |
737 | (chdir "../../../../../../../..") |
738 | (system* "antlr" "-o" "tool/src/main/java/org/antlr/tool" |
739 | "tool/src/main/java/org/antlr/tool/serialize.g") |
740 | (substitute* "tool/src/main/java/org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
741 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; |
742 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) |
743 | (substitute* "tool/src/main/java/org/antlr/tool/ErrorManager.java" |
744 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) |
745 | (substitute* "tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRParser.java" |
746 | (("public Object getTree") "public GrammarAST getTree")) |
747 | (substitute* "tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3Parser.java" |
748 | (("public Object getTree") "public CommonTree getTree")))) |
749 | (add-before 'build 'fix-build-xml |
750 | (lambda _ |
751 | (substitute* "build.xml" |
752 | (("<exec") "<copy todir=\"${classes.dir}\"> |
753 | <fileset dir=\"tool/src/main/resources\"> |
754 | <include name=\"**/*.stg\"/> |
755 | <include name=\"**/*.st\"/> |
756 | <include name=\"**/*.sti\"/> |
757 | <include name=\"**/STLexer.tokens\"/> |
758 | </fileset> |
759 | </copy><exec"))))))) |
760 | (native-inputs |
761 | `(("antlr" ,antlr2) |
762 | ("antlr3" ,antlr3-3.3))) |
763 | (inputs |
764 | `(("junit" ,java-junit))) |
765 | (propagated-inputs |
766 | `(("stringtemplate" ,stringtemplate3) |
767 | ("antlr" ,antlr2) |
768 | ("stringtemplate4" ,stringtemplate4-4.0.6))) |
769 | (home-page "http://www.stringtemplate.org") |
770 | (synopsis "") |
771 | (description "") |
772 | (license license:bsd-3))) |
773 | |
774 | (define-public antlr3 |
775 | (package |
776 | (inherit antlr3-temp) |
777 | (name "antlr3") |
778 | (native-inputs |
779 | `(("antlr" ,antlr2) |
780 | ("antlr3" ,antlr3-temp))) |
781 | (inputs |
782 | `(("junit" ,java-junit) |
783 | ("stringtemplate" ,stringtemplate3) |
784 | ("stringtemplate4" ,stringtemplate4))))) |
785 | |
786 | (define-public antlr3-3.4 |
787 | (package |
788 | (name "antlr3") |
789 | (version "3.4") |
790 | (source (origin |
791 | (method url-fetch) |
792 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
793 | "gh-pages/download/antlr-" |
794 | version ".tar.gz")) |
795 | (sha256 |
796 | (base32 |
797 | "1cwfswpk3jlzl1dhc6b6586srza8q0bbzwlxcq136p29v62fjrb3")))) |
798 | (build-system ant-build-system) |
799 | (arguments |
800 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
801 | #:src-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" |
802 | #:tests? #f |
803 | #:phases |
804 | (modify-phases %standard-phases |
805 | (add-after 'install 'bin-install |
806 | (lambda* (#:key inputs outputs #:allow-other-keys) |
807 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
808 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
809 | (mkdir-p bin) |
810 | (with-output-to-file (string-append bin "/antlr3") |
811 | (lambda _ |
812 | (display |
813 | (string-append "#!/bin/sh\n" |
814 | "java -cp " jar "/antlr3-3.3.jar:" |
815 | (string-concatenate |
816 | (find-files (assoc-ref inputs "stringtemplate") |
817 | ".*\\.jar")) |
818 | ":" |
819 | (string-concatenate |
820 | (find-files (string-append (assoc-ref inputs "antlr") "/lib") |
821 | ".*\\.jar")) |
822 | " org.antlr.Tool $*")))) |
823 | (chmod (string-append bin "/antlr3") #o755)))) |
824 | (add-before 'build 'generate-grammar |
825 | (lambda _ |
826 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") |
827 | (for-each (lambda (file) |
828 | (display file) |
829 | (newline) |
830 | (system* "antlr3" file)) |
831 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLR.g" |
832 | "ANTLRTreePrinter.g" "ANTLRv3.g" "ANTLRv3Tree.g" |
833 | "AssignTokenTypesWalker.g" "CodeGenTreeWalker.g" |
834 | "DefineGrammarItemsWalker.g" "LeftRecursiveRuleWalker.g" |
835 | "TreeToNFAConverter.g")) |
836 | (chdir "../../../../../../../..") |
837 | (system* "antlr" "-o" "tool/src/main/java/org/antlr/tool" |
838 | "tool/src/main/java/org/antlr/tool/serialize.g") |
839 | (substitute* "tool/src/main/java/org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
840 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; |
841 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) |
842 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
843 | (("import org.antlr.grammar.v3.\\*;") |
844 | "import org.antlr.grammar.v3.*;\n |
845 | import org.antlr.grammar.v3.TreeToNFAConverter;\n |
846 | import org.antlr.grammar.v3.DefineGrammarItemsWalker;\n |
847 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) |
848 | (substitute* "tool/src/main/java/org/antlr/tool/ErrorManager.java" |
849 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) |
850 | (substitute* "tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRParser.java" |
851 | (("public Object getTree") "public GrammarAST getTree")) |
852 | (substitute* "tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3Parser.java" |
853 | (("public Object getTree") "public CommonTree getTree")))) |
854 | (add-before 'build 'fix-build-xml |
855 | (lambda _ |
856 | (substitute* "build.xml" |
857 | (("<exec") "<copy todir=\"${classes.dir}\"> |
858 | <fileset dir=\"tool/src/main/resources\"> |
859 | <include name=\"**/*.stg\"/> |
860 | <include name=\"**/*.st\"/> |
861 | <include name=\"**/*.sti\"/> |
862 | <include name=\"**/STLexer.tokens\"/> |
863 | </fileset> |
864 | </copy><exec"))))))) |
865 | (native-inputs |
866 | `(("antlr" ,antlr2) |
867 | ("antlr3" ,antlr3-3.3))) |
868 | (inputs |
869 | `(("junit" ,java-junit))) |
870 | (propagated-inputs |
871 | `(("stringtemplate" ,stringtemplate3) |
872 | ("stringtemplate4" ,stringtemplate4) |
873 | ("antlr" ,antlr2) |
874 | ("antlr3" ,antlr3-3.1))) |
875 | (home-page "http://www.stringtemplate.org") |
876 | (synopsis "") |
877 | (description "") |
878 | (license license:bsd-3))) |
879 | |
880 | (define-public libantlr3c |
881 | (package |
882 | (inherit antlr3) |
883 | (name "libantlr3c") |
884 | (build-system gnu-build-system) |
885 | (native-inputs |
886 | `(("autoconf" ,autoconf) |
887 | ("automake" ,automake) |
888 | ("libtool" ,libtool))) |
889 | (propagated-inputs |
890 | `(("antlr" ,antlr3))) |
891 | (arguments |
892 | `(#:configure-flags (list "--enable-64bit" "--disable-static") |
893 | #:phases |
894 | (modify-phases %standard-phases |
895 | (add-before 'configure 'autoreconf |
896 | (lambda _ |
897 | (chdir "runtime/C") |
898 | (system* "libtoolize") |
899 | (system* "autoreconf" "-fiv")))))))) |
900 | |
901 | (define-public antlr3-3.3 |
902 | (package |
903 | (name "antlr3") |
904 | (version "3.3") |
905 | (source (origin |
906 | (method url-fetch) |
907 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
908 | "gh-pages/download/antlr-" |
909 | version ".tar.gz")) |
910 | (sha256 |
911 | (base32 |
912 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")))) |
913 | (build-system ant-build-system) |
914 | (arguments |
915 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
916 | #:src-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr2:tool/src/main/antlr3" |
917 | #:tests? #f |
918 | #:phases |
919 | (modify-phases %standard-phases |
920 | (add-after 'install 'bin-install |
921 | (lambda* (#:key inputs outputs #:allow-other-keys) |
922 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
923 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
924 | (mkdir-p bin) |
925 | (with-output-to-file (string-append bin "/antlr3") |
926 | (lambda _ |
927 | (display |
928 | (string-append "#!/bin/sh\n" |
929 | "java -cp " jar "/antlr3-3.3.jar:" |
930 | (string-concatenate |
931 | (find-files (assoc-ref inputs "stringtemplate") |
932 | ".*\\.jar")) |
933 | ":" |
934 | (string-concatenate |
935 | (find-files (string-append (assoc-ref inputs "antlr") "/lib") |
936 | ".*\\.jar")) |
937 | " org.antlr.Tool $*")))) |
938 | (chmod (string-append bin "/antlr3") #o755)))) |
939 | (add-before 'build 'generate-grammar |
940 | (lambda _ |
941 | (let ((dir "tool/src/main/antlr2/org/antlr/grammar/v2/")) |
942 | (for-each (lambda (file) |
943 | (display file) |
944 | (newline) |
945 | (system* "antlr" "-o" dir (string-append dir file))) |
946 | '("antlr.g" "antlr.print.g" "assign.types.g" |
947 | "buildnfa.g" "codegen.g" "define.g"))) |
948 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") |
949 | (for-each (lambda (file) |
950 | (display file) |
951 | (newline) |
952 | (system* "antlr3" file)) |
953 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" |
954 | "ANTLRv3Tree.g")) |
955 | (chdir "../../../../../../../..") |
956 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
957 | (("import org.antlr.grammar.v2.\\*;") |
958 | "import org.antlr.grammar.v2.*;\n |
959 | import org.antlr.grammar.v2.TreeToNFAConverter;\n |
960 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n |
961 | import org.antlr.grammar.v2.ANTLRTreePrinter;")))) |
962 | (add-before 'build 'fix-build-xml |
963 | (lambda _ |
964 | (substitute* "build.xml" |
965 | (("<exec") "<copy todir=\"${classes.dir}\"> |
966 | <fileset dir=\"tool/src/main/resources\"> |
967 | <include name=\"**/*.stg\"/> |
968 | <include name=\"**/*.st\"/> |
969 | <include name=\"**/*.sti\"/> |
970 | <include name=\"**/STLexer.tokens\"/> |
971 | </fileset> |
972 | </copy><exec"))))))) |
973 | (native-inputs |
974 | `(("antlr" ,antlr2) |
975 | ("antlr3" ,antlr3-3.1))) |
976 | (inputs |
977 | `(("junit" ,java-junit))) |
978 | (propagated-inputs |
979 | `(("stringtemplate" ,stringtemplate3) |
980 | ("antlr" ,antlr2) |
981 | ("antlr3" ,antlr3-3.1))) |
982 | (home-page "http://www.stringtemplate.org") |
983 | (synopsis "") |
984 | (description "") |
985 | (license license:bsd-3))) |
986 | |
987 | (define-public antlr3-3.1 |
988 | (package |
989 | (name "antlr3-3.1") |
990 | (version "3.1") |
991 | (source (origin |
992 | (method url-fetch) |
993 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
994 | "gh-pages/download/antlr-" |
995 | version ".tar.gz")) |
996 | (sha256 |
997 | (base32 |
998 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")))) |
999 | (build-system ant-build-system) |
1000 | (arguments |
1001 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
1002 | #:src-dir "src:runtime/Java/src" |
1003 | #:tests? #f |
1004 | #:phases |
1005 | (modify-phases %standard-phases |
1006 | (add-after 'install 'bin-install |
1007 | (lambda* (#:key inputs outputs #:allow-other-keys) |
1008 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
1009 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
1010 | (mkdir-p bin) |
1011 | (with-output-to-file (string-append bin "/antlr3") |
1012 | (lambda _ |
1013 | (display |
1014 | (string-append "#!/bin/sh\n" |
1015 | "java -cp " jar "/antlr3-3.1-3.1.jar:" |
1016 | (string-concatenate |
1017 | (find-files (assoc-ref inputs "stringtemplate") |
1018 | ".*\\.jar")) |
1019 | ":" |
1020 | (string-concatenate |
1021 | (find-files (string-append (assoc-ref inputs "antlr") "/lib") |
1022 | ".*\\.jar")) |
1023 | " org.antlr.Tool $*")))) |
1024 | (chmod (string-append bin "/antlr3") #o755)))) |
1025 | (add-before 'build 'generate-grammar |
1026 | (lambda _ |
1027 | (let ((dir "src/org/antlr/tool/")) |
1028 | (for-each (lambda (file) |
1029 | (display file) |
1030 | (newline) |
1031 | (system* "antlr" "-o" dir (string-append dir file))) |
1032 | '("antlr.g" "antlr.print.g" "assign.types.g" |
1033 | "buildnfa.g" "define.g"))) |
1034 | (format #t "codegen.g\n") |
1035 | (system* "antlr" "-o" "src/org/antlr/codegen" |
1036 | "src/org/antlr/codegen/codegen.g"))) |
1037 | (add-before 'build 'fix-build-xml |
1038 | (lambda _ |
1039 | (substitute* "build.xml" |
1040 | (("<exec") "<copy todir=\"${classes.dir}\"> |
1041 | <fileset dir=\"src\"> |
1042 | <include name=\"**/*.stg\"/> |
1043 | <include name=\"**/*.st\"/> |
1044 | <include name=\"**/*.sti\"/> |
1045 | <include name=\"**/STLexer.tokens\"/> |
1046 | </fileset> |
1047 | </copy><exec"))))))) |
1048 | (native-inputs |
1049 | `(("antlr" ,antlr2))) |
1050 | (inputs |
1051 | `(("junit" ,java-junit))) |
1052 | (propagated-inputs |
1053 | `(("stringtemplate" ,stringtemplate3))) |
1054 | (home-page "http://www.stringtemplate.org") |
1055 | (synopsis "") |
1056 | (description "") |
1057 | (license license:bsd-3))) |
1058 | |
1059 | (define-public stringtemplate4-4.0.6 |
1060 | (package |
1061 | (name "stringtemplate4") |
1062 | (version "4.0.6") |
1063 | (source (origin |
1064 | (method url-fetch) |
1065 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" |
1066 | version ".tar.gz")) |
1067 | (file-name (string-append name "-" version ".tar.gz")) |
1068 | (sha256 |
1069 | (base32 |
1070 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) |
1071 | (build-system ant-build-system) |
1072 | (arguments |
1073 | `(#:tests? #f |
1074 | #:jar-name (string-append ,name "-" ,version ".jar") |
1075 | #:phases |
1076 | (modify-phases %standard-phases |
1077 | (add-before 'build 'generate-grammar |
1078 | (lambda* (#:key inputs #:allow-other-keys) |
1079 | (chdir "src/org/stringtemplate/v4/compiler/") |
1080 | (for-each (lambda (file) |
1081 | (display file) |
1082 | (newline) |
1083 | (system* "antlr3" file)) |
1084 | '("STParser.g" "Group.g" "CodeGenerator.g")) |
1085 | (chdir "../../../../..")))))) |
1086 | (inputs |
1087 | `(("antlr3" ,antlr3-3.3) |
1088 | ("antlr2" ,antlr2) |
1089 | ("stringtemplate" ,stringtemplate3))) |
1090 | (home-page "http://www.stringtemplate.org") |
1091 | (synopsis "") |
1092 | (description "") |
1093 | (license license:bsd-3))) |
1094 | |
1095 | (define-public stringtemplate4 |
1096 | (package |
1097 | (inherit stringtemplate4-4.0.6) |
1098 | (name "stringtemplate4") |
1099 | (version "4.0.8") |
1100 | (source (origin |
1101 | (method url-fetch) |
1102 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" |
1103 | version ".tar.gz")) |
1104 | (file-name (string-append name "-" version ".tar.gz")) |
1105 | (sha256 |
1106 | (base32 |
1107 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) |
1108 | (inputs |
1109 | `(("antlr3" ,antlr3-temp) |
1110 | ("antlr2" ,antlr2) |
1111 | ("stringtemplate" ,stringtemplate3))))) |
1112 | |
1113 | ;; javax.json.* |
1114 | ;; org.abego.treelayout.* |
1115 | ;; com.ibm.icu.* |
1116 | (define-public antlr4 |
1117 | (package |
1118 | (name "antlr4") |
1119 | (version "4.7") |
1120 | (source (origin |
1121 | (method url-fetch) |
1122 | (uri (string-append "https://github.com/antlr/antlr4/archive/" |
1123 | version ".tar.gz")) |
1124 | (file-name (string-append name "-" version ".tar.gz")) |
1125 | (sha256 |
1126 | (base32 |
1127 | "0y7lzkvx9wbbmwg45mb4icx7i66z6894qfygrbbs26sr5xxyml9h")))) |
1128 | (build-system ant-build-system) |
1129 | (arguments |
1130 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
1131 | #:src-dir "runtime/Java/src:tool/src" |
1132 | #:phases |
1133 | (modify-phases %standard-phases |
1134 | (add-before 'build 'generate-grammar |
1135 | (lambda* (#:key inputs #:allow-other-keys) |
1136 | (chdir "tool/src/org/antlr/v4/parse") |
1137 | (for-each (lambda (file) |
1138 | (format #t "~a\n" file) |
1139 | (system* "antlr3" file)) |
1140 | '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g" |
1141 | "GrammarTreeVisitor.g" "ATNBuilder.g" |
1142 | "ActionSplitter.g" "LeftRecursiveRuleWalker.g")) |
1143 | (chdir "../codegen") |
1144 | (copy-file "../parse/ANTLRParser.tokens" "ANTLRParser.tokens") |
1145 | (format #t "SourceGenTriggers.g\n") |
1146 | (system* "antlr3" "SourceGenTriggers.g") |
1147 | (chdir "../../../../../..")))))) |
1148 | (inputs |
1149 | `(("antlr3" ,antlr3) |
1150 | ("icu4j" ,java-icu4j) |
1151 | ("java-jsonp" ,java-jsonp) |
1152 | ("treelayout" ,java-treelayout) |
1153 | ("stringtemplate4" ,stringtemplate4))) |
1154 | (home-page "https://antlr.org") |
1155 | (synopsis "") |
1156 | (description "") |
1157 | (license license:bsd-3))) |
1158 | |
1159 | |
1160 | ;; requires groovy 2.4.7. |
1161 | ;(define-public gradle |
1162 | ; (package |
1163 | ; (name "gradle") |
1164 | ; (version "3.4.1") |
1165 | ; (source (origin |
1166 | ; (method url-fetch) |
1167 | ; (uri (string-append "https://github.com/gradle/gradle/archive/v" |
1168 | ; version ".tar.gz")) |
1169 | ; (file-name (string-append name "-" version ".tar.gz")) |
1170 | ; (sha256 |
1171 | ; (base32 "0fq30k51mkixg31z3d4fjq3zbnyjml4i530px6n1n947mqk3rgyl")))) |
1172 | ; (build-system ant-build-system) |
1173 | ; (arguments |
1174 | ; `(#:phases |
1175 | ; (modify-phases %standard-phases |
1176 | ; (replace 'build |
1177 | ; (lambda* _ |
1178 | ; (system* "sh" "-x" "gradlew" "prBuild" "-x" "integTest" "--continue" |
1179 | ; "--stacktrace")))))) |
1180 | ; ;(system* "sh" "-x" "travisci_build.sh")))))) |
1181 | ; (home-page "") |
1182 | ; (synopsis "Build system") |
1183 | ; (description "Build system") |
1184 | ; (license license:asl2.0))) |
1185 | ; |
1186 | ;;; Requires gradle. |
1187 | ;(define-public android-anysoft-keyboard |
1188 | ; (package |
1189 | ; (name "android-anysoft-keyboard") |
1190 | ; (version "1.8-r9") |
1191 | ; (source (origin |
1192 | ; (method url-fetch) |
1193 | ; (uri (string-append "https://github.com/AnySoftKeyboard/" |
1194 | ; "AnySoftKeyboard/archive/" version ".tar.gz")) |
1195 | ; (file-name (string-append name "-" version ".tar.gz")) |
1196 | ; (sha256 |
1197 | ; (base32 |
1198 | ; "1mrin9mw1rs23d25v8yx4jprx7j05zir6756sqvk4myxbkcp8mag")))) |
1199 | ; (build-system ant-build-system) |
1200 | ; (home-page "https://anysoftkeyboard.github.io/") |
1201 | ; (synopsis "Alternative on-screen keyboard for multiple languages") |
1202 | ; (description "Alternative on-screen keyboard for multiple languages.") |
1203 | ; (license license:asl2.0))) |
1204 |