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