| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <[email protected]> |
| 3 | ;;; Copyright © 2016 Leo Famulari <[email protected]> |
| 4 | ;;; Copyright © 2016, 2017 Roel Janssen <[email protected]> |
| 5 | ;;; Copyright © 2017, 2019 Carlo Zancanaro <[email protected]> |
| 6 | ;;; Copyright © 2017-2020 Julien Lepiller <[email protected]> |
| 7 | ;;; Copyright © 2017 Thomas Danckaert <[email protected]> |
| 8 | ;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]> |
| 9 | ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <[email protected]> |
| 10 | ;;; Copyright © 2018, 2019 Gábor Boskovits <[email protected]> |
| 11 | ;;; Copyright © 2018 Chris Marusich <[email protected]> |
| 12 | ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <[email protected]> |
| 13 | ;;; Copyright © 2019, 2020 Björn Höfling <[email protected]> |
| 14 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <[email protected]> |
| 15 | ;;; Copyright © 2020 Raghav Gururajan <[email protected]> |
| 16 | ;;; Copyright © 2020 Maxim Cournoyer <[email protected]> |
| 17 | ;;; |
| 18 | ;;; This file is part of GNU Guix. |
| 19 | ;;; |
| 20 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 21 | ;;; under the terms of the GNU General Public License as published by |
| 22 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 23 | ;;; your option) any later version. |
| 24 | ;;; |
| 25 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 26 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 | ;;; GNU General Public License for more details. |
| 29 | ;;; |
| 30 | ;;; You should have received a copy of the GNU General Public License |
| 31 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 32 | |
| 33 | (define-module (gnu packages java) |
| 34 | #:use-module ((guix licenses) #:prefix license:) |
| 35 | #:use-module (guix packages) |
| 36 | #:use-module (guix download) |
| 37 | #:use-module (guix hg-download) |
| 38 | #:use-module (guix git-download) |
| 39 | #:use-module (guix svn-download) |
| 40 | #:use-module (guix utils) |
| 41 | #:use-module (guix build-system ant) |
| 42 | #:use-module (guix build-system gnu) |
| 43 | #:use-module (guix build-system trivial) |
| 44 | #:use-module (gnu packages) |
| 45 | #:use-module (gnu packages attr) |
| 46 | #:use-module (gnu packages autotools) |
| 47 | #:use-module (gnu packages base) |
| 48 | #:use-module (gnu packages bash) |
| 49 | #:use-module (gnu packages certs) |
| 50 | #:use-module (gnu packages cpio) |
| 51 | #:use-module (gnu packages cups) |
| 52 | #:use-module (gnu packages compression) |
| 53 | #:use-module (gnu packages elf) |
| 54 | #:use-module (gnu packages fontutils) |
| 55 | #:use-module (gnu packages gawk) |
| 56 | #:use-module (gnu packages gettext) |
| 57 | #:use-module (gnu packages gl) |
| 58 | #:use-module (gnu packages ghostscript) ;lcms |
| 59 | #:use-module (gnu packages gnome) |
| 60 | #:use-module (gnu packages groovy) |
| 61 | #:use-module (gnu packages gtk) |
| 62 | #:use-module (gnu packages guile) |
| 63 | #:use-module (gnu packages icu4c) |
| 64 | #:use-module (gnu packages image) |
| 65 | #:use-module (gnu packages java-compression) |
| 66 | #:use-module (gnu packages libffi) |
| 67 | #:use-module (gnu packages linux) ;alsa |
| 68 | #:use-module (gnu packages maths) |
| 69 | #:use-module (gnu packages maven) |
| 70 | #:use-module (gnu packages maven-parent-pom) |
| 71 | #:use-module (gnu packages nss) |
| 72 | #:use-module (gnu packages onc-rpc) |
| 73 | #:use-module (gnu packages web) |
| 74 | #:use-module (gnu packages wget) |
| 75 | #:use-module (gnu packages pkg-config) |
| 76 | #:use-module (gnu packages perl) |
| 77 | #:use-module (gnu packages popt) |
| 78 | #:use-module (gnu packages kerberos) |
| 79 | #:use-module (gnu packages xml) |
| 80 | #:use-module (gnu packages xorg) |
| 81 | #:use-module (gnu packages texinfo) |
| 82 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
| 83 | #:use-module (srfi srfi-11) |
| 84 | #:use-module (ice-9 match)) |
| 85 | |
| 86 | |
| 87 | ;;; |
| 88 | ;;; Java bootstrap toolchain. |
| 89 | ;;; |
| 90 | |
| 91 | ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We |
| 92 | ;; use it to build a simple version of GNU Classpath, the Java standard |
| 93 | ;; library. We chose version 0.93 because it is the last version that can be |
| 94 | ;; built with Jikes. With Jikes and this version of GNU Classpath we can |
| 95 | ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is |
| 96 | ;; the last version of JamVM that works with a version of GNU classpath that |
| 97 | ;; does not require ECJ. These three packages make up the bootstrap JDK. |
| 98 | |
| 99 | ;; This is sufficient to build an older version of Ant, which is needed to |
| 100 | ;; build an older version of ECJ, an incremental Java compiler, both of which |
| 101 | ;; are written in Java. |
| 102 | ;; |
| 103 | ;; ECJ is needed to build the latest release (0.99) and the development |
| 104 | ;; version of GNU Classpath. The development version of GNU Classpath has |
| 105 | ;; much more support for Java 1.6 than the latest release, but we need to |
| 106 | ;; build 0.99 first to get a working version of javah. ECJ, the development |
| 107 | ;; version of GNU Classpath, and the latest version of JamVM make up the |
| 108 | ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x |
| 109 | ;; build framework. We then build the more recent JDKs Icedtea 2.x and |
| 110 | ;; Icedtea 3.x. |
| 111 | |
| 112 | (define-public libantlr3c |
| 113 | (package |
| 114 | (name "libantlr3c") |
| 115 | (version "3.4") |
| 116 | (source |
| 117 | (origin |
| 118 | (method url-fetch) |
| 119 | (uri |
| 120 | (string-append "https://www.antlr3.org/download/C/" |
| 121 | name "-" version ".tar.gz")) |
| 122 | (sha256 |
| 123 | (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa")))) |
| 124 | (build-system gnu-build-system) |
| 125 | (arguments |
| 126 | `(#:configure-flags (list "--enable-debuginfo" "--disable-static") |
| 127 | #:phases (modify-phases %standard-phases |
| 128 | (replace 'configure |
| 129 | (lambda* (#:key build target native-inputs inputs outputs |
| 130 | (configure-flags '()) out-of-source? system |
| 131 | #:allow-other-keys) |
| 132 | (let ((configure (assoc-ref %standard-phases 'configure)) |
| 133 | (enable-64bit? (member system '("aarch64-linux" |
| 134 | "x86_64-linux" |
| 135 | "mips64el-linux")))) |
| 136 | (configure #:build build #:target target |
| 137 | #:native-inputs native-inputs |
| 138 | #:inputs inputs #:outputs outputs |
| 139 | #:configure-flags `(,(if enable-64bit? |
| 140 | "--enable-64bit" |
| 141 | '()) |
| 142 | ,@configure-flags) |
| 143 | #:out-of-source? out-of-source?))))))) |
| 144 | (synopsis "ANTLR C Library") |
| 145 | (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother |
| 146 | Tool for Language Recognition v3).") |
| 147 | (home-page "https://www.antlr3.org/") |
| 148 | (license license:bsd-3))) |
| 149 | |
| 150 | (define jikes |
| 151 | (package |
| 152 | (name "jikes") |
| 153 | (version "1.22") |
| 154 | (source (origin |
| 155 | (method url-fetch) |
| 156 | (uri (string-append "mirror://sourceforge/jikes/Jikes/" |
| 157 | version "/jikes-" version ".tar.bz2")) |
| 158 | (sha256 |
| 159 | (base32 |
| 160 | "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) |
| 161 | (build-system gnu-build-system) |
| 162 | (home-page "http://jikes.sourceforge.net/") |
| 163 | (synopsis "Compiler for the Java language") |
| 164 | (description "Jikes is a compiler that translates Java source files as |
| 165 | defined in The Java Language Specification into the bytecoded instruction set |
| 166 | and binary format defined in The Java Virtual Machine Specification.") |
| 167 | (license license:ibmpl1.0))) |
| 168 | |
| 169 | (define-public drip |
| 170 | ;; Last release is from 2014, with a few important commits afterwards. |
| 171 | (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08")) |
| 172 | (package |
| 173 | (name "drip") |
| 174 | (version (git-version "0.2.4" "1" commit)) |
| 175 | (source (origin |
| 176 | (method git-fetch) |
| 177 | (uri (git-reference |
| 178 | (url "https://github.com/ninjudd/drip") |
| 179 | (commit commit))) |
| 180 | (file-name (git-file-name name version)) |
| 181 | (sha256 |
| 182 | (base32 |
| 183 | "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2")))) |
| 184 | (build-system gnu-build-system) |
| 185 | (native-inputs |
| 186 | `(("jdk" ,icedtea "jdk"))) |
| 187 | (arguments |
| 188 | `(#:tests? #f ; No tests. |
| 189 | #:phases |
| 190 | (modify-phases %standard-phases |
| 191 | (delete 'configure) |
| 192 | (add-before 'install 'fix-wrapper |
| 193 | (lambda* (#:key inputs #:allow-other-keys) |
| 194 | (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps"))) |
| 195 | (substitute* "bin/drip" |
| 196 | (("jps") jps) |
| 197 | (("brew update && brew upgrade drip") "guix pull && guix install drip") |
| 198 | ;; No need to make: |
| 199 | (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "") |
| 200 | ;; No need to include source: |
| 201 | (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]") |
| 202 | "true")) |
| 203 | #t))) |
| 204 | (replace 'install |
| 205 | (lambda* (#:key outputs #:allow-other-keys) |
| 206 | (let* ((out (assoc-ref outputs "out")) |
| 207 | (bin (string-append out "/bin")) |
| 208 | (share (string-append out "/share/drip"))) |
| 209 | (mkdir-p bin) |
| 210 | (for-each |
| 211 | (lambda (file) |
| 212 | (install-file (string-append "bin/" file) bin)) |
| 213 | '("drip" "drip_daemon" "drip_proxy")) |
| 214 | (install-file "drip.jar" share) |
| 215 | (substitute* (string-append bin "/drip") |
| 216 | (("drip_dir=\\$bin_dir/..") |
| 217 | (string-append "drip_dir=" share))) |
| 218 | #t)))))) |
| 219 | (home-page "https://github.com/ninjudd/drip") |
| 220 | (synopsis "Faster Java Virtual Machine launching") |
| 221 | (description "Drip is a launcher for the Java Virtual Machine that |
| 222 | provides much faster startup times than the @command{java} command. The @command{drip} |
| 223 | script is intended to be a drop-in replacement for the @command{java} command, |
| 224 | only faster.") |
| 225 | (license license:epl1.0)))) |
| 226 | |
| 227 | ;; This is the last version of GNU Classpath that can be built without ECJ. |
| 228 | (define classpath-bootstrap |
| 229 | (package |
| 230 | (name "classpath") |
| 231 | (version "0.93") |
| 232 | (source (origin |
| 233 | (method url-fetch) |
| 234 | (uri (string-append "mirror://gnu/classpath/classpath-" |
| 235 | version ".tar.gz")) |
| 236 | (sha256 |
| 237 | (base32 |
| 238 | "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) |
| 239 | (patches (search-patches "classpath-aarch64-support.patch")))) |
| 240 | (build-system gnu-build-system) |
| 241 | (arguments |
| 242 | `(#:configure-flags |
| 243 | (list (string-append "JAVAC=" |
| 244 | (assoc-ref %build-inputs "jikes") |
| 245 | "/bin/jikes") |
| 246 | "--disable-Werror" |
| 247 | "--disable-gmp" |
| 248 | "--disable-gtk-peer" |
| 249 | "--disable-gconf-peer" |
| 250 | "--disable-plugin" |
| 251 | "--disable-dssi" |
| 252 | "--disable-alsa" |
| 253 | "--disable-gjdoc") |
| 254 | #:phases |
| 255 | (modify-phases %standard-phases |
| 256 | ;; XXX: This introduces a memory leak as we remove a call to free up |
| 257 | ;; memory for the file name string. This was necessary because of a |
| 258 | ;; runtime error that would have prevented us from building |
| 259 | ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685 |
| 260 | ;; for the gnarly details. |
| 261 | (add-after 'unpack 'remove-call-to-free |
| 262 | (lambda _ |
| 263 | (substitute* "native/jni/java-io/java_io_VMFile.c" |
| 264 | (("result = cpio_isFileExists.*" m) |
| 265 | (string-append m "\n//"))) |
| 266 | #t)) |
| 267 | (add-after 'install 'install-data |
| 268 | (lambda _ (invoke "make" "install-data")))))) |
| 269 | (native-inputs |
| 270 | `(("jikes" ,jikes) |
| 271 | ("fastjar" ,fastjar) |
| 272 | ("libltdl" ,libltdl) |
| 273 | ("pkg-config" ,pkg-config))) |
| 274 | (home-page "https://www.gnu.org/software/classpath/") |
| 275 | (synopsis "Essential libraries for Java") |
| 276 | (description "GNU Classpath is a project to create core class libraries |
| 277 | for use with runtimes, compilers and tools for the Java programming |
| 278 | language.") |
| 279 | ;; GPLv2 or later, with special linking exception. |
| 280 | (license license:gpl2+))) |
| 281 | |
| 282 | ;; This is the last version of JamVM that works with a version of GNU |
| 283 | ;; classpath that does not require ECJ. |
| 284 | (define jamvm-1-bootstrap |
| 285 | (package |
| 286 | (name "jamvm") |
| 287 | (version "1.5.1") |
| 288 | (source (origin |
| 289 | (method url-fetch) |
| 290 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" |
| 291 | "JamVM%20" version "/jamvm-" |
| 292 | version ".tar.gz")) |
| 293 | (patches (search-patches "jamvm-arm.patch")) |
| 294 | (sha256 |
| 295 | (base32 |
| 296 | "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")) |
| 297 | (snippet |
| 298 | '(begin |
| 299 | ;; Remove precompiled software. |
| 300 | (delete-file "lib/classes.zip") |
| 301 | #t)))) |
| 302 | (build-system gnu-build-system) |
| 303 | (arguments |
| 304 | `(#:configure-flags |
| 305 | (list (string-append "--with-classpath-install-dir=" |
| 306 | (assoc-ref %build-inputs "classpath")) |
| 307 | "--disable-int-caching" |
| 308 | "--enable-runtime-reloc-checks" |
| 309 | "--enable-ffi"))) |
| 310 | (inputs |
| 311 | `(("classpath" ,classpath-bootstrap) |
| 312 | ("jikes" ,jikes) |
| 313 | ("libffi" ,libffi) |
| 314 | ("zip" ,zip) |
| 315 | ("zlib" ,zlib))) |
| 316 | (home-page "http://jamvm.sourceforge.net/") |
| 317 | (synopsis "Small Java Virtual Machine") |
| 318 | (description "JamVM is a Java Virtual Machine conforming to the JVM |
| 319 | specification edition 2 (blue book). It is extremely small. However, unlike |
| 320 | other small VMs it supports the full spec, including object finalisation and |
| 321 | JNI.") |
| 322 | (license license:gpl2+))) |
| 323 | |
| 324 | (define ant-bootstrap |
| 325 | (package |
| 326 | (name "ant-bootstrap") |
| 327 | ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which |
| 328 | ;; are not supported. The 1.8.x series is the last to use only features |
| 329 | ;; supported by Jikes. |
| 330 | (version "1.8.4") |
| 331 | (source (origin |
| 332 | (method url-fetch) |
| 333 | (uri (string-append "mirror://apache/" |
| 334 | "ant/source/apache-ant-" |
| 335 | version "-src.tar.bz2")) |
| 336 | (sha256 |
| 337 | (base32 |
| 338 | "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) |
| 339 | (build-system gnu-build-system) |
| 340 | (arguments |
| 341 | `(#:imported-modules ((guix build syscalls) |
| 342 | ,@%gnu-build-system-modules) |
| 343 | #:modules ((srfi srfi-1) |
| 344 | (guix build gnu-build-system) |
| 345 | (guix build utils) |
| 346 | (guix build syscalls)) |
| 347 | #:tests? #f ; no "check" target |
| 348 | #:phases |
| 349 | (modify-phases %standard-phases |
| 350 | (delete 'bootstrap) |
| 351 | (delete 'configure) |
| 352 | (replace 'build |
| 353 | (lambda* (#:key inputs #:allow-other-keys) |
| 354 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
| 355 | (setenv "JAVACMD" |
| 356 | (string-append (assoc-ref inputs "jamvm") |
| 357 | "/bin/jamvm")) |
| 358 | (setenv "JAVAC" |
| 359 | (string-append (assoc-ref inputs "jikes") |
| 360 | "/bin/jikes")) |
| 361 | (setenv "CLASSPATH" |
| 362 | (string-append (assoc-ref inputs "jamvm") |
| 363 | "/lib/rt.jar")) |
| 364 | |
| 365 | ;; Ant complains if this file doesn't exist. |
| 366 | (setenv "HOME" "/tmp") |
| 367 | (with-output-to-file "/tmp/.ant.properties" |
| 368 | (lambda _ (display ""))) |
| 369 | |
| 370 | ;; Use jikes instead of javac for <javac ...> tags in build.xml |
| 371 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") |
| 372 | |
| 373 | ;; jikes produces lots of warnings, but they are not very |
| 374 | ;; interesting, so we silence them. |
| 375 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") |
| 376 | |
| 377 | ;; Without these JamVM options the build may freeze. |
| 378 | (substitute* "bootstrap.sh" |
| 379 | (("^\"\\$\\{JAVACMD\\}\" " m) |
| 380 | ,@(if (string-prefix? "armhf" (or (%current-system) |
| 381 | (%current-target-system))) |
| 382 | `((string-append m "-Xnocompact ")) |
| 383 | `((string-append m "-Xnocompact -Xnoinlining "))))) |
| 384 | |
| 385 | ;; Disable tests because we are bootstrapping and thus don't have |
| 386 | ;; any of the dependencies required to build and run the tests. |
| 387 | (substitute* "build.xml" |
| 388 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) |
| 389 | (invoke "bash" "bootstrap.sh" |
| 390 | (string-append "-Ddist.dir=" |
| 391 | (assoc-ref %outputs "out"))))) |
| 392 | (add-after 'build 'strip-jar-timestamps ;based on ant-build-system |
| 393 | (lambda* (#:key outputs #:allow-other-keys) |
| 394 | (define (repack-archive jar) |
| 395 | (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) |
| 396 | (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) |
| 397 | (with-directory-excursion dir |
| 398 | (invoke "unzip" jar)) |
| 399 | (delete-file jar) |
| 400 | ;; XXX: copied from (gnu build install) |
| 401 | (for-each (lambda (file) |
| 402 | (let ((s (lstat file))) |
| 403 | (unless (eq? (stat:type s) 'symlink) |
| 404 | (utime file 0 0 0 0)))) |
| 405 | (find-files dir #:directories? #t)) |
| 406 | ;; It is important that the manifest appears first. |
| 407 | (with-directory-excursion dir |
| 408 | (let* ((files (find-files "." ".*" #:directories? #t)) |
| 409 | ;; To ensure that the reference scanner can |
| 410 | ;; detect all store references in the jars |
| 411 | ;; we disable compression with the "-0" option. |
| 412 | (command (if (file-exists? manifest) |
| 413 | `("zip" "-0" "-X" ,jar ,manifest |
| 414 | ,@files) |
| 415 | `("zip" "-0" "-X" ,jar ,@files)))) |
| 416 | (apply invoke command))))) |
| 417 | (for-each repack-archive |
| 418 | (find-files |
| 419 | (string-append (assoc-ref %outputs "out") "/lib") |
| 420 | "\\.jar$")) |
| 421 | #t)) |
| 422 | (delete 'install)))) |
| 423 | (native-inputs |
| 424 | `(("jikes" ,jikes) |
| 425 | ("jamvm" ,jamvm-1-bootstrap) |
| 426 | ("unzip" ,unzip) |
| 427 | ("zip" ,zip))) |
| 428 | (home-page "https://ant.apache.org") |
| 429 | (synopsis "Build tool for Java") |
| 430 | (description |
| 431 | "Ant is a platform-independent build tool for Java. It is similar to |
| 432 | make but is implemented using the Java language, requires the Java platform, |
| 433 | and is best suited to building Java projects. Ant uses XML to describe the |
| 434 | build process and its dependencies, whereas Make uses Makefile format.") |
| 435 | (license license:asl2.0))) |
| 436 | |
| 437 | ;; Version 3.2.2 is the last version without a dependency on a full-fledged |
| 438 | ;; compiler for Java 1.5. |
| 439 | (define ecj-bootstrap |
| 440 | (package |
| 441 | (name "ecj-bootstrap") |
| 442 | (version "3.2.2") |
| 443 | (source (origin |
| 444 | (method url-fetch) |
| 445 | (uri (string-append "http://archive.eclipse.org/eclipse/" |
| 446 | "downloads/drops/R-" version |
| 447 | "-200702121330/ecjsrc.zip")) |
| 448 | (sha256 |
| 449 | (base32 |
| 450 | "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) |
| 451 | ;; It would be so much easier if we could use the ant-build-system, but we |
| 452 | ;; cannot as we don't have ant at this point. We use ecj for |
| 453 | ;; bootstrapping the JDK. |
| 454 | (build-system gnu-build-system) |
| 455 | (arguments |
| 456 | `(#:modules ((guix build gnu-build-system) |
| 457 | (guix build utils) |
| 458 | (srfi srfi-1)) |
| 459 | #:tests? #f ; there are no tests |
| 460 | #:phases |
| 461 | (modify-phases %standard-phases |
| 462 | (replace 'configure |
| 463 | (lambda* (#:key inputs #:allow-other-keys) |
| 464 | (setenv "CLASSPATH" |
| 465 | (string-join |
| 466 | (cons (string-append (assoc-ref inputs "jamvm") |
| 467 | "/lib/rt.jar") |
| 468 | (find-files (string-append |
| 469 | (assoc-ref inputs "ant-bootstrap") |
| 470 | "/lib") |
| 471 | "\\.jar$")) |
| 472 | ":")) |
| 473 | #t)) |
| 474 | (replace 'build |
| 475 | (lambda* (#:key inputs #:allow-other-keys) |
| 476 | ;; The unpack phase enters the "org" directory by mistake. |
| 477 | (chdir "..") |
| 478 | |
| 479 | ;; Create a simple manifest to make ecj executable. |
| 480 | (with-output-to-file "manifest" |
| 481 | (lambda _ |
| 482 | (display "Manifest-Version: 1.0 |
| 483 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) |
| 484 | |
| 485 | ;; Compile it all! |
| 486 | (and (apply invoke "jikes" |
| 487 | (find-files "." "\\.java$")) |
| 488 | (invoke "fastjar" "cvfm" |
| 489 | "ecj-bootstrap.jar" "manifest" ".")))) |
| 490 | (replace 'install |
| 491 | (lambda* (#:key outputs #:allow-other-keys) |
| 492 | (let ((share (string-append (assoc-ref outputs "out") |
| 493 | "/share/java/"))) |
| 494 | (mkdir-p share) |
| 495 | (install-file "ecj-bootstrap.jar" share) |
| 496 | #t)))))) |
| 497 | (native-inputs |
| 498 | `(("ant-bootstrap" ,ant-bootstrap) |
| 499 | ("unzip" ,unzip) |
| 500 | ("jikes" ,jikes) |
| 501 | ("jamvm" ,jamvm-1-bootstrap) |
| 502 | ("fastjar" ,fastjar))) |
| 503 | (home-page "https://eclipse.org") |
| 504 | (synopsis "Eclipse Java development tools core batch compiler") |
| 505 | (description "This package provides the Eclipse Java core batch compiler |
| 506 | for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a |
| 507 | requirement for all GNU Classpath releases after version 0.93.") |
| 508 | (license license:epl1.0))) |
| 509 | |
| 510 | (define ecj-javac-wrapper |
| 511 | (package (inherit ecj-bootstrap) |
| 512 | (name "ecj-javac-wrapper") |
| 513 | (source #f) |
| 514 | (build-system trivial-build-system) |
| 515 | (arguments |
| 516 | `(#:modules ((guix build utils)) |
| 517 | #:builder |
| 518 | (begin |
| 519 | (use-modules (guix build utils)) |
| 520 | (let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) |
| 521 | (target (string-append bin "/javac")) |
| 522 | (guile (string-append (assoc-ref %build-inputs "guile") |
| 523 | "/bin/guile")) |
| 524 | (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") |
| 525 | "/share/java/ecj-bootstrap.jar")) |
| 526 | (java (string-append (assoc-ref %build-inputs "jamvm") |
| 527 | "/bin/jamvm")) |
| 528 | (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath") |
| 529 | "/share/classpath"))) |
| 530 | (string-append jvmlib "/glibj.zip:" |
| 531 | jvmlib "/tools.zip")))) |
| 532 | (mkdir-p bin) |
| 533 | (with-output-to-file target |
| 534 | (lambda _ |
| 535 | (format #t "#!~a --no-auto-compile\n!#\n" guile) |
| 536 | (write |
| 537 | `(begin (use-modules (ice-9 match) |
| 538 | (ice-9 receive) |
| 539 | (ice-9 hash-table) |
| 540 | (srfi srfi-1) |
| 541 | (srfi srfi-26)) |
| 542 | (define defaults |
| 543 | '(("-bootclasspath" ,bootcp) |
| 544 | ("-source" "1.5") |
| 545 | ("-target" "1.5") |
| 546 | ("-cp" "."))) |
| 547 | (define (main args) |
| 548 | (let ((classpath (getenv "CLASSPATH"))) |
| 549 | (setenv "CLASSPATH" |
| 550 | (string-join (list ,ecj |
| 551 | ,(string-append (assoc-ref %build-inputs "jamvm") |
| 552 | "/lib/rt.jar") |
| 553 | (or classpath "")) |
| 554 | ":"))) |
| 555 | (receive (vm-args other-args) |
| 556 | ;; Separate VM arguments from arguments to ECJ. |
| 557 | (partition (cut string-prefix? "-J" <>) |
| 558 | (fold (lambda (default acc) |
| 559 | (if (member (first default) acc) |
| 560 | acc (append default acc))) |
| 561 | args defaults)) |
| 562 | (apply system* ,java |
| 563 | (append |
| 564 | ;; Remove "-J" prefix |
| 565 | (map (cut string-drop <> 2) vm-args) |
| 566 | '("org.eclipse.jdt.internal.compiler.batch.Main") |
| 567 | (cons "-nowarn" other-args))))) |
| 568 | ;; Entry point |
| 569 | (let ((args (cdr (command-line)))) |
| 570 | (if (null? args) |
| 571 | (format (current-error-port) "javac: no arguments given!\n") |
| 572 | (main args))))))) |
| 573 | (chmod target #o755) |
| 574 | #t)))) |
| 575 | (native-inputs |
| 576 | `(("guile" ,guile-2.2) |
| 577 | ("ecj-bootstrap" ,ecj-bootstrap) |
| 578 | ("jamvm" ,jamvm-1-bootstrap) |
| 579 | ("classpath" ,classpath-bootstrap))) |
| 580 | (description "This package provides a wrapper around the @dfn{Eclipse |
| 581 | compiler for Java} (ecj) with a command line interface that is compatible with |
| 582 | the standard javac executable."))) |
| 583 | |
| 584 | ;; The classpath-bootstrap was built without a virtual machine, so it does not |
| 585 | ;; provide a wrapper for javah. We cannot build the development version of |
| 586 | ;; Classpath without javah. |
| 587 | (define classpath-0.99 |
| 588 | (package (inherit classpath-bootstrap) |
| 589 | (version "0.99") |
| 590 | (source (origin |
| 591 | (method url-fetch) |
| 592 | (uri (string-append "mirror://gnu/classpath/classpath-" |
| 593 | version ".tar.gz")) |
| 594 | (sha256 |
| 595 | (base32 |
| 596 | "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) |
| 597 | (patches (search-patches "classpath-aarch64-support.patch")))) |
| 598 | (arguments |
| 599 | `(#:configure-flags |
| 600 | (list (string-append "--with-ecj-jar=" |
| 601 | (assoc-ref %build-inputs "ecj-bootstrap") |
| 602 | "/share/java/ecj-bootstrap.jar") |
| 603 | (string-append "JAVAC=" |
| 604 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
| 605 | "/bin/javac") |
| 606 | (string-append "JAVA=" |
| 607 | (assoc-ref %build-inputs "jamvm") |
| 608 | "/bin/jamvm") |
| 609 | "GCJ_JAVAC_TRUE=no" |
| 610 | "ac_cv_prog_java_works=yes" ; trust me |
| 611 | "--disable-Werror" |
| 612 | "--disable-gmp" |
| 613 | "--disable-gtk-peer" |
| 614 | "--disable-gconf-peer" |
| 615 | "--disable-plugin" |
| 616 | "--disable-dssi" |
| 617 | "--disable-alsa" |
| 618 | "--disable-gjdoc") |
| 619 | #:phases |
| 620 | (modify-phases %standard-phases |
| 621 | (add-after 'install 'install-data |
| 622 | (lambda _ (invoke "make" "install-data")))))) |
| 623 | (native-inputs |
| 624 | `(("ecj-bootstrap" ,ecj-bootstrap) |
| 625 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
| 626 | ("fastjar" ,fastjar) |
| 627 | ("jamvm" ,jamvm-1-bootstrap) |
| 628 | ("classpath" ,classpath-bootstrap) |
| 629 | ("libltdl" ,libltdl) |
| 630 | ("pkg-config" ,pkg-config))))) |
| 631 | |
| 632 | ;; We need this because classpath-bootstrap does not provide all of the tools |
| 633 | ;; we need to build classpath-devel. |
| 634 | (define classpath-jamvm-wrappers |
| 635 | (package (inherit classpath-0.99) |
| 636 | (name "classpath-jamvm-wrappers") |
| 637 | (source #f) |
| 638 | (build-system trivial-build-system) |
| 639 | (arguments |
| 640 | `(#:modules ((guix build utils)) |
| 641 | #:builder |
| 642 | (begin |
| 643 | (use-modules (guix build utils)) |
| 644 | (let* ((bash (assoc-ref %build-inputs "bash")) |
| 645 | (jamvm (assoc-ref %build-inputs "jamvm")) |
| 646 | (classpath (assoc-ref %build-inputs "classpath")) |
| 647 | (bin (string-append (assoc-ref %outputs "out") |
| 648 | "/bin/"))) |
| 649 | (mkdir-p bin) |
| 650 | (for-each (lambda (tool) |
| 651 | (with-output-to-file (string-append bin tool) |
| 652 | (lambda _ |
| 653 | ,@(if (string-prefix? "armhf" (or (%current-system) |
| 654 | (%current-target-system))) |
| 655 | `((format #t "#!~a/bin/sh |
| 656 | ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ |
| 657 | gnu.classpath.tools.~a.~a $@" |
| 658 | bash jamvm classpath tool |
| 659 | (if (string=? "native2ascii" tool) |
| 660 | "Native2ASCII" "Main"))) |
| 661 | `((format #t "#!~a/bin/sh |
| 662 | ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ |
| 663 | gnu.classpath.tools.~a.~a $@" |
| 664 | bash jamvm classpath tool |
| 665 | (if (string=? "native2ascii" tool) |
| 666 | "Native2ASCII" "Main")))))) |
| 667 | (chmod (string-append bin tool) #o755)) |
| 668 | (list "javah" |
| 669 | "rmic" |
| 670 | "rmid" |
| 671 | "orbd" |
| 672 | "rmiregistry" |
| 673 | "native2ascii")) |
| 674 | #t)))) |
| 675 | (native-inputs |
| 676 | `(("bash" ,bash) |
| 677 | ("jamvm" ,jamvm-1-bootstrap) |
| 678 | ("classpath" ,classpath-0.99))) |
| 679 | (inputs '()) |
| 680 | (synopsis "Executables from GNU Classpath") |
| 681 | (description "This package provides wrappers around the tools provided by |
| 682 | the GNU Classpath library. They are executed by the JamVM virtual |
| 683 | machine."))) |
| 684 | |
| 685 | ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since |
| 686 | ;; then Classpath has gained much more support for Java 1.6. |
| 687 | (define-public classpath-devel |
| 688 | (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") |
| 689 | (revision "1")) |
| 690 | (package (inherit classpath-bootstrap) |
| 691 | (version (string-append "0.99-" revision "." (string-take commit 9))) |
| 692 | (source (origin |
| 693 | (method git-fetch) |
| 694 | (uri (git-reference |
| 695 | (url "https://git.savannah.gnu.org/git/classpath.git") |
| 696 | (commit commit))) |
| 697 | (file-name (string-append "classpath-" version "-checkout")) |
| 698 | (sha256 |
| 699 | (base32 |
| 700 | "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")))) |
| 701 | (arguments |
| 702 | `(#:make-flags |
| 703 | ;; Ensure that the initial heap size is smaller than the maximum |
| 704 | ;; size. By default only Xmx is set, which can lead to invalid |
| 705 | ;; memory settings on some machines with a lot of memory. |
| 706 | '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") |
| 707 | #:configure-flags |
| 708 | (list (string-append "--with-ecj-jar=" |
| 709 | (assoc-ref %build-inputs "ecj-bootstrap") |
| 710 | "/share/java/ecj-bootstrap.jar") |
| 711 | (string-append "--with-javac=" |
| 712 | (assoc-ref %build-inputs "ecj-javac-wrapper") |
| 713 | "/bin/javac") |
| 714 | (string-append "JAVA=" |
| 715 | (assoc-ref %build-inputs "jamvm") |
| 716 | "/bin/jamvm") |
| 717 | "GCJ_JAVAC_TRUE=no" |
| 718 | "ac_cv_prog_java_works=yes" ; trust me |
| 719 | "--disable-Werror" |
| 720 | "--disable-gmp" |
| 721 | "--disable-gtk-peer" |
| 722 | "--disable-gconf-peer" |
| 723 | "--disable-plugin" |
| 724 | "--disable-dssi" |
| 725 | "--disable-alsa" |
| 726 | "--disable-gjdoc") |
| 727 | #:phases |
| 728 | (modify-phases %standard-phases |
| 729 | ;; XXX The bootstrap phase executes autogen.sh, which fails after |
| 730 | ;; complaining about the lack of gettext. |
| 731 | (replace 'bootstrap |
| 732 | (lambda _ (invoke "autoreconf" "-vif"))) |
| 733 | (add-after 'unpack 'remove-unsupported-annotations |
| 734 | (lambda _ |
| 735 | (substitute* (find-files "java" "\\.java$") |
| 736 | (("@Override") "")) |
| 737 | #t)) |
| 738 | (add-after 'install 'install-data |
| 739 | (lambda _ (invoke "make" "install-data")))))) |
| 740 | (native-inputs |
| 741 | `(("autoconf" ,autoconf) |
| 742 | ("automake" ,automake) |
| 743 | ("libtool" ,libtool) |
| 744 | ("gettext" ,gettext-minimal) |
| 745 | ("texinfo" ,texinfo) |
| 746 | ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah |
| 747 | ("ecj-bootstrap" ,ecj-bootstrap) |
| 748 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
| 749 | ("fastjar" ,fastjar) |
| 750 | ("jamvm" ,jamvm-1-bootstrap) |
| 751 | ("libltdl" ,libltdl) |
| 752 | ("pkg-config" ,pkg-config)))))) |
| 753 | |
| 754 | (define jamvm |
| 755 | (package (inherit jamvm-1-bootstrap) |
| 756 | (version "2.0.0") |
| 757 | (source (origin |
| 758 | (method url-fetch) |
| 759 | (uri (string-append "mirror://sourceforge/jamvm/jamvm/" |
| 760 | "JamVM%20" version "/jamvm-" |
| 761 | version ".tar.gz")) |
| 762 | (sha256 |
| 763 | (base32 |
| 764 | "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")) |
| 765 | (patches |
| 766 | (search-patches "jamvm-2.0.0-disable-branch-patching.patch")) |
| 767 | (snippet |
| 768 | '(begin |
| 769 | ;; Remove precompiled software. |
| 770 | (delete-file "src/classlib/gnuclasspath/lib/classes.zip") |
| 771 | #t)))) |
| 772 | (build-system gnu-build-system) |
| 773 | (arguments |
| 774 | `(#:configure-flags |
| 775 | (list (string-append "--with-classpath-install-dir=" |
| 776 | (assoc-ref %build-inputs "classpath"))))) |
| 777 | (inputs |
| 778 | `(("classpath" ,classpath-devel) |
| 779 | ("ecj-javac-wrapper" ,ecj-javac-wrapper) |
| 780 | ("zip" ,zip) |
| 781 | ("zlib" ,zlib))))) |
| 782 | |
| 783 | (define ecj-javac-wrapper-final |
| 784 | (package (inherit ecj-javac-wrapper) |
| 785 | (native-inputs |
| 786 | `(("guile" ,guile-2.2) |
| 787 | ("ecj-bootstrap" ,ecj-bootstrap) |
| 788 | ("jamvm" ,jamvm) |
| 789 | ("classpath" ,classpath-devel))))) |
| 790 | |
| 791 | ;; The bootstrap JDK consisting of jamvm, classpath-devel, |
| 792 | ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's |
| 793 | ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x, |
| 794 | ;; which uses Java 6 only. |
| 795 | (define-public icedtea-6 |
| 796 | (package |
| 797 | (name "icedtea") |
| 798 | (version "1.13.13") |
| 799 | (source (origin |
| 800 | (method url-fetch) |
| 801 | (uri (string-append |
| 802 | "http://icedtea.wildebeest.org/download/source/icedtea6-" |
| 803 | version ".tar.xz")) |
| 804 | (sha256 |
| 805 | (base32 |
| 806 | "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) |
| 807 | (modules '((guix build utils))) |
| 808 | (snippet |
| 809 | '(begin |
| 810 | (substitute* "Makefile.in" |
| 811 | ;; do not leak information about the build host |
| 812 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") |
| 813 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) |
| 814 | #t)))) |
| 815 | (build-system gnu-build-system) |
| 816 | (outputs '("out" ; Java Runtime Environment |
| 817 | "jdk" ; Java Development Kit |
| 818 | "doc")) ; all documentation |
| 819 | (arguments |
| 820 | `(;; There are many failing tests and many are known to fail upstream. |
| 821 | #:tests? #f |
| 822 | |
| 823 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build |
| 824 | ;; gremlin) doesn't support it yet, so skip this phase. |
| 825 | #:validate-runpath? #f |
| 826 | |
| 827 | #:modules ((guix build utils) |
| 828 | (guix build gnu-build-system) |
| 829 | (srfi srfi-19)) |
| 830 | |
| 831 | #:configure-flags |
| 832 | `("--enable-bootstrap" |
| 833 | "--enable-nss" |
| 834 | "--without-rhino" |
| 835 | "--with-parallel-jobs" |
| 836 | "--disable-downloading" |
| 837 | "--disable-tests" |
| 838 | ,(string-append "--with-ecj=" |
| 839 | (assoc-ref %build-inputs "ecj") |
| 840 | "/share/java/ecj-bootstrap.jar") |
| 841 | ,(string-append "--with-jar=" |
| 842 | (assoc-ref %build-inputs "fastjar") |
| 843 | "/bin/fastjar") |
| 844 | ,(string-append "--with-jdk-home=" |
| 845 | (assoc-ref %build-inputs "classpath")) |
| 846 | ,(string-append "--with-java=" |
| 847 | (assoc-ref %build-inputs "jamvm") |
| 848 | "/bin/jamvm")) |
| 849 | #:phases |
| 850 | (modify-phases %standard-phases |
| 851 | (replace 'unpack |
| 852 | (lambda* (#:key source inputs #:allow-other-keys) |
| 853 | (invoke "tar" "xvf" source) |
| 854 | (chdir (string-append "icedtea6-" ,version)) |
| 855 | (mkdir "openjdk") |
| 856 | (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") |
| 857 | ;; The convenient OpenJDK source bundle is no longer |
| 858 | ;; available for download, so we have to take the sources |
| 859 | ;; from the Mercurial repositories and change the Makefile |
| 860 | ;; to avoid tests for the OpenJDK zip archive. |
| 861 | (with-directory-excursion "openjdk" |
| 862 | (for-each (lambda (part) |
| 863 | (mkdir part) |
| 864 | (copy-recursively |
| 865 | (assoc-ref inputs |
| 866 | (string-append part "-src")) |
| 867 | part)) |
| 868 | '("jdk" "corba" |
| 869 | "langtools" "jaxp" "jaxws"))) |
| 870 | (with-directory-excursion "openjdk" |
| 871 | (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src")) |
| 872 | (rename-file "hg-checkout" "hotspot")) |
| 873 | (substitute* "patches/freetypeversion.patch" |
| 874 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") |
| 875 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) |
| 876 | (substitute* "Makefile.in" |
| 877 | (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") |
| 878 | "echo \"trust me\";") |
| 879 | ;; The contents of the bootstrap directory must be |
| 880 | ;; writeable but when copying from the store they are |
| 881 | ;; not. |
| 882 | (("mkdir -p lib/rt" line) |
| 883 | (string-append line "; chmod -R u+w $(BOOT_DIR)"))) |
| 884 | (invoke "chmod" "-R" "u+w" "openjdk"))) |
| 885 | (add-after 'unpack 'use-classpath |
| 886 | (lambda* (#:key inputs #:allow-other-keys) |
| 887 | (let ((jvmlib (assoc-ref inputs "classpath")) |
| 888 | (jamvm (assoc-ref inputs "jamvm"))) |
| 889 | ;; Classpath does not provide rt.jar. |
| 890 | (substitute* "Makefile.in" |
| 891 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") |
| 892 | (string-append jvmlib "/share/classpath/glibj.zip"))) |
| 893 | ;; Make sure we can find all classes. |
| 894 | (setenv "CLASSPATH" |
| 895 | (string-append jvmlib "/share/classpath/glibj.zip:" |
| 896 | jvmlib "/share/classpath/tools.zip:" |
| 897 | jamvm "/lib/rt.jar")) |
| 898 | (setenv "JAVACFLAGS" |
| 899 | (string-append "-cp " |
| 900 | jvmlib "/share/classpath/glibj.zip:" |
| 901 | jvmlib "/share/classpath/tools.zip"))) |
| 902 | #t)) |
| 903 | (add-after 'unpack 'patch-patches |
| 904 | (lambda _ |
| 905 | ;; shebang in patches so that they apply cleanly |
| 906 | (substitute* '("patches/jtreg-jrunscript.patch" |
| 907 | "patches/hotspot/hs23/drop_unlicensed_test.patch") |
| 908 | (("#!/bin/sh") (string-append "#!" (which "sh")))) |
| 909 | #t)) |
| 910 | (add-after 'unpack 'patch-paths |
| 911 | (lambda* (#:key inputs #:allow-other-keys) |
| 912 | ;; buildtree.make generates shell scripts, so we need to replace |
| 913 | ;; the generated shebang |
| 914 | (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") |
| 915 | (("/bin/sh") (which "bash"))) |
| 916 | |
| 917 | (let ((corebin (string-append |
| 918 | (assoc-ref inputs "coreutils") "/bin/")) |
| 919 | (binbin (string-append |
| 920 | (assoc-ref inputs "binutils") "/bin/")) |
| 921 | (grepbin (string-append |
| 922 | (assoc-ref inputs "grep") "/bin/"))) |
| 923 | (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" |
| 924 | "openjdk/corba/make/common/shared/Defs-linux.gmk") |
| 925 | (("UNIXCOMMAND_PATH = /bin/") |
| 926 | (string-append "UNIXCOMMAND_PATH = " corebin)) |
| 927 | (("USRBIN_PATH = /usr/bin/") |
| 928 | (string-append "USRBIN_PATH = " corebin)) |
| 929 | (("DEVTOOLS_PATH *= */usr/bin/") |
| 930 | (string-append "DEVTOOLS_PATH = " corebin)) |
| 931 | (("COMPILER_PATH *= */usr/bin/") |
| 932 | (string-append "COMPILER_PATH = " |
| 933 | (assoc-ref inputs "gcc") "/bin/")) |
| 934 | (("DEF_OBJCOPY *=.*objcopy") |
| 935 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) |
| 936 | |
| 937 | ;; fix path to alsa header |
| 938 | (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" |
| 939 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") |
| 940 | (string-append "ALSA_INCLUDE=" |
| 941 | (assoc-ref inputs "alsa-lib") |
| 942 | "/include/alsa/version.h"))) |
| 943 | |
| 944 | ;; fix hard-coded utility paths |
| 945 | (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" |
| 946 | "openjdk/corba/make/common/shared/Defs-utils.gmk") |
| 947 | (("ECHO *=.*echo") |
| 948 | (string-append "ECHO = " (which "echo"))) |
| 949 | (("^GREP *=.*grep") |
| 950 | (string-append "GREP = " (which "grep"))) |
| 951 | (("EGREP *=.*egrep") |
| 952 | (string-append "EGREP = " (which "egrep"))) |
| 953 | (("CPIO *=.*cpio") |
| 954 | (string-append "CPIO = " (which "cpio"))) |
| 955 | (("READELF *=.*readelf") |
| 956 | (string-append "READELF = " (which "readelf"))) |
| 957 | (("^ *AR *=.*ar") |
| 958 | (string-append "AR = " (which "ar"))) |
| 959 | (("^ *TAR *=.*tar") |
| 960 | (string-append "TAR = " (which "tar"))) |
| 961 | (("AS *=.*as") |
| 962 | (string-append "AS = " (which "as"))) |
| 963 | (("LD *=.*ld") |
| 964 | (string-append "LD = " (which "ld"))) |
| 965 | (("STRIP *=.*strip") |
| 966 | (string-append "STRIP = " (which "strip"))) |
| 967 | (("NM *=.*nm") |
| 968 | (string-append "NM = " (which "nm"))) |
| 969 | (("^SH *=.*sh") |
| 970 | (string-append "SH = " (which "bash"))) |
| 971 | (("^FIND *=.*find") |
| 972 | (string-append "FIND = " (which "find"))) |
| 973 | (("LDD *=.*ldd") |
| 974 | (string-append "LDD = " (which "ldd"))) |
| 975 | (("NAWK *=.*(n|g)awk") |
| 976 | (string-append "NAWK = " (which "gawk"))) |
| 977 | (("XARGS *=.*xargs") |
| 978 | (string-append "XARGS = " (which "xargs"))) |
| 979 | (("UNZIP *=.*unzip") |
| 980 | (string-append "UNZIP = " (which "unzip"))) |
| 981 | (("ZIPEXE *=.*zip") |
| 982 | (string-append "ZIPEXE = " (which "zip"))) |
| 983 | (("SED *=.*sed") |
| 984 | (string-append "SED = " (which "sed")))) |
| 985 | |
| 986 | ;; Some of these timestamps cause problems as they are more than |
| 987 | ;; 10 years ago, failing the build process. |
| 988 | (substitute* |
| 989 | "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" |
| 990 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") |
| 991 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") |
| 992 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") |
| 993 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")) |
| 994 | #t))) |
| 995 | (add-before 'configure 'set-additional-paths |
| 996 | (lambda* (#:key inputs #:allow-other-keys) |
| 997 | (setenv "CPATH" |
| 998 | (string-append (assoc-ref inputs "libxrender") |
| 999 | "/include/X11/extensions" ":" |
| 1000 | (assoc-ref inputs "libxtst") |
| 1001 | "/include/X11/extensions" ":" |
| 1002 | (assoc-ref inputs "libxinerama") |
| 1003 | "/include/X11/extensions" ":" |
| 1004 | (or (getenv "CPATH") ""))) |
| 1005 | (setenv "ALT_CUPS_HEADERS_PATH" |
| 1006 | (string-append (assoc-ref inputs "cups") |
| 1007 | "/include")) |
| 1008 | (setenv "ALT_FREETYPE_HEADERS_PATH" |
| 1009 | (string-append (assoc-ref inputs "freetype") |
| 1010 | "/include")) |
| 1011 | (setenv "ALT_FREETYPE_LIB_PATH" |
| 1012 | (string-append (assoc-ref inputs "freetype") |
| 1013 | "/lib")) |
| 1014 | #t)) |
| 1015 | (add-before 'build 'disable-os-version-check |
| 1016 | ;; allow build on linux major version change |
| 1017 | (lambda _ |
| 1018 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") |
| 1019 | #t)) |
| 1020 | (replace 'install |
| 1021 | (lambda* (#:key outputs #:allow-other-keys) |
| 1022 | (let ((doc (string-append (assoc-ref outputs "doc") |
| 1023 | "/share/doc/icedtea")) |
| 1024 | (jre (assoc-ref outputs "out")) |
| 1025 | (jdk (assoc-ref outputs "jdk"))) |
| 1026 | (copy-recursively "openjdk.build/docs" doc) |
| 1027 | (copy-recursively "openjdk.build/j2re-image" jre) |
| 1028 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) |
| 1029 | #t))))) |
| 1030 | (native-inputs |
| 1031 | `(("ant" ,ant-bootstrap) |
| 1032 | ("alsa-lib" ,alsa-lib) |
| 1033 | ("attr" ,attr) |
| 1034 | ("classpath" ,classpath-devel) |
| 1035 | ("coreutils" ,coreutils) |
| 1036 | ("cpio" ,cpio) |
| 1037 | ("cups" ,cups) |
| 1038 | ("ecj" ,ecj-bootstrap) |
| 1039 | ("ecj-javac" ,ecj-javac-wrapper-final) |
| 1040 | ("fastjar" ,fastjar) |
| 1041 | ("fontconfig" ,fontconfig) |
| 1042 | ("freetype" ,freetype) |
| 1043 | ("gtk" ,gtk+-2) |
| 1044 | ("gawk" ,gawk) |
| 1045 | ("giflib" ,giflib) |
| 1046 | ("grep" ,grep) |
| 1047 | ("jamvm" ,jamvm) |
| 1048 | ("lcms" ,lcms) |
| 1049 | ("libjpeg" ,libjpeg-turbo) |
| 1050 | ("libnsl" ,libnsl) |
| 1051 | ("libpng" ,libpng) |
| 1052 | ("libtool" ,libtool) |
| 1053 | ("libx11" ,libx11) |
| 1054 | ("libxcomposite" ,libxcomposite) |
| 1055 | ("libxi" ,libxi) |
| 1056 | ("libxinerama" ,libxinerama) |
| 1057 | ("libxrender" ,libxrender) |
| 1058 | ("libxslt" ,libxslt) ;for xsltproc |
| 1059 | ("libxt" ,libxt) |
| 1060 | ("libxtst" ,libxtst) |
| 1061 | ("mit-krb5" ,mit-krb5) |
| 1062 | ("nss" ,nss) |
| 1063 | ("nss-certs" ,nss-certs) |
| 1064 | ("perl" ,perl) |
| 1065 | ("pkg-config" ,pkg-config) |
| 1066 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it |
| 1067 | ("unzip" ,unzip) |
| 1068 | ("wget" ,wget) |
| 1069 | ("which" ,which) |
| 1070 | ("zip" ,zip) |
| 1071 | ("zlib" ,zlib) |
| 1072 | ("openjdk-src" |
| 1073 | ,(origin |
| 1074 | (method hg-fetch) |
| 1075 | (uri (hg-reference |
| 1076 | (url "http://hg.openjdk.java.net/jdk6/jdk6/") |
| 1077 | (changeset "jdk6-b41"))) |
| 1078 | (sha256 |
| 1079 | (base32 |
| 1080 | "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv")))) |
| 1081 | ("jdk-src" |
| 1082 | ,(origin |
| 1083 | (method hg-fetch) |
| 1084 | (uri (hg-reference |
| 1085 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/") |
| 1086 | (changeset "jdk6-b41"))) |
| 1087 | (sha256 |
| 1088 | (base32 |
| 1089 | "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9")))) |
| 1090 | ("hotspot-src" |
| 1091 | ,(origin |
| 1092 | (method hg-fetch) |
| 1093 | (uri (hg-reference |
| 1094 | (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/") |
| 1095 | (changeset "jdk6-b41"))) |
| 1096 | (sha256 |
| 1097 | (base32 |
| 1098 | "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd")) |
| 1099 | (patches |
| 1100 | (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch")))) |
| 1101 | ("corba-src" |
| 1102 | ,(origin |
| 1103 | (method hg-fetch) |
| 1104 | (uri (hg-reference |
| 1105 | (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/") |
| 1106 | (changeset "jdk6-b41"))) |
| 1107 | (sha256 |
| 1108 | (base32 |
| 1109 | "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q")))) |
| 1110 | ("langtools-src" |
| 1111 | ,(origin |
| 1112 | (method hg-fetch) |
| 1113 | (uri (hg-reference |
| 1114 | (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/") |
| 1115 | (changeset "jdk6-b41"))) |
| 1116 | (sha256 |
| 1117 | (base32 |
| 1118 | "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d")))) |
| 1119 | ("jaxp-src" |
| 1120 | ,(origin |
| 1121 | (method hg-fetch) |
| 1122 | (uri (hg-reference |
| 1123 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/") |
| 1124 | (changeset "jdk6-b41"))) |
| 1125 | (sha256 |
| 1126 | (base32 |
| 1127 | "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm")))) |
| 1128 | ("jaxws-src" |
| 1129 | ,(origin |
| 1130 | (method hg-fetch) |
| 1131 | (uri (hg-reference |
| 1132 | (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/") |
| 1133 | (changeset "jdk6-b41"))) |
| 1134 | (sha256 |
| 1135 | (base32 |
| 1136 | "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0")))))) |
| 1137 | (home-page "http://icedtea.classpath.org") |
| 1138 | (synopsis "Java development kit") |
| 1139 | (description |
| 1140 | "This package provides the OpenJDK built with the IcedTea build harness. |
| 1141 | This version of the OpenJDK is no longer maintained and is only used for |
| 1142 | bootstrapping purposes.") |
| 1143 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the |
| 1144 | ;; same license as both GNU Classpath and OpenJDK. |
| 1145 | (license license:gpl2+))) |
| 1146 | |
| 1147 | (define-public icedtea-7 |
| 1148 | (let* ((version "2.6.13") |
| 1149 | (drop (lambda (name hash) |
| 1150 | (origin |
| 1151 | (method url-fetch) |
| 1152 | (uri (string-append |
| 1153 | "http://icedtea.classpath.org/download/drops" |
| 1154 | "/icedtea7/" version "/" name ".tar.bz2")) |
| 1155 | (sha256 (base32 hash)))))) |
| 1156 | (package |
| 1157 | (name "icedtea") |
| 1158 | (version version) |
| 1159 | (source (origin |
| 1160 | (method url-fetch) |
| 1161 | (uri (string-append |
| 1162 | "http://icedtea.wildebeest.org/download/source/icedtea-" |
| 1163 | version ".tar.xz")) |
| 1164 | (sha256 |
| 1165 | (base32 |
| 1166 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
| 1167 | (modules '((guix build utils))) |
| 1168 | (snippet |
| 1169 | '(begin |
| 1170 | (substitute* "Makefile.in" |
| 1171 | ;; do not leak information about the build host |
| 1172 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") |
| 1173 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) |
| 1174 | #t)))) |
| 1175 | (build-system gnu-build-system) |
| 1176 | (outputs '("out" ; Java Runtime Environment |
| 1177 | "jdk" ; Java Development Kit |
| 1178 | "doc")) ; all documentation |
| 1179 | (arguments |
| 1180 | `(;; There are many test failures. Some are known to |
| 1181 | ;; fail upstream, others relate to not having an X |
| 1182 | ;; server running at test time, yet others are a |
| 1183 | ;; complete mystery to me. |
| 1184 | |
| 1185 | ;; hotspot: passed: 241; failed: 45; error: 2 |
| 1186 | ;; langtools: passed: 1,934; failed: 26 |
| 1187 | ;; jdk: unknown |
| 1188 | #:tests? #f |
| 1189 | |
| 1190 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build |
| 1191 | ;; gremlin) doesn't support it yet, so skip this phase. |
| 1192 | #:validate-runpath? #f |
| 1193 | |
| 1194 | ;; Apparently, the C locale is needed for some of the tests. |
| 1195 | #:locale "C" |
| 1196 | |
| 1197 | #:modules ((guix build utils) |
| 1198 | (guix build gnu-build-system) |
| 1199 | (ice-9 match) |
| 1200 | (ice-9 popen) |
| 1201 | (srfi srfi-19) |
| 1202 | (srfi srfi-26)) |
| 1203 | |
| 1204 | #:configure-flags |
| 1205 | ;; TODO: package pcsc and sctp, and add to inputs |
| 1206 | `("--disable-system-pcsc" |
| 1207 | "--disable-system-sctp" |
| 1208 | "--enable-bootstrap" |
| 1209 | "--enable-nss" |
| 1210 | "--without-rhino" |
| 1211 | "--disable-downloading" |
| 1212 | "--disable-tests" ;they are run in the check phase instead |
| 1213 | "--with-openjdk-src-dir=./openjdk.src" |
| 1214 | ,(string-append "--with-jdk-home=" |
| 1215 | (assoc-ref %build-inputs "jdk"))) |
| 1216 | |
| 1217 | #:phases |
| 1218 | (modify-phases %standard-phases |
| 1219 | (replace 'unpack |
| 1220 | (lambda* (#:key source inputs #:allow-other-keys) |
| 1221 | (let ((target (string-append "icedtea-" ,version)) |
| 1222 | (unpack (lambda* (name #:optional dir) |
| 1223 | (let ((dir (or dir |
| 1224 | (string-drop-right name 5)))) |
| 1225 | (mkdir dir) |
| 1226 | (invoke "tar" "xvf" |
| 1227 | (assoc-ref inputs name) |
| 1228 | "-C" dir |
| 1229 | "--strip-components=1"))))) |
| 1230 | (mkdir target) |
| 1231 | (invoke "tar" "xvf" source |
| 1232 | "-C" target "--strip-components=1") |
| 1233 | (chdir target) |
| 1234 | (unpack "openjdk-src" "openjdk.src") |
| 1235 | (with-directory-excursion "openjdk.src" |
| 1236 | (for-each unpack |
| 1237 | (filter (cut string-suffix? "-drop" <>) |
| 1238 | (map (match-lambda |
| 1239 | ((name . _) name)) |
| 1240 | inputs)))) |
| 1241 | #t))) |
| 1242 | (add-after 'unpack 'patch-bitrot |
| 1243 | (lambda _ |
| 1244 | (substitute* '("patches/boot/revert-6973616.patch" |
| 1245 | "openjdk.src/jdk/make/common/shared/Defs-versions.gmk") |
| 1246 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") |
| 1247 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) |
| 1248 | ;; As of attr 2.4.48 this header is no longer |
| 1249 | ;; included. It is provided by the libc instead. |
| 1250 | (substitute* '("configure" |
| 1251 | "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") |
| 1252 | (("attr/xattr.h") "sys/xattr.h")) |
| 1253 | #t)) |
| 1254 | (add-after 'unpack 'fix-x11-extension-include-path |
| 1255 | (lambda* (#:key inputs #:allow-other-keys) |
| 1256 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" |
| 1257 | (((string-append "\\$\\(firstword \\$\\(wildcard " |
| 1258 | "\\$\\(OPENWIN_HOME\\)" |
| 1259 | "/include/X11/extensions\\).*$")) |
| 1260 | (string-append (assoc-ref inputs "libxrender") |
| 1261 | "/include/X11/extensions" |
| 1262 | " -I" (assoc-ref inputs "libxtst") |
| 1263 | "/include/X11/extensions" |
| 1264 | " -I" (assoc-ref inputs "libxinerama") |
| 1265 | "/include/X11/extensions")) |
| 1266 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")) |
| 1267 | #t)) |
| 1268 | (add-after 'unpack 'patch-paths |
| 1269 | (lambda _ |
| 1270 | ;; buildtree.make generates shell scripts, so we need to replace |
| 1271 | ;; the generated shebang |
| 1272 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") |
| 1273 | (("/bin/sh") (which "bash"))) |
| 1274 | |
| 1275 | (let ((corebin (string-append |
| 1276 | (assoc-ref %build-inputs "coreutils") "/bin/")) |
| 1277 | (binbin (string-append |
| 1278 | (assoc-ref %build-inputs "binutils") "/bin/")) |
| 1279 | (grepbin (string-append |
| 1280 | (assoc-ref %build-inputs "grep") "/bin/"))) |
| 1281 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" |
| 1282 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") |
| 1283 | (("UNIXCOMMAND_PATH = /bin/") |
| 1284 | (string-append "UNIXCOMMAND_PATH = " corebin)) |
| 1285 | (("USRBIN_PATH = /usr/bin/") |
| 1286 | (string-append "USRBIN_PATH = " corebin)) |
| 1287 | (("DEVTOOLS_PATH *= */usr/bin/") |
| 1288 | (string-append "DEVTOOLS_PATH = " corebin)) |
| 1289 | (("COMPILER_PATH *= */usr/bin/") |
| 1290 | (string-append "COMPILER_PATH = " |
| 1291 | (assoc-ref %build-inputs "gcc") "/bin/")) |
| 1292 | (("DEF_OBJCOPY *=.*objcopy") |
| 1293 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) |
| 1294 | |
| 1295 | ;; fix path to alsa header |
| 1296 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
| 1297 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") |
| 1298 | (string-append "ALSA_INCLUDE=" |
| 1299 | (assoc-ref %build-inputs "alsa-lib") |
| 1300 | "/include/alsa/version.h"))) |
| 1301 | |
| 1302 | ;; fix hard-coded utility paths |
| 1303 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" |
| 1304 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") |
| 1305 | (("ECHO *=.*echo") |
| 1306 | (string-append "ECHO = " (which "echo"))) |
| 1307 | (("^GREP *=.*grep") |
| 1308 | (string-append "GREP = " (which "grep"))) |
| 1309 | (("EGREP *=.*egrep") |
| 1310 | (string-append "EGREP = " (which "egrep"))) |
| 1311 | (("CPIO *=.*cpio") |
| 1312 | (string-append "CPIO = " (which "cpio"))) |
| 1313 | (("READELF *=.*readelf") |
| 1314 | (string-append "READELF = " (which "readelf"))) |
| 1315 | (("^ *AR *=.*ar") |
| 1316 | (string-append "AR = " (which "ar"))) |
| 1317 | (("^ *TAR *=.*tar") |
| 1318 | (string-append "TAR = " (which "tar"))) |
| 1319 | (("AS *=.*as") |
| 1320 | (string-append "AS = " (which "as"))) |
| 1321 | (("LD *=.*ld") |
| 1322 | (string-append "LD = " (which "ld"))) |
| 1323 | (("STRIP *=.*strip") |
| 1324 | (string-append "STRIP = " (which "strip"))) |
| 1325 | (("NM *=.*nm") |
| 1326 | (string-append "NM = " (which "nm"))) |
| 1327 | (("^SH *=.*sh") |
| 1328 | (string-append "SH = " (which "bash"))) |
| 1329 | (("^FIND *=.*find") |
| 1330 | (string-append "FIND = " (which "find"))) |
| 1331 | (("LDD *=.*ldd") |
| 1332 | (string-append "LDD = " (which "ldd"))) |
| 1333 | (("NAWK *=.*(n|g)awk") |
| 1334 | (string-append "NAWK = " (which "gawk"))) |
| 1335 | (("XARGS *=.*xargs") |
| 1336 | (string-append "XARGS = " (which "xargs"))) |
| 1337 | (("UNZIP *=.*unzip") |
| 1338 | (string-append "UNZIP = " (which "unzip"))) |
| 1339 | (("ZIPEXE *=.*zip") |
| 1340 | (string-append "ZIPEXE = " (which "zip"))) |
| 1341 | (("SED *=.*sed") |
| 1342 | (string-append "SED = " (which "sed")))) |
| 1343 | |
| 1344 | ;; Some of these timestamps cause problems as they are more than |
| 1345 | ;; 10 years ago, failing the build process. |
| 1346 | (substitute* |
| 1347 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" |
| 1348 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") |
| 1349 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") |
| 1350 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") |
| 1351 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))) |
| 1352 | #t)) |
| 1353 | (add-before 'configure 'set-additional-paths |
| 1354 | (lambda* (#:key inputs #:allow-other-keys) |
| 1355 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
| 1356 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") |
| 1357 | (string-append "ALSA_INCLUDE=" |
| 1358 | (assoc-ref inputs "alsa-lib") |
| 1359 | "/include/alsa/version.h"))) |
| 1360 | (setenv "CC" "gcc") |
| 1361 | (setenv "CPATH" |
| 1362 | (string-append (assoc-ref inputs "libxcomposite") |
| 1363 | "/include/X11/extensions" ":" |
| 1364 | (assoc-ref inputs "libxrender") |
| 1365 | "/include/X11/extensions" ":" |
| 1366 | (assoc-ref inputs "libxtst") |
| 1367 | "/include/X11/extensions" ":" |
| 1368 | (assoc-ref inputs "libxinerama") |
| 1369 | "/include/X11/extensions" ":" |
| 1370 | (or (getenv "CPATH") ""))) |
| 1371 | (setenv "ALT_OBJCOPY" (which "objcopy")) |
| 1372 | (setenv "ALT_CUPS_HEADERS_PATH" |
| 1373 | (string-append (assoc-ref inputs "cups") |
| 1374 | "/include")) |
| 1375 | (setenv "ALT_FREETYPE_HEADERS_PATH" |
| 1376 | (string-append (assoc-ref inputs "freetype") |
| 1377 | "/include")) |
| 1378 | (setenv "ALT_FREETYPE_LIB_PATH" |
| 1379 | (string-append (assoc-ref inputs "freetype") |
| 1380 | "/lib")) |
| 1381 | #t)) |
| 1382 | (add-before 'build 'disable-os-version-check |
| 1383 | ;; allow build on linux major version change |
| 1384 | (lambda _ |
| 1385 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok") |
| 1386 | #t)) |
| 1387 | (add-before 'check 'fix-test-framework |
| 1388 | (lambda _ |
| 1389 | ;; Fix PATH in test environment |
| 1390 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" |
| 1391 | (("PATH=/bin:/usr/bin") |
| 1392 | (string-append "PATH=" (getenv "PATH")))) |
| 1393 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" |
| 1394 | (("/usr/bin/env") (which "env"))) |
| 1395 | (substitute* "openjdk.src/hotspot/test/test_env.sh" |
| 1396 | (("/bin/rm") (which "rm")) |
| 1397 | (("/bin/cp") (which "cp")) |
| 1398 | (("/bin/mv") (which "mv"))) |
| 1399 | #t)) |
| 1400 | (add-before 'check 'fix-hotspot-tests |
| 1401 | (lambda _ |
| 1402 | (with-directory-excursion "openjdk.src/hotspot/test/" |
| 1403 | (substitute* "jprt.config" |
| 1404 | (("PATH=\"\\$\\{path4sdk\\}\"") |
| 1405 | (string-append "PATH=" (getenv "PATH"))) |
| 1406 | (("make=/usr/bin/make") |
| 1407 | (string-append "make=" (which "make")))) |
| 1408 | (substitute* '("runtime/6626217/Test6626217.sh" |
| 1409 | "runtime/7110720/Test7110720.sh") |
| 1410 | (("/bin/rm") (which "rm")) |
| 1411 | (("/bin/cp") (which "cp")) |
| 1412 | (("/bin/mv") (which "mv")))) |
| 1413 | #t)) |
| 1414 | (add-before 'check 'fix-jdk-tests |
| 1415 | (lambda _ |
| 1416 | (with-directory-excursion "openjdk.src/jdk/test/" |
| 1417 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" |
| 1418 | (("/bin/pwd") (which "pwd"))) |
| 1419 | (substitute* "com/sun/jdi/ShellScaffold.sh" |
| 1420 | (("/bin/kill") (which "kill"))) |
| 1421 | (substitute* "start-Xvfb.sh" |
| 1422 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) |
| 1423 | (("/usr/bin/nohup") (which "nohup"))) |
| 1424 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" |
| 1425 | (("/bin/rm") (which "rm"))) |
| 1426 | (substitute* "tools/launcher/MultipleJRE.sh" |
| 1427 | (("echo \"#!/bin/sh\"") |
| 1428 | (string-append "echo \"#!" (which "rm") "\"")) |
| 1429 | (("/usr/bin/zip") (which "zip"))) |
| 1430 | (substitute* "com/sun/jdi/OnThrowTest.java" |
| 1431 | (("#!/bin/sh") (string-append "#!" (which "sh")))) |
| 1432 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" |
| 1433 | (("/usr/bin/uptime") (which "uptime"))) |
| 1434 | (substitute* "java/lang/ProcessBuilder/Basic.java" |
| 1435 | (("/usr/bin/env") (which "env")) |
| 1436 | (("/bin/false") (which "false")) |
| 1437 | (("/bin/true") (which "true")) |
| 1438 | (("/bin/cp") (which "cp")) |
| 1439 | (("/bin/sh") (which "sh"))) |
| 1440 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" |
| 1441 | (("/bin/sh") (which "sh"))) |
| 1442 | (substitute* "java/lang/ProcessBuilder/Zombies.java" |
| 1443 | (("/usr/bin/perl") (which "perl")) |
| 1444 | (("/bin/ps") (which "ps")) |
| 1445 | (("/bin/true") (which "true"))) |
| 1446 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" |
| 1447 | (("/usr/bin/tee") (which "tee"))) |
| 1448 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" |
| 1449 | (("/bin/true") (which "true"))) |
| 1450 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" |
| 1451 | (("/bin/cat") (which "cat"))) |
| 1452 | (substitute* "java/lang/Runtime/exec/ExitValue.java" |
| 1453 | (("/bin/sh") (which "sh")) |
| 1454 | (("/bin/true") (which "true")) |
| 1455 | (("/bin/kill") (which "kill"))) |
| 1456 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" |
| 1457 | (("/usr/bin/echo") (which "echo"))) |
| 1458 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" |
| 1459 | (("/usr/bin/cat") (which "cat"))) |
| 1460 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" |
| 1461 | (("/bin/cat") (which "cat")) |
| 1462 | (("/bin/sleep") (which "sleep")) |
| 1463 | (("/bin/sh") (which "sh"))) |
| 1464 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" |
| 1465 | (("/bin/cat") (which "cat"))) |
| 1466 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" |
| 1467 | (("/bin/chmod") (which "chmod"))) |
| 1468 | (substitute* "java/util/zip/ZipFile/Assortment.java" |
| 1469 | (("/bin/sh") (which "sh")))) |
| 1470 | #t)) |
| 1471 | (replace 'check |
| 1472 | (lambda _ |
| 1473 | ;; The "make check-*" targets always return zero, so we need to |
| 1474 | ;; check for errors in the associated log files to determine |
| 1475 | ;; whether any tests have failed. |
| 1476 | (use-modules (ice-9 rdelim)) |
| 1477 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) |
| 1478 | (checker (lambda (port) |
| 1479 | (let loop () |
| 1480 | (let ((line (read-line port))) |
| 1481 | (cond |
| 1482 | ((eof-object? line) #t) |
| 1483 | ((regexp-exec error-pattern line) |
| 1484 | (error "test failed")) |
| 1485 | (else (loop))))))) |
| 1486 | (run-test (lambda (test) |
| 1487 | (invoke "make" test) |
| 1488 | (call-with-input-file |
| 1489 | (string-append "test/" test ".log") |
| 1490 | checker)))) |
| 1491 | (when #f ; skip tests |
| 1492 | (run-test "check-hotspot") |
| 1493 | (run-test "check-langtools") |
| 1494 | (run-test "check-jdk")) |
| 1495 | #t))) |
| 1496 | (replace 'install |
| 1497 | (lambda* (#:key outputs #:allow-other-keys) |
| 1498 | (let ((doc (string-append (assoc-ref outputs "doc") |
| 1499 | "/share/doc/icedtea")) |
| 1500 | (jre (assoc-ref outputs "out")) |
| 1501 | (jdk (assoc-ref outputs "jdk"))) |
| 1502 | (copy-recursively "openjdk.build/docs" doc) |
| 1503 | (copy-recursively "openjdk.build/j2re-image" jre) |
| 1504 | (copy-recursively "openjdk.build/j2sdk-image" jdk)) |
| 1505 | #t)) |
| 1506 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
| 1507 | ;; But that shared object is located in the server/ folder, so it |
| 1508 | ;; cannot be found. This phase creates a symbolic link in the |
| 1509 | ;; lib/amd64 folder so that the other libraries can find it. |
| 1510 | ;; |
| 1511 | ;; See: |
| 1512 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html |
| 1513 | ;; |
| 1514 | ;; FIXME: Find the bug in the build system, so that this symlink is |
| 1515 | ;; not needed. |
| 1516 | (add-after 'install 'install-libjvm |
| 1517 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1518 | (let* ((lib-path (string-append (assoc-ref outputs "out") |
| 1519 | ;; See 'INSTALL_ARCH_DIR' in |
| 1520 | ;; 'configure'. |
| 1521 | ,(match (%current-system) |
| 1522 | ("i686-linux" |
| 1523 | "/lib/i386") |
| 1524 | ("x86_64-linux" |
| 1525 | "/lib/amd64") |
| 1526 | ("armhf-linux" |
| 1527 | "/lib/arm") |
| 1528 | ("aarch64-linux" |
| 1529 | "/lib/aarch64") |
| 1530 | ;; We need a catch-all, dropping |
| 1531 | ;; '-linux' works in most cases. |
| 1532 | (_ |
| 1533 | (string-append |
| 1534 | "/lib/" |
| 1535 | (string-drop-right |
| 1536 | (%current-system) 6))))))) |
| 1537 | (symlink (string-append lib-path "/server/libjvm.so") |
| 1538 | (string-append lib-path "/libjvm.so"))) |
| 1539 | #t)) |
| 1540 | ;; By default IcedTea only generates an empty keystore. In order to |
| 1541 | ;; be able to use certificates in Java programs we need to generate a |
| 1542 | ;; keystore from a set of certificates. For convenience we use the |
| 1543 | ;; certificates from the nss-certs package. |
| 1544 | (add-after 'install 'install-keystore |
| 1545 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1546 | (let* ((keystore "cacerts") |
| 1547 | (certs-dir (string-append (assoc-ref inputs "nss-certs") |
| 1548 | "/etc/ssl/certs")) |
| 1549 | (keytool (string-append (assoc-ref outputs "jdk") |
| 1550 | "/bin/keytool"))) |
| 1551 | (define (extract-cert file target) |
| 1552 | (call-with-input-file file |
| 1553 | (lambda (in) |
| 1554 | (call-with-output-file target |
| 1555 | (lambda (out) |
| 1556 | (let loop ((line (read-line in 'concat)) |
| 1557 | (copying? #f)) |
| 1558 | (cond |
| 1559 | ((eof-object? line) #t) |
| 1560 | ((string-prefix? "-----BEGIN" line) |
| 1561 | (display line out) |
| 1562 | (loop (read-line in 'concat) #t)) |
| 1563 | ((string-prefix? "-----END" line) |
| 1564 | (display line out) |
| 1565 | #t) |
| 1566 | (else |
| 1567 | (when copying? (display line out)) |
| 1568 | (loop (read-line in 'concat) copying?))))))))) |
| 1569 | (define (import-cert cert) |
| 1570 | (format #t "Importing certificate ~a\n" (basename cert)) |
| 1571 | (let ((temp "tmpcert")) |
| 1572 | (extract-cert cert temp) |
| 1573 | (let ((port (open-pipe* OPEN_WRITE keytool |
| 1574 | "-import" |
| 1575 | "-alias" (basename cert) |
| 1576 | "-keystore" keystore |
| 1577 | "-storepass" "changeit" |
| 1578 | "-file" temp))) |
| 1579 | (display "yes\n" port) |
| 1580 | (when (not (zero? (status:exit-val (close-pipe port)))) |
| 1581 | (format #t "failed to import ~a\n" cert))) |
| 1582 | (delete-file temp))) |
| 1583 | |
| 1584 | ;; This is necessary because the certificate directory contains |
| 1585 | ;; files with non-ASCII characters in their names. |
| 1586 | (setlocale LC_ALL "en_US.utf8") |
| 1587 | (setenv "LC_ALL" "en_US.utf8") |
| 1588 | |
| 1589 | (for-each import-cert (find-files certs-dir "\\.pem$")) |
| 1590 | (mkdir-p (string-append (assoc-ref outputs "out") |
| 1591 | "/lib/security")) |
| 1592 | (mkdir-p (string-append (assoc-ref outputs "jdk") |
| 1593 | "/jre/lib/security")) |
| 1594 | |
| 1595 | ;; The cacerts files we are going to overwrite are chmod'ed as |
| 1596 | ;; read-only (444) in icedtea-8 (which derives from this |
| 1597 | ;; package). We have to change this so we can overwrite them. |
| 1598 | (chmod (string-append (assoc-ref outputs "out") |
| 1599 | "/lib/security/" keystore) #o644) |
| 1600 | (chmod (string-append (assoc-ref outputs "jdk") |
| 1601 | "/jre/lib/security/" keystore) #o644) |
| 1602 | |
| 1603 | (install-file keystore |
| 1604 | (string-append (assoc-ref outputs "out") |
| 1605 | "/lib/security")) |
| 1606 | (install-file keystore |
| 1607 | (string-append (assoc-ref outputs "jdk") |
| 1608 | "/jre/lib/security")) |
| 1609 | #t)))))) |
| 1610 | (native-inputs |
| 1611 | `(("openjdk-src" |
| 1612 | ,(drop "openjdk" |
| 1613 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
| 1614 | ("corba-drop" |
| 1615 | ,(drop "corba" |
| 1616 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
| 1617 | ("jaxp-drop" |
| 1618 | ,(drop "jaxp" |
| 1619 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
| 1620 | ("jaxws-drop" |
| 1621 | ,(drop "jaxws" |
| 1622 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
| 1623 | ("jdk-drop" |
| 1624 | ,(drop "jdk" |
| 1625 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd")) |
| 1626 | ("langtools-drop" |
| 1627 | ,(drop "langtools" |
| 1628 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
| 1629 | ("hotspot-drop" |
| 1630 | ,(origin |
| 1631 | (method url-fetch) |
| 1632 | (uri (string-append |
| 1633 | "http://icedtea.classpath.org/downloads/drops" |
| 1634 | "/icedtea7/" version "/hotspot.tar.bz2")) |
| 1635 | (sha256 |
| 1636 | (base32 |
| 1637 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) |
| 1638 | (patches (search-patches |
| 1639 | "icedtea-7-hotspot-gcc-segfault-workaround.patch")))) |
| 1640 | ("ant" ,ant-bootstrap) |
| 1641 | ("attr" ,attr) |
| 1642 | ("coreutils" ,coreutils) |
| 1643 | ("diffutils" ,diffutils) ;for tests |
| 1644 | ("gawk" ,gawk) |
| 1645 | ("grep" ,grep) |
| 1646 | ("libtool" ,libtool) |
| 1647 | ("pkg-config" ,pkg-config) |
| 1648 | ("wget" ,wget) |
| 1649 | ("which" ,which) |
| 1650 | ("cpio" ,cpio) |
| 1651 | ("zip" ,zip) |
| 1652 | ("unzip" ,unzip) |
| 1653 | ("fastjar" ,fastjar) |
| 1654 | ("libxslt" ,libxslt) ;for xsltproc |
| 1655 | ("nss-certs" ,nss-certs) |
| 1656 | ("perl" ,perl) |
| 1657 | ("procps" ,procps) ;for "free", even though I'm not sure we should use it |
| 1658 | ("jdk" ,icedtea-6 "jdk"))) |
| 1659 | (inputs |
| 1660 | `(("alsa-lib" ,alsa-lib) |
| 1661 | ("cups" ,cups) |
| 1662 | ("libx11" ,libx11) |
| 1663 | ("libxcomposite" ,libxcomposite) |
| 1664 | ("libxt" ,libxt) |
| 1665 | ("libxtst" ,libxtst) |
| 1666 | ("libxi" ,libxi) |
| 1667 | ("libxinerama" ,libxinerama) |
| 1668 | ("libxrender" ,libxrender) |
| 1669 | ("libjpeg" ,libjpeg-turbo) |
| 1670 | ("libpng" ,libpng) |
| 1671 | ("mit-krb5" ,mit-krb5) |
| 1672 | ("nss" ,nss) |
| 1673 | ("giflib" ,giflib) |
| 1674 | ("fontconfig" ,fontconfig) |
| 1675 | ("freetype" ,freetype) |
| 1676 | ("lcms" ,lcms) |
| 1677 | ("zlib" ,zlib) |
| 1678 | ("gtk" ,gtk+-2))) |
| 1679 | (home-page "http://icedtea.classpath.org") |
| 1680 | (synopsis "Java development kit") |
| 1681 | (description |
| 1682 | "This package provides the Java development kit OpenJDK built with the |
| 1683 | IcedTea build harness.") |
| 1684 | |
| 1685 | ;; 'configure' lists "mips" and "mipsel", but not "mips64el'. |
| 1686 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
| 1687 | |
| 1688 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the |
| 1689 | ;; same license as both GNU Classpath and OpenJDK. |
| 1690 | (license license:gpl2+)))) |
| 1691 | |
| 1692 | (define-public icedtea-8 |
| 1693 | (let* ((version "3.7.0") |
| 1694 | (drop (lambda (name hash) |
| 1695 | (origin |
| 1696 | (method url-fetch) |
| 1697 | (uri (string-append |
| 1698 | "http://icedtea.classpath.org/download/drops" |
| 1699 | "/icedtea8/" version "/" name ".tar.xz")) |
| 1700 | (sha256 (base32 hash)))))) |
| 1701 | (package (inherit icedtea-7) |
| 1702 | (version "3.7.0") |
| 1703 | (source (origin |
| 1704 | (method url-fetch) |
| 1705 | (uri (string-append |
| 1706 | "http://icedtea.wildebeest.org/download/source/icedtea-" |
| 1707 | version ".tar.xz")) |
| 1708 | (sha256 |
| 1709 | (base32 |
| 1710 | "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w")) |
| 1711 | (modules '((guix build utils))) |
| 1712 | (snippet |
| 1713 | '(begin |
| 1714 | (substitute* '("configure" |
| 1715 | "acinclude.m4") |
| 1716 | ;; Do not embed build time |
| 1717 | (("(DIST_ID=\"Custom build).*$" _ prefix) |
| 1718 | (string-append prefix "\"\n")) |
| 1719 | ;; Do not leak information about the build host |
| 1720 | (("DIST_NAME=\"\\$build_os\"") |
| 1721 | "DIST_NAME=\"guix\"")) |
| 1722 | #t)))) |
| 1723 | (arguments |
| 1724 | `(#:imported-modules |
| 1725 | ((guix build ant-build-system) |
| 1726 | (guix build syscalls) |
| 1727 | ,@%gnu-build-system-modules) |
| 1728 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) |
| 1729 | ((#:modules modules) |
| 1730 | `((guix build utils) |
| 1731 | (guix build gnu-build-system) |
| 1732 | ((guix build ant-build-system) #:prefix ant:) |
| 1733 | (ice-9 match) |
| 1734 | (ice-9 popen) |
| 1735 | (srfi srfi-19) |
| 1736 | (srfi srfi-26))) |
| 1737 | ((#:configure-flags flags) |
| 1738 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) |
| 1739 | `( ;;"--disable-bootstrap" |
| 1740 | "--enable-bootstrap" |
| 1741 | "--enable-nss" |
| 1742 | "--disable-downloading" |
| 1743 | "--disable-system-pcsc" |
| 1744 | "--disable-system-sctp" |
| 1745 | "--disable-tests" ;they are run in the check phase instead |
| 1746 | "--with-openjdk-src-dir=./openjdk.src" |
| 1747 | ,(string-append "--with-jdk-home=" jdk)))) |
| 1748 | ((#:phases phases) |
| 1749 | `(modify-phases ,phases |
| 1750 | (delete 'fix-x11-extension-include-path) |
| 1751 | (delete 'patch-paths) |
| 1752 | (delete 'set-additional-paths) |
| 1753 | (delete 'patch-patches) |
| 1754 | (delete 'patch-bitrot) |
| 1755 | ;; Prevent the keytool from recording the current time when |
| 1756 | ;; adding certificates at build time. |
| 1757 | (add-after 'unpack 'patch-keystore |
| 1758 | (lambda _ |
| 1759 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" |
| 1760 | (("date = new Date\\(\\);") |
| 1761 | "\ |
| 1762 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ |
| 1763 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ |
| 1764 | new Date();")) |
| 1765 | #t)) |
| 1766 | (add-after 'unpack 'patch-jni-libs |
| 1767 | ;; Hardcode dynamically loaded libraries. |
| 1768 | (lambda _ |
| 1769 | (let* ((library-path (search-path-as-string->list |
| 1770 | (getenv "LIBRARY_PATH"))) |
| 1771 | (find-library (lambda (name) |
| 1772 | (search-path |
| 1773 | library-path |
| 1774 | (string-append "lib" name ".so"))))) |
| 1775 | (for-each |
| 1776 | (lambda (file) |
| 1777 | (catch 'decoding-error |
| 1778 | (lambda () |
| 1779 | (substitute* file |
| 1780 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" |
| 1781 | _ name version) |
| 1782 | (format #f "\"~a\"" (find-library name))) |
| 1783 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) |
| 1784 | (format #f "\"~a\"" (find-library name))))) |
| 1785 | (lambda _ |
| 1786 | ;; Those are safe to skip. |
| 1787 | (format (current-error-port) |
| 1788 | "warning: failed to substitute: ~a~%" |
| 1789 | file)))) |
| 1790 | (find-files "openjdk.src/jdk/src/solaris/native" |
| 1791 | "\\.c|\\.h")) |
| 1792 | #t))) |
| 1793 | (replace 'install |
| 1794 | (lambda* (#:key outputs #:allow-other-keys) |
| 1795 | (let ((doc (string-append (assoc-ref outputs "doc") |
| 1796 | "/share/doc/icedtea")) |
| 1797 | (jre (assoc-ref outputs "out")) |
| 1798 | (jdk (assoc-ref outputs "jdk"))) |
| 1799 | (copy-recursively "openjdk.build/docs" doc) |
| 1800 | (copy-recursively "openjdk.build/images/j2re-image" jre) |
| 1801 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) |
| 1802 | ;; Install the nss.cfg file to JRE to enable SSL/TLS |
| 1803 | ;; support via NSS. |
| 1804 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") |
| 1805 | (string-append jre "/lib/security/nss.cfg")) |
| 1806 | #t))) |
| 1807 | (add-after 'install 'strip-jar-timestamps |
| 1808 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) |
| 1809 | (native-inputs |
| 1810 | `(("jdk" ,icedtea-7 "jdk") |
| 1811 | ("openjdk-src" |
| 1812 | ,(drop "openjdk" |
| 1813 | "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p")) |
| 1814 | ("aarch32-drop" |
| 1815 | ,(drop "aarch32" |
| 1816 | "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg")) |
| 1817 | ("corba-drop" |
| 1818 | ,(drop "corba" |
| 1819 | "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah")) |
| 1820 | ("jaxp-drop" |
| 1821 | ,(drop "jaxp" |
| 1822 | "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i")) |
| 1823 | ("jaxws-drop" |
| 1824 | ,(drop "jaxws" |
| 1825 | "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf")) |
| 1826 | ("jdk-drop" |
| 1827 | ,(drop "jdk" |
| 1828 | "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl")) |
| 1829 | ("langtools-drop" |
| 1830 | ,(drop "langtools" |
| 1831 | "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw")) |
| 1832 | ("hotspot-drop" |
| 1833 | ,(origin |
| 1834 | (method url-fetch) |
| 1835 | (uri (string-append |
| 1836 | "http://icedtea.classpath.org/download/drops" |
| 1837 | "/icedtea8/" version "/hotspot.tar.xz")) |
| 1838 | (sha256 |
| 1839 | (base32 |
| 1840 | "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm")) |
| 1841 | (patches (search-patches |
| 1842 | "icedtea-7-hotspot-gcc-segfault-workaround.patch")))) |
| 1843 | ("nashorn-drop" |
| 1844 | ,(drop "nashorn" |
| 1845 | "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa")) |
| 1846 | ("shenandoah-drop" |
| 1847 | ,(drop "shenandoah" |
| 1848 | "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy")) |
| 1849 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
| 1850 | '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
| 1851 | "jdk-drop" "langtools-drop" "hotspot-drop"))))))) |
| 1852 | |
| 1853 | (define-public openjdk9 |
| 1854 | (package |
| 1855 | (name "openjdk") |
| 1856 | (version "9.181") |
| 1857 | (source (origin |
| 1858 | (method url-fetch) |
| 1859 | (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2") |
| 1860 | (file-name (string-append name "-" version ".tar.bz2")) |
| 1861 | (sha256 |
| 1862 | (base32 |
| 1863 | "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq")) |
| 1864 | (modules '((guix build utils))) |
| 1865 | (snippet |
| 1866 | `(begin |
| 1867 | (for-each delete-file |
| 1868 | (find-files "." ".*.(bin|exe|jar)$")) |
| 1869 | #t)))) |
| 1870 | (build-system gnu-build-system) |
| 1871 | (outputs '("out" "jdk" "doc")) |
| 1872 | (arguments |
| 1873 | `(#:tests? #f; require jtreg |
| 1874 | #:make-flags '("all") |
| 1875 | #:imported-modules |
| 1876 | ((guix build syscalls) |
| 1877 | ,@%gnu-build-system-modules) |
| 1878 | #:phases |
| 1879 | (modify-phases %standard-phases |
| 1880 | (add-after 'patch-source-shebangs 'fix-java-shebangs |
| 1881 | (lambda _ |
| 1882 | ;; This file was "fixed" by patch-source-shebangs, but it requires |
| 1883 | ;; this exact first line. |
| 1884 | (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem" |
| 1885 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) |
| 1886 | #t)) |
| 1887 | (replace 'configure |
| 1888 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1889 | ;; TODO: unbundle libpng and lcms |
| 1890 | (invoke "bash" "./configure" |
| 1891 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) |
| 1892 | "--disable-freetype-bundling" |
| 1893 | "--disable-warnings-as-errors" |
| 1894 | "--disable-hotspot-gtest" |
| 1895 | "--with-giflib=system" |
| 1896 | "--with-libjpeg=system" |
| 1897 | (string-append "--prefix=" (assoc-ref outputs "out"))) |
| 1898 | #t)) |
| 1899 | (add-before 'build 'write-source-revision-file |
| 1900 | (lambda _ |
| 1901 | (with-output-to-file ".src-rev" |
| 1902 | (lambda _ |
| 1903 | (display ,version))) |
| 1904 | #t)) |
| 1905 | (replace 'build |
| 1906 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 1907 | (apply invoke "make" |
| 1908 | `(,@(if parallel-build? |
| 1909 | (list (string-append "JOBS=" |
| 1910 | (number->string (parallel-job-count)))) |
| 1911 | '()) |
| 1912 | ,@make-flags)))) |
| 1913 | ;; Some of the libraries in the lib/ folder link to libjvm.so. |
| 1914 | ;; But that shared object is located in the server/ folder, so it |
| 1915 | ;; cannot be found. This phase creates a symbolic link in the |
| 1916 | ;; lib/ folder so that the other libraries can find it. |
| 1917 | ;; |
| 1918 | ;; See: |
| 1919 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html |
| 1920 | ;; |
| 1921 | ;; FIXME: Find the bug in the build system, so that this symlink is |
| 1922 | ;; not needed. |
| 1923 | (add-after 'install 'install-libjvm |
| 1924 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1925 | (let* ((lib-out (string-append (assoc-ref outputs "out") |
| 1926 | "/lib")) |
| 1927 | (lib-jdk (string-append (assoc-ref outputs "jdk") |
| 1928 | "/lib"))) |
| 1929 | (symlink (string-append lib-jdk "/server/libjvm.so") |
| 1930 | (string-append lib-jdk "/libjvm.so")) |
| 1931 | (symlink (string-append lib-out "/server/libjvm.so") |
| 1932 | (string-append lib-out "/libjvm.so"))) |
| 1933 | #t)) |
| 1934 | (replace 'install |
| 1935 | (lambda* (#:key outputs #:allow-other-keys) |
| 1936 | (let ((out (assoc-ref outputs "out")) |
| 1937 | (jdk (assoc-ref outputs "jdk")) |
| 1938 | (doc (assoc-ref outputs "doc")) |
| 1939 | (images (car (find-files "build" ".*-server-release" |
| 1940 | #:directories? #t)))) |
| 1941 | (copy-recursively (string-append images "/images/jdk") jdk) |
| 1942 | (copy-recursively (string-append images "/images/jre") out) |
| 1943 | (copy-recursively (string-append images "/images/docs") doc)) |
| 1944 | #t)) |
| 1945 | (add-after 'install 'strip-zip-timestamps |
| 1946 | (lambda* (#:key outputs #:allow-other-keys) |
| 1947 | (use-modules (guix build syscalls)) |
| 1948 | (for-each (lambda (zip) |
| 1949 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) |
| 1950 | (with-directory-excursion dir |
| 1951 | (invoke "unzip" zip)) |
| 1952 | (delete-file zip) |
| 1953 | (for-each (lambda (file) |
| 1954 | (let ((s (lstat file))) |
| 1955 | (unless (eq? (stat:type s) 'symlink) |
| 1956 | (format #t "reset ~a~%" file) |
| 1957 | (utime file 0 0 0 0)))) |
| 1958 | (find-files dir #:directories? #t)) |
| 1959 | (with-directory-excursion dir |
| 1960 | (let ((files (find-files "." ".*" #:directories? #t))) |
| 1961 | (apply invoke "zip" "-0" "-X" zip files))))) |
| 1962 | (find-files (assoc-ref outputs "doc") ".*.zip$")) |
| 1963 | #t))))) |
| 1964 | (inputs |
| 1965 | `(("alsa-lib" ,alsa-lib) |
| 1966 | ("cups" ,cups) |
| 1967 | ("fontconfig" ,fontconfig) |
| 1968 | ("freetype" ,freetype) |
| 1969 | ("giflib" ,giflib) |
| 1970 | ("lcms" ,lcms) |
| 1971 | ("libelf" ,libelf) |
| 1972 | ("libjpeg" ,libjpeg-turbo) |
| 1973 | ("libice" ,libice) |
| 1974 | ("libpng" ,libpng) |
| 1975 | ("libx11" ,libx11) |
| 1976 | ("libxcomposite" ,libxcomposite) |
| 1977 | ("libxi" ,libxi) |
| 1978 | ("libxinerama" ,libxinerama) |
| 1979 | ("libxrender" ,libxrender) |
| 1980 | ("libxt" ,libxt) |
| 1981 | ("libxtst" ,libxtst))) |
| 1982 | (native-inputs |
| 1983 | `(("icedtea-8" ,icedtea-8) |
| 1984 | ("icedtea-8:jdk" ,icedtea-8 "jdk") |
| 1985 | ;; XXX: The build system fails with newer versions of GNU Make. |
| 1986 | ("[email protected]" ,gnu-make-4.2) |
| 1987 | ("unzip" ,unzip) |
| 1988 | ("which" ,which) |
| 1989 | ("zip" ,zip))) |
| 1990 | (home-page "https://openjdk.java.net/projects/jdk9/") |
| 1991 | (synopsis "Java development kit") |
| 1992 | (description |
| 1993 | "This package provides the Java development kit OpenJDK.") |
| 1994 | (license license:gpl2+))) |
| 1995 | |
| 1996 | (define-public openjdk10 |
| 1997 | (package |
| 1998 | (inherit openjdk9) |
| 1999 | (name "openjdk") |
| 2000 | (version "10.46") |
| 2001 | (source (origin |
| 2002 | (method url-fetch) |
| 2003 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2") |
| 2004 | (file-name (string-append name "-" version ".tar.bz2")) |
| 2005 | (sha256 |
| 2006 | (base32 |
| 2007 | "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4")) |
| 2008 | (patches (search-patches |
| 2009 | "openjdk-10-idlj-reproducibility.patch")) |
| 2010 | (modules '((guix build utils))) |
| 2011 | (snippet |
| 2012 | `(begin |
| 2013 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
| 2014 | #t)))) |
| 2015 | (arguments |
| 2016 | (substitute-keyword-arguments (package-arguments openjdk9) |
| 2017 | ((#:phases phases) |
| 2018 | `(modify-phases ,phases |
| 2019 | (replace 'fix-java-shebangs |
| 2020 | (lambda _ |
| 2021 | ;; This file was "fixed" by patch-source-shebangs, but it requires |
| 2022 | ;; this exact first line. |
| 2023 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" |
| 2024 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) |
| 2025 | #t)) |
| 2026 | (replace 'configure |
| 2027 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2028 | (invoke "bash" "./configure" |
| 2029 | (string-append "--with-freetype=" (assoc-ref inputs "freetype")) |
| 2030 | "--disable-freetype-bundling" |
| 2031 | "--disable-warnings-as-errors" |
| 2032 | "--disable-hotspot-gtest" |
| 2033 | "--with-giflib=system" |
| 2034 | "--with-libjpeg=system" |
| 2035 | "--with-native-debug-symbols=zipped" |
| 2036 | (string-append "--prefix=" (assoc-ref outputs "out"))) |
| 2037 | #t)))))) |
| 2038 | (native-inputs |
| 2039 | `(("openjdk9" ,openjdk9) |
| 2040 | ("openjdk9:jdk" ,openjdk9 "jdk") |
| 2041 | ("[email protected]" ,gnu-make-4.2) |
| 2042 | ("unzip" ,unzip) |
| 2043 | ("which" ,which) |
| 2044 | ("zip" ,zip))))) |
| 2045 | |
| 2046 | (define-public openjdk11 |
| 2047 | (package |
| 2048 | (name "openjdk") |
| 2049 | (version "11.28") |
| 2050 | (source (origin |
| 2051 | (method url-fetch) |
| 2052 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2") |
| 2053 | (file-name (string-append name "-" version ".tar.bz2")) |
| 2054 | (sha256 |
| 2055 | (base32 |
| 2056 | "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w")) |
| 2057 | (modules '((guix build utils))) |
| 2058 | (snippet |
| 2059 | `(begin |
| 2060 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
| 2061 | #t)))) |
| 2062 | (build-system gnu-build-system) |
| 2063 | (outputs '("out" "jdk" "doc")) |
| 2064 | (arguments |
| 2065 | `(#:imported-modules |
| 2066 | ((guix build syscalls) |
| 2067 | (ice-9 binary-ports) |
| 2068 | (rnrs bytevectors) |
| 2069 | ,@%gnu-build-system-modules) |
| 2070 | #:tests? #f; requires jtreg |
| 2071 | ;; TODO package jtreg |
| 2072 | #:configure-flags |
| 2073 | `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise |
| 2074 | "--disable-warnings-as-errors" |
| 2075 | ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894 |
| 2076 | "--with-native-debug-symbols=zipped" |
| 2077 | ;; do not use the bundled libraries |
| 2078 | "--with-giflib=system" |
| 2079 | "--with-lcms=system" |
| 2080 | "--with-libjpeg=system" |
| 2081 | "--with-libpng=system" |
| 2082 | "--with-version-pre=" |
| 2083 | ;; allow the build system to locate the system freetype |
| 2084 | ,(string-append "--with-freetype-include=" |
| 2085 | (assoc-ref %build-inputs "freetype") "/include") |
| 2086 | ,(string-append "--with-freetype-lib=" |
| 2087 | (assoc-ref %build-inputs "freetype") "/lib")) |
| 2088 | #:phases |
| 2089 | (modify-phases %standard-phases |
| 2090 | (add-after 'patch-source-shebangs 'fix-java-shebangs |
| 2091 | (lambda _ |
| 2092 | ;; This file was "fixed" by patch-source-shebangs, but it requires |
| 2093 | ;; this exact first line. |
| 2094 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" |
| 2095 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")) |
| 2096 | #t)) |
| 2097 | (add-before 'build 'write-source-revision-file |
| 2098 | (lambda _ |
| 2099 | (with-output-to-file ".src-rev" |
| 2100 | (lambda _ |
| 2101 | (display ,version))) |
| 2102 | #t)) |
| 2103 | (replace 'build |
| 2104 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
| 2105 | (apply invoke "make" "all" |
| 2106 | `(,@(if parallel-build? |
| 2107 | (list (string-append "JOBS=" |
| 2108 | (number->string (parallel-job-count)))) |
| 2109 | '()) |
| 2110 | ,@make-flags)))) |
| 2111 | ;; jdk 11 does not build jre by default any more |
| 2112 | ;; building it anyways |
| 2113 | ;; for further information see: |
| 2114 | ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356 |
| 2115 | (add-after 'build 'build-jre |
| 2116 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
| 2117 | (apply invoke "make" "legacy-jre-image" |
| 2118 | `(,@(if parallel-build? |
| 2119 | (list (string-append "JOBS=" |
| 2120 | (number->string (parallel-job-count)))) |
| 2121 | '()) |
| 2122 | ,@make-flags)))) |
| 2123 | (replace 'install |
| 2124 | (lambda* (#:key outputs #:allow-other-keys) |
| 2125 | (let ((out (assoc-ref outputs "out")) |
| 2126 | (jdk (assoc-ref outputs "jdk")) |
| 2127 | (doc (assoc-ref outputs "doc")) |
| 2128 | (images (car (find-files "build" ".*-server-release" |
| 2129 | #:directories? #t)))) |
| 2130 | (copy-recursively (string-append images "/images/jdk") jdk) |
| 2131 | (copy-recursively (string-append images "/images/jre") out) |
| 2132 | (copy-recursively (string-append images "/images/docs") doc)) |
| 2133 | #t)) |
| 2134 | ;; Some of the libraries in the lib/ folder link to libjvm.so. |
| 2135 | ;; But that shared object is located in the server/ folder, so it |
| 2136 | ;; cannot be found. This phase creates a symbolic link in the |
| 2137 | ;; lib/ folder so that the other libraries can find it. |
| 2138 | ;; |
| 2139 | ;; See: |
| 2140 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html |
| 2141 | ;; |
| 2142 | ;; FIXME: Find the bug in the build system, so that this symlink is |
| 2143 | ;; not needed. |
| 2144 | (add-after 'install 'install-libjvm |
| 2145 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2146 | (let* ((lib-out (string-append (assoc-ref outputs "out") |
| 2147 | "/lib")) |
| 2148 | (lib-jdk (string-append (assoc-ref outputs "jdk") |
| 2149 | "/lib"))) |
| 2150 | (symlink (string-append lib-jdk "/server/libjvm.so") |
| 2151 | (string-append lib-jdk "/libjvm.so")) |
| 2152 | (symlink (string-append lib-out "/server/libjvm.so") |
| 2153 | (string-append lib-out "/libjvm.so"))) |
| 2154 | #t)) |
| 2155 | (add-after 'install 'strip-character-data-timestamps |
| 2156 | (lambda* (#:key outputs #:allow-other-keys) |
| 2157 | (use-modules (guix build syscalls)) |
| 2158 | (let ((archive (string-append |
| 2159 | (assoc-ref outputs "jdk") "/lib/src.zip")) |
| 2160 | (dir (mkdtemp! "zip-contents.XXXXXX"))) |
| 2161 | (with-directory-excursion dir |
| 2162 | (invoke "unzip" archive)) |
| 2163 | (delete-file archive) |
| 2164 | (with-directory-excursion dir |
| 2165 | (let ((char-data-files (find-files "." "CharacterData.*"))) |
| 2166 | (for-each (lambda (file) |
| 2167 | (substitute* file |
| 2168 | (((string-append "This file was generated " |
| 2169 | "AUTOMATICALLY from a template " |
| 2170 | "file.*")) |
| 2171 | (string-append "This file was generated " |
| 2172 | "AUTOMATICALLY from a template " |
| 2173 | "file")))) |
| 2174 | char-data-files))) |
| 2175 | (with-directory-excursion dir |
| 2176 | (let ((files (find-files "." ".*" #:directories? #t))) |
| 2177 | (apply invoke "zip" "-0" "-X" archive files)))))) |
| 2178 | (add-after 'strip-character-data-timestamps 'strip-archive-timestamps |
| 2179 | (lambda* (#:key outputs #:allow-other-keys) |
| 2180 | (use-modules (guix build syscalls) |
| 2181 | (ice-9 binary-ports) |
| 2182 | (rnrs bytevectors)) |
| 2183 | (letrec ((repack-archive |
| 2184 | (lambda (archive) |
| 2185 | (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) |
| 2186 | (with-directory-excursion dir |
| 2187 | (invoke "unzip" archive)) |
| 2188 | (delete-file archive) |
| 2189 | (for-each (compose repack-archive canonicalize-path) |
| 2190 | (find-files dir "(ct.sym|.*.jar)$")) |
| 2191 | (let ((reset-file-timestamp |
| 2192 | (lambda (file) |
| 2193 | (let ((s (lstat file))) |
| 2194 | (unless (eq? (stat:type s) 'symlink) |
| 2195 | (format #t "reset ~a~%" file) |
| 2196 | (utime file 0 0 0 0)))))) |
| 2197 | (for-each reset-file-timestamp |
| 2198 | (find-files dir #:directories? #t))) |
| 2199 | (with-directory-excursion dir |
| 2200 | (let ((files (find-files "." ".*" #:directories? #t))) |
| 2201 | (apply invoke "zip" "-0" "-X" archive files))))))) |
| 2202 | (for-each repack-archive |
| 2203 | (find-files (assoc-ref outputs "doc") ".*.zip$")) |
| 2204 | (for-each repack-archive |
| 2205 | (find-files (assoc-ref outputs "jdk") |
| 2206 | ".*.(zip|jar|diz)$")) |
| 2207 | (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym")) |
| 2208 | (let ((repack-jmod |
| 2209 | (lambda (file-name) |
| 2210 | (call-with-input-file file-name |
| 2211 | (lambda (file) |
| 2212 | (let ((header #vu8(#x4a #x4d #x01 #x00))) |
| 2213 | (if (equal? (get-bytevector-n |
| 2214 | file (bytevector-length header)) |
| 2215 | header) |
| 2216 | (let* ((header-length (bytevector-length header)) |
| 2217 | (temp-file (mkstemp! |
| 2218 | (string-copy |
| 2219 | "temp-file.XXXXXX"))) |
| 2220 | (temp-filename (port-filename temp-file)) |
| 2221 | (content-length |
| 2222 | (- (stat:size (stat file)) |
| 2223 | header-length))) |
| 2224 | (sendfile temp-file file content-length header-length) |
| 2225 | (delete-file file-name) |
| 2226 | (close-port temp-file) |
| 2227 | (repack-archive (canonicalize-path temp-filename)) |
| 2228 | (call-with-output-file file-name |
| 2229 | (lambda (file) |
| 2230 | (put-bytevector file header) |
| 2231 | (call-with-input-file temp-filename |
| 2232 | (lambda (temp-file) |
| 2233 | (sendfile |
| 2234 | file temp-file |
| 2235 | (stat:size (stat temp-file)) 0))))))))))))) |
| 2236 | (for-each repack-jmod |
| 2237 | (find-files (assoc-ref outputs "jdk") ".*.jmod$"))) |
| 2238 | #t))) |
| 2239 | (add-after 'install 'remove-timestamp-from-api-summary |
| 2240 | (lambda* (#:key outputs #:allow-other-keys) |
| 2241 | (substitute* (string-append (assoc-ref outputs "doc") |
| 2242 | "/api/overview-summary.html") |
| 2243 | (("Generated by javadoc \\(11-internal\\).*$") |
| 2244 | "Generated by javadoc (11-internal) -->\n")) |
| 2245 | #t))))) |
| 2246 | (inputs |
| 2247 | `(("alsa-lib" ,alsa-lib) |
| 2248 | ("cups" ,cups) |
| 2249 | ("fontconfig" ,fontconfig) |
| 2250 | ("freetype" ,freetype) |
| 2251 | ("giflib" ,giflib) |
| 2252 | ("lcms" ,lcms) |
| 2253 | ("libjpeg" ,libjpeg-turbo) |
| 2254 | ("libpng" ,libpng) |
| 2255 | ("libx11" ,libx11) |
| 2256 | ("libxext" ,libxext) |
| 2257 | ("libxrender" ,libxrender) |
| 2258 | ("libxt" ,libxt) |
| 2259 | ("libxtst" ,libxtst))) |
| 2260 | (native-inputs |
| 2261 | `(("autoconf" ,autoconf) |
| 2262 | ("openjdk10" ,openjdk10) |
| 2263 | ("openjdk10:jdk" ,openjdk10 "jdk") |
| 2264 | ("make" ,gnu-make-4.2) |
| 2265 | ("pkg-config" ,pkg-config) |
| 2266 | ("unzip" ,unzip) |
| 2267 | ("which" ,which) |
| 2268 | ("zip" ,zip))) |
| 2269 | (home-page "https://openjdk.java.net/projects/jdk/11/") |
| 2270 | (synopsis "Java development kit") |
| 2271 | (description |
| 2272 | "This package provides the Java development kit OpenJDK.") |
| 2273 | (license license:gpl2+))) |
| 2274 | |
| 2275 | (define-public openjdk12 |
| 2276 | (package |
| 2277 | (inherit openjdk11) |
| 2278 | (name "openjdk") |
| 2279 | (version "12.33") |
| 2280 | (source (origin |
| 2281 | (method url-fetch) |
| 2282 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2") |
| 2283 | (file-name (string-append name "-" version ".tar.bz2")) |
| 2284 | (sha256 |
| 2285 | (base32 |
| 2286 | "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2")) |
| 2287 | (modules '((guix build utils))) |
| 2288 | (snippet |
| 2289 | `(begin |
| 2290 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
| 2291 | #t)))) |
| 2292 | (inputs |
| 2293 | `(("alsa-lib" ,alsa-lib) |
| 2294 | ("cups" ,cups) |
| 2295 | ("fontconfig" ,fontconfig) |
| 2296 | ("freetype" ,freetype) |
| 2297 | ("giflib" ,giflib) |
| 2298 | ("lcms" ,lcms) |
| 2299 | ("libjpeg" ,libjpeg-turbo) |
| 2300 | ("libpng" ,libpng) |
| 2301 | ("libx11" ,libx11) |
| 2302 | ("libxext" ,libxext) |
| 2303 | ("libxrandr" ,libxrandr) |
| 2304 | ("libxrender" ,libxrender) |
| 2305 | ("libxt" ,libxt) |
| 2306 | ("libxtst" ,libxtst))) |
| 2307 | (native-inputs |
| 2308 | `(("autoconf" ,autoconf) |
| 2309 | ("openjdk11" ,openjdk11) |
| 2310 | ("openjdk11:jdk" ,openjdk11 "jdk") |
| 2311 | ("[email protected]" ,gnu-make-4.2) |
| 2312 | ("pkg-config" ,pkg-config) |
| 2313 | ("unzip" ,unzip) |
| 2314 | ("which" ,which) |
| 2315 | ("zip" ,zip))) |
| 2316 | (home-page "https://openjdk.java.net/projects/jdk/12"))) |
| 2317 | |
| 2318 | (define-public openjdk13 |
| 2319 | (package |
| 2320 | (inherit openjdk12) |
| 2321 | (name "openjdk") |
| 2322 | (version "13.0") |
| 2323 | (source (origin |
| 2324 | (method url-fetch) |
| 2325 | (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2") |
| 2326 | (file-name (string-append name "-" version ".tar.bz2")) |
| 2327 | (sha256 |
| 2328 | (base32 |
| 2329 | "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq")) |
| 2330 | (modules '((guix build utils))) |
| 2331 | (snippet |
| 2332 | `(begin |
| 2333 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
| 2334 | #t)))) |
| 2335 | (inputs |
| 2336 | `(("alsa-lib" ,alsa-lib) |
| 2337 | ("cups" ,cups) |
| 2338 | ("fontconfig" ,fontconfig) |
| 2339 | ("freetype" ,freetype) |
| 2340 | ("giflib" ,giflib) |
| 2341 | ("lcms" ,lcms) |
| 2342 | ("libjpeg" ,libjpeg-turbo) |
| 2343 | ("libpng" ,libpng) |
| 2344 | ("libx11" ,libx11) |
| 2345 | ("libxext" ,libxext) |
| 2346 | ("libxrandr" ,libxrandr) |
| 2347 | ("libxrender" ,libxrender) |
| 2348 | ("libxt" ,libxt) |
| 2349 | ("libxtst" ,libxtst))) |
| 2350 | (native-inputs |
| 2351 | `(("autoconf" ,autoconf) |
| 2352 | ("openjdk12:jdk" ,openjdk12 "jdk") |
| 2353 | ("[email protected]" ,gnu-make-4.2) |
| 2354 | ("pkg-config" ,pkg-config) |
| 2355 | ("unzip" ,unzip) |
| 2356 | ("which" ,which) |
| 2357 | ("zip" ,zip))) |
| 2358 | (home-page "https://openjdk.java.net/projects/jdk/13"))) |
| 2359 | |
| 2360 | (define-public openjdk14 |
| 2361 | (package |
| 2362 | (inherit openjdk13) |
| 2363 | (name "openjdk") |
| 2364 | (version "14.0") |
| 2365 | (source (origin |
| 2366 | (method url-fetch) |
| 2367 | (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2") |
| 2368 | (file-name (string-append name "-" version ".tar.bz2")) |
| 2369 | (sha256 |
| 2370 | (base32 |
| 2371 | "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch")) |
| 2372 | (modules '((guix build utils))) |
| 2373 | (snippet |
| 2374 | `(begin |
| 2375 | ;; The m4 macro uses 'help' to search for builtins, which is |
| 2376 | ;; not available in bash-minimal |
| 2377 | (substitute* "make/autoconf/basics.m4" |
| 2378 | (("if help") "if command -v")) |
| 2379 | (for-each delete-file (find-files "." ".*.(bin|exe|jar)$")) |
| 2380 | #t)))) |
| 2381 | (inputs |
| 2382 | `(("alsa-lib" ,alsa-lib) |
| 2383 | ("cups" ,cups) |
| 2384 | ("fontconfig" ,fontconfig) |
| 2385 | ("freetype" ,freetype) |
| 2386 | ("giflib" ,giflib) |
| 2387 | ("lcms" ,lcms) |
| 2388 | ("libjpeg" ,libjpeg-turbo) |
| 2389 | ("libpng" ,libpng) |
| 2390 | ("libx11" ,libx11) |
| 2391 | ("libxext" ,libxext) |
| 2392 | ("libxrandr" ,libxrandr) |
| 2393 | ("libxrender" ,libxrender) |
| 2394 | ("libxt" ,libxt) |
| 2395 | ("libxtst" ,libxtst))) |
| 2396 | (native-inputs |
| 2397 | `(("autoconf" ,autoconf) |
| 2398 | ("[email protected]" ,gnu-make-4.2) |
| 2399 | ("openjdk13:jdk" ,openjdk13 "jdk") |
| 2400 | ("pkg-config" ,pkg-config) |
| 2401 | ("unzip" ,unzip) |
| 2402 | ("which" ,which) |
| 2403 | ("zip" ,zip))) |
| 2404 | (home-page "https://openjdk.java.net/projects/jdk/14"))) |
| 2405 | |
| 2406 | (define-public icedtea icedtea-8) |
| 2407 | |
| 2408 | |
| 2409 | (define-public ant/java8 |
| 2410 | (package (inherit ant-bootstrap) |
| 2411 | (name "ant") |
| 2412 | (version "1.10.1") |
| 2413 | (source (origin |
| 2414 | (method url-fetch) |
| 2415 | (uri (string-append "mirror://apache/ant/source/apache-ant-" |
| 2416 | version "-src.tar.gz")) |
| 2417 | (sha256 |
| 2418 | (base32 |
| 2419 | "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8")) |
| 2420 | (modules '((guix build utils))) |
| 2421 | (snippet |
| 2422 | '(begin |
| 2423 | (for-each delete-file |
| 2424 | (find-files "lib/optional" "\\.jar$")) |
| 2425 | #t)))) |
| 2426 | (arguments |
| 2427 | (substitute-keyword-arguments (package-arguments ant-bootstrap) |
| 2428 | ((#:phases phases) |
| 2429 | `(modify-phases ,phases |
| 2430 | (add-after 'unpack 'remove-scripts |
| 2431 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant |
| 2432 | ;; wrappers. |
| 2433 | (lambda _ |
| 2434 | (for-each delete-file |
| 2435 | (find-files "src/script" |
| 2436 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) |
| 2437 | #t)) |
| 2438 | (replace 'build |
| 2439 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2440 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) |
| 2441 | |
| 2442 | ;; Disable tests to avoid dependency on hamcrest-core, which needs |
| 2443 | ;; Ant to build. This is necessary in addition to disabling the |
| 2444 | ;; "check" phase, because the dependency on "test-jar" would always |
| 2445 | ;; result in the tests to be run. |
| 2446 | (substitute* "build.xml" |
| 2447 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) |
| 2448 | (invoke "bash" "bootstrap.sh" |
| 2449 | (string-append "-Ddist.dir=" |
| 2450 | (assoc-ref outputs "out"))))))))) |
| 2451 | (native-inputs |
| 2452 | `(("jdk" ,icedtea-8 "jdk") |
| 2453 | ("zip" ,zip) |
| 2454 | ("unzip" ,unzip))))) |
| 2455 | |
| 2456 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
| 2457 | ;; requires Java 8. |
| 2458 | (define-public ant |
| 2459 | (package (inherit ant/java8) |
| 2460 | (version "1.9.9") |
| 2461 | (source (origin |
| 2462 | (method url-fetch) |
| 2463 | (uri (string-append "mirror://apache/ant/source/apache-ant-" |
| 2464 | version "-src.tar.gz")) |
| 2465 | (sha256 |
| 2466 | (base32 |
| 2467 | "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n")))) |
| 2468 | (native-inputs |
| 2469 | `(("jdk" ,icedtea-7 "jdk") |
| 2470 | ("zip" ,zip) |
| 2471 | ("unzip" ,unzip))))) |
| 2472 | |
| 2473 | (define-public ant-apache-bcel |
| 2474 | (package |
| 2475 | (inherit ant/java8) |
| 2476 | (name "ant-apache-bcel") |
| 2477 | (arguments |
| 2478 | (substitute-keyword-arguments (package-arguments ant/java8) |
| 2479 | ((#:phases phases) |
| 2480 | `(modify-phases ,phases |
| 2481 | (add-after 'unpack 'link-bcel |
| 2482 | (lambda* (#:key inputs #:allow-other-keys) |
| 2483 | (for-each (lambda (file) |
| 2484 | (symlink file |
| 2485 | (string-append "lib/optional/" |
| 2486 | (basename file)))) |
| 2487 | (find-files (assoc-ref inputs "java-commons-bcel") |
| 2488 | "\\.jar$")) |
| 2489 | #t)) |
| 2490 | (add-after 'build 'install |
| 2491 | (lambda* (#:key outputs #:allow-other-keys) |
| 2492 | (let* ((out (assoc-ref outputs "out")) |
| 2493 | (share (string-append out "/share/java")) |
| 2494 | (bin (string-append out "/bin")) |
| 2495 | (lib (string-append out "/lib"))) |
| 2496 | (mkdir-p share) |
| 2497 | (install-file (string-append lib "/ant-apache-bcel.jar") share) |
| 2498 | (delete-file-recursively bin) |
| 2499 | (delete-file-recursively lib) |
| 2500 | #t))))))) |
| 2501 | (inputs |
| 2502 | `(("java-commons-bcel" ,java-commons-bcel) |
| 2503 | ,@(package-inputs ant/java8))))) |
| 2504 | |
| 2505 | (define-public ant-junit |
| 2506 | (package |
| 2507 | (inherit ant/java8) |
| 2508 | (name "ant-junit") |
| 2509 | (arguments |
| 2510 | (substitute-keyword-arguments (package-arguments ant/java8) |
| 2511 | ((#:phases phases) |
| 2512 | `(modify-phases ,phases |
| 2513 | (add-after 'unpack 'link-junit |
| 2514 | (lambda* (#:key inputs #:allow-other-keys) |
| 2515 | (for-each (lambda (file) |
| 2516 | (symlink file |
| 2517 | (string-append "lib/optional/" |
| 2518 | (basename file)))) |
| 2519 | (find-files (assoc-ref inputs "java-junit") |
| 2520 | "\\.jar$")) |
| 2521 | #t)) |
| 2522 | (add-after 'build 'install |
| 2523 | (lambda* (#:key outputs #:allow-other-keys) |
| 2524 | (let* ((out (assoc-ref outputs "out")) |
| 2525 | (share (string-append out "/share/java")) |
| 2526 | (bin (string-append out "/bin")) |
| 2527 | (lib (string-append out "/lib"))) |
| 2528 | (mkdir-p share) |
| 2529 | (install-file (string-append lib "/ant-junit.jar") share) |
| 2530 | (delete-file-recursively bin) |
| 2531 | (delete-file-recursively lib) |
| 2532 | #t))))))) |
| 2533 | (inputs |
| 2534 | `(("java-junit" ,java-junit) |
| 2535 | ,@(package-inputs ant/java8))))) |
| 2536 | |
| 2537 | (define-public java-openjfx-build |
| 2538 | (package |
| 2539 | (name "java-openjfx-build") |
| 2540 | ;; This is a java-8 version |
| 2541 | (version "8.202") |
| 2542 | (source (origin |
| 2543 | (method hg-fetch) |
| 2544 | (uri (hg-reference |
| 2545 | (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt") |
| 2546 | (changeset (string-append |
| 2547 | (string-join (string-split version #\.) "u") |
| 2548 | "-ga")))) |
| 2549 | (file-name (string-append name "-" version "-checkout")) |
| 2550 | (modules '((guix build utils))) |
| 2551 | (snippet |
| 2552 | '(begin |
| 2553 | ;; Delete included gradle jar |
| 2554 | (delete-file-recursively "gradle/wrapper") |
| 2555 | #t)) |
| 2556 | (sha256 |
| 2557 | (base32 |
| 2558 | "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")) |
| 2559 | (patches (search-patches "java-openjfx-build-jdk_version.patch")))) |
| 2560 | (build-system ant-build-system) |
| 2561 | (arguments |
| 2562 | `(#:jar-name "java-openjfx.jar" |
| 2563 | #:source-dir "buildSrc/src/main/java" |
| 2564 | #:test-dir "buildSrc/src/test" |
| 2565 | #:phases |
| 2566 | (modify-phases %standard-phases |
| 2567 | (add-before 'configure 'generate-jsl-parser |
| 2568 | (lambda _ |
| 2569 | (invoke "antlr3" "-o" |
| 2570 | "buildSrc/src/main/java/com/sun/scenario/effect/compiler" |
| 2571 | "buildSrc/src/main/antlr/JSL.g")))))) |
| 2572 | (inputs |
| 2573 | `(("antlr3" ,antlr3) |
| 2574 | ("java-stringtemplate" ,java-stringtemplate))) |
| 2575 | (native-inputs |
| 2576 | `(("java-junit" ,java-junit) |
| 2577 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 2578 | (home-page "https://openjfx.io") |
| 2579 | (synopsis "Graphical application toolkit in Java") |
| 2580 | (description "OpenJFX is a client application platform for desktop, |
| 2581 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2582 | modern, efficient, and fully featured toolkit for developing rich client |
| 2583 | applications. This package contains base classes for the OpenJFX |
| 2584 | distribution and helper classes for building other parts of the |
| 2585 | distribution.") |
| 2586 | (license license:gpl2))) ;gpl2 only, with classpath exception |
| 2587 | |
| 2588 | (define-public java-openjfx-base |
| 2589 | (package (inherit java-openjfx-build) |
| 2590 | (name "java-openjfx-base") |
| 2591 | (arguments |
| 2592 | `(#:jar-name "java-openjfx-base.jar" |
| 2593 | #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info" |
| 2594 | #:test-dir "modules/base/src/test" |
| 2595 | #:phases |
| 2596 | (modify-phases %standard-phases |
| 2597 | (add-before 'check 'remove-empty-file |
| 2598 | (lambda _ |
| 2599 | (with-directory-excursion "modules/base/src/test/java" |
| 2600 | ;; These files are completely commented, but junit expects them to |
| 2601 | ;; contain a class, so tests fail. |
| 2602 | (delete-file |
| 2603 | "com/sun/javafx/property/adapter/PropertyDescriptorTest.java") |
| 2604 | (delete-file |
| 2605 | "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java") |
| 2606 | (delete-file "javafx/beans/property/PropertiesTest.java") |
| 2607 | (delete-file |
| 2608 | "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java") |
| 2609 | ;; This one fails |
| 2610 | (delete-file "com/sun/javafx/runtime/VersionInfoTest.java")) |
| 2611 | #t))))) |
| 2612 | (propagated-inputs |
| 2613 | `(("java-openjfx-build" ,java-openjfx-build))) |
| 2614 | (description "OpenJFX is a client application platform for desktop, |
| 2615 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2616 | modern, efficient, and fully featured toolkit for developing rich client |
| 2617 | applications. This package contains base classes for the OpenJFX |
| 2618 | distribution."))) |
| 2619 | |
| 2620 | (define-public java-openjfx-graphics |
| 2621 | (package (inherit java-openjfx-build) |
| 2622 | (name "java-openjfx-graphics") |
| 2623 | (arguments |
| 2624 | `(#:jar-name "java-openjfx-graphics.jar" |
| 2625 | #:source-dir "modules/graphics/src/main/java" |
| 2626 | #:tests? #f; require X |
| 2627 | #:test-dir "modules/graphics/src/test")) |
| 2628 | (propagated-inputs |
| 2629 | `(("java-openjfx-base" ,java-openjfx-base) |
| 2630 | ("java-swt" ,java-swt))) |
| 2631 | (description "OpenJFX is a client application platform for desktop, |
| 2632 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2633 | modern, efficient, and fully featured toolkit for developing rich client |
| 2634 | applications. This package contains graphics-related classes for the |
| 2635 | OpenJFX distribution."))) |
| 2636 | |
| 2637 | (define-public java-openjfx-media |
| 2638 | (package (inherit java-openjfx-build) |
| 2639 | (name "java-openjfx-media") |
| 2640 | (propagated-inputs |
| 2641 | `(("java-openjxf-graphics" ,java-openjfx-graphics))) |
| 2642 | (arguments |
| 2643 | `(#:jar-name "java-openjfx-media.jar" |
| 2644 | #:source-dir "modules/media/src/main/java" |
| 2645 | #:tests? #f)); no tests |
| 2646 | (description "OpenJFX is a client application platform for desktop, |
| 2647 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2648 | modern, efficient, and fully featured toolkit for developing rich client |
| 2649 | applications. This package contains media-related classes for the |
| 2650 | OpenJFX distribution."))) |
| 2651 | |
| 2652 | (define-public javacc-4 |
| 2653 | (package |
| 2654 | (name "javacc") |
| 2655 | (version "4.1") |
| 2656 | (source (origin |
| 2657 | (method git-fetch) |
| 2658 | (uri (git-reference |
| 2659 | (url "https://github.com/javacc/javacc") |
| 2660 | (commit "release_41"))) |
| 2661 | (file-name (string-append "javacc-" version "-checkout")) |
| 2662 | (sha256 |
| 2663 | (base32 |
| 2664 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")) |
| 2665 | (modules '((guix build utils))) |
| 2666 | ;; delete bundled jars |
| 2667 | (snippet '(begin (delete-file-recursively "lib") #t)))) |
| 2668 | (build-system ant-build-system) |
| 2669 | ;; Tests fail with |
| 2670 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: |
| 2671 | ;; JAVACODE failed |
| 2672 | (arguments |
| 2673 | `(#:tests? #f |
| 2674 | #:phases |
| 2675 | (modify-phases %standard-phases |
| 2676 | ;; Delete tests to avoid build failure (we don't run them anyway). |
| 2677 | (add-after 'unpack 'delete-tests |
| 2678 | (lambda _ |
| 2679 | (for-each delete-file |
| 2680 | '("src/org/javacc/JavaCCTestCase.java" |
| 2681 | "src/org/javacc/parser/ExpansionTest.java" |
| 2682 | "src/org/javacc/parser/OptionsTest.java" |
| 2683 | "src/org/javacc/jjtree/JJTreeOptionsTest.java")) |
| 2684 | (for-each delete-file-recursively |
| 2685 | '("src/org/javacc/parser/test" |
| 2686 | "src/org/javacc/jjdoc/test")) |
| 2687 | #t)) |
| 2688 | (replace 'install (install-jars "bin/lib"))))) |
| 2689 | (home-page "https://javacc.org/") |
| 2690 | (synopsis "Java parser generator") |
| 2691 | (description "Java Compiler Compiler (JavaCC) is the most popular parser |
| 2692 | generator for use with Java applications. A parser generator is a tool that |
| 2693 | reads a grammar specification and converts it to a Java program that can |
| 2694 | recognize matches to the grammar. In addition to the parser generator itself, |
| 2695 | JavaCC provides other standard capabilities related to parser generation such |
| 2696 | as tree building (via a tool called JJTree included with JavaCC), actions, |
| 2697 | debugging, etc.") |
| 2698 | (license license:bsd-3))) |
| 2699 | |
| 2700 | ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar |
| 2701 | ;; in the bootstrap/ directory. |
| 2702 | (define-public javacc-3 |
| 2703 | (package |
| 2704 | (inherit javacc-4) |
| 2705 | (version "3.2") |
| 2706 | (source (origin |
| 2707 | (method git-fetch) |
| 2708 | (uri (git-reference |
| 2709 | (url "https://github.com/javacc/javacc.git") |
| 2710 | (commit "release_32"))) |
| 2711 | (file-name (string-append "javacc-" version "-checkout")) |
| 2712 | (sha256 |
| 2713 | (base32 |
| 2714 | "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3")))) |
| 2715 | (arguments |
| 2716 | `(#:tests? #f |
| 2717 | #:phases |
| 2718 | (modify-phases %standard-phases |
| 2719 | (add-before 'build 'set-java-version |
| 2720 | (lambda _ |
| 2721 | (for-each |
| 2722 | (lambda (file) |
| 2723 | (substitute* file |
| 2724 | (("debug=") "source=\"1.4\" debug="))) |
| 2725 | (find-files "." "build.xml")) |
| 2726 | #t)) |
| 2727 | (replace 'install (install-jars "bin/lib"))))))) |
| 2728 | |
| 2729 | (define-public javacc |
| 2730 | (package |
| 2731 | (inherit javacc-4) |
| 2732 | (version "7.0.4") |
| 2733 | (source |
| 2734 | (origin |
| 2735 | (method git-fetch) |
| 2736 | (uri (git-reference |
| 2737 | (url "https://github.com/javacc/javacc") |
| 2738 | (commit version))) |
| 2739 | (file-name (git-file-name "javacc" version)) |
| 2740 | (sha256 |
| 2741 | (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i")) |
| 2742 | (modules '((guix build utils))) |
| 2743 | ;; Delete bundled jars. |
| 2744 | (snippet '(begin (for-each delete-file-recursively |
| 2745 | '("bootstrap" "lib")) |
| 2746 | #t)))) |
| 2747 | (arguments |
| 2748 | `(#:make-flags ; bootstrap from javacc-4 |
| 2749 | (list (string-append "-Dbootstrap-jar=" |
| 2750 | (assoc-ref %build-inputs "javacc") |
| 2751 | "/share/java/javacc.jar")) |
| 2752 | #:test-target "test" |
| 2753 | #:phases |
| 2754 | (modify-phases %standard-phases |
| 2755 | (replace 'install (install-jars "target")) |
| 2756 | (add-after 'install 'install-bin |
| 2757 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 2758 | (let* ((out (assoc-ref outputs "out")) |
| 2759 | (dir (string-append out "/share/java")) |
| 2760 | (bin (string-append out "/bin")) |
| 2761 | (javacc (string-append bin "/javacc"))) |
| 2762 | (mkdir-p bin) |
| 2763 | (with-output-to-file javacc |
| 2764 | (lambda _ |
| 2765 | (display |
| 2766 | (string-append "#!/bin/sh\n" |
| 2767 | (assoc-ref inputs "jdk") "/bin/java" |
| 2768 | " -cp " dir "/javacc.jar" " `basename $0`" " $*")))) |
| 2769 | (chmod javacc #o755) |
| 2770 | ;; symlink to different names to affect the first argument and |
| 2771 | ;; change the behavior of the jar file. |
| 2772 | (symlink javacc (string-append bin "/jjdoc")) |
| 2773 | (symlink javacc (string-append bin "/jjtree")) |
| 2774 | #t)))))) |
| 2775 | |
| 2776 | (native-inputs |
| 2777 | `(("javacc" ,javacc-4))))) |
| 2778 | |
| 2779 | ;; This is the last 3.x release of ECJ |
| 2780 | (define-public java-ecj-3 |
| 2781 | (package |
| 2782 | (name "java-ecj") |
| 2783 | (version "3.8.2") |
| 2784 | (source (origin |
| 2785 | (method url-fetch) |
| 2786 | (uri (string-append "http://archive.eclipse.org/eclipse/" |
| 2787 | "downloads/drops/R-" version |
| 2788 | "-201301310800/ecjsrc-" version ".jar")) |
| 2789 | (sha256 |
| 2790 | (base32 |
| 2791 | "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) |
| 2792 | (build-system ant-build-system) |
| 2793 | (arguments |
| 2794 | `(#:tests? #f ; none included |
| 2795 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ |
| 2796 | #:make-flags (list "-f" "src/build.xml") |
| 2797 | #:build-target "build" |
| 2798 | #:phases |
| 2799 | (modify-phases %standard-phases |
| 2800 | (add-after 'unpack 'fix-manifest |
| 2801 | (lambda _ |
| 2802 | ;; Record the main class to make ecj executable. |
| 2803 | (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" |
| 2804 | (lambda (in out) |
| 2805 | (display "Manifest-Version: 1.0 |
| 2806 | Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" |
| 2807 | out))) |
| 2808 | #t)) |
| 2809 | (replace 'install (install-jars "."))))) |
| 2810 | (home-page "https://eclipse.org") |
| 2811 | (synopsis "Eclipse Java development tools core batch compiler") |
| 2812 | (description "This package provides the Eclipse Java core batch compiler.") |
| 2813 | (license license:epl1.0))) |
| 2814 | |
| 2815 | ;; This is needed for java-cisd-args4j |
| 2816 | (define-public java-ecj-3.5 |
| 2817 | (package (inherit java-ecj-3) |
| 2818 | (version "3.5.1") |
| 2819 | (source (origin |
| 2820 | (method url-fetch/zipbomb) |
| 2821 | (uri (string-append "http://archive.eclipse.org/eclipse/" |
| 2822 | "downloads/drops/R-" version |
| 2823 | "-200909170800/ecjsrc-" version ".zip")) |
| 2824 | (sha256 |
| 2825 | (base32 |
| 2826 | "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) |
| 2827 | (build-system ant-build-system) |
| 2828 | (arguments |
| 2829 | `(#:tests? #f ; none included |
| 2830 | #:jdk ,icedtea-7 ; doesn't build with JDK8+ |
| 2831 | #:build-target "build" |
| 2832 | #:phases |
| 2833 | (modify-phases %standard-phases |
| 2834 | (add-after 'unpack 'fix-manifest |
| 2835 | (lambda _ |
| 2836 | ;; Record the main class to make ecj executable. |
| 2837 | (with-atomic-file-replacement "META-INF/MANIFEST.MF" |
| 2838 | (lambda (in out) |
| 2839 | (dump-port in out) |
| 2840 | (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" |
| 2841 | out))) |
| 2842 | #t)) |
| 2843 | (replace 'install (install-jars "."))))) |
| 2844 | (native-inputs |
| 2845 | `(("unzip" ,unzip))))) |
| 2846 | |
| 2847 | (define-public java-ecj |
| 2848 | (package (inherit java-ecj-3) |
| 2849 | (version "4.6.3") |
| 2850 | (source |
| 2851 | (origin |
| 2852 | (method url-fetch) |
| 2853 | (uri (string-append |
| 2854 | "http://archive.eclipse.org/eclipse/downloads/drops4/R-" |
| 2855 | version |
| 2856 | "-201703010400/ecjsrc-" |
| 2857 | version |
| 2858 | ".jar")) |
| 2859 | (sha256 |
| 2860 | (base32 |
| 2861 | "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) |
| 2862 | (arguments |
| 2863 | `(#:tests? #f ; none included |
| 2864 | #:build-target "build" |
| 2865 | #:phases |
| 2866 | (modify-phases %standard-phases |
| 2867 | (add-after 'unpack 'fix-build.xml |
| 2868 | (lambda _ |
| 2869 | (substitute* "src/build.xml" |
| 2870 | (("^.*MANIFEST.*$") |
| 2871 | "")) |
| 2872 | #t)) |
| 2873 | (add-after 'unpack 'fix-prop |
| 2874 | (lambda _ |
| 2875 | (substitute* "src/build.xml" |
| 2876 | (("^.*properties.*$") |
| 2877 | "<include name=\"**/*.properties\"/> |
| 2878 | <include name=\"**/*.props\"/>")) |
| 2879 | #t)) |
| 2880 | (add-before 'build 'chdir |
| 2881 | (lambda _ |
| 2882 | (chdir "src") |
| 2883 | #t)) |
| 2884 | (replace 'install (install-jars "."))))))) |
| 2885 | |
| 2886 | (define-public java-cisd-base |
| 2887 | (let ((revision 38938) |
| 2888 | (base-version "14.12.0")) |
| 2889 | (package |
| 2890 | (name "java-cisd-base") |
| 2891 | (version (string-append base-version "-" (number->string revision))) |
| 2892 | (source (origin |
| 2893 | (method svn-fetch) |
| 2894 | (uri (svn-reference |
| 2895 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 2896 | "base/tags/release/" |
| 2897 | (version-major+minor base-version) |
| 2898 | ".x/" base-version "/base/")) |
| 2899 | (revision revision))) |
| 2900 | (file-name (string-append "java-cisd-base-" version "-checkout")) |
| 2901 | (sha256 |
| 2902 | (base32 |
| 2903 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) |
| 2904 | (modules '((guix build utils))) |
| 2905 | (snippet |
| 2906 | '(begin |
| 2907 | ;; Delete included gradle jar |
| 2908 | (delete-file-recursively "gradle/wrapper") |
| 2909 | ;; Delete pre-built native libraries |
| 2910 | (delete-file-recursively "libs") |
| 2911 | #t)))) |
| 2912 | (build-system ant-build-system) |
| 2913 | (arguments |
| 2914 | `(#:make-flags '("-file" "build/build.xml") |
| 2915 | #:test-target "jar-test" |
| 2916 | #:jdk ,icedtea-8 |
| 2917 | #:phases |
| 2918 | (modify-phases %standard-phases |
| 2919 | (add-after 'unpack 'unpack-build-resources |
| 2920 | (lambda* (#:key inputs #:allow-other-keys) |
| 2921 | (copy-recursively (assoc-ref inputs "build-resources") |
| 2922 | "../build_resources") |
| 2923 | #t)) |
| 2924 | (add-after 'unpack-build-resources 'fix-dependencies |
| 2925 | (lambda* (#:key inputs #:allow-other-keys) |
| 2926 | (substitute* "build/build.xml" |
| 2927 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") |
| 2928 | (string-append (assoc-ref inputs "java-testng") |
| 2929 | "/share/java/java-testng.jar")) |
| 2930 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") |
| 2931 | (string-append (assoc-ref inputs "java-commons-lang") |
| 2932 | "/share/java/commons-lang-" |
| 2933 | ,(package-version java-commons-lang) ".jar")) |
| 2934 | (("\\$\\{lib\\}/commons-io/commons-io.jar") |
| 2935 | (string-append (assoc-ref inputs "java-commons-io") |
| 2936 | "/lib/m2/commons-io/commons-io/" |
| 2937 | ,(package-version java-commons-io) |
| 2938 | "/commons-io-" |
| 2939 | ,(package-version java-commons-io) |
| 2940 | ".jar")) |
| 2941 | ;; Remove dependency on svn |
| 2942 | (("<build-info.*") "") |
| 2943 | (("\\$\\{revision.number\\}") |
| 2944 | ,(number->string revision)) |
| 2945 | (("\\$\\{version.number\\}") ,base-version)) |
| 2946 | ;; Remove dependency on classycle |
| 2947 | (substitute* "../build_resources/ant/build-common.xml" |
| 2948 | (("<taskdef name=\"dependency-checker.*") "") |
| 2949 | (("classname=\"classycle.*") "") |
| 2950 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) |
| 2951 | #t)) |
| 2952 | ;; A few tests fail because of the lack of a proper /etc/groups and |
| 2953 | ;; /etc/passwd file in the build container. |
| 2954 | (add-after 'unpack 'disable-broken-tests |
| 2955 | (lambda _ |
| 2956 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" |
| 2957 | (("Unix.isOperational\\(\\)") "false")) |
| 2958 | #t)) |
| 2959 | ;; These decorators are almost useless and pull in an unpackaged |
| 2960 | ;; dependency. |
| 2961 | (add-after 'unpack 'remove-useless-decorators |
| 2962 | (lambda _ |
| 2963 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" |
| 2964 | (("@Private") "") |
| 2965 | (("import ch.rinn.restrictions.Private;") "")) |
| 2966 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" |
| 2967 | (("@Friend.*") "") |
| 2968 | (("import ch.rinn.restrictions.Friend;") "")) |
| 2969 | #t)) |
| 2970 | (add-before 'configure 'build-native-code |
| 2971 | (lambda* (#:key inputs #:allow-other-keys) |
| 2972 | (let ((jdk (assoc-ref inputs "jdk")) |
| 2973 | (dir ,(match (%current-system) |
| 2974 | ("i686-linux" |
| 2975 | "i386-Linux") |
| 2976 | ((or "armhf-linux" "aarch64-linux") |
| 2977 | "arm-Linux") |
| 2978 | ((or "x86_64-linux") |
| 2979 | "amd64-Linux") |
| 2980 | (_ "unknown-Linux")))) |
| 2981 | (with-directory-excursion "source/c" |
| 2982 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" |
| 2983 | (string-append "-I" jdk "/include") |
| 2984 | (string-append "-I" jdk "/include/linux") |
| 2985 | "-o" "libunix.so") |
| 2986 | (invoke "gcc" "-shared" "-O3" "-fPIC" |
| 2987 | "-DMACHINE_BYTE_ORDER=1" |
| 2988 | "copyCommon.c" |
| 2989 | "copyByteChar.c" |
| 2990 | "copyByteDouble.c" |
| 2991 | "copyByteFloat.c" |
| 2992 | "copyByteInt.c" |
| 2993 | "copyByteLong.c" |
| 2994 | "copyByteShort.c" |
| 2995 | (string-append "-I" jdk "/include") |
| 2996 | (string-append "-I" jdk "/include/linux") |
| 2997 | "-o" "libnativedata.so")) |
| 2998 | (install-file "source/c/libunix.so" |
| 2999 | (string-append "libs/native/unix/" dir)) |
| 3000 | (install-file "source/c/libnativedata.so" |
| 3001 | (string-append "libs/native/nativedata/" dir)) |
| 3002 | #t))) |
| 3003 | ;; In the "check" phase we only build the test executable. |
| 3004 | (add-after 'check 'run-tests |
| 3005 | (lambda _ |
| 3006 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") |
| 3007 | (delete-file "targets/dist/sis-base-test.jar") |
| 3008 | #t)) |
| 3009 | (replace 'install (install-jars "targets/dist"))))) |
| 3010 | (native-inputs |
| 3011 | `(("jdk" ,icedtea-8) |
| 3012 | ("java-commons-lang" ,java-commons-lang) |
| 3013 | ("java-commons-io" ,java-commons-io) |
| 3014 | ("java-testng" ,java-testng) |
| 3015 | ("build-resources" |
| 3016 | ,(origin |
| 3017 | (method svn-fetch) |
| 3018 | (uri (svn-reference |
| 3019 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3020 | "base/tags/release/" |
| 3021 | (version-major+minor base-version) |
| 3022 | ".x/" base-version |
| 3023 | "/build_resources/")) |
| 3024 | (revision revision))) |
| 3025 | (sha256 |
| 3026 | (base32 |
| 3027 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) |
| 3028 | (home-page "http://svnsis.ethz.ch") |
| 3029 | (synopsis "Utility classes for libraries from ETH Zurich") |
| 3030 | (description "This library supplies some utility classes needed for |
| 3031 | libraries from the SIS division at ETH Zurich like jHDF5.") |
| 3032 | ;; The C sources are under a non-copyleft license, which looks like a |
| 3033 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. |
| 3034 | (license (list license:asl2.0 |
| 3035 | (license:non-copyleft "file://source/c/COPYING")))))) |
| 3036 | |
| 3037 | (define-public java-cisd-args4j |
| 3038 | (let ((revision 39162) |
| 3039 | (base-version "9.11.2")) |
| 3040 | (package |
| 3041 | (name "java-cisd-args4j") |
| 3042 | (version (string-append base-version "-" (number->string revision))) |
| 3043 | (source (origin |
| 3044 | (method svn-fetch) |
| 3045 | (uri (svn-reference |
| 3046 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3047 | "args4j/tags/release/" |
| 3048 | (version-major+minor base-version) |
| 3049 | ".x/" base-version "/args4j/")) |
| 3050 | (revision revision))) |
| 3051 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) |
| 3052 | (sha256 |
| 3053 | (base32 |
| 3054 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) |
| 3055 | (build-system ant-build-system) |
| 3056 | (arguments |
| 3057 | `(#:make-flags '("-file" "build/build.xml") |
| 3058 | #:tests? #f ; there are no tests |
| 3059 | ;; There are weird build failures with JDK8, such as: "The type |
| 3060 | ;; java.io.ObjectInputStream cannot be resolved. It is indirectly |
| 3061 | ;; referenced from required .class files" |
| 3062 | #:jdk ,icedtea-7 |
| 3063 | #:modules ((guix build ant-build-system) |
| 3064 | (guix build utils) |
| 3065 | (guix build java-utils) |
| 3066 | (sxml simple) |
| 3067 | (sxml transform) |
| 3068 | (sxml xpath)) |
| 3069 | #:phases |
| 3070 | (modify-phases %standard-phases |
| 3071 | (add-after 'unpack 'unpack-build-resources |
| 3072 | (lambda* (#:key inputs #:allow-other-keys) |
| 3073 | (mkdir-p "../build_resources") |
| 3074 | (invoke "tar" "xf" (assoc-ref inputs "build-resources") |
| 3075 | "-C" "../build_resources" |
| 3076 | "--strip-components=1") |
| 3077 | (mkdir-p "../build_resources/lib") |
| 3078 | #t)) |
| 3079 | (add-after 'unpack-build-resources 'fix-dependencies |
| 3080 | (lambda* (#:key inputs #:allow-other-keys) |
| 3081 | ;; FIXME: There should be a more convenient abstraction for |
| 3082 | ;; editing XML files. |
| 3083 | (with-directory-excursion "../build_resources/ant/" |
| 3084 | (chmod "build-common.xml" #o664) |
| 3085 | (call-with-output-file "build-common.xml.new" |
| 3086 | (lambda (port) |
| 3087 | (sxml->xml |
| 3088 | (pre-post-order |
| 3089 | (with-input-from-file "build-common.xml" |
| 3090 | (lambda _ (xml->sxml #:trim-whitespace? #t))) |
| 3091 | `(;; Remove dependency on classycle and custom ant tasks |
| 3092 | (taskdef . ,(lambda (tag . kids) |
| 3093 | (let ((name ((sxpath '(name *text*)) kids))) |
| 3094 | (if (or (member "build-info" name) |
| 3095 | (member "dependency-checker" name) |
| 3096 | (member "build-java-subprojects" name) |
| 3097 | (member "project-classpath" name)) |
| 3098 | '() ; skip |
| 3099 | `(,tag ,@kids))))) |
| 3100 | (typedef . ,(lambda (tag . kids) |
| 3101 | (let ((name ((sxpath '(name *text*)) kids))) |
| 3102 | (if (member "recursive-jar" name) |
| 3103 | '() ; skip |
| 3104 | `(,tag ,@kids))))) |
| 3105 | (build-java-subprojects . ,(lambda _ '())) |
| 3106 | ;; Ignore everything else |
| 3107 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) |
| 3108 | (*text* . ,(lambda (_ txt) txt)))) |
| 3109 | port))) |
| 3110 | (rename-file "build-common.xml.new" "build-common.xml")) |
| 3111 | (substitute* "build/build.xml" |
| 3112 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") |
| 3113 | (string-append (assoc-ref inputs "java-cisd-base") |
| 3114 | "/share/java/sis-base.jar")) |
| 3115 | ;; Remove dependency on svn |
| 3116 | (("<build-info.*") "") |
| 3117 | (("\\$\\{revision.number\\}") |
| 3118 | ,(number->string revision)) |
| 3119 | (("\\$\\{version.number\\}") ,base-version) |
| 3120 | ;; Don't use custom ant tasks. |
| 3121 | (("recursive-jar") "jar") |
| 3122 | (("<project-classpath.*") "")) |
| 3123 | #t)) |
| 3124 | (replace 'install (install-jars "targets/dist"))))) |
| 3125 | (inputs |
| 3126 | `(("java-cisd-base" ,java-cisd-base))) |
| 3127 | (native-inputs |
| 3128 | `(("ecj" ,java-ecj-3.5) |
| 3129 | ("build-resources" |
| 3130 | ,(origin |
| 3131 | (method svn-fetch) |
| 3132 | (uri (svn-reference |
| 3133 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3134 | "args4j/tags/release/" |
| 3135 | (version-major+minor base-version) |
| 3136 | ".x/" base-version |
| 3137 | "/build_resources/")) |
| 3138 | (revision revision))) |
| 3139 | (sha256 |
| 3140 | (base32 |
| 3141 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) |
| 3142 | (modules '((guix build utils))) |
| 3143 | ;; Delete bundled pre-built jars. |
| 3144 | (snippet |
| 3145 | '(begin (delete-file-recursively "lib/") #t)))))) |
| 3146 | (home-page "http://svnsis.ethz.ch") |
| 3147 | (synopsis "Command line parser library") |
| 3148 | (description "This package provides a parser for command line arguments.") |
| 3149 | (license license:asl2.0)))) |
| 3150 | |
| 3151 | (define-public java-cisd-jhdf5 |
| 3152 | (let ((revision 39162) |
| 3153 | (base-version "14.12.6")) |
| 3154 | (package |
| 3155 | (name "java-cisd-jhdf5") |
| 3156 | (version (string-append base-version "-" (number->string revision))) |
| 3157 | (source (origin |
| 3158 | (method svn-fetch) |
| 3159 | (uri (svn-reference |
| 3160 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3161 | "jhdf5/tags/release/" |
| 3162 | (version-major+minor base-version) |
| 3163 | ".x/" base-version "/jhdf5/")) |
| 3164 | (revision revision))) |
| 3165 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) |
| 3166 | (sha256 |
| 3167 | (base32 |
| 3168 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) |
| 3169 | (modules '((guix build utils))) |
| 3170 | (snippet |
| 3171 | '(begin |
| 3172 | ;; Delete included gradle jar |
| 3173 | (delete-file-recursively "gradle/wrapper") |
| 3174 | ;; Delete pre-built native libraries |
| 3175 | (delete-file-recursively "libs") |
| 3176 | #t)))) |
| 3177 | (build-system ant-build-system) |
| 3178 | (arguments |
| 3179 | `(#:make-flags '("-file" "build/build.xml") |
| 3180 | #:build-target "jar-all" |
| 3181 | #:test-target "jar-test" |
| 3182 | #:jdk ,icedtea-8 |
| 3183 | #:phases |
| 3184 | (modify-phases %standard-phases |
| 3185 | ;; FIXME: this build phase fails. |
| 3186 | (delete 'generate-jar-indices) |
| 3187 | ;; Don't erase results from the build phase when building tests. |
| 3188 | (add-after 'unpack 'separate-test-target-from-clean |
| 3189 | (lambda _ |
| 3190 | (substitute* "build/build.xml" |
| 3191 | (("\"jar-test\" depends=\"clean, ") |
| 3192 | "\"jar-test\" depends=\"")) |
| 3193 | #t)) |
| 3194 | (add-after 'unpack 'unpack-build-resources |
| 3195 | (lambda* (#:key inputs #:allow-other-keys) |
| 3196 | (copy-recursively (assoc-ref inputs "build-resources") |
| 3197 | "../build_resources") |
| 3198 | (delete-file-recursively "../build_resources/lib/") |
| 3199 | (mkdir-p "../build_resources/lib") |
| 3200 | ;; Remove dependency on classycle |
| 3201 | (substitute* "../build_resources/ant/build-common.xml" |
| 3202 | (("<taskdef name=\"dependency-checker.*") "") |
| 3203 | (("classname=\"classycle.*") "") |
| 3204 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) |
| 3205 | ;; Remove dependency on svn |
| 3206 | (substitute* "build/build.xml" |
| 3207 | (("<build-info.*") "") |
| 3208 | (("\\$\\{revision.number\\}") |
| 3209 | ,(number->string revision)) |
| 3210 | (("\\$\\{version.number\\}") ,base-version)) |
| 3211 | #t)) |
| 3212 | (add-after 'unpack-build-resources 'fix-dependencies |
| 3213 | (lambda* (#:key inputs #:allow-other-keys) |
| 3214 | (substitute* "../build_resources/ant/build-common.xml" |
| 3215 | (("../libraries/testng/testng-jdk15.jar") |
| 3216 | (string-append (assoc-ref inputs "java-testng") |
| 3217 | "/share/java/java-testng.jar"))) |
| 3218 | (substitute* "build/build.xml" |
| 3219 | (("\\$\\{lib\\}/sis-base/sis-base.jar") |
| 3220 | (string-append (assoc-ref inputs "java-cisd-base") |
| 3221 | "/share/java/sis-base.jar")) |
| 3222 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") |
| 3223 | (string-append (assoc-ref inputs "java-cisd-args4j") |
| 3224 | "/share/java/cisd-args4j.jar")) |
| 3225 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") |
| 3226 | (string-append (assoc-ref inputs "java-commons-lang") |
| 3227 | "/share/java/commons-lang-" |
| 3228 | ,(package-version java-commons-lang) ".jar")) |
| 3229 | (("\\$\\{lib\\}/commons-io/commons-io.jar") |
| 3230 | (string-append (assoc-ref inputs "java-commons-io") |
| 3231 | "/lib/m2/commons-io/commons-io/" |
| 3232 | ,(package-version java-commons-io) |
| 3233 | "/commons-io-" |
| 3234 | ,(package-version java-commons-io) |
| 3235 | ".jar")) |
| 3236 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") |
| 3237 | (string-append (assoc-ref inputs "java-testng") |
| 3238 | "/share/java/java-testng.jar")) |
| 3239 | (("\\$\\{lib\\}/junit4/junit.jar") |
| 3240 | (car (find-files (assoc-ref inputs "java-junit") "jar$"))) |
| 3241 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") |
| 3242 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 3243 | "jar$")))) |
| 3244 | ;; Remove dependency on ch.rinn.restrictions |
| 3245 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" |
| 3246 | (substitute* '("BitSetConversionUtils.java" |
| 3247 | "HDF5Utils.java") |
| 3248 | (("import ch.rinn.restrictions.Private;") "") |
| 3249 | (("@Private") ""))) |
| 3250 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" |
| 3251 | (substitute* '("BitSetConversionTest.java" |
| 3252 | "h5ar/HDF5ArchiverTest.java") |
| 3253 | (("import ch.rinn.restrictions.Friend;") "") |
| 3254 | (("@Friend.*") "")) |
| 3255 | ;; Remove leftovers from removing @Friend |
| 3256 | (substitute* "h5ar/HDF5ArchiverTest.java" |
| 3257 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") |
| 3258 | ""))) |
| 3259 | #t)) |
| 3260 | (add-before 'configure 'build-native-library |
| 3261 | (lambda* (#:key inputs #:allow-other-keys) |
| 3262 | (let ((jdk (assoc-ref inputs "jdk")) |
| 3263 | (hdf5 (assoc-ref inputs "hdf5")) |
| 3264 | (dir ,(match (%current-system) |
| 3265 | ("i686-linux" |
| 3266 | "i386-Linux") |
| 3267 | ((or "armhf-linux" "aarch64-linux") |
| 3268 | "arm-Linux") |
| 3269 | ((or "x86_64-linux") |
| 3270 | "amd64-Linux") |
| 3271 | (_ "unknown-Linux")))) |
| 3272 | (with-directory-excursion "source/c" |
| 3273 | (apply invoke `("gcc" "-shared" "-O3" |
| 3274 | "-fPIC" |
| 3275 | "-Wl,--exclude-libs,ALL" |
| 3276 | ,@(find-files "jhdf5" "\\.c$") |
| 3277 | ,@(find-files "hdf-java" "\\.c$") |
| 3278 | ,(string-append "-I" hdf5 "/include") |
| 3279 | ,(string-append "-I" jdk "/include") |
| 3280 | ,(string-append "-I" jdk "/include/linux") |
| 3281 | ,(string-append hdf5 "/lib/libhdf5.a") |
| 3282 | "-o" "libjhdf5.so" "-lz"))) |
| 3283 | (install-file "source/c/libjhdf5.so" |
| 3284 | (string-append "libs/native/jhdf5/" dir)) |
| 3285 | #t))) |
| 3286 | ;; In the "check" phase we only build the test executable. |
| 3287 | (add-after 'check 'run-tests |
| 3288 | (lambda _ |
| 3289 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") |
| 3290 | (delete-file "targets/dist/sis-jhdf5-test.jar") |
| 3291 | #t)) |
| 3292 | (replace 'install |
| 3293 | (install-jars "targets/dist"))))) |
| 3294 | (inputs |
| 3295 | `(("java-cisd-base" ,java-cisd-base) |
| 3296 | ("java-cisd-args4j" ,java-cisd-args4j) |
| 3297 | ("java-commons-lang" ,java-commons-lang) |
| 3298 | ("java-commons-io" ,java-commons-io) |
| 3299 | ("hdf5" ,hdf5) |
| 3300 | ("zlib" ,zlib))) |
| 3301 | (native-inputs |
| 3302 | `(("jdk" ,icedtea-8) |
| 3303 | ("java-testng" ,java-testng) |
| 3304 | ("java-junit" ,java-junit) |
| 3305 | ("java-jmock" ,java-jmock) |
| 3306 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 3307 | ("build-resources" |
| 3308 | ,(origin |
| 3309 | (method svn-fetch) |
| 3310 | (uri (svn-reference |
| 3311 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3312 | "jhdf5/tags/release/" |
| 3313 | (version-major+minor base-version) |
| 3314 | ".x/" base-version |
| 3315 | "/build_resources/")) |
| 3316 | (revision revision))) |
| 3317 | (sha256 |
| 3318 | (base32 |
| 3319 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) |
| 3320 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") |
| 3321 | (synopsis "Java binding for HDF5") |
| 3322 | (description "JHDF5 is a high-level API in Java for reading and writing |
| 3323 | HDF5 files, building on the libraries provided by the HDF Group.") |
| 3324 | ;; The C sources are under a non-copyleft license, which looks like a |
| 3325 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. |
| 3326 | (license (list license:asl2.0 |
| 3327 | (license:non-copyleft "file://source/c/COPYING")))))) |
| 3328 | |
| 3329 | (define-public java-classpathx-servletapi |
| 3330 | (package |
| 3331 | (name "java-classpathx-servletapi") |
| 3332 | (version "3.0.1") |
| 3333 | (source (origin |
| 3334 | (method url-fetch) |
| 3335 | (uri (string-append "mirror://gnu/classpathx/servletapi/" |
| 3336 | "servletapi-" version ".tar.gz")) |
| 3337 | (sha256 |
| 3338 | (base32 |
| 3339 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
| 3340 | (build-system ant-build-system) |
| 3341 | (arguments |
| 3342 | `(#:tests? #f ; there is no test target |
| 3343 | #:build-target "compile" |
| 3344 | #:make-flags |
| 3345 | (list "-Dbuild.compiler=javac1.8" |
| 3346 | (string-append "-Ddist=" (assoc-ref %outputs "out"))) |
| 3347 | #:phases |
| 3348 | (modify-phases %standard-phases |
| 3349 | (replace 'install |
| 3350 | (lambda* (#:key make-flags #:allow-other-keys) |
| 3351 | (apply invoke `("ant" "dist" ,@make-flags))))))) |
| 3352 | (home-page "https://www.gnu.org/software/classpathx/") |
| 3353 | (synopsis "Java servlet API implementation") |
| 3354 | (description "This is the GNU servlet API distribution, part of the |
| 3355 | ClasspathX project. It provides implementations of version 3.0 of the servlet |
| 3356 | API and version 2.1 of the Java ServerPages API.") |
| 3357 | (license license:gpl3+))) |
| 3358 | |
| 3359 | (define-public java-javaee-servletapi |
| 3360 | (package |
| 3361 | (name "java-javaee-servletapi") |
| 3362 | (version "3.1.0") |
| 3363 | (source (origin |
| 3364 | (method git-fetch) |
| 3365 | (uri (git-reference |
| 3366 | (url "https://github.com/javaee/servlet-spec") |
| 3367 | (commit version))) |
| 3368 | (file-name (git-file-name name version)) |
| 3369 | (sha256 |
| 3370 | (base32 |
| 3371 | "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl")))) |
| 3372 | (build-system ant-build-system) |
| 3373 | (arguments |
| 3374 | `(#:jar-name "javax-servletapi.jar" |
| 3375 | ;; no tests |
| 3376 | #:tests? #f |
| 3377 | #:source-dir "src/main/java" |
| 3378 | #:phases |
| 3379 | (modify-phases %standard-phases |
| 3380 | (add-before 'build 'copy-resources |
| 3381 | (lambda _ |
| 3382 | (mkdir-p "build/classes/javax/servlet/http") |
| 3383 | (let ((from-prefix "src/main/java/javax/servlet/") |
| 3384 | (to-prefix "build/classes/javax/servlet/")) |
| 3385 | (for-each (lambda (f) |
| 3386 | (copy-file (string-append from-prefix f) |
| 3387 | (string-append to-prefix f))) |
| 3388 | (list "LocalStrings_ja.properties" |
| 3389 | "LocalStrings.properties" |
| 3390 | "LocalStrings_fr.properties" |
| 3391 | "http/LocalStrings_es.properties" |
| 3392 | "http/LocalStrings_ja.properties" |
| 3393 | "http/LocalStrings.properties" |
| 3394 | "http/LocalStrings_fr.properties"))) |
| 3395 | #t))))) |
| 3396 | (native-inputs |
| 3397 | `(("unzip" ,unzip))) |
| 3398 | (home-page "https://javaee.github.io/servlet-spec/") |
| 3399 | (synopsis "Java servlet API") |
| 3400 | (description "Java Servlet is the foundation web specification in the |
| 3401 | Java Enterprise Platform. Developers can build web applications using the |
| 3402 | Servlet API to interact with the request/response workflow. This project |
| 3403 | provides information on the continued development of the Java Servlet |
| 3404 | specification.") |
| 3405 | ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1. |
| 3406 | ;; Some files are licensed under ASL 2.0. |
| 3407 | (license (list license:asl2.0 license:gpl2 license:cddl1.1)))) |
| 3408 | |
| 3409 | (define-public java-swt |
| 3410 | (package |
| 3411 | (name "java-swt") |
| 3412 | (version "4.7.1a") |
| 3413 | (source |
| 3414 | ;; The types of many variables and procedures differ in the sources |
| 3415 | ;; dependent on whether the target architecture is a 32-bit system or a |
| 3416 | ;; 64-bit system. Instead of patching the sources on demand in a build |
| 3417 | ;; phase we download either the 32-bit archive (which mostly uses "int" |
| 3418 | ;; types) or the 64-bit archive (which mostly uses "long" types). |
| 3419 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
| 3420 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") |
| 3421 | (file32 "x86") |
| 3422 | (file64 "x86_64")) |
| 3423 | (let-values (((hash file) |
| 3424 | (match (or (%current-target-system) (%current-system)) |
| 3425 | ("x86_64-linux" (values hash64 file64)) |
| 3426 | (_ (values hash32 file32))))) |
| 3427 | (origin |
| 3428 | (method url-fetch) |
| 3429 | (uri (string-append |
| 3430 | "http://download.eclipse.org/eclipse/downloads/drops4/" |
| 3431 | "R-" version "-201710090410/swt-" version |
| 3432 | "-gtk-linux-" file ".zip")) |
| 3433 | (sha256 (base32 hash)))))) |
| 3434 | (build-system ant-build-system) |
| 3435 | (arguments |
| 3436 | `(#:jar-name "swt.jar" |
| 3437 | #:jdk ,icedtea-8 |
| 3438 | #:tests? #f ; no "check" target |
| 3439 | #:phases |
| 3440 | (modify-phases %standard-phases |
| 3441 | (replace 'unpack |
| 3442 | (lambda* (#:key source #:allow-other-keys) |
| 3443 | (mkdir "swt") |
| 3444 | (invoke "unzip" source "-d" "swt") |
| 3445 | (chdir "swt") |
| 3446 | (mkdir "src") |
| 3447 | (invoke "unzip" "src.zip" "-d" "src"))) |
| 3448 | ;; The classpath contains invalid icecat jars. Since we don't need |
| 3449 | ;; anything other than the JDK on the classpath, we can simply unset |
| 3450 | ;; it. |
| 3451 | (add-after 'configure 'unset-classpath |
| 3452 | (lambda _ (unsetenv "CLASSPATH") #t)) |
| 3453 | (add-before 'build 'build-native |
| 3454 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3455 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) |
| 3456 | ;; Build shared libraries. Users of SWT have to set the system |
| 3457 | ;; property swt.library.path to the "lib" directory of this |
| 3458 | ;; package output. |
| 3459 | (mkdir-p lib) |
| 3460 | (setenv "OUTPUT_DIR" lib) |
| 3461 | (with-directory-excursion "src" |
| 3462 | (invoke "bash" "build.sh"))))) |
| 3463 | (add-after 'install 'install-native |
| 3464 | (lambda* (#:key outputs #:allow-other-keys) |
| 3465 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) |
| 3466 | (for-each (lambda (file) |
| 3467 | (install-file file lib)) |
| 3468 | (find-files "." "\\.so$")) |
| 3469 | #t)))))) |
| 3470 | (inputs |
| 3471 | `(("gtk" ,gtk+-2) |
| 3472 | ("libxtst" ,libxtst) |
| 3473 | ("libxt" ,libxt) |
| 3474 | ("mesa" ,mesa) |
| 3475 | ("glu" ,glu))) |
| 3476 | (native-inputs |
| 3477 | `(("pkg-config" ,pkg-config) |
| 3478 | ("unzip" ,unzip))) |
| 3479 | (home-page "https://www.eclipse.org/swt/") |
| 3480 | (synopsis "Widget toolkit for Java") |
| 3481 | (description |
| 3482 | "SWT is a widget toolkit for Java designed to provide efficient, portable |
| 3483 | access to the user-interface facilities of the operating systems on which it |
| 3484 | is implemented.") |
| 3485 | ;; SWT code is licensed under EPL1.0 |
| 3486 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 |
| 3487 | ;; Cairo bindings contain code under MPL1.1 |
| 3488 | ;; XULRunner 1.9 bindings contain code under MPL2.0 |
| 3489 | (license (list |
| 3490 | license:epl1.0 |
| 3491 | license:mpl1.1 |
| 3492 | license:mpl2.0 |
| 3493 | license:lgpl2.1+)))) |
| 3494 | |
| 3495 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead |
| 3496 | ;; of the latest release. |
| 3497 | (define-public java-qdox-1.12 |
| 3498 | (package |
| 3499 | (name "java-qdox") |
| 3500 | (version "1.12.1") |
| 3501 | (source (origin |
| 3502 | (method url-fetch) |
| 3503 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3504 | "com/thoughtworks/qdox/qdox/" version |
| 3505 | "/qdox-" version "-sources.jar")) |
| 3506 | (sha256 |
| 3507 | (base32 |
| 3508 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) |
| 3509 | (build-system ant-build-system) |
| 3510 | (arguments |
| 3511 | `(;; Tests require junit |
| 3512 | #:tests? #f |
| 3513 | #:jar-name "qdox.jar" |
| 3514 | #:phases |
| 3515 | (modify-phases %standard-phases |
| 3516 | (replace 'unpack |
| 3517 | (lambda* (#:key source #:allow-other-keys) |
| 3518 | (mkdir "src") |
| 3519 | (with-directory-excursion "src" |
| 3520 | (invoke "jar" "-xf" source)))) |
| 3521 | ;; At this point we don't have junit, so we must remove the API |
| 3522 | ;; tests. |
| 3523 | (add-after 'unpack 'delete-tests |
| 3524 | (lambda _ |
| 3525 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") |
| 3526 | #t))))) |
| 3527 | (home-page "https://github.com/codehaus/qdox") |
| 3528 | (synopsis "Parse definitions from Java source files") |
| 3529 | (description |
| 3530 | "QDox is a high speed, small footprint parser for extracting |
| 3531 | class/interface/method definitions from source files complete with JavaDoc |
| 3532 | @code{@@tags}. It is designed to be used by active code generators or |
| 3533 | documentation tools.") |
| 3534 | (license license:asl2.0))) |
| 3535 | |
| 3536 | (define-public java-qdox |
| 3537 | (package |
| 3538 | (name "java-qdox") |
| 3539 | ; Newer version exists, but this version is required by java-plexus-component-metadata |
| 3540 | (version "2.0-M2") |
| 3541 | (source (origin |
| 3542 | (method url-fetch) |
| 3543 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox |
| 3544 | ;; Older releases at https://github.com/codehaus/qdox/ |
| 3545 | ;; Note: The release at maven is pre-generated. The release at |
| 3546 | ;; github requires jflex. |
| 3547 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3548 | "com/thoughtworks/qdox/qdox/" version |
| 3549 | "/qdox-" version "-sources.jar")) |
| 3550 | (sha256 |
| 3551 | (base32 |
| 3552 | "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x")))) |
| 3553 | (build-system ant-build-system) |
| 3554 | (arguments |
| 3555 | `(#:jar-name "qdox.jar" |
| 3556 | #:tests? #f; no tests |
| 3557 | #:modules |
| 3558 | ((guix build ant-build-system) |
| 3559 | (guix build java-utils) |
| 3560 | (guix build utils) |
| 3561 | (sxml simple)) |
| 3562 | #:phases |
| 3563 | (modify-phases %standard-phases |
| 3564 | (add-before 'install 'create-pom |
| 3565 | (lambda _ |
| 3566 | (with-output-to-file "pom.xml" |
| 3567 | (lambda _ |
| 3568 | (sxml->xml |
| 3569 | `((project |
| 3570 | (modelVersion "4.0.0") |
| 3571 | (name "QDox") |
| 3572 | (groupId "com.thoughtworks.qdox") |
| 3573 | (artifactId "qdox") |
| 3574 | (version ,,version)))))) |
| 3575 | #t)) |
| 3576 | (replace 'install |
| 3577 | (install-from-pom "pom.xml"))))) |
| 3578 | (home-page "https://github.com/codehaus/qdox") |
| 3579 | (synopsis "Parse definitions from Java source files") |
| 3580 | (description "QDox is a high speed, small footprint parser for extracting |
| 3581 | class/interface/method definitions from source files complete with JavaDoc |
| 3582 | @code{@@tags}. It is designed to be used by active code generators or |
| 3583 | documentation tools.") |
| 3584 | (license license:asl2.0))) |
| 3585 | |
| 3586 | (define-public java-qdox-2-M9 |
| 3587 | (package |
| 3588 | (inherit java-qdox) |
| 3589 | (version "2.0-M9"); required by plexus-java |
| 3590 | (source (origin |
| 3591 | (method url-fetch) |
| 3592 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox |
| 3593 | ;; Older releases at https://github.com/codehaus/qdox/ |
| 3594 | ;; Note: The release at maven is pre-generated. The release at |
| 3595 | ;; github requires jflex. |
| 3596 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3597 | "com/thoughtworks/qdox/qdox/" version |
| 3598 | "/qdox-" version "-sources.jar")) |
| 3599 | (sha256 |
| 3600 | (base32 |
| 3601 | "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))))) |
| 3602 | |
| 3603 | (define-public java-jarjar |
| 3604 | (package |
| 3605 | (name "java-jarjar") |
| 3606 | (version "1.4") |
| 3607 | (source (origin |
| 3608 | (method url-fetch) |
| 3609 | (uri (string-append |
| 3610 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" |
| 3611 | "code.google.com/jarjar/jarjar-src-" version ".zip")) |
| 3612 | (sha256 |
| 3613 | (base32 |
| 3614 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")) |
| 3615 | (modules '((guix build utils))) |
| 3616 | (snippet |
| 3617 | '(begin |
| 3618 | ;; Delete bundled thirds-party jar archives. |
| 3619 | (delete-file-recursively "lib") |
| 3620 | (delete-file "src/test/enumtest.jar") |
| 3621 | ;; the CLASSPATH needs this directory, create an empty one |
| 3622 | (mkdir-p "lib") |
| 3623 | #t)))) |
| 3624 | (build-system ant-build-system) |
| 3625 | (arguments |
| 3626 | `(;; Tests require junit, which ultimately depends on this package. |
| 3627 | #:tests? #f |
| 3628 | #:build-target "jar" |
| 3629 | #:phases |
| 3630 | (modify-phases %standard-phases |
| 3631 | (add-before 'build 'do-not-use-bundled-asm |
| 3632 | (lambda* (#:key inputs #:allow-other-keys) |
| 3633 | (substitute* "build.xml" |
| 3634 | (("<path id=\"path.build\">") |
| 3635 | (string-append "<path id=\"path.build\"><fileset dir=\"" |
| 3636 | (assoc-ref inputs "java-asm-bootstrap") |
| 3637 | "/lib/m2\" includes=\"**/*.jar\"/>")) |
| 3638 | (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "") |
| 3639 | (("lib/asm-commons-4.0.jar") |
| 3640 | (car (find-files (assoc-ref inputs "java-asm-bootstrap") |
| 3641 | "asm-6.0.jar"))) |
| 3642 | (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>") |
| 3643 | (string-append "<include name=\"org/objectweb/asm/" |
| 3644 | "commons/Remap*.class\"/>" |
| 3645 | "<include name=\"org/objectweb/asm/*.class\"/>" |
| 3646 | "<include name=\"org/objectweb/asm/" |
| 3647 | "signature/*.class\"/>" |
| 3648 | "<include name=\"org/objectweb/asm/" |
| 3649 | "commons/SignatureRemapper.class\"/>"))) |
| 3650 | #t)) |
| 3651 | (add-before 'build 'remove-maven-dependency |
| 3652 | (lambda _ |
| 3653 | ;; We do not need to build jarjar as a maven plugin just yet, so |
| 3654 | ;; remove this file. Maven requires jarjar (but not that plugin), |
| 3655 | ;; so removing it improves the bootstrap. |
| 3656 | (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java") |
| 3657 | #t)) |
| 3658 | (replace 'install |
| 3659 | (lambda* (#:key outputs #:allow-other-keys) |
| 3660 | (let ((target (string-append (assoc-ref outputs "out") |
| 3661 | "/share/java"))) |
| 3662 | (install-file (string-append "dist/jarjar-" ,version ".jar") |
| 3663 | target)) |
| 3664 | #t))))) |
| 3665 | (inputs |
| 3666 | `(("java-asm-bootstrap" ,java-asm-bootstrap))) |
| 3667 | (native-inputs |
| 3668 | `(("unzip" ,unzip))) |
| 3669 | (home-page "https://code.google.com/archive/p/jarjar/") |
| 3670 | (synopsis "Repackage Java libraries") |
| 3671 | (description |
| 3672 | "Jar Jar Links is a utility that makes it easy to repackage Java |
| 3673 | libraries and embed them into your own distribution. Jar Jar Links includes |
| 3674 | an Ant task that extends the built-in @code{jar} task.") |
| 3675 | (license license:asl2.0))) |
| 3676 | |
| 3677 | (define-public java-hamcrest-core |
| 3678 | (package |
| 3679 | (name "java-hamcrest-core") |
| 3680 | (version "1.3") |
| 3681 | (source (origin |
| 3682 | (method git-fetch) |
| 3683 | (uri (git-reference |
| 3684 | (url "https://github.com/hamcrest/JavaHamcrest/") |
| 3685 | (commit (string-append "hamcrest-java-" version)))) |
| 3686 | (file-name (git-file-name name version)) |
| 3687 | (sha256 |
| 3688 | (base32 |
| 3689 | "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63")) |
| 3690 | (modules '((guix build utils))) |
| 3691 | (snippet |
| 3692 | '(begin |
| 3693 | ;; Delete bundled thirds-party jar archives. |
| 3694 | (delete-file-recursively "lib") |
| 3695 | #t)))) |
| 3696 | (build-system ant-build-system) |
| 3697 | (arguments |
| 3698 | `(#:tests? #f ; Tests require junit |
| 3699 | #:modules ((guix build ant-build-system) |
| 3700 | (guix build java-utils) |
| 3701 | (guix build utils) |
| 3702 | (srfi srfi-1)) |
| 3703 | #:make-flags (list (string-append "-Dversion=" ,version)) |
| 3704 | #:test-target "unit-test" |
| 3705 | #:build-target "core" |
| 3706 | #:phases |
| 3707 | (modify-phases %standard-phases |
| 3708 | ;; Disable unit tests, because they require junit, which requires |
| 3709 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" |
| 3710 | ;; attribute from the manifest for reproducibility. |
| 3711 | (add-before 'configure 'patch-build.xml |
| 3712 | (lambda _ |
| 3713 | (substitute* "build.xml" |
| 3714 | (("unit-test, ") "") |
| 3715 | (("\\$\\{build.timestamp\\}") "guix")) |
| 3716 | #t)) |
| 3717 | ;; Java's "getMethods()" returns methods in an unpredictable order. |
| 3718 | ;; To make the output of the generated code deterministic we must |
| 3719 | ;; sort the array of methods. |
| 3720 | (add-after 'unpack 'make-method-order-deterministic |
| 3721 | (lambda _ |
| 3722 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" |
| 3723 | (("import java\\.util\\.Iterator;" line) |
| 3724 | (string-append line "\n" |
| 3725 | "import java.util.Arrays; import java.util.Comparator;")) |
| 3726 | (("allMethods = cls\\.getMethods\\(\\);" line) |
| 3727 | (string-append "_" line |
| 3728 | " |
| 3729 | private Method[] getSortedMethods() { |
| 3730 | Arrays.sort(_allMethods, new Comparator<Method>() { |
| 3731 | @Override |
| 3732 | public int compare(Method a, Method b) { |
| 3733 | return a.toString().compareTo(b.toString()); |
| 3734 | } |
| 3735 | }); |
| 3736 | return _allMethods; |
| 3737 | } |
| 3738 | |
| 3739 | private Method[] allMethods = getSortedMethods();"))) |
| 3740 | #t)) |
| 3741 | (add-before 'build 'do-not-use-bundled-qdox |
| 3742 | (lambda* (#:key inputs #:allow-other-keys) |
| 3743 | (substitute* "build.xml" |
| 3744 | (("lib/generator/qdox-1.12.jar") |
| 3745 | (string-append (assoc-ref inputs "java-qdox-1.12") |
| 3746 | "/share/java/qdox.jar"))) |
| 3747 | #t)) |
| 3748 | ;; build.xml searches for .jar files in this directoy, which |
| 3749 | ;; we remove from the source archive. |
| 3750 | (add-before 'build 'create-dummy-directories |
| 3751 | (lambda _ |
| 3752 | (mkdir-p "lib/integration") |
| 3753 | #t)) |
| 3754 | (add-before 'build 'create-pom |
| 3755 | (lambda _ |
| 3756 | (substitute* "pom/hamcrest-core.pom" |
| 3757 | (("@VERSION@") ,version)) |
| 3758 | #t)) |
| 3759 | (replace 'install |
| 3760 | (install-from-pom "pom/hamcrest-core.pom"))))) |
| 3761 | (native-inputs |
| 3762 | `(("java-qdox-1.12" ,java-qdox-1.12) |
| 3763 | ("java-jarjar" ,java-jarjar))) |
| 3764 | (propagated-inputs |
| 3765 | `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))) |
| 3766 | (home-page "http://hamcrest.org/") |
| 3767 | (synopsis "Library of matchers for building test expressions") |
| 3768 | (description |
| 3769 | "This package provides a library of matcher objects (also known as |
| 3770 | constraints or predicates) allowing @code{match} rules to be defined |
| 3771 | declaratively, to be used in other frameworks. Typical scenarios include |
| 3772 | testing frameworks, mocking libraries and UI validation rules.") |
| 3773 | (license license:bsd-2))) |
| 3774 | |
| 3775 | (define java-hamcrest-parent-pom |
| 3776 | (package |
| 3777 | (inherit java-hamcrest-core) |
| 3778 | (name "java-hamcrest-parent-pom") |
| 3779 | (propagated-inputs '()) |
| 3780 | (native-inputs '()) |
| 3781 | (arguments |
| 3782 | `(#:tests? #f |
| 3783 | #:phases |
| 3784 | (modify-phases %standard-phases |
| 3785 | (delete 'configure) |
| 3786 | (replace 'build |
| 3787 | (lambda _ |
| 3788 | (substitute* "pom/hamcrest-parent.pom" |
| 3789 | (("@VERSION@") ,(package-version java-hamcrest-core))) |
| 3790 | #t)) |
| 3791 | (replace 'install |
| 3792 | (install-pom-file "pom/hamcrest-parent.pom"))))))) |
| 3793 | |
| 3794 | (define-public java-hamcrest-library |
| 3795 | (package |
| 3796 | (inherit java-hamcrest-core) |
| 3797 | (name "java-hamcrest-library") |
| 3798 | (arguments |
| 3799 | (substitute-keyword-arguments (package-arguments java-hamcrest-core) |
| 3800 | ((#:build-target _) "library") |
| 3801 | ((#:phases phases) |
| 3802 | `(modify-phases ,phases |
| 3803 | (add-after 'unpack 'patch-classpath-for-integration |
| 3804 | (lambda* (#:key inputs #:allow-other-keys) |
| 3805 | (substitute* "build.xml" |
| 3806 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") |
| 3807 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 3808 | "jar$")))) |
| 3809 | #t)) |
| 3810 | (replace 'create-pom |
| 3811 | (lambda _ |
| 3812 | (substitute* "pom/hamcrest-library.pom" |
| 3813 | (("@VERSION@") ,(package-version java-hamcrest-core))) |
| 3814 | #t)) |
| 3815 | (replace 'install |
| 3816 | (install-from-pom "pom/hamcrest-library.pom")))))) |
| 3817 | (propagated-inputs |
| 3818 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 3819 | ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom))))) |
| 3820 | |
| 3821 | (define-public java-junit |
| 3822 | (package |
| 3823 | (name "java-junit") |
| 3824 | (version "4.12") |
| 3825 | (source (origin |
| 3826 | (method git-fetch) |
| 3827 | (uri (git-reference |
| 3828 | (url "https://github.com/junit-team/junit/") |
| 3829 | (commit (string-append "r" version)))) |
| 3830 | (file-name (git-file-name name version)) |
| 3831 | (sha256 |
| 3832 | (base32 |
| 3833 | "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h")) |
| 3834 | (modules '((guix build utils))) |
| 3835 | (snippet |
| 3836 | '(begin |
| 3837 | ;; Delete bundled jar archives. |
| 3838 | (delete-file-recursively "lib") |
| 3839 | #t)))) |
| 3840 | (build-system ant-build-system) |
| 3841 | (arguments |
| 3842 | `(#:jar-name "junit.jar" |
| 3843 | #:source-dir "src/main/java" |
| 3844 | #:test-dir "src/test" |
| 3845 | #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java" |
| 3846 | "**/RuleChainTest.java" "**/TestWatchmanTest.java") |
| 3847 | #:phases |
| 3848 | (modify-phases %standard-phases |
| 3849 | (add-before 'check 'copy-test-resources |
| 3850 | (lambda _ |
| 3851 | (copy-recursively "src/test/resources" "build/test-classes") |
| 3852 | #t)) |
| 3853 | (replace 'install |
| 3854 | (install-from-pom "pom.xml"))))) |
| 3855 | (propagated-inputs |
| 3856 | `(("java-hamcrest-core" ,java-hamcrest-core))) |
| 3857 | (native-inputs |
| 3858 | `(("java-hamcrest-library" ,java-hamcrest-library))) |
| 3859 | (home-page "https://junit.org/junit4/") |
| 3860 | (synopsis "Test framework for Java") |
| 3861 | (description |
| 3862 | "JUnit is a simple framework to write repeatable tests for Java projects. |
| 3863 | JUnit provides assertions for testing expected results, test fixtures for |
| 3864 | sharing common test data, and test runners for running tests.") |
| 3865 | (license license:epl1.0))) |
| 3866 | |
| 3867 | (define-public java-junitparams |
| 3868 | (package |
| 3869 | (name "java-junitparams") |
| 3870 | (version "1.1.1") |
| 3871 | (source (origin |
| 3872 | (method git-fetch) |
| 3873 | (uri (git-reference |
| 3874 | (url "https://github.com/Pragmatists/JUnitParams") |
| 3875 | (commit (string-append "JUnitParams-" version)))) |
| 3876 | (file-name (git-file-name name version)) |
| 3877 | (sha256 |
| 3878 | (base32 |
| 3879 | "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b")))) |
| 3880 | (build-system ant-build-system) |
| 3881 | (arguments |
| 3882 | `(#:jar-name "junitparams.jar" |
| 3883 | #:source-dir "src/main/java" |
| 3884 | #:test-dir "src/test" |
| 3885 | #:test-exclude (list "**/SuperclassTest.java"))) |
| 3886 | (inputs |
| 3887 | `(("java-junit" ,java-junit))) |
| 3888 | (native-inputs |
| 3889 | `(("java-junit" ,java-junit) |
| 3890 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 3891 | ("java-assertj" ,java-assertj))) |
| 3892 | (home-page "https://github.com/Pragmatists/JUnitParams") |
| 3893 | (synopsis "Parameterised test support for JUnit") |
| 3894 | (description "The JUnitParams project adds a new runner to JUnit and |
| 3895 | provides much easier and readable parametrised tests for JUnit.") |
| 3896 | (license license:asl2.0))) |
| 3897 | |
| 3898 | (define-public java-plexus-utils |
| 3899 | (package |
| 3900 | (name "java-plexus-utils") |
| 3901 | ;; sisu-build-api needs this version, later versions don't work |
| 3902 | (version "3.2.1") |
| 3903 | (source (origin |
| 3904 | (method git-fetch) |
| 3905 | (uri (git-reference |
| 3906 | (url "https://github.com/codehaus-plexus/plexus-utils") |
| 3907 | (commit (string-append "plexus-utils-" version)))) |
| 3908 | (file-name (git-file-name name version)) |
| 3909 | (sha256 |
| 3910 | (base32 |
| 3911 | "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))) |
| 3912 | (build-system ant-build-system) |
| 3913 | ;; FIXME: The default build.xml does not include a target to install |
| 3914 | ;; javadoc files. |
| 3915 | (arguments |
| 3916 | `(#:jar-name "plexus-utils.jar" |
| 3917 | #:source-dir "src/main" |
| 3918 | #:phases |
| 3919 | (modify-phases %standard-phases |
| 3920 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr |
| 3921 | (lambda _ |
| 3922 | (substitute* "src/main/java/org/codehaus/plexus/util/\ |
| 3923 | cli/shell/BourneShell.java" |
| 3924 | (("/bin/sh") (which "sh")) |
| 3925 | (("/usr/") (getcwd))) |
| 3926 | #t)) |
| 3927 | (add-after 'unpack 'fix-or-disable-broken-tests |
| 3928 | (lambda _ |
| 3929 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" |
| 3930 | (substitute* '("cli/CommandlineTest.java" |
| 3931 | "cli/shell/BourneShellTest.java") |
| 3932 | (("/bin/sh") (which "sh")) |
| 3933 | (("/bin/echo") (which "echo"))) |
| 3934 | |
| 3935 | ;; This test depends on MavenProjectStub, but we don't have |
| 3936 | ;; a package for Maven. |
| 3937 | (delete-file "introspection/ReflectionValueExtractorTest.java") |
| 3938 | |
| 3939 | ;; FIXME: The command line tests fail, maybe because they use |
| 3940 | ;; absolute paths. |
| 3941 | (delete-file "cli/CommandlineTest.java") |
| 3942 | |
| 3943 | ;; These tests require openjdk jmh, which is not packaged yet |
| 3944 | (for-each delete-file (find-files "." "PerfTest.java$"))) |
| 3945 | #t)) |
| 3946 | (add-before 'build 'copy-resources |
| 3947 | (lambda _ |
| 3948 | (copy-recursively "src/main/resources" "build/classes") |
| 3949 | #t)) |
| 3950 | (replace 'install (install-from-pom "pom.xml"))))) |
| 3951 | (native-inputs |
| 3952 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 3953 | ("java-junit" ,java-junit))) |
| 3954 | (propagated-inputs |
| 3955 | `(("plexus-parent-pom" ,plexus-parent-pom-5.1))) |
| 3956 | (home-page "https://codehaus-plexus.github.io/plexus-utils/") |
| 3957 | (synopsis "Common utilities for the Plexus framework") |
| 3958 | (description "This package provides various Java utility classes for the |
| 3959 | Plexus framework to ease working with strings, files, command lines, XML and |
| 3960 | more.") |
| 3961 | (license license:asl2.0))) |
| 3962 | |
| 3963 | (define-public java-plexus-utils-3.3.0 |
| 3964 | (package |
| 3965 | (inherit java-plexus-utils) |
| 3966 | (version "3.3.0") |
| 3967 | (source (origin |
| 3968 | (method git-fetch) |
| 3969 | (uri (git-reference |
| 3970 | (url "https://github.com/codehaus-plexus/plexus-utils") |
| 3971 | (commit (string-append "plexus-utils-" version)))) |
| 3972 | (file-name (git-file-name "java-plexus-utils" version)) |
| 3973 | (sha256 |
| 3974 | (base32 |
| 3975 | "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g")))))) |
| 3976 | |
| 3977 | (define-public java-plexus-interpolation |
| 3978 | (package |
| 3979 | (name "java-plexus-interpolation") |
| 3980 | (version "1.26") |
| 3981 | (source (origin |
| 3982 | (method git-fetch) |
| 3983 | (uri (git-reference |
| 3984 | (url "https://github.com/codehaus-plexus/plexus-interpolation") |
| 3985 | (commit (string-append "plexus-interpolation-" version)))) |
| 3986 | (file-name (git-file-name name version)) |
| 3987 | (sha256 |
| 3988 | (base32 |
| 3989 | "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh")))) |
| 3990 | (build-system ant-build-system) |
| 3991 | (arguments |
| 3992 | `(#:jar-name "plexus-interpolation.jar" |
| 3993 | #:source-dir "src/main" |
| 3994 | #:phases |
| 3995 | (modify-phases %standard-phases |
| 3996 | (replace 'install (install-from-pom "pom.xml"))))) |
| 3997 | (propagated-inputs |
| 3998 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) |
| 3999 | (native-inputs |
| 4000 | `(("java-junit" ,java-junit) |
| 4001 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 4002 | (home-page "https://codehaus-plexus.github.io/plexus-interpolation/") |
| 4003 | (synopsis "Java components for interpolating ${} strings and the like") |
| 4004 | (description "Plexus interpolator is a modular, flexible interpolation |
| 4005 | framework for the expression language style commonly seen in Maven, Plexus, |
| 4006 | and other related projects. |
| 4007 | |
| 4008 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} |
| 4009 | package within @code{plexus-utils}, but has been separated in order to allow |
| 4010 | these two libraries to vary independently of one another.") |
| 4011 | (license license:asl2.0))) |
| 4012 | |
| 4013 | (define-public java-plexus-classworlds |
| 4014 | (package |
| 4015 | (name "java-plexus-classworlds") |
| 4016 | (version "2.6.0") |
| 4017 | (source (origin |
| 4018 | (method git-fetch) |
| 4019 | (uri (git-reference |
| 4020 | (url "https://github.com/codehaus-plexus/plexus-classworlds") |
| 4021 | (commit (string-append "plexus-classworlds-" version)))) |
| 4022 | (file-name (git-file-name name version)) |
| 4023 | (sha256 |
| 4024 | (base32 |
| 4025 | "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s")))) |
| 4026 | (build-system ant-build-system) |
| 4027 | (arguments |
| 4028 | `(#:jar-name "plexus-classworlds.jar" |
| 4029 | #:source-dir "src/main" |
| 4030 | #:tests? #f;; FIXME: we need to generate some resources as in pom.xml |
| 4031 | #:phases |
| 4032 | (modify-phases %standard-phases |
| 4033 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4034 | (propagated-inputs |
| 4035 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) |
| 4036 | (native-inputs |
| 4037 | `(("java-junit" ,java-junit))) |
| 4038 | (home-page "https://codehaus-plexus.github.io/plexus-classworlds/") |
| 4039 | (synopsis "Java class loader framework") |
| 4040 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
| 4041 | mechanism of Java. It is especially useful for dynamic loading of application |
| 4042 | components.") |
| 4043 | (license license:asl2.0))) |
| 4044 | |
| 4045 | (define java-plexus-container-default-bootstrap |
| 4046 | (package |
| 4047 | (name "java-plexus-container-default-bootstrap") |
| 4048 | (version "1.7.1") |
| 4049 | (source (origin |
| 4050 | (method git-fetch) |
| 4051 | (uri (git-reference |
| 4052 | (url "https://github.com/codehaus-plexus/plexus-containers") |
| 4053 | (commit (string-append "plexus-containers-" version)))) |
| 4054 | (file-name (git-file-name name version)) |
| 4055 | (sha256 |
| 4056 | (base32 |
| 4057 | "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228")))) |
| 4058 | (build-system ant-build-system) |
| 4059 | (arguments |
| 4060 | `(#:jar-name "container-default.jar" |
| 4061 | #:source-dir "plexus-container-default/src/main/java" |
| 4062 | #:test-dir "plexus-container-default/src/test" |
| 4063 | #:tests? #f; requires plexus-archiver, which depends on this package |
| 4064 | #:phases |
| 4065 | (modify-phases %standard-phases |
| 4066 | (add-before 'build 'fix-google-collections |
| 4067 | (lambda _ |
| 4068 | ;; Google collections are now replaced with guava |
| 4069 | (substitute* "plexus-container-default/pom.xml" |
| 4070 | (("google-collections") "guava") |
| 4071 | (("com.google.collections") "com.google.guava")) |
| 4072 | #t)) |
| 4073 | (add-before 'build 'copy-resources |
| 4074 | (lambda _ |
| 4075 | (copy-recursively |
| 4076 | "plexus-container-default/src/main/resources/" |
| 4077 | "build/classes") |
| 4078 | #t)) |
| 4079 | (replace 'install |
| 4080 | (install-from-pom "plexus-container-default/pom.xml"))))) |
| 4081 | (propagated-inputs |
| 4082 | `(("java-plexus-worldclass" ,java-plexus-classworlds) |
| 4083 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
| 4084 | ("java-plexus-utils" ,java-plexus-utils) |
| 4085 | ("java-junit" ,java-junit) |
| 4086 | ("java-guava" ,java-guava) |
| 4087 | ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) |
| 4088 | (home-page "https://github.com/codehaus-plexus/plexus-containers") |
| 4089 | (synopsis "Inversion-of-control container") |
| 4090 | (description "Plexus-default-container is Plexus' inversion-of-control |
| 4091 | (@dfn{IoC}) container. It is composed of its public API and its default |
| 4092 | implementation.") |
| 4093 | (license license:asl2.0))) |
| 4094 | |
| 4095 | (define java-plexus-containers-parent-pom |
| 4096 | (package |
| 4097 | (inherit java-plexus-container-default-bootstrap) |
| 4098 | (name "java-plexus-containers-parent-pom") |
| 4099 | (arguments |
| 4100 | `(#:tests? #f |
| 4101 | #:phases |
| 4102 | (modify-phases %standard-phases |
| 4103 | (delete 'configure) |
| 4104 | (delete 'build) |
| 4105 | (replace 'install |
| 4106 | (install-pom-file "pom.xml"))))) |
| 4107 | (propagated-inputs |
| 4108 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) |
| 4109 | |
| 4110 | (define-public java-plexus-io |
| 4111 | (package |
| 4112 | (name "java-plexus-io") |
| 4113 | (version "3.2.0") |
| 4114 | (source (origin |
| 4115 | (method git-fetch) |
| 4116 | (uri (git-reference |
| 4117 | (url "https://github.com/codehaus-plexus/plexus-io") |
| 4118 | (commit (string-append "plexus-io-" version)))) |
| 4119 | (file-name (git-file-name name version)) |
| 4120 | (sha256 |
| 4121 | (base32 |
| 4122 | "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr")))) |
| 4123 | (build-system ant-build-system) |
| 4124 | (arguments |
| 4125 | `(#:jar-name "plexus-io.jar" |
| 4126 | #:source-dir "src/main/java" |
| 4127 | #:test-dir "src/test" |
| 4128 | #:phases |
| 4129 | (modify-phases %standard-phases |
| 4130 | (add-before 'build 'copy-resources |
| 4131 | (lambda _ |
| 4132 | (mkdir-p "build/classes") |
| 4133 | (copy-recursively "src/main/resources" "build/classes") |
| 4134 | (mkdir-p "build/test-classes") |
| 4135 | (copy-recursively "src/test/resources" "build/test-classes") |
| 4136 | #t)) |
| 4137 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4138 | (propagated-inputs |
| 4139 | `(("java-plexus-utils" ,java-plexus-utils-3.3.0) |
| 4140 | ("java-commons-io" ,java-commons-io) |
| 4141 | ("plexus-parent-pom" ,plexus-parent-pom-5.1))) |
| 4142 | (inputs |
| 4143 | `(("java-jsr305" ,java-jsr305))) |
| 4144 | (native-inputs |
| 4145 | `(("junit" ,java-junit) |
| 4146 | ("hamcrest" ,java-hamcrest-core) |
| 4147 | ("guava" ,java-guava) |
| 4148 | ("classworlds" ,java-plexus-classworlds) |
| 4149 | ("xbean" ,java-geronimo-xbean-reflect) |
| 4150 | ("container-default" ,java-plexus-container-default-bootstrap))) |
| 4151 | (home-page "https://github.com/codehaus-plexus/plexus-io") |
| 4152 | (synopsis "I/O plexus components") |
| 4153 | (description "Plexus IO is a set of plexus components, which are designed |
| 4154 | for use in I/O operations. This implementation using plexus components allows |
| 4155 | reusing it in maven.") |
| 4156 | (license license:asl2.0))) |
| 4157 | |
| 4158 | (define-public java-plexus-archiver |
| 4159 | (package |
| 4160 | (name "java-plexus-archiver") |
| 4161 | (version "4.2.2") |
| 4162 | (source (origin |
| 4163 | (method url-fetch) |
| 4164 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" |
| 4165 | "/archive/plexus-archiver-" version ".tar.gz")) |
| 4166 | (sha256 |
| 4167 | (base32 |
| 4168 | "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys")))) |
| 4169 | (build-system ant-build-system) |
| 4170 | (arguments |
| 4171 | `(#:jar-name "plexus-archiver.jar" |
| 4172 | #:source-dir "src/main/java" |
| 4173 | #:test-dir "src/test" |
| 4174 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") |
| 4175 | #:phases |
| 4176 | (modify-phases %standard-phases |
| 4177 | (add-before 'check 'remove-failing |
| 4178 | (lambda _ |
| 4179 | ;; Requires an older version of plexus container |
| 4180 | (delete-file |
| 4181 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java") |
| 4182 | #t)) |
| 4183 | (add-before 'check 'fix-test-building |
| 4184 | (lambda _ |
| 4185 | (substitute* "build.xml" |
| 4186 | (("srcdir=\"src/test\"") "srcdir=\"src/test/java\"")) |
| 4187 | #t)) |
| 4188 | (add-before 'build 'copy-resources |
| 4189 | (lambda _ |
| 4190 | (mkdir-p "build/classes") |
| 4191 | (copy-recursively "src/main/resources" "build/classes") |
| 4192 | (mkdir-p "build/test-classes") |
| 4193 | (copy-recursively "src/test/resources" "build/test-classes") |
| 4194 | #t)) |
| 4195 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4196 | (propagated-inputs |
| 4197 | `(("java-plexus-utils" ,java-plexus-utils-3.3.0) |
| 4198 | ("java-plexus-io" ,java-plexus-io) |
| 4199 | ("java-iq80-snappy" ,java-iq80-snappy) |
| 4200 | ("java-commons-compress" ,java-commons-compress) |
| 4201 | ("plexus-parent-pom" ,plexus-parent-pom-6.1))) |
| 4202 | (inputs |
| 4203 | `(("java-jsr305" ,java-jsr305) |
| 4204 | ("java-plexus-container-default" |
| 4205 | ,java-plexus-container-default-bootstrap))) |
| 4206 | (native-inputs |
| 4207 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 4208 | ("junit" ,java-junit) |
| 4209 | ("classworld" ,java-plexus-classworlds) |
| 4210 | ("xbean" ,java-geronimo-xbean-reflect) |
| 4211 | ("xz" ,java-xz) |
| 4212 | ("guava" ,java-guava))) |
| 4213 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") |
| 4214 | (synopsis "Archiver component of the Plexus project") |
| 4215 | (description "Plexus-archiver contains a component to deal with project |
| 4216 | archives (jar).") |
| 4217 | (license license:asl2.0))) |
| 4218 | |
| 4219 | (define-public java-plexus-container-default |
| 4220 | (package |
| 4221 | (inherit java-plexus-container-default-bootstrap) |
| 4222 | (name "java-plexus-container-default") |
| 4223 | (arguments |
| 4224 | `(#:jar-name "container-default.jar" |
| 4225 | #:source-dir "plexus-container-default/src/main/java" |
| 4226 | #:test-dir "plexus-container-default/src/test" |
| 4227 | #:test-exclude (list ;"**/*Test.java" |
| 4228 | "**/Abstract*.java" |
| 4229 | ;; Requires plexus-hierarchy |
| 4230 | "**/PlexusHierarchyTest.java" |
| 4231 | ;; Failures |
| 4232 | "**/ComponentRealmCompositionTest.java" |
| 4233 | "**/PlexusContainerTest.java") |
| 4234 | #:phases |
| 4235 | (modify-phases %standard-phases |
| 4236 | (add-before 'build 'fix-google-collections |
| 4237 | (lambda _ |
| 4238 | ;; Google collections are now replaced with guava |
| 4239 | (substitute* "plexus-container-default/pom.xml" |
| 4240 | (("google-collections") "guava") |
| 4241 | (("com.google.collections") "com.google.guava")) |
| 4242 | #t)) |
| 4243 | (add-before 'build 'copy-resources |
| 4244 | (lambda _ |
| 4245 | (copy-recursively |
| 4246 | "plexus-container-default/src/main/resources/" |
| 4247 | "build/classes") |
| 4248 | #t)) |
| 4249 | (add-before 'check 'fix-paths |
| 4250 | (lambda _ |
| 4251 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) |
| 4252 | (substitute* |
| 4253 | (string-append |
| 4254 | dir "/plexus/component/composition/" |
| 4255 | "ComponentRealmCompositionTest.java") |
| 4256 | (("src/test") "plexus-container-default/src/test")) |
| 4257 | #t))) |
| 4258 | (replace 'install |
| 4259 | (install-from-pom "plexus-container-default/pom.xml"))))) |
| 4260 | (inputs |
| 4261 | `(("worldclass" ,java-plexus-classworlds) |
| 4262 | ("xbean" ,java-geronimo-xbean-reflect) |
| 4263 | ("utils" ,java-plexus-utils) |
| 4264 | ("junit" ,java-junit) |
| 4265 | ("guava" ,java-guava))) |
| 4266 | (native-inputs |
| 4267 | `(("archiver" ,java-plexus-archiver) |
| 4268 | ("hamcrest" ,java-hamcrest-core))))) |
| 4269 | |
| 4270 | (define-public java-plexus-component-annotations |
| 4271 | (package |
| 4272 | (inherit java-plexus-container-default) |
| 4273 | (name "java-plexus-component-annotations") |
| 4274 | (arguments |
| 4275 | `(#:jar-name "plexus-component-annotations.jar" |
| 4276 | #:source-dir "plexus-component-annotations/src/main/java" |
| 4277 | #:tests? #f; no tests |
| 4278 | #:phases |
| 4279 | (modify-phases %standard-phases |
| 4280 | (replace 'install |
| 4281 | (install-from-pom "plexus-component-annotations/pom.xml"))))) |
| 4282 | (propagated-inputs |
| 4283 | `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) |
| 4284 | (inputs '()) |
| 4285 | (native-inputs '()) |
| 4286 | (synopsis "Plexus descriptors generator") |
| 4287 | (description "This package is a Maven plugin to generate Plexus descriptors |
| 4288 | from source tags and class annotations."))) |
| 4289 | |
| 4290 | (define-public java-plexus-component-metadata |
| 4291 | (package |
| 4292 | (inherit java-plexus-container-default) |
| 4293 | (name "java-plexus-component-metadata") |
| 4294 | (arguments |
| 4295 | `(#:jar-name "plexus-component-metadata.jar" |
| 4296 | #:source-dir "src/main/java" |
| 4297 | #:test-dir "src/test" |
| 4298 | #:jdk ,icedtea-8 |
| 4299 | #:phases |
| 4300 | (modify-phases %standard-phases |
| 4301 | (add-before 'configure 'chdir |
| 4302 | (lambda _ |
| 4303 | (chdir "plexus-component-metadata") |
| 4304 | #t)) |
| 4305 | (add-before 'build 'copy-resources |
| 4306 | (lambda _ |
| 4307 | (copy-recursively "src/main/resources" |
| 4308 | "build/classes/") |
| 4309 | #t))))) |
| 4310 | (propagated-inputs |
| 4311 | `(("java-plexus-container-default" ,java-plexus-container-default) |
| 4312 | ("java-plexu-component-annotations" ,java-plexus-component-annotations) |
| 4313 | ("java-plexus-utils" ,java-plexus-utils) |
| 4314 | ("java-plexus-cli" ,java-plexus-cli) |
| 4315 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
| 4316 | ("maven-plugin-api" ,maven-plugin-api) |
| 4317 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
| 4318 | ("maven-core-bootstrap" ,maven-core-bootstrap) |
| 4319 | ("maven-model" ,maven-model) |
| 4320 | ("java-commons-cli" ,java-commons-cli) |
| 4321 | ("java-qdox" ,java-qdox) |
| 4322 | ("java-jdom2" ,java-jdom2) |
| 4323 | ("java-asm" ,java-asm))) |
| 4324 | (native-inputs |
| 4325 | `(("java-junit" ,java-junit) |
| 4326 | ("java-guava" ,java-guava) |
| 4327 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect))) |
| 4328 | (synopsis "Inversion-of-control container for Maven") |
| 4329 | (description "The Plexus project provides a full software stack for creating |
| 4330 | and executing software projects. Based on the Plexus container, the |
| 4331 | applications can utilise component-oriented programming to build modular, |
| 4332 | reusable components that can easily be assembled and reused. This package |
| 4333 | provides the Maven plugin generating the component metadata."))) |
| 4334 | |
| 4335 | (define-public java-plexus-cipher |
| 4336 | (package |
| 4337 | (name "java-plexus-cipher") |
| 4338 | (version "1.7") |
| 4339 | (source (origin |
| 4340 | (method git-fetch) |
| 4341 | (uri (git-reference |
| 4342 | (url "https://github.com/codehaus-plexus/plexus-cipher") |
| 4343 | (commit (string-append "plexus-cipher-" version)))) |
| 4344 | (file-name (git-file-name name version)) |
| 4345 | (sha256 |
| 4346 | (base32 |
| 4347 | "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0")))) |
| 4348 | (build-system ant-build-system) |
| 4349 | (arguments |
| 4350 | `(#:jar-name "plexus-cipher.jar" |
| 4351 | #:source-dir "src/main/java" |
| 4352 | #:tests? #f; FIXME: requires sisu-inject-bean |
| 4353 | #:phases |
| 4354 | (modify-phases %standard-phases |
| 4355 | (add-before 'build 'copy-resources |
| 4356 | (lambda _ |
| 4357 | (copy-recursively "src/main/resources" "build/classes") |
| 4358 | (mkdir-p "build/classes/META-INF/sisu") |
| 4359 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 4360 | (lambda _ |
| 4361 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) |
| 4362 | #t)) |
| 4363 | (add-before 'install 'fix-test-dependency |
| 4364 | (lambda _ |
| 4365 | ;; sisu-inject-bean is only used for tests, but its scope is "provided". |
| 4366 | (substitute* "pom.xml" |
| 4367 | (("provided") "test")) |
| 4368 | #t)) |
| 4369 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4370 | (inputs |
| 4371 | `(("java-cdi-api" ,java-cdi-api) |
| 4372 | ("java-javax-inject" ,java-javax-inject))) |
| 4373 | (propagated-inputs |
| 4374 | `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15))) |
| 4375 | (native-inputs |
| 4376 | `(("java-junit" ,java-junit))) |
| 4377 | (home-page "https://github.com/sonatype/plexus-cipher") |
| 4378 | (synopsis "Encryption/decryption Component") |
| 4379 | (description "Plexus-cipher contains a component to deal with encryption |
| 4380 | and decryption.") |
| 4381 | (license license:asl2.0))) |
| 4382 | |
| 4383 | (define-public java-plexus-java |
| 4384 | (package |
| 4385 | (name "java-plexus-java") |
| 4386 | (version "0.9.10") |
| 4387 | (source (origin |
| 4388 | (method git-fetch) |
| 4389 | (uri (git-reference |
| 4390 | (url "https://github.com/codehaus-plexus/plexus-languages") |
| 4391 | (commit (string-append "plexus-languages-" version)))) |
| 4392 | (file-name (git-file-name name version)) |
| 4393 | (sha256 |
| 4394 | (base32 |
| 4395 | "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5")) |
| 4396 | (modules '((guix build utils))) |
| 4397 | (snippet |
| 4398 | `(begin |
| 4399 | (for-each delete-file (find-files "." ".*.jar$")) |
| 4400 | #t)))) |
| 4401 | (build-system ant-build-system) |
| 4402 | (arguments |
| 4403 | `(#:jar-name "plexus-java.java" |
| 4404 | #:source-dir "plexus-java/src/main/java" |
| 4405 | #:test-dir "plexus-java/src/test" |
| 4406 | #:tests? #f; require mockito 2 |
| 4407 | #:phases |
| 4408 | (modify-phases %standard-phases |
| 4409 | (add-after 'build 'generate-metadata |
| 4410 | (lambda _ |
| 4411 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
| 4412 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
| 4413 | "--source" "plexus-java/src/main/java" |
| 4414 | "--output" "build/classes/META-INF/plexus/components.xml" |
| 4415 | "--classes" "build/classes" |
| 4416 | "--descriptors" "build/classes/META-INF") |
| 4417 | (invoke "ant" "jar") |
| 4418 | #t)) |
| 4419 | (add-before 'install 'install-parent |
| 4420 | (install-pom-file "pom.xml")) |
| 4421 | (replace 'install |
| 4422 | (install-from-pom "plexus-java/pom.xml"))))) |
| 4423 | (propagated-inputs |
| 4424 | `(("java-asm" ,java-asm) |
| 4425 | ("java-qdox" ,java-qdox-2-M9) |
| 4426 | ("java-javax-inject" ,java-javax-inject) |
| 4427 | ("plexus-parent-pom" ,plexus-parent-pom-4.0))) |
| 4428 | (inputs |
| 4429 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations))) |
| 4430 | (native-inputs |
| 4431 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) |
| 4432 | ("java-junit" ,java-junit))) |
| 4433 | (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java") |
| 4434 | (synopsis "Shared language features for Java") |
| 4435 | (description "This package contains shared language features of the Java |
| 4436 | language, for the plexus project.") |
| 4437 | (license license:asl2.0))) |
| 4438 | |
| 4439 | (define-public java-plexus-compiler-api |
| 4440 | (package |
| 4441 | (name "java-plexus-compiler-api") |
| 4442 | (version "2.8.4") |
| 4443 | (source (origin |
| 4444 | (method git-fetch) |
| 4445 | (uri (git-reference |
| 4446 | (url "https://github.com/codehaus-plexus/plexus-compiler") |
| 4447 | (commit (string-append "plexus-compiler-" version)))) |
| 4448 | (file-name (git-file-name name version)) |
| 4449 | (sha256 |
| 4450 | (base32 |
| 4451 | "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk")))) |
| 4452 | (build-system ant-build-system) |
| 4453 | (arguments |
| 4454 | `(#:jar-name "plexus-compiler-api.jar" |
| 4455 | #:source-dir "plexus-compiler-api/src/main/java" |
| 4456 | #:test-dir "plexus-compiler-api/src/test" |
| 4457 | #:phases |
| 4458 | (modify-phases %standard-phases |
| 4459 | (replace 'install |
| 4460 | (install-from-pom "plexus-compiler-api/pom.xml"))))) |
| 4461 | (propagated-inputs |
| 4462 | `(("java-plexus-container-default" ,java-plexus-container-default) |
| 4463 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) |
| 4464 | ("java-plexus-util" ,java-plexus-utils))) |
| 4465 | (native-inputs |
| 4466 | `(("java-junit" ,java-junit))) |
| 4467 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") |
| 4468 | (synopsis "Plexus Compilers component's API to manipulate compilers") |
| 4469 | (description "This package contains the API used by components to manipulate |
| 4470 | compilers.") |
| 4471 | (license (list license:asl2.0 |
| 4472 | license:expat)))) |
| 4473 | |
| 4474 | (define java-plexus-compiler-pom |
| 4475 | (package |
| 4476 | (inherit java-plexus-compiler-api) |
| 4477 | (name "java-plexus-compiler-pom") |
| 4478 | (arguments |
| 4479 | `(#:tests? #f |
| 4480 | #:phases |
| 4481 | (modify-phases %standard-phases |
| 4482 | (delete 'configure) |
| 4483 | (delete 'build) |
| 4484 | (replace 'install |
| 4485 | (install-pom-file "pom.xml")) |
| 4486 | (add-after 'install 'install-compilers |
| 4487 | (install-pom-file "plexus-compilers/pom.xml"))))) |
| 4488 | (propagated-inputs |
| 4489 | `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0))))) |
| 4490 | |
| 4491 | (define plexus-components-parent-pom-4.0 |
| 4492 | (package |
| 4493 | (name "plexus-components-parent-pom") |
| 4494 | (version "4.0") |
| 4495 | (source (origin |
| 4496 | (method git-fetch) |
| 4497 | (uri (git-reference |
| 4498 | (url "https://github.com/codehaus-plexus/plexus-components") |
| 4499 | (commit (string-append "plexus-components-" version)))) |
| 4500 | (file-name (git-file-name name version)) |
| 4501 | (sha256 |
| 4502 | (base32 |
| 4503 | "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi")))) |
| 4504 | (build-system ant-build-system) |
| 4505 | (arguments |
| 4506 | `(#:tests? #f |
| 4507 | #:phases |
| 4508 | (modify-phases %standard-phases |
| 4509 | (delete 'configure) |
| 4510 | (delete 'build) |
| 4511 | (replace 'install |
| 4512 | (install-pom-file "pom.xml"))))) |
| 4513 | (propagated-inputs |
| 4514 | `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0))) |
| 4515 | (home-page "https://codehaus-plexus.github.io/plexus-components") |
| 4516 | (synopsis "Plexus parent pom") |
| 4517 | (description "This package contains the Plexus components parent POM.") |
| 4518 | (license license:asl2.0))) |
| 4519 | |
| 4520 | (define-public java-plexus-compiler-manager |
| 4521 | (package |
| 4522 | (inherit java-plexus-compiler-api) |
| 4523 | (name "java-plexus-compiler-manager") |
| 4524 | (arguments |
| 4525 | `(#:jar-name "compiler-compiler-manager.java" |
| 4526 | #:source-dir "plexus-compiler-manager/src/main/java" |
| 4527 | #:test-dir "plexus-compiler-manager/src/test" |
| 4528 | #:tests? #f |
| 4529 | #:phases |
| 4530 | (modify-phases %standard-phases |
| 4531 | (add-after 'build 'generate-metadata |
| 4532 | (lambda _ |
| 4533 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
| 4534 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
| 4535 | "--source" "plexus-compiler-manager/src/main/java" |
| 4536 | "--output" "build/classes/META-INF/plexus/components.xml" |
| 4537 | "--classes" "build/classes" |
| 4538 | "--descriptors" "build/classes/META-INF") |
| 4539 | (invoke "ant" "jar") |
| 4540 | #t)) |
| 4541 | (add-after 'generate-metadata 'rebuild |
| 4542 | (lambda _ |
| 4543 | (invoke "ant" "jar") |
| 4544 | #t)) |
| 4545 | (replace 'install |
| 4546 | (install-from-pom "plexus-compiler-manager/pom.xml"))))) |
| 4547 | (propagated-inputs |
| 4548 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) |
| 4549 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) |
| 4550 | ("java-plexus-container-default" ,java-plexus-container-default))) |
| 4551 | (native-inputs |
| 4552 | `(("unzip" ,unzip) |
| 4553 | ("java-plexus-component-metadata" ,java-plexus-component-metadata))) |
| 4554 | (synopsis "Compiler management for Plexus Compiler component") |
| 4555 | (description "Plexus Compiler is a Plexus component to use different |
| 4556 | compilers through a uniform API. This component chooses the compiler |
| 4557 | implementation to use in a project."))) |
| 4558 | |
| 4559 | (define-public java-plexus-compiler-javac |
| 4560 | (package |
| 4561 | (inherit java-plexus-compiler-api) |
| 4562 | (name "java-plexus-compiler-javac") |
| 4563 | (arguments |
| 4564 | `(#:jar-name "plexus-compiler-javac.jar" |
| 4565 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" |
| 4566 | #:jdk ,icedtea-8 |
| 4567 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. |
| 4568 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test" |
| 4569 | #:modules ((guix build ant-build-system) |
| 4570 | (guix build utils) |
| 4571 | (guix build java-utils) |
| 4572 | (sxml simple)) |
| 4573 | #:phases |
| 4574 | (modify-phases %standard-phases |
| 4575 | ;; We cannot use java-plexus-component-metadata to generate the metadata |
| 4576 | ;; because it ultimately depends on this package. |
| 4577 | ;; Create it manually instead |
| 4578 | (add-before 'build 'create-metadata |
| 4579 | (lambda _ |
| 4580 | (let* ((dir "build/classes/META-INF/plexus") |
| 4581 | (file (string-append dir "/components.xml"))) |
| 4582 | (mkdir-p dir) |
| 4583 | (with-output-to-file file |
| 4584 | (lambda _ |
| 4585 | (sxml->xml |
| 4586 | `(component-set |
| 4587 | (components |
| 4588 | (component |
| 4589 | (role "org.codehaus.plexus.compiler.Compiler") |
| 4590 | (role-hint "javac") |
| 4591 | (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler") |
| 4592 | (isolated-realm "false")))))))) |
| 4593 | #t)) |
| 4594 | (replace 'install |
| 4595 | (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml"))))) |
| 4596 | (propagated-inputs |
| 4597 | `(("java-plexus-compiler-api" ,java-plexus-compiler-api) |
| 4598 | ("java-plexus-utils" ,java-plexus-utils) |
| 4599 | ("java-plexus-container-default" ,java-plexus-container-default))) |
| 4600 | (synopsis "Javac Compiler support for Plexus Compiler component") |
| 4601 | (description "This package contains the Javac Compiler support for Plexus |
| 4602 | Compiler component."))) |
| 4603 | |
| 4604 | (define plexus-components-pom-1.1.20 |
| 4605 | (package |
| 4606 | (name "plexus-components-pom-1.1.20") |
| 4607 | (version "1.1.20") |
| 4608 | (source (origin |
| 4609 | (method git-fetch) |
| 4610 | (uri (git-reference |
| 4611 | (url "https://github.com/codehaus-plexus/plexus-components") |
| 4612 | (commit (string-append "plexus-components-" version)))) |
| 4613 | (file-name (git-file-name name version)) |
| 4614 | (sha256 |
| 4615 | (base32 |
| 4616 | "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb")))) |
| 4617 | (build-system ant-build-system) |
| 4618 | (arguments |
| 4619 | `(#:tests? #f |
| 4620 | #:phases |
| 4621 | (modify-phases %standard-phases |
| 4622 | (delete 'configure) |
| 4623 | (delete 'build) |
| 4624 | (replace 'install |
| 4625 | (install-pom-file "pom.xml"))))) |
| 4626 | (propagated-inputs |
| 4627 | `(("plexus-parent-pom" ,plexus-parent-pom-3.1))) |
| 4628 | (home-page "https://github.com/codehaus-plexus/plexus-components") |
| 4629 | (synopsis "Maven parent pom for plexus packages") |
| 4630 | (description "This package contains the parent pom for plexus component |
| 4631 | packages.") |
| 4632 | (license license:asl2.0))) |
| 4633 | |
| 4634 | (define-public java-plexus-digest |
| 4635 | (package |
| 4636 | (name "java-plexus-digest") |
| 4637 | (version "1.2") |
| 4638 | (source (origin |
| 4639 | (method git-fetch) |
| 4640 | (uri (git-reference |
| 4641 | (url "https://github.com/codehaus-plexus/plexus-digest") |
| 4642 | (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430"))) |
| 4643 | (file-name (git-file-name name version)) |
| 4644 | (sha256 |
| 4645 | (base32 |
| 4646 | "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x")))) |
| 4647 | (build-system ant-build-system) |
| 4648 | (arguments |
| 4649 | `(#:jar-name "plexus-digest.jar" |
| 4650 | #:source-dir "src/main/java" |
| 4651 | #:tests? #f |
| 4652 | #:phases |
| 4653 | (modify-phases %standard-phases |
| 4654 | (replace 'install |
| 4655 | (install-from-pom "pom.xml"))))) |
| 4656 | (propagated-inputs |
| 4657 | `(("java-plexus-utils" ,java-plexus-utils) |
| 4658 | ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20))) |
| 4659 | (native-inputs |
| 4660 | `(("java-junit" ,java-junit))) |
| 4661 | (home-page "https://github.com/codehaus-plexus/plexus-digest") |
| 4662 | (synopsis "Hash function utilities for Java") |
| 4663 | (description "This package is a plexus component that contains hash |
| 4664 | function utilities.") |
| 4665 | (license license:asl2.0))) |
| 4666 | |
| 4667 | (define-public java-plexus-sec-dispatcher |
| 4668 | (package |
| 4669 | (name "java-plexus-sec-dispatcher") |
| 4670 | (version "1.4") ;; Newest release listed at the Maven Central Repository. |
| 4671 | (source (origin |
| 4672 | ;; This project doesn't tag releases or publish tarballs, so we take |
| 4673 | ;; the "prepare release plexus-sec-dispatcher-1.4" git commit. |
| 4674 | (method git-fetch) |
| 4675 | (uri (git-reference |
| 4676 | (url "https://github.com/sonatype/plexus-sec-dispatcher/") |
| 4677 | (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f"))) |
| 4678 | (sha256 |
| 4679 | (base32 |
| 4680 | "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs")) |
| 4681 | (file-name (git-file-name name version)))) |
| 4682 | (arguments |
| 4683 | `(#:jar-name "plexus-sec-dispatcher.jar" |
| 4684 | #:source-dir "src/main/java" |
| 4685 | #:phases |
| 4686 | (modify-phases %standard-phases |
| 4687 | (add-before 'build 'generate-models |
| 4688 | (lambda* (#:key inputs #:allow-other-keys) |
| 4689 | (define (modello-single-mode file version mode) |
| 4690 | (invoke "java" |
| 4691 | "org.codehaus.modello.ModelloCli" |
| 4692 | file mode "src/main/java" version |
| 4693 | "false" "true")) |
| 4694 | (let ((file "src/main/mdo/settings-security.mdo")) |
| 4695 | (modello-single-mode file "1.0.0" "java") |
| 4696 | (modello-single-mode file "1.0.0" "xpp3-reader") |
| 4697 | (modello-single-mode file "1.0.0" "xpp3-writer")) |
| 4698 | #t)) |
| 4699 | (add-before 'build 'generate-components.xml |
| 4700 | (lambda _ |
| 4701 | (mkdir-p "build/classes/META-INF/plexus") |
| 4702 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" |
| 4703 | (lambda _ |
| 4704 | (display |
| 4705 | "<component-set>\n |
| 4706 | <components>\n |
| 4707 | <component>\n |
| 4708 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n |
| 4709 | <role-hint>default</role-hint>\n |
| 4710 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n |
| 4711 | <description></description>\n |
| 4712 | <requirements>\n |
| 4713 | <requirement>\n |
| 4714 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n |
| 4715 | <field-name>_cipher</field-name>\n |
| 4716 | </requirement>\n |
| 4717 | <requirement>\n |
| 4718 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n |
| 4719 | <field-name>_decryptors</field-name>\n |
| 4720 | </requirement>\n |
| 4721 | </requirements>\n |
| 4722 | <configuration>\n |
| 4723 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n |
| 4724 | </configuration>\n |
| 4725 | </component>\n |
| 4726 | </components>\n |
| 4727 | </component-set>\n"))) |
| 4728 | #t)) |
| 4729 | (add-before 'check 'fix-paths |
| 4730 | (lambda _ |
| 4731 | (copy-recursively "src/test/resources" "target") |
| 4732 | #t)) |
| 4733 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4734 | (propagated-inputs |
| 4735 | `(("java-plexus-utils" ,java-plexus-utils) |
| 4736 | ("java-plexus-cipher" ,java-plexus-cipher) |
| 4737 | ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12))) |
| 4738 | (native-inputs |
| 4739 | `(("java-modello-core" ,java-modello-core) |
| 4740 | ;; for modello: |
| 4741 | ("java-plexus-container-default" ,java-plexus-container-default) |
| 4742 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
| 4743 | ("java-plexus-utils" ,java-plexus-utils) |
| 4744 | ("java-guava" ,java-guava) |
| 4745 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
| 4746 | ("java-sisu-build-api" ,java-sisu-build-api) |
| 4747 | ;; modello plugins: |
| 4748 | ("java-modellop-plugins-java" ,java-modello-plugins-java) |
| 4749 | ("java-modellop-plugins-xml" ,java-modello-plugins-xml) |
| 4750 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) |
| 4751 | ;; for tests |
| 4752 | ("java-junit" ,java-junit))) |
| 4753 | (build-system ant-build-system) |
| 4754 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") |
| 4755 | (synopsis "Plexus Security Dispatcher Component") |
| 4756 | (description "This package is the Plexus Security Dispatcher Component. |
| 4757 | This component decrypts a string passed to it.") |
| 4758 | (license license:asl2.0))) |
| 4759 | |
| 4760 | (define-public java-plexus-cli |
| 4761 | (package |
| 4762 | (name "java-plexus-cli") |
| 4763 | (version "1.7") |
| 4764 | (source (origin |
| 4765 | (method git-fetch) |
| 4766 | (uri (git-reference |
| 4767 | (url "https://github.com/sonatype/plexus-cli") |
| 4768 | (commit "a776afa6bca84e5107bedb69440329cdb24ed645"))) |
| 4769 | (file-name (string-append name "-" version)) |
| 4770 | (sha256 |
| 4771 | (base32 |
| 4772 | "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx")))) |
| 4773 | (build-system ant-build-system) |
| 4774 | (arguments |
| 4775 | `(#:jar-name "plexus-cli.jar" |
| 4776 | #:source-dir "src/main/java" |
| 4777 | #:jdk ,icedtea-8 |
| 4778 | #:test-dir "src/test")) |
| 4779 | (inputs |
| 4780 | `(("java-commons-cli" ,java-commons-cli) |
| 4781 | ("java-plexus-container-default" ,java-plexus-container-default) |
| 4782 | ("java-plexus-classworlds" ,java-plexus-classworlds))) |
| 4783 | (native-inputs |
| 4784 | `(("java-plexus-utils" ,java-plexus-utils) |
| 4785 | ("java-junit" ,java-junit) |
| 4786 | ("java-guava" ,java-guava))) |
| 4787 | (home-page "https://codehaus-plexus.github.io/plexus-cli") |
| 4788 | (synopsis "CLI building library for plexus") |
| 4789 | (description "This package is a library to help creating CLI around |
| 4790 | Plexus components.") |
| 4791 | (license license:asl2.0))) |
| 4792 | |
| 4793 | (define-public java-sisu-build-api |
| 4794 | (package |
| 4795 | (name "java-sisu-build-api") |
| 4796 | (version "0.0.7") |
| 4797 | (source (origin |
| 4798 | (method git-fetch) |
| 4799 | (uri (git-reference |
| 4800 | (url "https://github.com/sonatype/sisu-build-api") |
| 4801 | (commit (string-append "plexus-build-api-" version)))) |
| 4802 | (file-name (git-file-name name version)) |
| 4803 | (sha256 |
| 4804 | (base32 |
| 4805 | "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0")))) |
| 4806 | (build-system ant-build-system) |
| 4807 | (arguments |
| 4808 | `(#:jar-name "sisu-build-api.jar" |
| 4809 | #:source-dir "src/main/java" |
| 4810 | #:jdk ,icedtea-8 |
| 4811 | #:tests? #f; FIXME: how to run the tests? |
| 4812 | #:phases |
| 4813 | (modify-phases %standard-phases |
| 4814 | (add-before 'build 'copy-resources |
| 4815 | (lambda _ |
| 4816 | (copy-recursively "src/main/resources" "build/classes") |
| 4817 | (substitute* (find-files "build/classes") |
| 4818 | (("\\$\\{project.version\\}") ,version)) |
| 4819 | #t)) |
| 4820 | (add-before 'build 'generate-plexus-compontent |
| 4821 | (lambda _ |
| 4822 | (mkdir-p "build/classes/META-INF/plexus") |
| 4823 | ;; This file is required for plexus to inject this package. |
| 4824 | ;; FIXME: how is it generated? |
| 4825 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" |
| 4826 | (lambda _ |
| 4827 | (display |
| 4828 | "<component-set>\n |
| 4829 | <components>\n |
| 4830 | <component>\n |
| 4831 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n |
| 4832 | <role-hint>default</role-hint>\n |
| 4833 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n |
| 4834 | <description>Filesystem based non-incremental build context implementation\n |
| 4835 | which behaves as if all files were just created.</description>\n |
| 4836 | </component>\n |
| 4837 | </components>\n |
| 4838 | </component-set>\n"))) |
| 4839 | #t)) |
| 4840 | (replace 'install |
| 4841 | (install-from-pom "pom.xml"))))) |
| 4842 | (inputs |
| 4843 | `(("java-plexus-utils" ,java-plexus-utils) |
| 4844 | ("java-plexus-container-default" ,java-plexus-container-default))) |
| 4845 | (home-page "https://github.com/sonatype/sisu-build-api/") |
| 4846 | (synopsis "Base build API for maven") |
| 4847 | (description "This package contains the base build API for maven and |
| 4848 | a default implementation of it. This API is about scanning files in a |
| 4849 | project and determining what files need to be rebuilt.") |
| 4850 | (license license:asl2.0))) |
| 4851 | |
| 4852 | (define-public java-modello-core |
| 4853 | (package |
| 4854 | (name "java-modello-core") |
| 4855 | (version "1.9.1") |
| 4856 | (source (origin |
| 4857 | (method git-fetch) |
| 4858 | (uri (git-reference |
| 4859 | (url "https://github.com/codehaus-plexus/modello") |
| 4860 | (commit (string-append "modello-" version)))) |
| 4861 | (file-name (git-file-name name version)) |
| 4862 | (sha256 |
| 4863 | (base32 |
| 4864 | "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4")))) |
| 4865 | (build-system ant-build-system) |
| 4866 | (arguments |
| 4867 | `(#:jar-name "modello-core.jar" |
| 4868 | #:source-dir "modello-core/src/main/java" |
| 4869 | #:test-dir "modello-core/src/test" |
| 4870 | #:main-class "org.codehaus.modello.ModelloCli" |
| 4871 | #:jdk ,icedtea-8 |
| 4872 | #:phases |
| 4873 | (modify-phases %standard-phases |
| 4874 | (add-before 'build 'copy-resources |
| 4875 | (lambda _ |
| 4876 | (mkdir-p "build/classes/META-INF/plexus") |
| 4877 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" |
| 4878 | "build/classes/META-INF/plexus/components.xml") |
| 4879 | #t)) |
| 4880 | (add-before 'check 'fix-tests |
| 4881 | (lambda _ |
| 4882 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" |
| 4883 | (substitute* '("modello/core/DefaultModelloCoreTest.java" |
| 4884 | "modello/core/io/ModelReaderTest.java") |
| 4885 | (("src/test") "modello-core/src/test"))) |
| 4886 | #t))))) |
| 4887 | (propagated-inputs |
| 4888 | `(("java-plexus-utils" ,java-plexus-utils) |
| 4889 | ("java-plexus-container-default" ,java-plexus-container-default) |
| 4890 | ("java-sisu-build-api" ,java-sisu-build-api))) |
| 4891 | (native-inputs |
| 4892 | `(("java-junit" ,java-junit) |
| 4893 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
| 4894 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
| 4895 | ("java-guava" ,java-guava))) |
| 4896 | (home-page "https://codehaus-plexus.github.io/modello/") |
| 4897 | (synopsis "Framework for code generation from a simple model") |
| 4898 | (description "Modello is a framework for code generation from a simple model. |
| 4899 | |
| 4900 | Modello generates code from a simple model format: based on a plugin |
| 4901 | architecture, various types of code and descriptors can be generated from the |
| 4902 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, |
| 4903 | XSD and documentation.") |
| 4904 | (license (list |
| 4905 | license:expat |
| 4906 | ;; Although this package uses only files licensed under expat, |
| 4907 | ;; other parts of the source are licensed under different |
| 4908 | ;; licenses. We include them to be inherited by other packages. |
| 4909 | license:asl2.0 |
| 4910 | ;; Some files in modello-plugin-java are licensed under a |
| 4911 | ;; 5-clause BSD license. |
| 4912 | (license:non-copyleft |
| 4913 | (string-append "file:///modello-plugins/modello-plugin-java/" |
| 4914 | "src/main/java/org/codehaus/modello/plugin/" |
| 4915 | "java/javasource/JNaming.java")))))) |
| 4916 | |
| 4917 | (define-public java-modello-plugins-java |
| 4918 | (package |
| 4919 | (inherit java-modello-core) |
| 4920 | (name "java-modello-plugins-java") |
| 4921 | (arguments |
| 4922 | `(#:jar-name "modello-plugins-java.jar" |
| 4923 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" |
| 4924 | #:test-dir "modello-plugins/modello-plugin-java/src/test" |
| 4925 | #:jdk ,icedtea-8 |
| 4926 | #:tests? #f; requires maven-model, which depends on this package |
| 4927 | #:phases |
| 4928 | (modify-phases %standard-phases |
| 4929 | (add-before 'build 'copy-resources |
| 4930 | (lambda _ |
| 4931 | (mkdir-p "build/classes") |
| 4932 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" |
| 4933 | "build/classes") |
| 4934 | #t))))) |
| 4935 | (inputs |
| 4936 | `(("java-modello-core" ,java-modello-core))) |
| 4937 | (synopsis "Modello Java Plugin") |
| 4938 | (description "Modello Java Plugin generates Java objects for the model."))) |
| 4939 | |
| 4940 | (define-public java-modello-plugins-xml |
| 4941 | (package |
| 4942 | (inherit java-modello-core) |
| 4943 | (name "java-modello-plugins-xml") |
| 4944 | (arguments |
| 4945 | `(#:jar-name "modello-plugins-xml.jar" |
| 4946 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" |
| 4947 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" |
| 4948 | #:jdk ,icedtea-8 |
| 4949 | #:phases |
| 4950 | (modify-phases %standard-phases |
| 4951 | (add-before 'build 'copy-resources |
| 4952 | (lambda _ |
| 4953 | (mkdir-p "build/classes") |
| 4954 | (copy-recursively |
| 4955 | "modello-plugins/modello-plugin-xml/src/main/resources" |
| 4956 | "build/classes") |
| 4957 | #t)) |
| 4958 | (add-before 'check 'fix-paths |
| 4959 | (lambda _ |
| 4960 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" |
| 4961 | (substitute* |
| 4962 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" |
| 4963 | (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) |
| 4964 | #t))))) |
| 4965 | (propagated-inputs |
| 4966 | `(("java-modello-core" ,java-modello-core) |
| 4967 | ("java-modello-plugins-java" ,java-modello-plugins-java))) |
| 4968 | (synopsis "Modello XML Plugin") |
| 4969 | (description "Modello XML Plugin contains shared code for every plugins |
| 4970 | working on XML representation of the model."))) |
| 4971 | |
| 4972 | (define-public java-modello-test |
| 4973 | (package |
| 4974 | (inherit java-modello-core) |
| 4975 | (name "java-modello-test") |
| 4976 | (arguments |
| 4977 | `(#:jar-name "modello-test.jar" |
| 4978 | #:source-dir "modello-test/src/main/java" |
| 4979 | #:tests? #f; no tests |
| 4980 | #:jdk ,icedtea-8)) |
| 4981 | (inputs |
| 4982 | `(("java-plexus-utils" ,java-plexus-utils) |
| 4983 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) |
| 4984 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) |
| 4985 | ("java-plexus-container-default" ,java-plexus-container-default))) |
| 4986 | (synopsis "Modello test package") |
| 4987 | (description "The modello test package contains the basis to create |
| 4988 | Modello generator unit-tests, including sample models and xml files to test |
| 4989 | every feature for every plugin."))) |
| 4990 | |
| 4991 | (define-public java-modello-plugins-xpp3 |
| 4992 | (package |
| 4993 | (inherit java-modello-core) |
| 4994 | (name "java-modello-plugins-xpp3") |
| 4995 | (arguments |
| 4996 | `(#:jar-name "modello-plugins-xpp3.jar" |
| 4997 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" |
| 4998 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" |
| 4999 | ;; One of the test dependencies is maven-model which depends on this package. |
| 5000 | #:tests? #f |
| 5001 | #:jdk ,icedtea-8 |
| 5002 | #:phases |
| 5003 | (modify-phases %standard-phases |
| 5004 | (add-before 'build 'copy-resources |
| 5005 | (lambda _ |
| 5006 | (mkdir-p "build/classes") |
| 5007 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" |
| 5008 | "build/classes") |
| 5009 | #t))))) |
| 5010 | (propagated-inputs |
| 5011 | `(("java-modello-core" ,java-modello-core) |
| 5012 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
| 5013 | ("java-modello-plugins-xml" ,java-modello-plugins-xml))) |
| 5014 | (native-inputs |
| 5015 | `(("java-xmlunit" ,java-xmlunit) |
| 5016 | ("java-modello-test" ,java-modello-test) |
| 5017 | ,@(package-native-inputs java-modello-core))) |
| 5018 | (synopsis "Modello XPP3 Plugin") |
| 5019 | (description "The modello XPP3 plugin generates XML readers and writers based |
| 5020 | on the XPP3 API (XML Pull Parser)."))) |
| 5021 | |
| 5022 | (define-public java-asm |
| 5023 | (package |
| 5024 | (name "java-asm") |
| 5025 | (version "6.0") |
| 5026 | (source (origin |
| 5027 | (method url-fetch) |
| 5028 | (uri (string-append "https://download.forge.ow2.org/asm/" |
| 5029 | "asm-" version ".tar.gz")) |
| 5030 | (sha256 |
| 5031 | (base32 |
| 5032 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
| 5033 | (build-system ant-build-system) |
| 5034 | (arguments |
| 5035 | `(#:build-target "compile" |
| 5036 | ;; The tests require an old version of Janino, which no longer compiles |
| 5037 | ;; with the JDK7. |
| 5038 | #:tests? #f |
| 5039 | #:make-flags |
| 5040 | (list |
| 5041 | ;; We don't need these extra ant tasks, but the build system asks us to |
| 5042 | ;; provide a path anyway. |
| 5043 | "-Dobjectweb.ant.tasks.path=dummy-path" |
| 5044 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and |
| 5045 | ;; used during the build automatically by ant-build-system, but |
| 5046 | ;; java-asm's build.xml fails unless we provide something here. |
| 5047 | "-Dbiz.aQute.bnd.path=dummy-path") |
| 5048 | #:phases |
| 5049 | (modify-phases %standard-phases |
| 5050 | (add-before 'build 'remove-bnd-dependency |
| 5051 | (lambda _ |
| 5052 | ;; This file is the only one to require bnd, and is not needed |
| 5053 | ;; because we don't build a bundle. |
| 5054 | (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java") |
| 5055 | #t)) |
| 5056 | (add-before 'install 'build-jars |
| 5057 | (lambda* (#:key make-flags #:allow-other-keys) |
| 5058 | ;; We cannot use the "jar" target because it depends on a couple |
| 5059 | ;; of unpackaged, complicated tools. |
| 5060 | (mkdir "dist") |
| 5061 | (invoke "jar" |
| 5062 | "-cf" (string-append "dist/asm-" ,version ".jar") |
| 5063 | "-C" "output/build/tmp" "."))) |
| 5064 | (add-before 'install 'fix-pom |
| 5065 | (lambda _ |
| 5066 | (substitute* (find-files "archive" "\\.pom$") |
| 5067 | (("@product.artifact@") ,version)) |
| 5068 | #t)) |
| 5069 | (add-before 'install 'install-parent |
| 5070 | (install-pom-file "archive/asm-parent.pom")) |
| 5071 | (replace 'install |
| 5072 | (install-from-pom "archive/asm.pom"))))) |
| 5073 | (native-inputs |
| 5074 | `(("java-junit" ,java-junit))) |
| 5075 | (propagated-inputs |
| 5076 | `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3))) |
| 5077 | (home-page "https://asm.ow2.io/") |
| 5078 | (synopsis "Very small and fast Java bytecode manipulation framework") |
| 5079 | (description "ASM is an all purpose Java bytecode manipulation and |
| 5080 | analysis framework. It can be used to modify existing classes or dynamically |
| 5081 | generate classes, directly in binary form. The provided common |
| 5082 | transformations and analysis algorithms allow easily assembling custom |
| 5083 | complex transformations and code analysis tools.") |
| 5084 | (license license:bsd-3))) |
| 5085 | |
| 5086 | (define java-org-ow2-parent-pom-1.3 |
| 5087 | (package |
| 5088 | (name "java-org-ow2-parent-pom") |
| 5089 | (version "1.3") |
| 5090 | (source (origin |
| 5091 | (method url-fetch) |
| 5092 | (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom") |
| 5093 | (sha256 |
| 5094 | (base32 |
| 5095 | "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai")))) |
| 5096 | (build-system ant-build-system) |
| 5097 | (arguments |
| 5098 | `(#:tests? #f |
| 5099 | #:phases |
| 5100 | (modify-phases %standard-phases |
| 5101 | (delete 'unpack) |
| 5102 | (delete 'build) |
| 5103 | (delete 'configure) |
| 5104 | (replace 'install |
| 5105 | (install-pom-file (assoc-ref %build-inputs "source")))))) |
| 5106 | (home-page "https://ow2.org") |
| 5107 | (synopsis "Ow2.org parent pom") |
| 5108 | (description "This package contains the parent pom for projects from ow2.org, |
| 5109 | including java-asm.") |
| 5110 | (license license:lgpl2.1+))) |
| 5111 | |
| 5112 | (define java-asm-bootstrap |
| 5113 | (package |
| 5114 | (inherit java-asm) |
| 5115 | (name "java-asm-bootstrap") |
| 5116 | (arguments |
| 5117 | (substitute-keyword-arguments (package-arguments java-asm) |
| 5118 | ((#:tests? _) #f))) |
| 5119 | (native-inputs `()))) |
| 5120 | |
| 5121 | (define-public java-cglib |
| 5122 | (package |
| 5123 | (name "java-cglib") |
| 5124 | (version "3.2.4") |
| 5125 | (source |
| 5126 | (origin |
| 5127 | (method git-fetch) |
| 5128 | (uri (git-reference |
| 5129 | (url "https://github.com/cglib/cglib") |
| 5130 | (commit (string-append |
| 5131 | "RELEASE_" |
| 5132 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) |
| 5133 | version))))) |
| 5134 | (file-name (git-file-name name version)) |
| 5135 | (sha256 |
| 5136 | (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v")))) |
| 5137 | (build-system ant-build-system) |
| 5138 | (arguments |
| 5139 | `(;; FIXME: tests fail because junit runs |
| 5140 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem |
| 5141 | ;; to describe a test at all. |
| 5142 | #:tests? #f |
| 5143 | #:jar-name "cglib.jar" |
| 5144 | #:phases |
| 5145 | (modify-phases %standard-phases |
| 5146 | (add-after 'unpack 'chdir |
| 5147 | (lambda _ (chdir "cglib") #t))))) |
| 5148 | (inputs |
| 5149 | `(("java-asm" ,java-asm) |
| 5150 | ("java-junit" ,java-junit))) |
| 5151 | (home-page "https://github.com/cglib/cglib/") |
| 5152 | (synopsis "Java byte code generation library") |
| 5153 | (description "The byte code generation library CGLIB is a high level API |
| 5154 | to generate and transform Java byte code.") |
| 5155 | (license license:asl2.0))) |
| 5156 | |
| 5157 | (define-public java-objenesis |
| 5158 | (package |
| 5159 | (name "java-objenesis") |
| 5160 | (version "2.5.1") |
| 5161 | (source (origin |
| 5162 | (method git-fetch) |
| 5163 | (uri (git-reference |
| 5164 | (url "https://github.com/easymock/objenesis") |
| 5165 | (commit version))) |
| 5166 | (file-name (git-file-name name version)) |
| 5167 | (sha256 |
| 5168 | (base32 |
| 5169 | "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya")))) |
| 5170 | (build-system ant-build-system) |
| 5171 | (arguments |
| 5172 | `(#:jar-name "objenesis.jar" |
| 5173 | #:source-dir "main/src/" |
| 5174 | #:test-dir "main/src/test/")) |
| 5175 | (native-inputs |
| 5176 | `(("java-junit" ,java-junit) |
| 5177 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 5178 | (home-page "http://objenesis.org/") |
| 5179 | (synopsis "Bypass the constructor when creating an object") |
| 5180 | (description "Objenesis is a small Java library that serves one purpose: |
| 5181 | to instantiate a new object of a particular class. It is common to see |
| 5182 | restrictions in libraries stating that classes must require a default |
| 5183 | constructor. Objenesis aims to overcome these restrictions by bypassing the |
| 5184 | constructor on object instantiation.") |
| 5185 | (license license:asl2.0))) |
| 5186 | |
| 5187 | (define-public java-easymock |
| 5188 | (package |
| 5189 | (name "java-easymock") |
| 5190 | (version "3.4") |
| 5191 | (source (origin |
| 5192 | (method git-fetch) |
| 5193 | (uri (git-reference |
| 5194 | (url "https://github.com/easymock/easymock/") |
| 5195 | (commit (string-append "easymock-" version)))) |
| 5196 | (file-name (git-file-name name version)) |
| 5197 | (sha256 |
| 5198 | (base32 |
| 5199 | "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq")))) |
| 5200 | (build-system ant-build-system) |
| 5201 | (arguments |
| 5202 | `(#:jar-name "easymock.jar" |
| 5203 | #:source-dir "core/src/main" |
| 5204 | #:test-dir "core/src/test" |
| 5205 | #:phases |
| 5206 | (modify-phases %standard-phases |
| 5207 | ;; FIXME: Android support requires the following packages to be |
| 5208 | ;; available: com.google.dexmaker.stock.ProxyBuilder |
| 5209 | (add-after 'unpack 'delete-android-support |
| 5210 | (lambda _ |
| 5211 | (with-directory-excursion "core/src/main/java/org/easymock/internal" |
| 5212 | (substitute* "MocksControl.java" |
| 5213 | (("AndroidSupport.isAndroid\\(\\)") "false") |
| 5214 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) |
| 5215 | (delete-file "AndroidClassProxyFactory.java")) |
| 5216 | #t)) |
| 5217 | (add-after 'unpack 'delete-broken-tests |
| 5218 | (lambda _ |
| 5219 | (with-directory-excursion "core/src/test/java/org/easymock" |
| 5220 | ;; This test depends on dexmaker. |
| 5221 | (delete-file "tests2/ClassExtensionHelperTest.java") |
| 5222 | |
| 5223 | ;; This is not a test. |
| 5224 | (delete-file "tests/BaseEasyMockRunnerTest.java") |
| 5225 | |
| 5226 | ;; This test should be executed with a different runner... |
| 5227 | (delete-file "tests2/EasyMockAnnotationsTest.java") |
| 5228 | ;; ...but deleting it means that we also have to delete these |
| 5229 | ;; dependent files. |
| 5230 | (delete-file "tests2/EasyMockRunnerTest.java") |
| 5231 | (delete-file "tests2/EasyMockRuleTest.java") |
| 5232 | |
| 5233 | ;; This test fails because the file "easymock.properties" does |
| 5234 | ;; not exist. |
| 5235 | (delete-file "tests2/EasyMockPropertiesTest.java")) |
| 5236 | #t))))) |
| 5237 | (inputs |
| 5238 | `(("java-asm" ,java-asm) |
| 5239 | ("java-cglib" ,java-cglib) |
| 5240 | ("java-objenesis" ,java-objenesis))) |
| 5241 | (native-inputs |
| 5242 | `(("java-junit" ,java-junit) |
| 5243 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 5244 | (home-page "https://easymock.org/") |
| 5245 | (synopsis "Java library providing mock objects for unit tests") |
| 5246 | (description "EasyMock is a Java library that provides an easy way to use |
| 5247 | mock objects in unit testing.") |
| 5248 | (license license:asl2.0))) |
| 5249 | |
| 5250 | (define-public java-jmock-1 |
| 5251 | (package |
| 5252 | (name "java-jmock") |
| 5253 | (version "1.2.0") |
| 5254 | (source (origin |
| 5255 | (method git-fetch) |
| 5256 | (uri (git-reference |
| 5257 | (url "https://github.com/jmock-developers/jmock-library") |
| 5258 | (commit version))) |
| 5259 | (file-name (git-file-name name version)) |
| 5260 | (sha256 |
| 5261 | (base32 |
| 5262 | "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z")))) |
| 5263 | (build-system ant-build-system) |
| 5264 | (arguments |
| 5265 | `(#:build-target "jars" |
| 5266 | #:test-target "run.tests" |
| 5267 | #:phases |
| 5268 | (modify-phases %standard-phases |
| 5269 | (replace 'install (install-jars "build"))))) |
| 5270 | (home-page "http://jmock.org/") |
| 5271 | (synopsis "Mock object library for test-driven development") |
| 5272 | (description "JMock is a library that supports test-driven development of |
| 5273 | Java code with mock objects. Mock objects help you design and test the |
| 5274 | interactions between the objects in your programs. |
| 5275 | |
| 5276 | The jMock library |
| 5277 | |
| 5278 | @itemize |
| 5279 | @item makes it quick and easy to define mock objects |
| 5280 | @item lets you precisely specify the interactions between |
| 5281 | your objects, reducing the brittleness of your tests |
| 5282 | @item plugs into your favourite test framework |
| 5283 | @item is easy to extend. |
| 5284 | @end itemize\n") |
| 5285 | (license license:bsd-3))) |
| 5286 | |
| 5287 | (define-public java-jmock |
| 5288 | (package |
| 5289 | (inherit java-jmock-1) |
| 5290 | (name "java-jmock") |
| 5291 | (version "2.8.2") |
| 5292 | (source (origin |
| 5293 | (method git-fetch) |
| 5294 | (uri (git-reference |
| 5295 | (url "https://github.com/jmock-developers/jmock-library") |
| 5296 | (commit version))) |
| 5297 | (file-name (git-file-name name version)) |
| 5298 | (sha256 |
| 5299 | (base32 |
| 5300 | "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6")))) |
| 5301 | (inputs |
| 5302 | `(("java-hamcrest-all" ,java-hamcrest-all) |
| 5303 | ("java-asm" ,java-asm) |
| 5304 | ("java-bsh" ,java-bsh) |
| 5305 | ("java-junit" ,java-junit))) |
| 5306 | (native-inputs |
| 5307 | `(("cglib" ,java-cglib))) |
| 5308 | (arguments |
| 5309 | `(#:jar-name "java-jmock.jar" |
| 5310 | #:source-dir "jmock/src/main/java" |
| 5311 | #:test-dir "jmock/src/test")))) |
| 5312 | |
| 5313 | (define-public java-jmock-junit4 |
| 5314 | (package |
| 5315 | (inherit java-jmock) |
| 5316 | (name "java-jmock-junit4") |
| 5317 | (arguments |
| 5318 | `(#:jar-name "java-jmock-junit4.jar" |
| 5319 | #:source-dir "jmock-junit4/src/main/java" |
| 5320 | #:test-dir "jmock-junit4/src/test")) |
| 5321 | (inputs |
| 5322 | `(("java-hamcrest-all" ,java-hamcrest-all) |
| 5323 | ("java-asm" ,java-asm) |
| 5324 | ("java-bsh" ,java-bsh) |
| 5325 | ("java-jmock" ,java-jmock) |
| 5326 | ("java-jumit" ,java-junit))))) |
| 5327 | |
| 5328 | (define-public java-jmock-legacy |
| 5329 | (package |
| 5330 | (inherit java-jmock) |
| 5331 | (name "java-jmock-legacy") |
| 5332 | (arguments |
| 5333 | `(#:jar-name "java-jmock-legacy.jar" |
| 5334 | #:source-dir "jmock-legacy/src/main/java" |
| 5335 | #:test-dir "jmock-legacy/src/test" |
| 5336 | #:phases |
| 5337 | (modify-phases %standard-phases |
| 5338 | (add-before 'check 'copy-tests |
| 5339 | (lambda _ |
| 5340 | ;; This file is a dependancy of some tests |
| 5341 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) |
| 5342 | (copy-file (string-append "jmock/src/test/java/" file) |
| 5343 | (string-append "jmock-legacy/src/test/java/" file)) |
| 5344 | #t)))))) |
| 5345 | (inputs |
| 5346 | `(("java-hamcrest-all" ,java-hamcrest-all) |
| 5347 | ("java-objenesis" ,java-objenesis) |
| 5348 | ("java-cglib" ,java-cglib) |
| 5349 | ("java-jmock" ,java-jmock) |
| 5350 | ("java-asm" ,java-asm) |
| 5351 | ("java-bsh" ,java-bsh) |
| 5352 | ("java-junit" ,java-junit))) |
| 5353 | (native-inputs |
| 5354 | `(("java-jmock-junit4" ,java-jmock-junit4))))) |
| 5355 | |
| 5356 | (define-public java-hamcrest-all |
| 5357 | (package (inherit java-hamcrest-core) |
| 5358 | (name "java-hamcrest-all") |
| 5359 | (arguments |
| 5360 | `(#:jdk ,icedtea-8 |
| 5361 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) |
| 5362 | ((#:build-target _) "bigjar") |
| 5363 | ((#:phases phases) |
| 5364 | `(modify-phases ,phases |
| 5365 | ;; Some build targets override the classpath, so we need to patch |
| 5366 | ;; the build.xml to ensure that required dependencies are on the |
| 5367 | ;; classpath. |
| 5368 | (add-after 'unpack 'patch-classpath-for-integration |
| 5369 | (lambda* (#:key inputs #:allow-other-keys) |
| 5370 | (substitute* "build.xml" |
| 5371 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) |
| 5372 | (string-join |
| 5373 | (cons line |
| 5374 | (append |
| 5375 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") |
| 5376 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") |
| 5377 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) |
| 5378 | ";")) |
| 5379 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") |
| 5380 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 5381 | "jar$")))) |
| 5382 | #t)) |
| 5383 | (replace 'install |
| 5384 | (lambda* (#:key outputs #:allow-other-keys) |
| 5385 | (let* ((target (string-append (assoc-ref outputs "out") |
| 5386 | "/share/java/")) |
| 5387 | (version-suffix |
| 5388 | ,(string-append |
| 5389 | "-" (package-version java-hamcrest-core) ".jar")) |
| 5390 | (install-without-version-suffix |
| 5391 | (lambda (jar) |
| 5392 | (copy-file jar |
| 5393 | (string-append target |
| 5394 | (basename jar version-suffix) |
| 5395 | ".jar"))))) |
| 5396 | (mkdir-p target) |
| 5397 | (for-each |
| 5398 | install-without-version-suffix |
| 5399 | (find-files "build" |
| 5400 | (lambda (name _) |
| 5401 | (and (string-suffix? ".jar" name) |
| 5402 | (not (string-suffix? "-sources.jar" name))))))) |
| 5403 | #t))))))) |
| 5404 | (inputs |
| 5405 | `(("java-junit" ,java-junit) |
| 5406 | ("java-jmock" ,java-jmock-1) |
| 5407 | ;; This is necessary because of what seems to be a race condition. |
| 5408 | ;; This package would sometimes fail to build because hamcrest-core.jar |
| 5409 | ;; could not be found, even though it is built as part of this package. |
| 5410 | ;; Adding java-hamcrest-core appears to fix this problem. See |
| 5411 | ;; https://debbugs.gnu.org/31390 for more information. |
| 5412 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 5413 | ("java-easymock" ,java-easymock) |
| 5414 | ,@(package-inputs java-hamcrest-core))))) |
| 5415 | |
| 5416 | (define-public java-jopt-simple |
| 5417 | (package |
| 5418 | (name "java-jopt-simple") |
| 5419 | (version "5.0.3") |
| 5420 | (source (origin |
| 5421 | (method url-fetch) |
| 5422 | (uri (string-append "http://repo1.maven.org/maven2/" |
| 5423 | "net/sf/jopt-simple/jopt-simple/" |
| 5424 | version "/jopt-simple-" |
| 5425 | version "-sources.jar")) |
| 5426 | (sha256 |
| 5427 | (base32 |
| 5428 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) |
| 5429 | (build-system ant-build-system) |
| 5430 | (arguments |
| 5431 | `(#:tests? #f ; there are no tests |
| 5432 | #:jar-name "jopt-simple.jar")) |
| 5433 | (home-page "https://pholser.github.io/jopt-simple/") |
| 5434 | (synopsis "Java library for parsing command line options") |
| 5435 | (description "JOpt Simple is a Java library for parsing command line |
| 5436 | options, such as those you might pass to an invocation of @code{javac}. In |
| 5437 | the interest of striving for simplicity, as closely as possible JOpt Simple |
| 5438 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and |
| 5439 | GNU @code{getopt_long}. It also aims to make option parser configuration and |
| 5440 | retrieval of options and their arguments simple and expressive, without being |
| 5441 | overly clever.") |
| 5442 | (license license:expat))) |
| 5443 | |
| 5444 | (define-public java-commons-math3 |
| 5445 | (package |
| 5446 | (name "java-commons-math3") |
| 5447 | (version "3.6.1") |
| 5448 | (source (origin |
| 5449 | (method url-fetch) |
| 5450 | (uri (string-append "mirror://apache/commons/math/source/" |
| 5451 | "commons-math3-" version "-src.tar.gz")) |
| 5452 | (sha256 |
| 5453 | (base32 |
| 5454 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) |
| 5455 | (build-system ant-build-system) |
| 5456 | (arguments |
| 5457 | `(#:build-target "jar" |
| 5458 | #:test-target "test" |
| 5459 | #:make-flags |
| 5460 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) |
| 5461 | (junit (assoc-ref %build-inputs "java-junit"))) |
| 5462 | (list (string-append "-Djunit.jar=" |
| 5463 | (car (find-files junit "jar$"))) |
| 5464 | (string-append "-Dhamcrest.jar=" |
| 5465 | (car (find-files hamcrest ".*.jar$"))))) |
| 5466 | #:phases |
| 5467 | (modify-phases %standard-phases |
| 5468 | ;; We want to build the jar in the build phase and run the tests |
| 5469 | ;; later in a separate phase. |
| 5470 | (add-after 'unpack 'untangle-targets |
| 5471 | (lambda _ |
| 5472 | (substitute* "build.xml" |
| 5473 | (("name=\"jar\" depends=\"test\"") |
| 5474 | "name=\"jar\" depends=\"compile\"")) |
| 5475 | #t)) |
| 5476 | ;; There is no install target. |
| 5477 | (replace 'install |
| 5478 | (install-jars "target"))))) |
| 5479 | (native-inputs |
| 5480 | `(("java-junit" ,java-junit) |
| 5481 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 5482 | (home-page "https://commons.apache.org/math/") |
| 5483 | (synopsis "Apache Commons mathematics library") |
| 5484 | (description "Commons Math is a library of lightweight, self-contained |
| 5485 | mathematics and statistics components addressing the most common problems not |
| 5486 | available in the Java programming language or Commons Lang.") |
| 5487 | (license license:asl2.0))) |
| 5488 | |
| 5489 | (define-public java-jmh |
| 5490 | (package |
| 5491 | (name "java-jmh") |
| 5492 | (version "1.17.5") |
| 5493 | (source (origin |
| 5494 | (method hg-fetch) |
| 5495 | (uri (hg-reference |
| 5496 | (url "http://hg.openjdk.java.net/code-tools/jmh/") |
| 5497 | (changeset version))) |
| 5498 | (file-name (string-append name "-" version "-checkout")) |
| 5499 | (sha256 |
| 5500 | (base32 |
| 5501 | "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) |
| 5502 | (build-system ant-build-system) |
| 5503 | (arguments |
| 5504 | `(#:jar-name "jmh-core.jar" |
| 5505 | #:source-dir "jmh-core/src/main" |
| 5506 | #:test-dir "jmh-core/src/test" |
| 5507 | #:phases |
| 5508 | (modify-phases %standard-phases |
| 5509 | ;; This seems to be a bug in the JDK. It may not be necessary in |
| 5510 | ;; future versions of the JDK. |
| 5511 | (add-after 'unpack 'fix-bug |
| 5512 | (lambda _ |
| 5513 | (with-directory-excursion |
| 5514 | "jmh-core/src/main/java/org/openjdk/jmh/runner/options" |
| 5515 | (substitute* '("IntegerValueConverter.java" |
| 5516 | "ThreadsValueConverter.java") |
| 5517 | (("public Class<Integer> valueType") |
| 5518 | "public Class<? extends Integer> valueType"))) |
| 5519 | #t))))) |
| 5520 | (inputs |
| 5521 | `(("java-jopt-simple" ,java-jopt-simple) |
| 5522 | ("java-commons-math3" ,java-commons-math3))) |
| 5523 | (native-inputs |
| 5524 | `(("java-junit" ,java-junit) |
| 5525 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 5526 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") |
| 5527 | (synopsis "Benchmark harness for the JVM") |
| 5528 | (description "JMH is a Java harness for building, running, and analysing |
| 5529 | nano/micro/milli/macro benchmarks written in Java and other languages |
| 5530 | targeting the JVM.") |
| 5531 | ;; GPLv2 only |
| 5532 | (license license:gpl2))) |
| 5533 | |
| 5534 | (define-public java-commons-collections4 |
| 5535 | (package |
| 5536 | (name "java-commons-collections4") |
| 5537 | (version "4.1") |
| 5538 | (source (origin |
| 5539 | (method url-fetch) |
| 5540 | (uri (string-append "mirror://apache/commons/collections/source/" |
| 5541 | "commons-collections4-" version "-src.tar.gz")) |
| 5542 | (sha256 |
| 5543 | (base32 |
| 5544 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) |
| 5545 | (build-system ant-build-system) |
| 5546 | (arguments |
| 5547 | `(#:test-target "test" |
| 5548 | #:make-flags |
| 5549 | (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) |
| 5550 | (junit (assoc-ref %build-inputs "java-junit")) |
| 5551 | (easymock (assoc-ref %build-inputs "java-easymock"))) |
| 5552 | (list (string-append "-Djunit.jar=" |
| 5553 | (car (find-files junit "jar$"))) |
| 5554 | (string-append "-Dhamcrest.jar=" |
| 5555 | (car (find-files hamcrest "jar$"))) |
| 5556 | (string-append "-Deasymock.jar=" easymock |
| 5557 | "/share/java/easymock.jar"))) |
| 5558 | #:phases |
| 5559 | (modify-phases %standard-phases |
| 5560 | (replace 'install |
| 5561 | (install-jars "target"))))) |
| 5562 | (native-inputs |
| 5563 | `(("java-junit" ,java-junit) |
| 5564 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 5565 | ("java-easymock" ,java-easymock))) |
| 5566 | (home-page "https://commons.apache.org/collections/") |
| 5567 | (synopsis "Collections framework") |
| 5568 | (description "The Java Collections Framework is the recognised standard |
| 5569 | for collection handling in Java. Commons-Collections seek to build upon the |
| 5570 | JDK classes by providing new interfaces, implementations and utilities. There |
| 5571 | are many features, including: |
| 5572 | |
| 5573 | @itemize |
| 5574 | @item @code{Bag} interface for collections that have a number of copies of |
| 5575 | each object |
| 5576 | @item @code{BidiMap} interface for maps that can be looked up from value to |
| 5577 | key as well and key to value |
| 5578 | @item @code{MapIterator} interface to provide simple and quick iteration over |
| 5579 | maps |
| 5580 | @item Transforming decorators that alter each object as it is added to the |
| 5581 | collection |
| 5582 | @item Composite collections that make multiple collections look like one |
| 5583 | @item Ordered maps and sets that retain the order elements are added in, |
| 5584 | including an LRU based map |
| 5585 | @item Reference map that allows keys and/or values to be garbage collected |
| 5586 | under close control |
| 5587 | @item Many comparator implementations |
| 5588 | @item Many iterator implementations |
| 5589 | @item Adapter classes from array and enumerations to collections |
| 5590 | @item Utilities to test or create typical set-theory properties of collections |
| 5591 | such as union, intersection, and closure. |
| 5592 | @end itemize\n") |
| 5593 | (license license:asl2.0))) |
| 5594 | |
| 5595 | (define-public java-commons-collections |
| 5596 | (package |
| 5597 | (inherit java-commons-collections4) |
| 5598 | (name "java-commons-collections") |
| 5599 | (version "3.2.2") |
| 5600 | (source (origin |
| 5601 | (method url-fetch) |
| 5602 | (uri (string-append "mirror://apache/commons/collections/source/" |
| 5603 | "commons-collections-" version "-src.tar.gz")) |
| 5604 | (sha256 |
| 5605 | (base32 |
| 5606 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")) |
| 5607 | (patches |
| 5608 | (search-patches "java-commons-collections-fix-java8.patch")))) |
| 5609 | (arguments |
| 5610 | (substitute-keyword-arguments (package-arguments java-commons-collections4) |
| 5611 | ((#:phases phases) |
| 5612 | `(modify-phases ,phases |
| 5613 | ;; The manifest is required by the build procedure |
| 5614 | (add-before 'build 'add-manifest |
| 5615 | (lambda _ |
| 5616 | (mkdir-p "build/conf") |
| 5617 | (call-with-output-file "build/conf/MANIFEST.MF" |
| 5618 | (lambda (file) |
| 5619 | (format file "Manifest-Version: 1.0\n"))) |
| 5620 | #t)) |
| 5621 | (replace 'install |
| 5622 | (install-jars "build")))))))) |
| 5623 | |
| 5624 | (define java-commons-collections-test-classes |
| 5625 | (package |
| 5626 | (inherit java-commons-collections) |
| 5627 | (arguments |
| 5628 | `(#:jar-name "commons-collections-test-classes.jar" |
| 5629 | #:source-dir "src/test" |
| 5630 | #:tests? #f)) |
| 5631 | (inputs |
| 5632 | `(("collection" ,java-commons-collections))))) |
| 5633 | |
| 5634 | (define-public java-commons-beanutils |
| 5635 | (package |
| 5636 | (name "java-commons-beanutils") |
| 5637 | (version "1.9.3") |
| 5638 | (source (origin |
| 5639 | (method url-fetch) |
| 5640 | (uri (string-append "mirror://apache/commons/beanutils/source/" |
| 5641 | "commons-beanutils-" version "-src.tar.gz")) |
| 5642 | (sha256 |
| 5643 | (base32 |
| 5644 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) |
| 5645 | (build-system ant-build-system) |
| 5646 | (arguments |
| 5647 | `(#:test-target "test" |
| 5648 | #:tests? #f |
| 5649 | #:phases |
| 5650 | (modify-phases %standard-phases |
| 5651 | (replace 'install |
| 5652 | (lambda* (#:key outputs #:allow-other-keys) |
| 5653 | (rename-file (string-append "dist/commons-beanutils-" ,version |
| 5654 | "-SNAPSHOT.jar") |
| 5655 | "commons-beanutils.jar") |
| 5656 | (install-file "commons-beanutils.jar" |
| 5657 | (string-append (assoc-ref outputs "out") "/share/java/")) |
| 5658 | #t))))) |
| 5659 | (inputs |
| 5660 | `(("logging" ,java-commons-logging-minimal) |
| 5661 | ("collections" ,java-commons-collections))) |
| 5662 | (native-inputs |
| 5663 | `(("junit" ,java-junit) |
| 5664 | ("collections-test" ,java-commons-collections-test-classes))) |
| 5665 | (home-page "https://commons.apache.org/beanutils/") |
| 5666 | (synopsis "Dynamically set or get properties in Java") |
| 5667 | (description "BeanUtils provides a simplified interface to reflection and |
| 5668 | introspection to set or get dynamically determined properties through their |
| 5669 | setter and getter method.") |
| 5670 | (license license:asl2.0))) |
| 5671 | |
| 5672 | (define-public java-commons-io |
| 5673 | (package |
| 5674 | (name "java-commons-io") |
| 5675 | (version "2.5") |
| 5676 | (source |
| 5677 | (origin |
| 5678 | (method url-fetch) |
| 5679 | (uri (string-append "mirror://apache/commons/io/source/" |
| 5680 | "commons-io-" version "-src.tar.gz")) |
| 5681 | (sha256 |
| 5682 | (base32 |
| 5683 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) |
| 5684 | (build-system ant-build-system) |
| 5685 | (outputs '("out" "doc")) |
| 5686 | (arguments |
| 5687 | `(#:test-target "test" |
| 5688 | #:make-flags |
| 5689 | (list (string-append "-Djunit.jar=" |
| 5690 | (car (find-files (assoc-ref %build-inputs "java-junit") |
| 5691 | "jar$")))) |
| 5692 | #:phases |
| 5693 | (modify-phases %standard-phases |
| 5694 | (add-after 'build 'build-javadoc ant-build-javadoc) |
| 5695 | (replace 'install (install-from-pom "pom.xml")) |
| 5696 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) |
| 5697 | (native-inputs |
| 5698 | `(("java-junit" ,java-junit) |
| 5699 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 5700 | (propagated-inputs |
| 5701 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39))) |
| 5702 | (home-page "https://commons.apache.org/io/") |
| 5703 | (synopsis "Common useful IO related classes") |
| 5704 | (description "Commons-IO contains utility classes, stream implementations, |
| 5705 | file filters and endian classes.") |
| 5706 | (license license:asl2.0))) |
| 5707 | |
| 5708 | (define-public java-commons-exec-1.1 |
| 5709 | (package |
| 5710 | (name "java-commons-exec") |
| 5711 | (version "1.1") |
| 5712 | (source |
| 5713 | (origin |
| 5714 | (method url-fetch) |
| 5715 | (uri (string-append "mirror://apache/commons/exec/source/" |
| 5716 | "commons-exec-" version "-src.tar.gz")) |
| 5717 | (sha256 |
| 5718 | (base32 |
| 5719 | "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk")))) |
| 5720 | (build-system ant-build-system) |
| 5721 | (arguments |
| 5722 | `(#:test-target "test" |
| 5723 | #:make-flags |
| 5724 | (list (string-append "-Dmaven.junit.jar=" |
| 5725 | (car (find-files (assoc-ref %build-inputs "java-junit") |
| 5726 | "jar$")))) |
| 5727 | #:phases |
| 5728 | (modify-phases %standard-phases |
| 5729 | (add-before 'build 'delete-network-tests |
| 5730 | (lambda _ |
| 5731 | (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java") |
| 5732 | (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java" |
| 5733 | (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") "")) |
| 5734 | #t)) |
| 5735 | ;; The "build" phase automatically tests. |
| 5736 | (delete 'check) |
| 5737 | (replace 'install (install-jars "target"))))) |
| 5738 | (native-inputs |
| 5739 | `(("java-junit" ,java-junit))) |
| 5740 | (home-page "https://commons.apache.org/proper/commons-exec/") |
| 5741 | (synopsis "Common program execution related classes") |
| 5742 | (description "Commons-Exec simplifies executing external processes.") |
| 5743 | (license license:asl2.0))) |
| 5744 | |
| 5745 | (define-public java-commons-exec |
| 5746 | (package |
| 5747 | (inherit java-commons-exec-1.1) |
| 5748 | (version "1.3") |
| 5749 | (source |
| 5750 | (origin |
| 5751 | (method url-fetch) |
| 5752 | (uri (string-append "mirror://apache/commons/exec/source/" |
| 5753 | "commons-exec-" version "-src.tar.gz")) |
| 5754 | (sha256 |
| 5755 | (base32 |
| 5756 | "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv")))) |
| 5757 | (arguments |
| 5758 | `(#:test-target "test" |
| 5759 | #:make-flags |
| 5760 | (list (string-append "-Dmaven.junit.jar=" |
| 5761 | (car (find-files (assoc-ref %build-inputs "java-junit") |
| 5762 | "jar$"))) |
| 5763 | "-Dmaven.compiler.source=1.7" |
| 5764 | "-Dmaven.compiler.target=1.7") |
| 5765 | #:phases |
| 5766 | (modify-phases %standard-phases |
| 5767 | (add-before 'build 'delete-network-tests |
| 5768 | (lambda* (#:key inputs #:allow-other-keys) |
| 5769 | ;; This test hangs indefinitely. |
| 5770 | (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java") |
| 5771 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java" |
| 5772 | (("ping -c 10 127.0.0.1") "sleep 10")) |
| 5773 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java" |
| 5774 | (("/bin/ls") "ls")) |
| 5775 | (call-with-output-file "src/test/scripts/ping.sh" |
| 5776 | (lambda (port) |
| 5777 | (format port "#!~a/bin/sh\nsleep $1\n" |
| 5778 | (assoc-ref inputs "bash")))) |
| 5779 | #t)) |
| 5780 | ;; The "build" phase automatically tests. |
| 5781 | (delete 'check) |
| 5782 | (replace 'install (install-jars "target"))))) |
| 5783 | (native-inputs |
| 5784 | `(("java-junit" ,java-junit) |
| 5785 | ("java-hamcrest-core" ,java-hamcrest-core))))) |
| 5786 | |
| 5787 | (define-public java-commons-lang |
| 5788 | (package |
| 5789 | (name "java-commons-lang") |
| 5790 | (version "2.6") |
| 5791 | (source |
| 5792 | (origin |
| 5793 | (method url-fetch) |
| 5794 | (uri (string-append "mirror://apache/commons/lang/source/" |
| 5795 | "commons-lang-" version "-src.tar.gz")) |
| 5796 | (sha256 |
| 5797 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) |
| 5798 | (build-system ant-build-system) |
| 5799 | (outputs '("out" "doc")) |
| 5800 | (arguments |
| 5801 | `(#:test-target "test" |
| 5802 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
| 5803 | #:phases |
| 5804 | (modify-phases %standard-phases |
| 5805 | (add-after 'build 'build-javadoc ant-build-javadoc) |
| 5806 | (add-before 'check 'disable-failing-test |
| 5807 | (lambda _ |
| 5808 | ;; Disable a failing test |
| 5809 | (substitute* "src/test/java/org/apache/commons/lang/\ |
| 5810 | time/FastDateFormatTest.java" |
| 5811 | (("public void testFormat\\(\\)") |
| 5812 | "public void disabled_testFormat()")) |
| 5813 | #t)) |
| 5814 | (replace 'install (install-jars "target")) |
| 5815 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) |
| 5816 | (native-inputs |
| 5817 | `(("java-junit" ,java-junit))) |
| 5818 | (home-page "https://commons.apache.org/lang/") |
| 5819 | (synopsis "Extension of the java.lang package") |
| 5820 | (description "The Commons Lang components contains a set of Java classes |
| 5821 | that provide helper methods for standard Java classes, especially those found |
| 5822 | in the @code{java.lang} package in the Sun JDK. The following classes are |
| 5823 | included: |
| 5824 | |
| 5825 | @itemize |
| 5826 | @item StringUtils - Helper for @code{java.lang.String}. |
| 5827 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets |
| 5828 | of characters such as @code{[a-z]} and @code{[abcdez]}. |
| 5829 | @item RandomStringUtils - Helper for creating randomised strings. |
| 5830 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. |
| 5831 | @item NumberRange - A range of numbers with an upper and lower bound. |
| 5832 | @item ObjectUtils - Helper for @code{java.lang.Object}. |
| 5833 | @item SerializationUtils - Helper for serializing objects. |
| 5834 | @item SystemUtils - Utility class defining the Java system properties. |
| 5835 | @item NestedException package - A sub-package for the creation of nested |
| 5836 | exceptions. |
| 5837 | @item Enum package - A sub-package for the creation of enumerated types. |
| 5838 | @item Builder package - A sub-package for the creation of @code{equals}, |
| 5839 | @code{hashCode}, @code{compareTo} and @code{toString} methods. |
| 5840 | @end itemize\n") |
| 5841 | (license license:asl2.0))) |
| 5842 | |
| 5843 | (define-public java-commons-lang3 |
| 5844 | (package |
| 5845 | (name "java-commons-lang3") |
| 5846 | (version "3.9") |
| 5847 | (source |
| 5848 | (origin |
| 5849 | (method url-fetch) |
| 5850 | (uri (string-append "mirror://apache/commons/lang/source/" |
| 5851 | "commons-lang3-" version "-src.tar.gz")) |
| 5852 | (sha256 |
| 5853 | (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6")))) |
| 5854 | (build-system ant-build-system) |
| 5855 | (arguments |
| 5856 | `(#:jar-name "commons-lang3.jar" |
| 5857 | #:source-dir "src/main/java" |
| 5858 | #:tests? #f; require junit5 |
| 5859 | #:phases |
| 5860 | (modify-phases %standard-phases |
| 5861 | (replace 'install (install-from-pom "pom.xml"))))) |
| 5862 | (propagated-inputs |
| 5863 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48))) |
| 5864 | (home-page "https://commons.apache.org/lang/") |
| 5865 | (synopsis "Extension of the java.lang package") |
| 5866 | (description "The Commons Lang components contains a set of Java classes |
| 5867 | that provide helper methods for standard Java classes, especially those found |
| 5868 | in the @code{java.lang} package. The following classes are included: |
| 5869 | |
| 5870 | @itemize |
| 5871 | @item StringUtils - Helper for @code{java.lang.String}. |
| 5872 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of |
| 5873 | characters such as @code{[a-z]} and @code{[abcdez]}. |
| 5874 | @item RandomStringUtils - Helper for creating randomised strings. |
| 5875 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. |
| 5876 | @item NumberRange - A range of numbers with an upper and lower bound. |
| 5877 | @item ObjectUtils - Helper for @code{java.lang.Object}. |
| 5878 | @item SerializationUtils - Helper for serializing objects. |
| 5879 | @item SystemUtils - Utility class defining the Java system properties. |
| 5880 | @item NestedException package - A sub-package for the creation of nested |
| 5881 | exceptions. |
| 5882 | @item Enum package - A sub-package for the creation of enumerated types. |
| 5883 | @item Builder package - A sub-package for the creation of @code{equals}, |
| 5884 | @code{hashCode}, @code{compareTo} and @code{toString} methods. |
| 5885 | @end itemize\n") |
| 5886 | (license license:asl2.0))) |
| 5887 | |
| 5888 | (define-public java-commons-bsf |
| 5889 | (package |
| 5890 | (name "java-commons-bsf") |
| 5891 | (version "2.4.0") |
| 5892 | (source (origin |
| 5893 | (method url-fetch) |
| 5894 | (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-" |
| 5895 | version ".tar.gz")) |
| 5896 | (sha256 |
| 5897 | (base32 |
| 5898 | "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas")) |
| 5899 | (modules '((guix build utils))) |
| 5900 | (snippet |
| 5901 | '(begin |
| 5902 | (for-each delete-file |
| 5903 | (find-files "." "\\.jar$")) |
| 5904 | #t)))) |
| 5905 | (build-system ant-build-system) |
| 5906 | (arguments |
| 5907 | `(#:build-target "jar" |
| 5908 | #:tests? #f; No test file |
| 5909 | #:modules ((guix build ant-build-system) |
| 5910 | (guix build utils) |
| 5911 | (guix build java-utils) |
| 5912 | (sxml simple)) |
| 5913 | #:phases |
| 5914 | (modify-phases %standard-phases |
| 5915 | (add-before 'build 'create-properties |
| 5916 | (lambda _ |
| 5917 | ;; This file is missing from the distribution |
| 5918 | (call-with-output-file "build-properties.xml" |
| 5919 | (lambda (port) |
| 5920 | (sxml->xml |
| 5921 | `(project (@ (basedir ".") (name "build-properties") (default "")) |
| 5922 | (property (@ (name "project.name") (value "bsf"))) |
| 5923 | (property (@ (name "source.level") (value "1.5"))) |
| 5924 | (property (@ (name "build.lib") (value "build/jar"))) |
| 5925 | (property (@ (name "src.dir") (value "src"))) |
| 5926 | (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) |
| 5927 | (property (@ (name "build.tests") (value "build/test-classes"))) |
| 5928 | (property (@ (name "build.dest") (value "build/classes")))) |
| 5929 | port))) |
| 5930 | #t)) |
| 5931 | (replace 'install (install-jars "build"))))) |
| 5932 | (native-inputs |
| 5933 | `(("java-junit" ,java-junit))) |
| 5934 | (inputs |
| 5935 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) |
| 5936 | (home-page "https://commons.apache.org/proper/commons-bsf") |
| 5937 | (synopsis "Bean Scripting Framework") |
| 5938 | (description "The Bean Scripting Framework (BSF) is a set of Java classes |
| 5939 | which provides scripting language support within Java applications, and access |
| 5940 | to Java objects and methods from scripting languages. BSF allows one to write |
| 5941 | JSPs in languages other than Java while providing access to the Java class |
| 5942 | library. In addition, BSF permits any Java application to be implemented in |
| 5943 | part (or dynamically extended) by a language that is embedded within it. This |
| 5944 | is achieved by providing an API that permits calling scripting language engines |
| 5945 | from within Java, as well as an object registry that exposes Java objects to |
| 5946 | these scripting language engines.") |
| 5947 | (license license:asl2.0))) |
| 5948 | |
| 5949 | (define-public java-commons-jxpath |
| 5950 | (package |
| 5951 | (name "java-commons-jxpath") |
| 5952 | (version "1.3") |
| 5953 | (source (origin |
| 5954 | (method url-fetch) |
| 5955 | (uri (string-append "mirror://apache/commons/jxpath/source/" |
| 5956 | "commons-jxpath-" version "-src.tar.gz")) |
| 5957 | (sha256 |
| 5958 | (base32 |
| 5959 | "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs")))) |
| 5960 | (build-system ant-build-system) |
| 5961 | (arguments |
| 5962 | `(#:jar-name "commons-jxpath.jar" |
| 5963 | ;; tests require more dependencies, including mockrunner which depends on old software |
| 5964 | #:tests? #f |
| 5965 | #:source-dir "src/java")) |
| 5966 | (inputs |
| 5967 | `(("servlet" ,java-classpathx-servletapi) |
| 5968 | ("java-jdom" ,java-jdom) |
| 5969 | ("java-commons-beanutils" ,java-commons-beanutils))) |
| 5970 | (native-inputs |
| 5971 | `(("java-junit" ,java-junit))) |
| 5972 | (home-page "https://commons.apache.org/jxpath/") |
| 5973 | (synopsis "Simple interpreter of an expression language called XPath.") |
| 5974 | (description "The org.apache.commons.jxpath package defines a simple |
| 5975 | interpreter of an expression language called XPath. JXPath applies XPath |
| 5976 | expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet |
| 5977 | contexts, DOM etc, including mixtures thereof.") |
| 5978 | (license license:asl2.0))) |
| 5979 | |
| 5980 | (define-public java-commons-pool |
| 5981 | (package |
| 5982 | (name "java-commons-pool") |
| 5983 | (version "2.6.2") |
| 5984 | (source (origin |
| 5985 | (method url-fetch) |
| 5986 | (uri (string-append "mirror://apache/commons/pool/source/" |
| 5987 | "commons-pool2-" version "-src.tar.gz")) |
| 5988 | (sha256 |
| 5989 | (base32 |
| 5990 | "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6")))) |
| 5991 | (arguments |
| 5992 | `(#:jar-name "common-pool.jar" |
| 5993 | #:source-dir "src/main/java" |
| 5994 | #:test-exclude |
| 5995 | (list "**/PerformanceTest.java"))) |
| 5996 | (build-system ant-build-system) |
| 5997 | (inputs |
| 5998 | `(("java-cglib" ,java-cglib))) |
| 5999 | (native-inputs |
| 6000 | `(("java-junit" ,java-junit) |
| 6001 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 6002 | ("java-asm" ,java-asm) |
| 6003 | ("java-objenesis" ,java-objenesis))) |
| 6004 | (home-page "https://commons.apache.org/proper/commons-pool/") |
| 6005 | (synopsis "Object-pooling API in Java") |
| 6006 | (description "The commons-pool package provides an object-pooling API |
| 6007 | and a number of object pool implementations. This package defines a |
| 6008 | handful of pooling interfaces and some base classes that may be useful when |
| 6009 | creating new pool implementations.") |
| 6010 | (license license:asl2.0))) |
| 6011 | |
| 6012 | (define-public java-commons-dbcp |
| 6013 | (package |
| 6014 | (name "java-commons-dbcp") |
| 6015 | (version "2.6.0") |
| 6016 | (source (origin |
| 6017 | (method url-fetch) |
| 6018 | (uri (string-append "mirror://apache/commons/dbcp/source/" |
| 6019 | "commons-dbcp2-" version "-src.tar.gz")) |
| 6020 | (sha256 |
| 6021 | (base32 |
| 6022 | "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc")))) |
| 6023 | (arguments |
| 6024 | `(#:source-dir "src/main/java" |
| 6025 | #:jar-name "java-commons-dbcp.jar" |
| 6026 | #:tests? #f)); requires apache-geronimo |
| 6027 | (inputs |
| 6028 | `(("java-commons-pool" ,java-commons-pool) |
| 6029 | ("java-commons-logging" ,java-commons-logging-minimal) |
| 6030 | ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec))) |
| 6031 | (native-inputs |
| 6032 | `(("java-junit" ,java-junit))) |
| 6033 | (build-system ant-build-system) |
| 6034 | (home-page "https://commons.apache.org/proper/commons-dbcp/") |
| 6035 | (synopsis "Database Connection Pool for Java") |
| 6036 | (description "Commons-dbcp allows you to share a pool of database |
| 6037 | connections between users. Creating a new connection for each user can be |
| 6038 | time consuming and even unfeasible when the number of simultaneous users is |
| 6039 | very large. This package provides a way to share a poole of connections to |
| 6040 | reduce that load.") |
| 6041 | (license license:asl2.0))) |
| 6042 | |
| 6043 | (define-public java-commons-jcs |
| 6044 | (package |
| 6045 | (name "java-commons-jcs") |
| 6046 | (version "2.2.1") |
| 6047 | (source (origin |
| 6048 | (method url-fetch) |
| 6049 | (uri (string-append "mirror://apache/commons/jcs/source/" |
| 6050 | "commons-jcs-dist-" version "-src.tar.gz")) |
| 6051 | (sha256 |
| 6052 | (base32 |
| 6053 | "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q")))) |
| 6054 | (build-system ant-build-system) |
| 6055 | (arguments |
| 6056 | `(#:jar-name "commons-jcs.jar" |
| 6057 | #:source-dir "commons-jcs-core/src/main/java" |
| 6058 | #:test-dir "commons-jcs-core/src/test" |
| 6059 | #:tests? #f; requires hsqldb |
| 6060 | #:phases |
| 6061 | (modify-phases %standard-phases |
| 6062 | (add-before 'build 'prepare |
| 6063 | (lambda _ |
| 6064 | (with-directory-excursion |
| 6065 | "commons-jcs-core/src/main/java/org/apache/commons/jcs" |
| 6066 | (substitute* |
| 6067 | "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java" |
| 6068 | (("commons.dbcp") "commons.dbcp2") |
| 6069 | ((".*\\.setMaxActive.*") "")) |
| 6070 | ;;; Remove dependency on velocity-tools |
| 6071 | (delete-file "admin/servlet/JCSAdminServlet.java")) |
| 6072 | #t))))) |
| 6073 | (propagated-inputs |
| 6074 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) |
| 6075 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
| 6076 | ("java-commons-httpclient" ,java-commons-httpclient) |
| 6077 | ("java-commons-dbcp" ,java-commons-dbcp))) |
| 6078 | (native-inputs |
| 6079 | `(("java-junit" ,java-junit))) |
| 6080 | (home-page "https://commons.apache.org/proper/commons-jcs/") |
| 6081 | (synopsis "Distributed caching system in Java") |
| 6082 | (description "JCS is a distributed caching system written in Java. It |
| 6083 | is intended to speed up applications by providing a means to manage cached |
| 6084 | data of various dynamic natures. Like any caching system, JCS is most useful |
| 6085 | for high read, low put applications. Latency times drop sharply and |
| 6086 | bottlenecks move away from the database in an effectively cached system.") |
| 6087 | (license license:asl2.0))) |
| 6088 | |
| 6089 | (define-public java-jsr250 |
| 6090 | (package |
| 6091 | (name "java-jsr250") |
| 6092 | (version "1.3") |
| 6093 | (source (origin |
| 6094 | (method url-fetch) |
| 6095 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6096 | "javax/annotation/javax.annotation-api/" |
| 6097 | version "/javax.annotation-api-" |
| 6098 | version "-sources.jar")) |
| 6099 | (sha256 |
| 6100 | (base32 |
| 6101 | "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz")))) |
| 6102 | (build-system ant-build-system) |
| 6103 | (arguments |
| 6104 | `(#:tests? #f ; no tests included |
| 6105 | #:jdk ,icedtea-8 |
| 6106 | #:jar-name "jsr250.jar" |
| 6107 | #:modules ((guix build ant-build-system) |
| 6108 | (guix build utils) |
| 6109 | (guix build maven pom) |
| 6110 | (guix build java-utils) |
| 6111 | (sxml simple)) |
| 6112 | #:phases |
| 6113 | (modify-phases %standard-phases |
| 6114 | (add-before 'install 'create-pom |
| 6115 | (lambda _ |
| 6116 | (with-output-to-file "pom.xml" |
| 6117 | (lambda _ |
| 6118 | (sxml->xml |
| 6119 | `((project |
| 6120 | (modelVersion "4.0.0") |
| 6121 | (name "jsr250") |
| 6122 | (groupId "javax.annotation") |
| 6123 | (artifactId "jsr250-api") |
| 6124 | (version ,,version)))))) |
| 6125 | #t)) |
| 6126 | (replace 'install |
| 6127 | (install-from-pom "pom.xml"))))) |
| 6128 | (home-page "https://jcp.org/en/jsr/detail?id=250") |
| 6129 | (synopsis "Security-related annotations") |
| 6130 | (description "This package provides annotations for security. It provides |
| 6131 | packages in the @code{javax.annotation} and @code{javax.annotation.security} |
| 6132 | namespaces.") |
| 6133 | ;; either cddl or gpl2 only, with classpath exception |
| 6134 | (license (list license:cddl1.0 |
| 6135 | license:gpl2)))) |
| 6136 | |
| 6137 | (define-public java-jsr305 |
| 6138 | (package |
| 6139 | (name "java-jsr305") |
| 6140 | (version "3.0.1") |
| 6141 | (source (origin |
| 6142 | (method url-fetch) |
| 6143 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6144 | "com/google/code/findbugs/" |
| 6145 | "jsr305/" version "/jsr305-" |
| 6146 | version "-sources.jar")) |
| 6147 | (sha256 |
| 6148 | (base32 |
| 6149 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) |
| 6150 | (build-system ant-build-system) |
| 6151 | (arguments |
| 6152 | `(#:tests? #f ; no tests included |
| 6153 | #:jar-name "jsr305.jar" |
| 6154 | #:modules ((guix build ant-build-system) |
| 6155 | (guix build java-utils) |
| 6156 | (guix build maven pom) |
| 6157 | (guix build utils) |
| 6158 | (sxml simple)) |
| 6159 | #:phases |
| 6160 | (modify-phases %standard-phases |
| 6161 | (add-before 'install 'create-pom |
| 6162 | (lambda _ |
| 6163 | (with-output-to-file "pom.xml" |
| 6164 | (lambda _ |
| 6165 | (sxml->xml |
| 6166 | `((project |
| 6167 | (modelVersion "4.0.0") |
| 6168 | (name "jsr305") |
| 6169 | (groupId "com.google.code.findbugs") |
| 6170 | (artifactId "jsr305") |
| 6171 | (version ,,version)))))) |
| 6172 | #t)) |
| 6173 | (replace 'install |
| 6174 | (install-from-pom "pom.xml"))))) |
| 6175 | (home-page "http://findbugs.sourceforge.net/") |
| 6176 | (synopsis "Annotations for the static analyzer called findbugs") |
| 6177 | (description "This package provides annotations for the findbugs package. |
| 6178 | It provides packages in the @code{javax.annotations} namespace.") |
| 6179 | (license license:asl2.0))) |
| 6180 | |
| 6181 | (define-public java-guava |
| 6182 | (package |
| 6183 | (name "java-guava") |
| 6184 | ;; This is the last release of Guava that can be built with Java 7. |
| 6185 | (version "20.0") |
| 6186 | (source (origin |
| 6187 | (method git-fetch) |
| 6188 | (uri (git-reference |
| 6189 | (url "https://github.com/google/guava/") |
| 6190 | (commit (string-append "v" version)))) |
| 6191 | (file-name (git-file-name name version)) |
| 6192 | (sha256 |
| 6193 | (base32 |
| 6194 | "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp")))) |
| 6195 | (build-system ant-build-system) |
| 6196 | (arguments |
| 6197 | `(#:tests? #f ; no tests included |
| 6198 | #:jar-name "guava.jar" |
| 6199 | #:source-dir "guava/src" |
| 6200 | #:phases |
| 6201 | (modify-phases %standard-phases |
| 6202 | (add-after 'unpack 'trim-sources |
| 6203 | (lambda _ |
| 6204 | (with-directory-excursion "guava/src/com/google/common" |
| 6205 | ;; Remove annotations to avoid extra dependencies: |
| 6206 | ;; * "j2objc" annotations are used when converting Java to |
| 6207 | ;; Objective C; |
| 6208 | ;; * "errorprone" annotations catch common Java mistakes at |
| 6209 | ;; compile time; |
| 6210 | ;; * "IgnoreJRERequirement" is used for Android. |
| 6211 | (substitute* (find-files "." "\\.java$") |
| 6212 | (("import com.google.j2objc.*") "") |
| 6213 | (("import com.google.errorprone.annotation.*") "") |
| 6214 | (("import org.codehaus.mojo.animal_sniffer.*") "") |
| 6215 | (("@CanIgnoreReturnValue") "") |
| 6216 | (("@LazyInit") "") |
| 6217 | (("@WeakOuter") "") |
| 6218 | (("@RetainedWith") "") |
| 6219 | (("@Weak") "") |
| 6220 | (("@ForOverride") "") |
| 6221 | (("@J2ObjCIncompatible") "") |
| 6222 | (("@IgnoreJRERequirement") ""))) |
| 6223 | #t)) |
| 6224 | (replace 'install (install-from-pom "guava/pom.xml"))))) |
| 6225 | (inputs |
| 6226 | `(("java-jsr305" ,java-jsr305))) |
| 6227 | (propagated-inputs |
| 6228 | `(("java-guava-parent-pom" ,java-guava-parent-pom))) |
| 6229 | (home-page "https://github.com/google/guava") |
| 6230 | (synopsis "Google core libraries for Java") |
| 6231 | (description "Guava is a set of core libraries that includes new |
| 6232 | collection types (such as multimap and multiset), immutable collections, a |
| 6233 | graph library, functional types, an in-memory cache, and APIs/utilities for |
| 6234 | concurrency, I/O, hashing, primitives, reflection, string processing, and much |
| 6235 | more!") |
| 6236 | (license license:asl2.0))) |
| 6237 | |
| 6238 | (define java-guava-parent-pom |
| 6239 | (package |
| 6240 | (inherit java-guava) |
| 6241 | (name "java-guava-parent-pom") |
| 6242 | (arguments |
| 6243 | `(#:tests? #f |
| 6244 | #:phases |
| 6245 | (modify-phases %standard-phases |
| 6246 | (delete 'configure) |
| 6247 | (delete 'build) |
| 6248 | (replace 'install |
| 6249 | (install-pom-file "pom.xml"))))) |
| 6250 | (propagated-inputs |
| 6251 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) |
| 6252 | |
| 6253 | ;; The java-commons-logging package provides adapters to many different |
| 6254 | ;; logging frameworks. To avoid an excessive dependency graph we try to build |
| 6255 | ;; it with only a minimal set of adapters. |
| 6256 | (define-public java-commons-logging-minimal |
| 6257 | (package |
| 6258 | (name "java-commons-logging-minimal") |
| 6259 | (version "1.2") |
| 6260 | (source (origin |
| 6261 | (method url-fetch) |
| 6262 | (uri (string-append "mirror://apache/commons/logging/source/" |
| 6263 | "commons-logging-" version "-src.tar.gz")) |
| 6264 | (sha256 |
| 6265 | (base32 |
| 6266 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) |
| 6267 | (build-system ant-build-system) |
| 6268 | (arguments |
| 6269 | `(#:tests? #f ; avoid dependency on logging frameworks |
| 6270 | #:jar-name "commons-logging-minimal.jar" |
| 6271 | #:phases |
| 6272 | (modify-phases %standard-phases |
| 6273 | (add-after 'unpack 'delete-adapters-and-tests |
| 6274 | (lambda _ |
| 6275 | ;; Delete all adapters except for NoOpLog, SimpleLog, and |
| 6276 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl |
| 6277 | ;; is used by applications; SimpleLog is the only actually usable |
| 6278 | ;; implementation that does not depend on another logging |
| 6279 | ;; framework. |
| 6280 | (for-each |
| 6281 | (lambda (file) |
| 6282 | (delete-file (string-append |
| 6283 | "src/main/java/org/apache/commons/logging/impl/" file))) |
| 6284 | (list "Jdk13LumberjackLogger.java" |
| 6285 | "WeakHashtable.java" |
| 6286 | "Log4JLogger.java" |
| 6287 | "ServletContextCleaner.java" |
| 6288 | "Jdk14Logger.java" |
| 6289 | "AvalonLogger.java" |
| 6290 | "LogKitLogger.java")) |
| 6291 | (delete-file-recursively "src/test") |
| 6292 | #t))))) |
| 6293 | (home-page "https://commons.apache.org/logging/") |
| 6294 | (synopsis "Common API for logging implementations") |
| 6295 | (description "The Logging package is a thin bridge between different |
| 6296 | logging implementations. A library that uses the commons-logging API can be |
| 6297 | used with any logging implementation at runtime.") |
| 6298 | (license license:asl2.0))) |
| 6299 | |
| 6300 | ;; This is the last release of the 1.x series. |
| 6301 | (define-public java-mockito-1 |
| 6302 | (package |
| 6303 | (name "java-mockito") |
| 6304 | (version "1.10.19") |
| 6305 | (source (origin |
| 6306 | (method url-fetch) |
| 6307 | (uri (string-append "http://repo1.maven.org/maven2/" |
| 6308 | "org/mockito/mockito-core/" version |
| 6309 | "/mockito-core-" version "-sources.jar")) |
| 6310 | (sha256 |
| 6311 | (base32 |
| 6312 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) |
| 6313 | (build-system ant-build-system) |
| 6314 | (arguments |
| 6315 | `(#:jar-name "mockito.jar" |
| 6316 | #:tests? #f ; no tests included |
| 6317 | ;; FIXME: patch-and-repack does not support jars, so we have to apply |
| 6318 | ;; patches in build phases. |
| 6319 | #:phases |
| 6320 | (modify-phases %standard-phases |
| 6321 | ;; Mockito was developed against a different version of hamcrest, |
| 6322 | ;; which does not require matcher implementations to provide an |
| 6323 | ;; implementation of the "describeMismatch" method. We add this |
| 6324 | ;; simple definition to pass the build with our version of hamcrest. |
| 6325 | (add-after 'unpack 'fix-hamcrest-build-error |
| 6326 | (lambda _ |
| 6327 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" |
| 6328 | (("public Matcher getActualMatcher\\(\\) .*" line) |
| 6329 | (string-append " |
| 6330 | public void describeMismatch(Object item, Description description) { |
| 6331 | actualMatcher.describeMismatch(item, description); |
| 6332 | }" |
| 6333 | line))) |
| 6334 | #t)) |
| 6335 | ;; Mockito bundles cglib. We have a cglib package, so let's use |
| 6336 | ;; that instead. |
| 6337 | (add-after 'unpack 'use-system-libraries |
| 6338 | (lambda _ |
| 6339 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" |
| 6340 | (substitute* '("CGLIBHacker.java" |
| 6341 | "CglibMockMaker.java" |
| 6342 | "ClassImposterizer.java" |
| 6343 | "DelegatingMockitoMethodProxy.java" |
| 6344 | "MethodInterceptorFilter.java" |
| 6345 | "MockitoNamingPolicy.java" |
| 6346 | "SerializableMockitoMethodProxy.java" |
| 6347 | "SerializableNoOp.java") |
| 6348 | (("import org.mockito.cglib") "import net.sf.cglib"))) |
| 6349 | #t))))) |
| 6350 | (inputs |
| 6351 | `(("java-junit" ,java-junit) |
| 6352 | ("java-objenesis" ,java-objenesis) |
| 6353 | ("java-cglib" ,java-cglib) |
| 6354 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 6355 | (home-page "http://mockito.org") |
| 6356 | (synopsis "Mockito is a mock library for Java") |
| 6357 | (description "Mockito is a mocking library for Java which lets you write |
| 6358 | tests with a clean and simple API. It generates mocks using reflection, and |
| 6359 | it records all mock invocations, including methods arguments.") |
| 6360 | (license license:asl2.0))) |
| 6361 | |
| 6362 | (define-public java-httpcomponents-httpcore |
| 6363 | (package |
| 6364 | (name "java-httpcomponents-httpcore") |
| 6365 | (version "4.4.6") |
| 6366 | (source (origin |
| 6367 | (method url-fetch) |
| 6368 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" |
| 6369 | "source/httpcomponents-core-" |
| 6370 | version "-src.tar.gz")) |
| 6371 | (sha256 |
| 6372 | (base32 |
| 6373 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) |
| 6374 | (build-system ant-build-system) |
| 6375 | (arguments |
| 6376 | `(#:jar-name "httpcomponents-httpcore.jar" |
| 6377 | #:phases |
| 6378 | (modify-phases %standard-phases |
| 6379 | (add-after 'unpack 'chdir |
| 6380 | (lambda _ (chdir "httpcore") #t))))) |
| 6381 | (inputs |
| 6382 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) |
| 6383 | ("java-commons-lang3" ,java-commons-lang3))) |
| 6384 | (native-inputs |
| 6385 | `(("java-junit" ,java-junit) |
| 6386 | ("java-mockito" ,java-mockito-1))) |
| 6387 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") |
| 6388 | (synopsis "Low level HTTP transport components") |
| 6389 | (description "HttpCore is a set of low level HTTP transport components |
| 6390 | that can be used to build custom client and server side HTTP services with a |
| 6391 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based |
| 6392 | on the classic Java I/O and non-blocking, event driven I/O model based on Java |
| 6393 | NIO. |
| 6394 | |
| 6395 | This package provides the blocking I/O model library.") |
| 6396 | (license license:asl2.0))) |
| 6397 | |
| 6398 | (define-public java-httpcomponents-httpcore-nio |
| 6399 | (package (inherit java-httpcomponents-httpcore) |
| 6400 | (name "java-httpcomponents-httpcore-nio") |
| 6401 | (arguments |
| 6402 | `(#:jar-name "httpcomponents-httpcore-nio.jar" |
| 6403 | #:phases |
| 6404 | (modify-phases %standard-phases |
| 6405 | (add-after 'unpack 'chdir |
| 6406 | (lambda _ (chdir "httpcore-nio") #t))))) |
| 6407 | (inputs |
| 6408 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) |
| 6409 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 6410 | ,@(package-inputs java-httpcomponents-httpcore))) |
| 6411 | (description "HttpCore is a set of low level HTTP transport components |
| 6412 | that can be used to build custom client and server side HTTP services with a |
| 6413 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based |
| 6414 | on the classic Java I/O and non-blocking, event driven I/O model based on Java |
| 6415 | NIO. |
| 6416 | |
| 6417 | This package provides the non-blocking I/O model library based on Java |
| 6418 | NIO."))) |
| 6419 | |
| 6420 | (define-public java-httpcomponents-httpcore-ab |
| 6421 | (package (inherit java-httpcomponents-httpcore) |
| 6422 | (name "java-httpcomponents-httpcore-ab") |
| 6423 | (arguments |
| 6424 | `(#:jar-name "httpcomponents-httpcore-ab.jar" |
| 6425 | #:phases |
| 6426 | (modify-phases %standard-phases |
| 6427 | (add-after 'unpack 'chdir |
| 6428 | (lambda _ (chdir "httpcore-ab") #t))))) |
| 6429 | (inputs |
| 6430 | `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) |
| 6431 | ("java-commons-cli" ,java-commons-cli) |
| 6432 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 6433 | ,@(package-inputs java-httpcomponents-httpcore))) |
| 6434 | (synopsis "Apache HttpCore benchmarking tool") |
| 6435 | (description "This package provides the HttpCore benchmarking tool. It is |
| 6436 | an Apache AB clone based on HttpCore."))) |
| 6437 | |
| 6438 | (define-public java-httpcomponents-httpclient |
| 6439 | (package |
| 6440 | (name "java-httpcomponents-httpclient") |
| 6441 | (version "4.5.12") |
| 6442 | (source (origin |
| 6443 | (method url-fetch) |
| 6444 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" |
| 6445 | "source/httpcomponents-client-" |
| 6446 | version "-src.tar.gz")) |
| 6447 | (sha256 |
| 6448 | (base32 |
| 6449 | "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb")))) |
| 6450 | (build-system ant-build-system) |
| 6451 | (arguments |
| 6452 | `(#:jar-name "httpcomponents-httpclient.jar" |
| 6453 | #:phases |
| 6454 | (modify-phases %standard-phases |
| 6455 | (add-after 'unpack 'chdir |
| 6456 | (lambda _ (chdir "httpclient") #t))))) |
| 6457 | (inputs |
| 6458 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal) |
| 6459 | ("java-commons-codec" ,java-commons-codec) |
| 6460 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 6461 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) |
| 6462 | ("java-mockito" ,java-mockito-1) |
| 6463 | ("java-junit" ,java-junit))) |
| 6464 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") |
| 6465 | (synopsis "HTTP client library for Java") |
| 6466 | (description "Although the @code{java.net} package provides basic |
| 6467 | functionality for accessing resources via HTTP, it doesn't provide the full |
| 6468 | flexibility or functionality needed by many applications. @code{HttpClient} |
| 6469 | seeks to fill this void by providing an efficient, up-to-date, and |
| 6470 | feature-rich package implementing the client side of the most recent HTTP |
| 6471 | standards and recommendations.") |
| 6472 | (license license:asl2.0))) |
| 6473 | |
| 6474 | (define-public java-httpcomponents-httpmime |
| 6475 | (package (inherit java-httpcomponents-httpclient) |
| 6476 | (name "java-httpcomponents-httpmime") |
| 6477 | (arguments |
| 6478 | `(#:jar-name "httpcomponents-httpmime.jar" |
| 6479 | #:phases |
| 6480 | (modify-phases %standard-phases |
| 6481 | (add-after 'unpack 'chdir |
| 6482 | (lambda _ (chdir "httpmime") #t))))) |
| 6483 | (inputs |
| 6484 | `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) |
| 6485 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) |
| 6486 | ("java-junit" ,java-junit) |
| 6487 | ("java-hamcrest-core" ,java-hamcrest-core))))) |
| 6488 | |
| 6489 | (define-public java-commons-net |
| 6490 | (package |
| 6491 | (name "java-commons-net") |
| 6492 | (version "3.6") |
| 6493 | (source (origin |
| 6494 | (method url-fetch) |
| 6495 | (uri (string-append "mirror://apache/commons/net/source/" |
| 6496 | "commons-net-" version "-src.tar.gz")) |
| 6497 | (sha256 |
| 6498 | (base32 |
| 6499 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) |
| 6500 | (build-system ant-build-system) |
| 6501 | (arguments |
| 6502 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which |
| 6503 | ;; should be "resources/examples/examples.properties"), but gets "null" |
| 6504 | ;; instead. |
| 6505 | #:tests? #f |
| 6506 | #:jar-name "commons-net.jar")) |
| 6507 | (native-inputs |
| 6508 | `(("java-junit" ,java-junit) |
| 6509 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 6510 | (home-page "https://commons.apache.org/net/") |
| 6511 | (synopsis "Client library for many basic Internet protocols") |
| 6512 | (description "The Apache Commons Net library implements the client side of |
| 6513 | many basic Internet protocols. The purpose of the library is to provide |
| 6514 | fundamental protocol access, not higher-level abstractions.") |
| 6515 | (license license:asl2.0))) |
| 6516 | |
| 6517 | (define-public java-jsch |
| 6518 | (package |
| 6519 | (name "java-jsch") |
| 6520 | (version "0.1.55") |
| 6521 | (source (origin |
| 6522 | (method url-fetch) |
| 6523 | (uri (string-append "mirror://sourceforge/jsch/jsch/" |
| 6524 | version "/jsch-" version ".zip")) |
| 6525 | (sha256 |
| 6526 | (base32 |
| 6527 | "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6")))) |
| 6528 | (build-system ant-build-system) |
| 6529 | (arguments |
| 6530 | `(#:build-target "dist" |
| 6531 | #:tests? #f ; no tests included |
| 6532 | #:phases |
| 6533 | (modify-phases %standard-phases |
| 6534 | (replace 'install (install-jars "dist"))))) |
| 6535 | (native-inputs |
| 6536 | `(("unzip" ,unzip))) |
| 6537 | (home-page "http://www.jcraft.com/jsch/") |
| 6538 | (synopsis "Pure Java implementation of SSH2") |
| 6539 | (description "JSch is a pure Java implementation of SSH2. JSch allows you |
| 6540 | to connect to an SSH server and use port forwarding, X11 forwarding, file |
| 6541 | transfer, etc., and you can integrate its functionality into your own Java |
| 6542 | programs.") |
| 6543 | (license license:bsd-3))) |
| 6544 | |
| 6545 | (define-public java-commons-compress |
| 6546 | (package |
| 6547 | (name "java-commons-compress") |
| 6548 | (version "1.13") |
| 6549 | (source (origin |
| 6550 | (method url-fetch) |
| 6551 | (uri (string-append "mirror://apache/commons/compress/source/" |
| 6552 | "commons-compress-" version "-src.tar.gz")) |
| 6553 | (sha256 |
| 6554 | (base32 |
| 6555 | "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) |
| 6556 | (build-system ant-build-system) |
| 6557 | (arguments |
| 6558 | `(#:jar-name "commons-compress.jar" |
| 6559 | #:phases |
| 6560 | (modify-phases %standard-phases |
| 6561 | (add-after 'unpack 'delete-bad-tests |
| 6562 | (lambda _ |
| 6563 | (with-directory-excursion "src/test/java/org/apache/commons/compress/" |
| 6564 | ;; FIXME: These tests really should not fail. Maybe they are |
| 6565 | ;; indicative of problems with our Java packaging work. |
| 6566 | |
| 6567 | ;; This test fails with a null pointer exception. |
| 6568 | (delete-file "archivers/sevenz/SevenZOutputFileTest.java") |
| 6569 | ;; This test fails to open test resources. |
| 6570 | (delete-file "archivers/zip/ExplodeSupportTest.java") |
| 6571 | |
| 6572 | ;; FIXME: This test adds a dependency on powermock, which is hard to |
| 6573 | ;; package at this point. |
| 6574 | ;; https://github.com/powermock/powermock |
| 6575 | (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) |
| 6576 | #t)) |
| 6577 | (replace 'install (install-from-pom "pom.xml"))))) |
| 6578 | (propagated-inputs |
| 6579 | `(("java-xz" ,java-xz) |
| 6580 | ("apache-commons-parent-pom" ,apache-commons-parent-pom-41))) |
| 6581 | (native-inputs |
| 6582 | `(("java-junit" ,java-junit) |
| 6583 | ("java-mockito" ,java-mockito-1))) |
| 6584 | (home-page "https://commons.apache.org/proper/commons-compress/") |
| 6585 | (synopsis "Java library for working with compressed files") |
| 6586 | (description "The Apache Commons Compress library defines an API for |
| 6587 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, |
| 6588 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") |
| 6589 | (license license:asl2.0))) |
| 6590 | |
| 6591 | (define-public java-commons-csv |
| 6592 | (package |
| 6593 | (name "java-commons-csv") |
| 6594 | (version "1.4") |
| 6595 | (source (origin |
| 6596 | (method url-fetch) |
| 6597 | (uri (string-append "mirror://apache/commons/csv/source/" |
| 6598 | "commons-csv-" version "-src.tar.gz")) |
| 6599 | (sha256 |
| 6600 | (base32 |
| 6601 | "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij")))) |
| 6602 | (build-system ant-build-system) |
| 6603 | (arguments |
| 6604 | `(#:jar-name "commons-csv.jar" |
| 6605 | #:source-dir "src/main/java" |
| 6606 | #:tests? #f)); FIXME: requires java-h2 |
| 6607 | (inputs |
| 6608 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 6609 | ("java-commons-io" ,java-commons-io) |
| 6610 | ("java-commons-lang3" ,java-commons-lang3) |
| 6611 | ("junit" ,java-junit))) |
| 6612 | (home-page "https://commons.apache.org/proper/commons-csv/") |
| 6613 | (synopsis "Read and write CSV documents") |
| 6614 | (description "Commons CSV reads and writes files in variations of the Comma |
| 6615 | Separated Value (CSV) format. The most common CSV formats are predefined in the |
| 6616 | CSVFormat class: |
| 6617 | |
| 6618 | @itemize |
| 6619 | @item Microsoft Excel |
| 6620 | @item Informix UNLOAD |
| 6621 | @item Informix UNLOAD CSV |
| 6622 | @item MySQL |
| 6623 | @item RFC 4180 |
| 6624 | @item TDF |
| 6625 | @end itemize |
| 6626 | |
| 6627 | Custom formats can be created using a fluent style API.") |
| 6628 | (license license:asl2.0))) |
| 6629 | |
| 6630 | (define-public java-osgi-annotation |
| 6631 | (package |
| 6632 | (name "java-osgi-annotation") |
| 6633 | (version "6.0.0") |
| 6634 | (source (origin |
| 6635 | (method url-fetch) |
| 6636 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6637 | "org/osgi/org.osgi.annotation/" version "/" |
| 6638 | "org.osgi.annotation-" version "-sources.jar")) |
| 6639 | (sha256 |
| 6640 | (base32 |
| 6641 | "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) |
| 6642 | (build-system ant-build-system) |
| 6643 | (arguments |
| 6644 | `(#:tests? #f ; no tests |
| 6645 | #:jar-name "osgi-annotation.jar")) |
| 6646 | (home-page "https://www.osgi.org") |
| 6647 | (synopsis "Annotation module of OSGi framework") |
| 6648 | (description |
| 6649 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 6650 | and service platform for the Java programming language. This package contains |
| 6651 | the OSGi annotation module, providing additional services to help dynamic |
| 6652 | components.") |
| 6653 | (license license:asl2.0))) |
| 6654 | |
| 6655 | (define-public java-osgi-core |
| 6656 | (package |
| 6657 | (name "java-osgi-core") |
| 6658 | (version "6.0.0") |
| 6659 | (source (origin |
| 6660 | (method url-fetch) |
| 6661 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6662 | "org/osgi/org.osgi.core/" version "/" |
| 6663 | "org.osgi.core-" version "-sources.jar")) |
| 6664 | (sha256 |
| 6665 | (base32 |
| 6666 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) |
| 6667 | (build-system ant-build-system) |
| 6668 | (arguments |
| 6669 | `(#:tests? #f ; no tests |
| 6670 | #:jar-name "osgi-core.jar")) |
| 6671 | (inputs |
| 6672 | `(("java-osgi-annotation" ,java-osgi-annotation))) |
| 6673 | (home-page "https://www.osgi.org") |
| 6674 | (synopsis "Core module of OSGi framework") |
| 6675 | (description |
| 6676 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 6677 | and service platform for the Java programming language. This package contains |
| 6678 | the OSGi Core module.") |
| 6679 | (license license:asl2.0))) |
| 6680 | |
| 6681 | (define-public java-osgi-service-event |
| 6682 | (package |
| 6683 | (name "java-osgi-service-event") |
| 6684 | (version "1.3.1") |
| 6685 | (source (origin |
| 6686 | (method url-fetch) |
| 6687 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6688 | "org/osgi/org.osgi.service.event/" |
| 6689 | version "/org.osgi.service.event-" |
| 6690 | version "-sources.jar")) |
| 6691 | (sha256 |
| 6692 | (base32 |
| 6693 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) |
| 6694 | (build-system ant-build-system) |
| 6695 | (arguments |
| 6696 | `(#:tests? #f ; no tests |
| 6697 | #:jar-name "osgi-service-event.jar")) |
| 6698 | (inputs |
| 6699 | `(("java-osgi-annotation" ,java-osgi-annotation) |
| 6700 | ("java-osgi-core" ,java-osgi-core))) |
| 6701 | (home-page "https://www.osgi.org") |
| 6702 | (synopsis "OSGi service event module") |
| 6703 | (description |
| 6704 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 6705 | and service platform for the Java programming language. This package contains |
| 6706 | the OSGi @code{org.osgi.service.event} module.") |
| 6707 | (license license:asl2.0))) |
| 6708 | |
| 6709 | (define-public java-eclipse-osgi |
| 6710 | (package |
| 6711 | (name "java-eclipse-osgi") |
| 6712 | (version "3.11.3") |
| 6713 | (source (origin |
| 6714 | (method url-fetch) |
| 6715 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6716 | "org/eclipse/platform/org.eclipse.osgi/" |
| 6717 | version "/org.eclipse.osgi-" |
| 6718 | version "-sources.jar")) |
| 6719 | (sha256 |
| 6720 | (base32 |
| 6721 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) |
| 6722 | (build-system ant-build-system) |
| 6723 | (arguments |
| 6724 | `(#:tests? #f ; no tests included |
| 6725 | #:jar-name "eclipse-equinox-osgi.jar")) |
| 6726 | (inputs |
| 6727 | `(("java-osgi-annotation" ,java-osgi-annotation))) |
| 6728 | (home-page "http://www.eclipse.org/equinox/") |
| 6729 | (synopsis "Eclipse Equinox OSGi framework") |
| 6730 | (description "This package provides an implementation of the OSGi Core |
| 6731 | specification.") |
| 6732 | (license license:epl1.0))) |
| 6733 | |
| 6734 | (define-public java-eclipse-equinox-common |
| 6735 | (package |
| 6736 | (name "java-eclipse-equinox-common") |
| 6737 | (version "3.10.200") |
| 6738 | (source (origin |
| 6739 | (method url-fetch) |
| 6740 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6741 | "org/eclipse/platform/org.eclipse.equinox.common/" |
| 6742 | version "/org.eclipse.equinox.common-" |
| 6743 | version "-sources.jar")) |
| 6744 | (sha256 |
| 6745 | (base32 |
| 6746 | "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj")))) |
| 6747 | (build-system ant-build-system) |
| 6748 | (arguments |
| 6749 | `(#:tests? #f ; no tests included |
| 6750 | #:jar-name "eclipse-equinox-common.jar")) |
| 6751 | (inputs |
| 6752 | `(("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6753 | (home-page "http://www.eclipse.org/equinox/") |
| 6754 | (synopsis "Common Eclipse runtime") |
| 6755 | (description "This package provides the common Eclipse runtime.") |
| 6756 | (license license:epl1.0))) |
| 6757 | |
| 6758 | (define-public java-eclipse-core-jobs |
| 6759 | (package |
| 6760 | (name "java-eclipse-core-jobs") |
| 6761 | (version "3.8.0") |
| 6762 | (source (origin |
| 6763 | (method url-fetch) |
| 6764 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6765 | "org/eclipse/platform/org.eclipse.core.jobs/" |
| 6766 | version "/org.eclipse.core.jobs-" |
| 6767 | version "-sources.jar")) |
| 6768 | (sha256 |
| 6769 | (base32 |
| 6770 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) |
| 6771 | (build-system ant-build-system) |
| 6772 | (arguments |
| 6773 | `(#:tests? #f ; no tests included |
| 6774 | #:jar-name "eclipse-core-jobs.jar")) |
| 6775 | (inputs |
| 6776 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6777 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6778 | (home-page "http://www.eclipse.org/equinox/") |
| 6779 | (synopsis "Eclipse jobs mechanism") |
| 6780 | (description "This package provides the Eclipse jobs mechanism.") |
| 6781 | (license license:epl1.0))) |
| 6782 | |
| 6783 | (define-public java-eclipse-equinox-registry |
| 6784 | (package |
| 6785 | (name "java-eclipse-equinox-registry") |
| 6786 | (version "3.6.100") |
| 6787 | (source (origin |
| 6788 | (method url-fetch) |
| 6789 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6790 | "org/eclipse/platform/org.eclipse.equinox.registry/" |
| 6791 | version "/org.eclipse.equinox.registry-" |
| 6792 | version "-sources.jar")) |
| 6793 | (sha256 |
| 6794 | (base32 |
| 6795 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) |
| 6796 | (build-system ant-build-system) |
| 6797 | (arguments |
| 6798 | `(#:tests? #f ; no tests included |
| 6799 | #:jar-name "eclipse-equinox-registry.jar")) |
| 6800 | (inputs |
| 6801 | `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs) |
| 6802 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6803 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6804 | (home-page "http://www.eclipse.org/equinox/") |
| 6805 | (synopsis "Eclipse extension registry support") |
| 6806 | (description "This package provides support for the Eclipse extension |
| 6807 | registry.") |
| 6808 | (license license:epl1.0))) |
| 6809 | |
| 6810 | (define-public java-eclipse-equinox-app |
| 6811 | (package |
| 6812 | (name "java-eclipse-equinox-app") |
| 6813 | (version "1.3.400") |
| 6814 | (source (origin |
| 6815 | (method url-fetch) |
| 6816 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6817 | "org/eclipse/platform/org.eclipse.equinox.app/" |
| 6818 | version "/org.eclipse.equinox.app-" |
| 6819 | version "-sources.jar")) |
| 6820 | (sha256 |
| 6821 | (base32 |
| 6822 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) |
| 6823 | (build-system ant-build-system) |
| 6824 | (arguments |
| 6825 | `(#:tests? #f ; no tests included |
| 6826 | #:jar-name "eclipse-equinox-app.jar")) |
| 6827 | (inputs |
| 6828 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6829 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 6830 | ("java-eclipse-osgi" ,java-eclipse-osgi) |
| 6831 | ("java-osgi-service-event" ,java-osgi-service-event))) |
| 6832 | (home-page "http://www.eclipse.org/equinox/") |
| 6833 | (synopsis "Equinox application container") |
| 6834 | (description "This package provides the Equinox application container for |
| 6835 | Eclipse.") |
| 6836 | (license license:epl1.0))) |
| 6837 | |
| 6838 | (define-public java-eclipse-equinox-preferences |
| 6839 | (package |
| 6840 | (name "java-eclipse-equinox-preferences") |
| 6841 | (version "3.6.1") |
| 6842 | (source (origin |
| 6843 | (method url-fetch) |
| 6844 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6845 | "org/eclipse/platform/org.eclipse.equinox.preferences/" |
| 6846 | version "/org.eclipse.equinox.preferences-" |
| 6847 | version "-sources.jar")) |
| 6848 | (sha256 |
| 6849 | (base32 |
| 6850 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) |
| 6851 | (build-system ant-build-system) |
| 6852 | (arguments |
| 6853 | `(#:tests? #f ; no tests included |
| 6854 | #:jar-name "eclipse-equinox-preferences.jar")) |
| 6855 | (inputs |
| 6856 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6857 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 6858 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6859 | (home-page "http://www.eclipse.org/equinox/") |
| 6860 | (synopsis "Eclipse preferences mechanism") |
| 6861 | (description "This package provides the Eclipse preferences mechanism with |
| 6862 | the module @code{org.eclipse.equinox.preferences}.") |
| 6863 | (license license:epl1.0))) |
| 6864 | |
| 6865 | (define-public java-eclipse-core-contenttype |
| 6866 | (package |
| 6867 | (name "java-eclipse-core-contenttype") |
| 6868 | (version "3.5.100") |
| 6869 | (source (origin |
| 6870 | (method url-fetch) |
| 6871 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6872 | "org/eclipse/platform/org.eclipse.core.contenttype/" |
| 6873 | version "/org.eclipse.core.contenttype-" |
| 6874 | version "-sources.jar")) |
| 6875 | (sha256 |
| 6876 | (base32 |
| 6877 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) |
| 6878 | (build-system ant-build-system) |
| 6879 | (arguments |
| 6880 | `(#:tests? #f ; no tests included |
| 6881 | #:jar-name "eclipse-core-contenttype.jar")) |
| 6882 | (inputs |
| 6883 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6884 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 6885 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 6886 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6887 | (home-page "http://www.eclipse.org/") |
| 6888 | (synopsis "Eclipse content mechanism") |
| 6889 | (description "This package provides the Eclipse content mechanism in the |
| 6890 | @code{org.eclipse.core.contenttype} module.") |
| 6891 | (license license:epl1.0))) |
| 6892 | |
| 6893 | (define-public java-eclipse-core-runtime |
| 6894 | (package |
| 6895 | (name "java-eclipse-core-runtime") |
| 6896 | (version "3.15.100") |
| 6897 | (source (origin |
| 6898 | (method url-fetch) |
| 6899 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6900 | "org/eclipse/platform/org.eclipse.core.runtime/" |
| 6901 | version "/org.eclipse.core.runtime-" |
| 6902 | version "-sources.jar")) |
| 6903 | (sha256 |
| 6904 | (base32 |
| 6905 | "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r")))) |
| 6906 | (build-system ant-build-system) |
| 6907 | (arguments |
| 6908 | `(#:tests? #f ; no tests included |
| 6909 | #:jar-name "eclipse-core-runtime.jar")) |
| 6910 | (inputs |
| 6911 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) |
| 6912 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) |
| 6913 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) |
| 6914 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6915 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 6916 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 6917 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6918 | (home-page "https://www.eclipse.org/") |
| 6919 | (synopsis "Eclipse core runtime") |
| 6920 | (description "This package provides the Eclipse core runtime with the |
| 6921 | module @code{org.eclipse.core.runtime}.") |
| 6922 | (license license:epl1.0))) |
| 6923 | |
| 6924 | (define-public java-eclipse-core-filesystem |
| 6925 | (package |
| 6926 | (name "java-eclipse-core-filesystem") |
| 6927 | (version "1.6.1") |
| 6928 | (source (origin |
| 6929 | (method url-fetch) |
| 6930 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6931 | "org/eclipse/platform/org.eclipse.core.filesystem/" |
| 6932 | version "/org.eclipse.core.filesystem-" |
| 6933 | version "-sources.jar")) |
| 6934 | (sha256 |
| 6935 | (base32 |
| 6936 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) |
| 6937 | (build-system ant-build-system) |
| 6938 | (arguments |
| 6939 | `(#:tests? #f ; no tests included |
| 6940 | #:jar-name "eclipse-core-filesystem.jar")) |
| 6941 | (inputs |
| 6942 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6943 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 6944 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6945 | (home-page "https://www.eclipse.org/") |
| 6946 | (synopsis "Eclipse core file system") |
| 6947 | (description "This package provides the Eclipse core file system with the |
| 6948 | module @code{org.eclipse.core.filesystem}.") |
| 6949 | (license license:epl1.0))) |
| 6950 | |
| 6951 | (define-public java-eclipse-core-expressions |
| 6952 | (package |
| 6953 | (name "java-eclipse-core-expressions") |
| 6954 | (version "3.5.100") |
| 6955 | (source (origin |
| 6956 | (method url-fetch) |
| 6957 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6958 | "org/eclipse/platform/org.eclipse.core.expressions/" |
| 6959 | version "/org.eclipse.core.expressions-" |
| 6960 | version "-sources.jar")) |
| 6961 | (sha256 |
| 6962 | (base32 |
| 6963 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) |
| 6964 | (build-system ant-build-system) |
| 6965 | (arguments |
| 6966 | `(#:tests? #f ; no tests included |
| 6967 | #:jar-name "eclipse-core-expressions.jar")) |
| 6968 | (inputs |
| 6969 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6970 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 6971 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 6972 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 6973 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 6974 | (home-page "https://www.eclipse.org/") |
| 6975 | (synopsis "Eclipse core expression language") |
| 6976 | (description "This package provides the Eclipse core expression language |
| 6977 | with the @code{org.eclipse.core.expressions} module.") |
| 6978 | (license license:epl1.0))) |
| 6979 | |
| 6980 | (define-public java-eclipse-core-variables |
| 6981 | (package |
| 6982 | (name "java-eclipse-core-variables") |
| 6983 | (version "3.3.0") |
| 6984 | (source (origin |
| 6985 | (method url-fetch) |
| 6986 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6987 | "org/eclipse/platform/org.eclipse.core.variables/" |
| 6988 | version "/org.eclipse.core.variables-" |
| 6989 | version "-sources.jar")) |
| 6990 | (sha256 |
| 6991 | (base32 |
| 6992 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) |
| 6993 | (build-system ant-build-system) |
| 6994 | (arguments |
| 6995 | `(#:tests? #f ; no tests included |
| 6996 | #:jar-name "eclipse-core-variables.jar")) |
| 6997 | (inputs |
| 6998 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 6999 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 7000 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 7001 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 7002 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 7003 | (home-page "https://www.eclipse.org/platform") |
| 7004 | (synopsis "Eclipse core variables") |
| 7005 | (description "This package provides the Eclipse core variables module |
| 7006 | @code{org.eclipse.core.variables}.") |
| 7007 | (license license:epl1.0))) |
| 7008 | |
| 7009 | (define-public java-eclipse-ant-core |
| 7010 | (package |
| 7011 | (name "java-eclipse-ant-core") |
| 7012 | (version "3.4.100") |
| 7013 | (source (origin |
| 7014 | (method url-fetch) |
| 7015 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7016 | "org/eclipse/platform/org.eclipse.ant.core/" |
| 7017 | version "/org.eclipse.ant.core-" |
| 7018 | version "-sources.jar")) |
| 7019 | (sha256 |
| 7020 | (base32 |
| 7021 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) |
| 7022 | (build-system ant-build-system) |
| 7023 | (arguments |
| 7024 | `(#:tests? #f ; no tests included |
| 7025 | #:jar-name "eclipse-ant-core.jar")) |
| 7026 | (inputs |
| 7027 | `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app) |
| 7028 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 7029 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 7030 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 7031 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) |
| 7032 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 7033 | ("java-eclipse-core-variables" ,java-eclipse-core-variables) |
| 7034 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 7035 | (home-page "https://www.eclipse.org/platform") |
| 7036 | (synopsis "Ant build tool core libraries") |
| 7037 | (description "This package provides the ant build tool core libraries with |
| 7038 | the module @code{org.eclipse.ant.core}.") |
| 7039 | (license license:epl1.0))) |
| 7040 | |
| 7041 | (define-public java-eclipse-core-resources |
| 7042 | (package |
| 7043 | (name "java-eclipse-core-resources") |
| 7044 | (version "3.13.200") |
| 7045 | (source (origin |
| 7046 | (method url-fetch) |
| 7047 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7048 | "org/eclipse/platform/org.eclipse.core.resources/" |
| 7049 | version "/org.eclipse.core.resources-" |
| 7050 | version "-sources.jar")) |
| 7051 | (sha256 |
| 7052 | (base32 |
| 7053 | "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs")))) |
| 7054 | (build-system ant-build-system) |
| 7055 | (arguments |
| 7056 | `(#:tests? #f ; no tests included |
| 7057 | #:jar-name "eclipse-core-resources.jar")) |
| 7058 | (inputs |
| 7059 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 7060 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 7061 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 7062 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) |
| 7063 | ("java-eclipse-core-expressions" ,java-eclipse-core-expressions) |
| 7064 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) |
| 7065 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) |
| 7066 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 7067 | ("java-eclipse-ant-core" ,java-eclipse-ant-core) |
| 7068 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 7069 | (home-page "https://www.eclipse.org/") |
| 7070 | (synopsis "Eclipse core resource management") |
| 7071 | (description "This package provides the Eclipse core resource management |
| 7072 | module @code{org.eclipse.core.resources}.") |
| 7073 | (license license:epl1.0))) |
| 7074 | |
| 7075 | (define-public java-eclipse-compare-core |
| 7076 | (package |
| 7077 | (name "java-eclipse-compare-core") |
| 7078 | (version "3.6.0") |
| 7079 | (source (origin |
| 7080 | (method url-fetch) |
| 7081 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7082 | "org/eclipse/platform/org.eclipse.compare.core/" |
| 7083 | version "/org.eclipse.compare.core-" |
| 7084 | version "-sources.jar")) |
| 7085 | (sha256 |
| 7086 | (base32 |
| 7087 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) |
| 7088 | (build-system ant-build-system) |
| 7089 | (arguments |
| 7090 | `(#:tests? #f ; no tests included |
| 7091 | #:jar-name "eclipse-compare-core.jar")) |
| 7092 | (inputs |
| 7093 | `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 7094 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 7095 | ("java-eclipse-osgi" ,java-eclipse-osgi) |
| 7096 | ("java-icu4j" ,java-icu4j))) |
| 7097 | (home-page "https://www.eclipse.org/") |
| 7098 | (synopsis "Eclipse core compare support") |
| 7099 | (description "This package provides the Eclipse core compare support |
| 7100 | module @code{org.eclipse.compare.core}.") |
| 7101 | (license license:epl1.0))) |
| 7102 | |
| 7103 | (define-public java-eclipse-team-core |
| 7104 | (package |
| 7105 | (name "java-eclipse-team-core") |
| 7106 | (version "3.8.0") |
| 7107 | (source (origin |
| 7108 | (method url-fetch) |
| 7109 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7110 | "org/eclipse/platform/org.eclipse.team.core/" |
| 7111 | version "/org.eclipse.team.core-" |
| 7112 | version "-sources.jar")) |
| 7113 | (sha256 |
| 7114 | (base32 |
| 7115 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) |
| 7116 | (build-system ant-build-system) |
| 7117 | (arguments |
| 7118 | `(#:tests? #f ; no tests included |
| 7119 | #:jar-name "eclipse-team-core.jar")) |
| 7120 | (inputs |
| 7121 | `(("java-eclipse-compare-core" ,java-eclipse-compare-core) |
| 7122 | ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) |
| 7123 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) |
| 7124 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) |
| 7125 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) |
| 7126 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 7127 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 7128 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 7129 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 7130 | ("java-eclipse-osgi" ,java-eclipse-osgi))) |
| 7131 | (home-page "https://www.eclipse.org/platform") |
| 7132 | (synopsis "Eclipse team support core") |
| 7133 | (description "This package provides the Eclipse team support core module |
| 7134 | @code{org.eclipse.team.core}.") |
| 7135 | (license license:epl1.0))) |
| 7136 | |
| 7137 | (define-public java-eclipse-core-commands |
| 7138 | (package |
| 7139 | (name "java-eclipse-core-commands") |
| 7140 | (version "3.8.1") |
| 7141 | (source (origin |
| 7142 | (method url-fetch) |
| 7143 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7144 | "org/eclipse/platform/org.eclipse.core.commands/" |
| 7145 | version "/org.eclipse.core.commands-" |
| 7146 | version "-sources.jar")) |
| 7147 | (sha256 |
| 7148 | (base32 |
| 7149 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) |
| 7150 | (build-system ant-build-system) |
| 7151 | (arguments |
| 7152 | `(#:tests? #f ; no tests included |
| 7153 | #:jar-name "eclipse-core-commands.jar")) |
| 7154 | (inputs |
| 7155 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common))) |
| 7156 | (home-page "https://www.eclipse.org/platform") |
| 7157 | (synopsis "Eclipse core commands") |
| 7158 | (description "This package provides Eclipse core commands in the module |
| 7159 | @code{org.eclipse.core.commands}.") |
| 7160 | (license license:epl1.0))) |
| 7161 | |
| 7162 | (define-public java-eclipse-text |
| 7163 | (package |
| 7164 | (name "java-eclipse-text") |
| 7165 | (version "3.6.0") |
| 7166 | (source (origin |
| 7167 | (method url-fetch) |
| 7168 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7169 | "org/eclipse/platform/org.eclipse.text/" |
| 7170 | version "/org.eclipse.text-" |
| 7171 | version "-sources.jar")) |
| 7172 | (sha256 |
| 7173 | (base32 |
| 7174 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) |
| 7175 | (build-system ant-build-system) |
| 7176 | (arguments |
| 7177 | `(#:tests? #f ; no tests included |
| 7178 | #:jar-name "eclipse-text.jar" |
| 7179 | #:phases |
| 7180 | (modify-phases %standard-phases |
| 7181 | ;; When creating a new category we must make sure that the new list |
| 7182 | ;; matches List<Position>. By default it seems to be too generic |
| 7183 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. |
| 7184 | ;; Without this we get this error: |
| 7185 | ;; |
| 7186 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: |
| 7187 | ;; error: method put in interface Map<K,V> cannot be applied to given types; |
| 7188 | ;; [javac] fPositions.put(category, new ArrayList<>()); |
| 7189 | ;; [javac] ^ |
| 7190 | ;; [javac] required: String,List<Position> |
| 7191 | ;; [javac] found: String,ArrayList<Object> |
| 7192 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted |
| 7193 | ;; to List<Position> by method invocation conversion |
| 7194 | ;; [javac] where K,V are type-variables: |
| 7195 | ;; [javac] K extends Object declared in interface Map |
| 7196 | ;; [javac] V extends Object declared in interface Map |
| 7197 | ;; |
| 7198 | ;; I don't know if this is a good fix. I suspect it is not, but it |
| 7199 | ;; seems to work. |
| 7200 | (add-after 'unpack 'fix-compilation-error |
| 7201 | (lambda _ |
| 7202 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" |
| 7203 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") |
| 7204 | "Positions.put(category, new ArrayList<Position>());")) |
| 7205 | #t))))) |
| 7206 | (inputs |
| 7207 | `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 7208 | ("java-eclipse-core-commands" ,java-eclipse-core-commands) |
| 7209 | ("java-icu4j" ,java-icu4j))) |
| 7210 | (home-page "http://www.eclipse.org/platform") |
| 7211 | (synopsis "Eclipse text library") |
| 7212 | (description "Platform Text is part of the Platform UI project and |
| 7213 | provides the basic building blocks for text and text editors within Eclipse |
| 7214 | and contributes the Eclipse default text editor.") |
| 7215 | (license license:epl1.0))) |
| 7216 | |
| 7217 | (define-public java-eclipse-jdt-core |
| 7218 | (package |
| 7219 | (name "java-eclipse-jdt-core") |
| 7220 | (version "3.16.0") |
| 7221 | (source (origin |
| 7222 | (method url-fetch) |
| 7223 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7224 | "org/eclipse/jdt/org.eclipse.jdt.core/" |
| 7225 | version "/org.eclipse.jdt.core-" |
| 7226 | version "-sources.jar")) |
| 7227 | (sha256 |
| 7228 | (base32 |
| 7229 | "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k")))) |
| 7230 | (build-system ant-build-system) |
| 7231 | (arguments |
| 7232 | `(#:tests? #f ; no tests included |
| 7233 | #:jar-name "eclipse-jdt-core.jar" |
| 7234 | #:phases |
| 7235 | (modify-phases %standard-phases |
| 7236 | (add-after 'unpack 'move-sources |
| 7237 | (lambda _ |
| 7238 | (with-directory-excursion "src/jdtCompilerAdaptersrc/" |
| 7239 | (for-each (lambda (file) |
| 7240 | (install-file file (string-append "../" (dirname file)))) |
| 7241 | (find-files "." ".*"))) |
| 7242 | (delete-file-recursively "src/jdtCompilerAdaptersrc/") |
| 7243 | #t)) |
| 7244 | (add-before 'build 'copy-resources |
| 7245 | (lambda _ |
| 7246 | (with-directory-excursion "src" |
| 7247 | (for-each (lambda (file) |
| 7248 | (install-file file (string-append "../build/classes/" (dirname file)))) |
| 7249 | (find-files "." ".*.(props|properties|rsc)"))) |
| 7250 | #t))))) |
| 7251 | (inputs |
| 7252 | `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype) |
| 7253 | ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem) |
| 7254 | ("java-eclipse-core-jobs" ,java-eclipse-core-jobs) |
| 7255 | ("java-eclipse-core-resources" ,java-eclipse-core-resources) |
| 7256 | ("java-eclipse-core-runtime" ,java-eclipse-core-runtime) |
| 7257 | ("java-eclipse-equinox-app" ,java-eclipse-equinox-app) |
| 7258 | ("java-eclipse-equinox-common" ,java-eclipse-equinox-common) |
| 7259 | ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences) |
| 7260 | ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry) |
| 7261 | ("java-eclipse-osgi" ,java-eclipse-osgi) |
| 7262 | ("java-eclipse-text" ,java-eclipse-text))) |
| 7263 | (home-page "https://www.eclipse.org/jdt") |
| 7264 | (synopsis "Java development tools core libraries") |
| 7265 | (description "This package provides the core libraries of the Eclipse Java |
| 7266 | development tools.") |
| 7267 | (license license:epl1.0))) |
| 7268 | |
| 7269 | (define-public java-eclipse-jdt-compiler-apt |
| 7270 | (package |
| 7271 | (name "java-eclipse-jdt-compiler-apt") |
| 7272 | (version "1.3.400") |
| 7273 | (source (origin |
| 7274 | (method url-fetch) |
| 7275 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7276 | "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/" |
| 7277 | version "/org.eclipse.jdt.compiler.apt-" |
| 7278 | version "-sources.jar")) |
| 7279 | (sha256 |
| 7280 | (base32 |
| 7281 | "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8")))) |
| 7282 | (build-system ant-build-system) |
| 7283 | (arguments |
| 7284 | `(#:tests? #f ; no tests included |
| 7285 | #:jar-name "eclipse-jdt-compiler-apt.jar" |
| 7286 | #:jdk ,openjdk11)) |
| 7287 | (inputs |
| 7288 | `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core))) |
| 7289 | (home-page "https://www.eclipse.org/jdt/apt/") |
| 7290 | (synopsis "Annotation processing tool") |
| 7291 | (description "APT stands for Annotation Processing Tool. APT provides a |
| 7292 | means for generating files and compiling new Java classes based on annotations |
| 7293 | found in your source code.") |
| 7294 | (license license:epl2.0))) |
| 7295 | |
| 7296 | (define-public java-javax-mail |
| 7297 | (package |
| 7298 | (name "java-javax-mail") |
| 7299 | (version "1.5.6") |
| 7300 | (source (origin |
| 7301 | (method url-fetch) |
| 7302 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7303 | "com/sun/mail/javax.mail/" |
| 7304 | version "/javax.mail-" |
| 7305 | version "-sources.jar")) |
| 7306 | (sha256 |
| 7307 | (base32 |
| 7308 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) |
| 7309 | (build-system ant-build-system) |
| 7310 | (arguments |
| 7311 | `(#:tests? #f ; no tests |
| 7312 | #:jar-name "javax-mail.jar")) |
| 7313 | (home-page "https://javamail.java.net") |
| 7314 | (synopsis "Reference implementation of the JavaMail API") |
| 7315 | (description |
| 7316 | "This package provides versions of the JavaMail API implementation, IMAP, |
| 7317 | SMTP, and POP3 service providers, some examples, and documentation for the |
| 7318 | JavaMail API.") |
| 7319 | ;; GPLv2 only with "classpath exception". |
| 7320 | (license license:gpl2))) |
| 7321 | |
| 7322 | (define-public java-log4j-api |
| 7323 | (package |
| 7324 | (name "java-log4j-api") |
| 7325 | (version "2.4.1") |
| 7326 | (source (origin |
| 7327 | (method url-fetch) |
| 7328 | (uri (string-append "mirror://apache/logging/log4j/" version |
| 7329 | "/apache-log4j-" version "-src.tar.gz")) |
| 7330 | (sha256 |
| 7331 | (base32 |
| 7332 | "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd")))) |
| 7333 | (build-system ant-build-system) |
| 7334 | (arguments |
| 7335 | `(#:tests? #f ; tests require unpackaged software |
| 7336 | #:jar-name "log4j-api.jar" |
| 7337 | #:make-flags |
| 7338 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") |
| 7339 | "/share/java")) |
| 7340 | #:phases |
| 7341 | (modify-phases %standard-phases |
| 7342 | (add-after 'unpack 'enter-dir |
| 7343 | (lambda _ (chdir "log4j-api") #t)) |
| 7344 | ;; FIXME: The tests require additional software that has not been |
| 7345 | ;; packaged yet, such as |
| 7346 | ;; * org.apache.maven |
| 7347 | ;; * org.apache.felix |
| 7348 | (add-after 'enter-dir 'delete-tests |
| 7349 | (lambda _ (delete-file-recursively "src/test") #t))))) |
| 7350 | (inputs |
| 7351 | `(("java-osgi-core" ,java-osgi-core) |
| 7352 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 7353 | ("java-junit" ,java-junit))) |
| 7354 | (home-page "https://logging.apache.org/log4j/2.x/") |
| 7355 | (synopsis "API module of the Log4j logging framework for Java") |
| 7356 | (description |
| 7357 | "This package provides the API module of the Log4j logging framework for |
| 7358 | Java.") |
| 7359 | (license license:asl2.0))) |
| 7360 | |
| 7361 | (define-public java-log4j-core |
| 7362 | (package |
| 7363 | (inherit java-log4j-api) |
| 7364 | (name "java-log4j-core") |
| 7365 | (inputs |
| 7366 | `(("java-osgi-core" ,java-osgi-core) |
| 7367 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 7368 | ("java-log4j-api" ,java-log4j-api) |
| 7369 | ("java-mail" ,java-mail) |
| 7370 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) |
| 7371 | ("java-lmax-disruptor" ,java-lmax-disruptor) |
| 7372 | ("java-kafka" ,java-kafka-clients) |
| 7373 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) |
| 7374 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 7375 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) |
| 7376 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) |
| 7377 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) |
| 7378 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) |
| 7379 | ("java-commons-compress" ,java-commons-compress) |
| 7380 | ("java-commons-csv" ,java-commons-csv) |
| 7381 | ("java-jeromq" ,java-jeromq) |
| 7382 | ("java-junit" ,java-junit))) |
| 7383 | (native-inputs |
| 7384 | `(("hamcrest" ,java-hamcrest-all) |
| 7385 | ("java-commons-io" ,java-commons-io) |
| 7386 | ("java-commons-lang3" ,java-commons-lang3) |
| 7387 | ("slf4j" ,java-slf4j-api))) |
| 7388 | (arguments |
| 7389 | `(#:tests? #f ; tests require more dependencies |
| 7390 | #:test-dir "src/test" |
| 7391 | #:source-dir "src/main/java" |
| 7392 | #:jar-name "log4j-core.jar" |
| 7393 | #:jdk ,icedtea-8 |
| 7394 | #:make-flags |
| 7395 | (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out") |
| 7396 | "/share/java")) |
| 7397 | #:phases |
| 7398 | (modify-phases %standard-phases |
| 7399 | (add-after 'unpack 'enter-dir |
| 7400 | (lambda _ (chdir "log4j-core") #t))))) |
| 7401 | (synopsis "Core component of the Log4j framework") |
| 7402 | (description "This package provides the core component of the Log4j |
| 7403 | logging framework for Java."))) |
| 7404 | |
| 7405 | (define-public java-log4j-1.2-api |
| 7406 | (package |
| 7407 | (inherit java-log4j-api) |
| 7408 | (name "java-log4j-1.2-api") |
| 7409 | (arguments |
| 7410 | `(#:jar-name "java-log4j-1.2-api.jar" |
| 7411 | #:source-dir "log4j-1.2-api/src/main/java" |
| 7412 | #:jdk ,icedtea-8 |
| 7413 | ;; Tests require maven-model (and other maven subprojects), which is a |
| 7414 | ;; cyclic dependency. |
| 7415 | #:tests? #f)) |
| 7416 | (inputs |
| 7417 | `(("log4j-api" ,java-log4j-api) |
| 7418 | ("log4j-core" ,java-log4j-core) |
| 7419 | ("osgi-core" ,java-osgi-core) |
| 7420 | ("eclipse-osgi" ,java-eclipse-osgi) |
| 7421 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) |
| 7422 | |
| 7423 | (define-public java-commons-cli |
| 7424 | (package |
| 7425 | (name "java-commons-cli") |
| 7426 | (version "1.4") |
| 7427 | (source (origin |
| 7428 | (method url-fetch) |
| 7429 | (uri (string-append "mirror://apache/commons/cli/source/" |
| 7430 | "commons-cli-" version "-src.tar.gz")) |
| 7431 | (sha256 |
| 7432 | (base32 |
| 7433 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
| 7434 | (build-system ant-build-system) |
| 7435 | ;; TODO: javadoc |
| 7436 | (arguments |
| 7437 | `(#:jar-name "commons-cli.jar" |
| 7438 | #:phases |
| 7439 | (modify-phases %standard-phases |
| 7440 | (replace 'install |
| 7441 | (install-from-pom "pom.xml"))))) |
| 7442 | (native-inputs |
| 7443 | `(("java-junit" ,java-junit) |
| 7444 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 7445 | (home-page "https://commons.apache.org/cli/") |
| 7446 | (synopsis "Command line arguments and options parsing library") |
| 7447 | (description "The Apache Commons CLI library provides an API for parsing |
| 7448 | command line options passed to programs. It is also able to print help |
| 7449 | messages detailing the options available for a command line tool. |
| 7450 | |
| 7451 | Commons CLI supports different types of options: |
| 7452 | |
| 7453 | @itemize |
| 7454 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) |
| 7455 | @item GNU like long options (ie. du --human-readable --max-depth=1) |
| 7456 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) |
| 7457 | @item Short options with value attached (ie. gcc -O2 foo.c) |
| 7458 | @item long options with single hyphen (ie. ant -projecthelp) |
| 7459 | @end itemize |
| 7460 | |
| 7461 | This is a part of the Apache Commons Project.") |
| 7462 | (license license:asl2.0))) |
| 7463 | |
| 7464 | (define-public java-commons-codec |
| 7465 | (package |
| 7466 | (name "java-commons-codec") |
| 7467 | (version "1.14") |
| 7468 | (source (origin |
| 7469 | (method url-fetch) |
| 7470 | (uri (string-append "mirror://apache/commons/codec/source/" |
| 7471 | "commons-codec-" version "-src.tar.gz")) |
| 7472 | (sha256 |
| 7473 | (base32 |
| 7474 | "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9")))) |
| 7475 | (build-system ant-build-system) |
| 7476 | (arguments |
| 7477 | `(#:jar-name "java-commons-codec.jar" |
| 7478 | #:source-dir "src/main/java" |
| 7479 | #:test-dir "src/test" |
| 7480 | #:test-exclude (list "**/*AbstractTest.java") |
| 7481 | #:phases |
| 7482 | (modify-phases %standard-phases |
| 7483 | (add-before 'build 'copy-resources |
| 7484 | (lambda _ |
| 7485 | (copy-recursively "src/main/resources" |
| 7486 | "build/classes") |
| 7487 | #t)) |
| 7488 | (add-before 'check 'copy-test-resources |
| 7489 | (lambda _ |
| 7490 | (copy-recursively "src/test/resources" |
| 7491 | "build/test-classes") |
| 7492 | #t)) |
| 7493 | (replace 'install (install-from-pom "pom.xml"))))) |
| 7494 | (native-inputs |
| 7495 | `(("java-commons-lang3" ,java-commons-lang3) |
| 7496 | ("java-junit" ,java-junit))) |
| 7497 | (propagated-inputs |
| 7498 | `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50))) |
| 7499 | (home-page "https://commons.apache.org/codec/") |
| 7500 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") |
| 7501 | (description "The codec package contains simple encoder and decoders for |
| 7502 | various formats such as Base64 and Hexadecimal. In addition to these widely |
| 7503 | used encoders and decoders, the codec package also maintains a collection of |
| 7504 | phonetic encoding utilities. |
| 7505 | |
| 7506 | This is a part of the Apache Commons Project.") |
| 7507 | (license license:asl2.0))) |
| 7508 | |
| 7509 | (define-public java-commons-daemon |
| 7510 | (package |
| 7511 | (name "java-commons-daemon") |
| 7512 | (version "1.1.0") |
| 7513 | (source (origin |
| 7514 | (method url-fetch) |
| 7515 | (uri (string-append "mirror://apache/commons/daemon/source/" |
| 7516 | "commons-daemon-" version "-src.tar.gz")) |
| 7517 | (sha256 |
| 7518 | (base32 |
| 7519 | "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n")))) |
| 7520 | (build-system ant-build-system) |
| 7521 | (arguments |
| 7522 | `(#:test-target "test" |
| 7523 | #:phases |
| 7524 | (modify-phases %standard-phases |
| 7525 | (add-after 'build 'build-javadoc ant-build-javadoc) |
| 7526 | (replace 'install (install-jars "dist")) |
| 7527 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) |
| 7528 | (native-inputs |
| 7529 | `(("java-junit" ,java-junit))) |
| 7530 | (home-page "https://commons.apache.org/daemon/") |
| 7531 | (synopsis "Library to launch Java applications as daemons") |
| 7532 | (description "The Daemon package from Apache Commons can be used to |
| 7533 | implement Java applications which can be launched as daemons. For example the |
| 7534 | program will be notified about a shutdown so that it can perform cleanup tasks |
| 7535 | before its process of execution is destroyed by the operation system. |
| 7536 | |
| 7537 | This package contains the Java library. You will also need the actual binary |
| 7538 | for your architecture which is provided by the jsvc package. |
| 7539 | |
| 7540 | This is a part of the Apache Commons Project.") |
| 7541 | (license license:asl2.0))) |
| 7542 | |
| 7543 | (define-public java-javaewah |
| 7544 | (package |
| 7545 | (name "java-javaewah") |
| 7546 | (version "1.1.6") |
| 7547 | (source (origin |
| 7548 | (method git-fetch) |
| 7549 | (uri (git-reference |
| 7550 | (url "https://github.com/lemire/javaewah/") |
| 7551 | (commit (string-append "JavaEWAH-" version)))) |
| 7552 | (file-name (git-file-name name version)) |
| 7553 | (sha256 |
| 7554 | (base32 |
| 7555 | "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw")))) |
| 7556 | (build-system ant-build-system) |
| 7557 | (arguments `(#:jar-name "javaewah.jar")) |
| 7558 | (inputs |
| 7559 | `(("java-junit" ,java-junit) |
| 7560 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 7561 | (home-page "https://github.com/lemire/javaewah") |
| 7562 | (synopsis "Compressed alternative to the Java @code{BitSet} class") |
| 7563 | (description "This is a word-aligned compressed variant of the Java |
| 7564 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like |
| 7565 | compression scheme. It can be used to implement bitmap indexes. |
| 7566 | |
| 7567 | The goal of word-aligned compression is not to achieve the best compression, |
| 7568 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU |
| 7569 | cycles, maybe at the expense of storage. However, the EWAH scheme is always |
| 7570 | more efficient storage-wise than an uncompressed bitmap (as implemented in the |
| 7571 | @code{BitSet} class by Sun).") |
| 7572 | ;; GPL2.0 derivates are explicitly allowed. |
| 7573 | (license license:asl2.0))) |
| 7574 | |
| 7575 | (define-public java-slf4j-api |
| 7576 | (package |
| 7577 | (name "java-slf4j-api") |
| 7578 | (version "1.7.25") |
| 7579 | (source (origin |
| 7580 | (method url-fetch) |
| 7581 | (uri (string-append "https://www.slf4j.org/dist/slf4j-" |
| 7582 | version ".tar.gz")) |
| 7583 | (sha256 |
| 7584 | (base32 |
| 7585 | "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb")) |
| 7586 | (modules '((guix build utils))) |
| 7587 | ;; Delete bundled jars. |
| 7588 | (snippet |
| 7589 | '(begin |
| 7590 | (for-each delete-file (find-files "." "\\.jar$")) |
| 7591 | #t)))) |
| 7592 | (build-system ant-build-system) |
| 7593 | (arguments |
| 7594 | `(#:jar-name "slf4j-api.jar" |
| 7595 | #:source-dir "slf4j-api/src/main" |
| 7596 | #:test-dir "slf4j-api/src/test" |
| 7597 | #:phases |
| 7598 | (modify-phases %standard-phases |
| 7599 | (add-after 'build 'regenerate-jar |
| 7600 | (lambda _ |
| 7601 | ;; pom.xml ignores these files in the jar creation process. If we don't, |
| 7602 | ;; we get the error "This code should have never made it into slf4j-api.jar" |
| 7603 | (delete-file-recursively "build/classes/org/slf4j/impl") |
| 7604 | (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C" |
| 7605 | "build/classes" "."))) |
| 7606 | (add-before 'check 'dont-test-abstract-classes |
| 7607 | (lambda _ |
| 7608 | ;; abstract classes are not meant to be run with junit |
| 7609 | (substitute* "build.xml" |
| 7610 | (("<include name=\"\\*\\*/\\*Test.java\" />") |
| 7611 | (string-append "<include name=\"**/*Test.java\" />" |
| 7612 | "<exclude name=\"**/MultithreadedInitializationTest" |
| 7613 | ".java\" />"))) |
| 7614 | #t)) |
| 7615 | (replace 'install |
| 7616 | (install-from-pom "slf4j-api/pom.xml"))))) |
| 7617 | (propagated-inputs |
| 7618 | `(("java-slf4j-parent" ,java-slf4j-parent))) |
| 7619 | (native-inputs |
| 7620 | `(("java-junit" ,java-junit) |
| 7621 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 7622 | (home-page "https://www.slf4j.org/") |
| 7623 | (synopsis "Simple logging facade for Java") |
| 7624 | (description "The Simple Logging Facade for Java (SLF4J) serves as a |
| 7625 | simple facade or abstraction for various logging |
| 7626 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) |
| 7627 | allowing the end user to plug in the desired logging framework at deployment |
| 7628 | time.") |
| 7629 | (license license:expat))) |
| 7630 | |
| 7631 | (define java-slf4j-parent |
| 7632 | (package |
| 7633 | (inherit java-slf4j-api) |
| 7634 | (name "java-slf4j-parent") |
| 7635 | (native-inputs `()) |
| 7636 | (propagated-inputs '()) |
| 7637 | (arguments |
| 7638 | `(#:tests? #f |
| 7639 | #:phases |
| 7640 | (modify-phases %standard-phases |
| 7641 | (delete 'build) |
| 7642 | (delete 'configure) |
| 7643 | (replace 'install |
| 7644 | (install-pom-file "pom.xml"))))))) |
| 7645 | |
| 7646 | (define-public java-slf4j-simple |
| 7647 | (package |
| 7648 | (name "java-slf4j-simple") |
| 7649 | (version "1.7.25") |
| 7650 | (source (package-source java-slf4j-api)) |
| 7651 | (build-system ant-build-system) |
| 7652 | (arguments |
| 7653 | `(#:jar-name "slf4j-simple.jar" |
| 7654 | #:source-dir "slf4j-simple/src/main" |
| 7655 | #:test-dir "slf4j-simple/src/test" |
| 7656 | #:phases |
| 7657 | (modify-phases %standard-phases |
| 7658 | ;; The tests need some test classes from slf4j-api |
| 7659 | (add-before 'check 'build-slf4j-api-test-helpers |
| 7660 | (lambda _ |
| 7661 | ;; Add current dir to CLASSPATH ... |
| 7662 | (setenv "CLASSPATH" |
| 7663 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) |
| 7664 | ;; ... and build test helper classes here: |
| 7665 | (apply invoke |
| 7666 | `("javac" "-d" "." |
| 7667 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))) |
| 7668 | (replace 'install |
| 7669 | (install-from-pom "slf4j-simple/pom.xml"))))) |
| 7670 | (propagated-inputs |
| 7671 | `(("java-slf4j-api" ,java-slf4j-api))) |
| 7672 | (native-inputs |
| 7673 | `(("java-junit" ,java-junit) |
| 7674 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 7675 | (home-page "https://www.slf4j.org/") |
| 7676 | (synopsis "Simple implementation of simple logging facade for Java") |
| 7677 | (description "SLF4J binding for the Simple implementation, which outputs |
| 7678 | all events to System.err. Only messages of level INFO and higher are |
| 7679 | printed.") |
| 7680 | (license license:expat))) |
| 7681 | |
| 7682 | (define-public antlr2 |
| 7683 | (package |
| 7684 | (name "antlr2") |
| 7685 | (version "2.7.7") |
| 7686 | (source (origin |
| 7687 | (method url-fetch) |
| 7688 | (uri (string-append "https://www.antlr2.org/download/antlr-" |
| 7689 | version ".tar.gz")) |
| 7690 | (sha256 |
| 7691 | (base32 |
| 7692 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) |
| 7693 | (modules '((guix build utils))) |
| 7694 | (snippet |
| 7695 | '(begin |
| 7696 | (delete-file "antlr.jar") |
| 7697 | (substitute* "lib/cpp/antlr/CharScanner.hpp" |
| 7698 | (("#include <map>") |
| 7699 | (string-append |
| 7700 | "#include <map>\n" |
| 7701 | "#define EOF (-1)\n" |
| 7702 | "#include <strings.h>"))) |
| 7703 | (substitute* "configure" |
| 7704 | (("/bin/sh") "sh")) |
| 7705 | #t)))) |
| 7706 | (build-system gnu-build-system) |
| 7707 | (arguments |
| 7708 | `(#:tests? #f ; no test target |
| 7709 | #:imported-modules ((guix build ant-build-system) |
| 7710 | (guix build syscalls) |
| 7711 | ,@%gnu-build-system-modules) |
| 7712 | #:modules (((guix build ant-build-system) #:prefix ant:) |
| 7713 | (guix build gnu-build-system) |
| 7714 | (guix build utils)) |
| 7715 | #:phases |
| 7716 | (modify-phases %standard-phases |
| 7717 | (add-after 'install 'strip-jar-timestamps |
| 7718 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
| 7719 | (add-before 'configure 'fix-timestamp |
| 7720 | (lambda _ |
| 7721 | (substitute* "configure" |
| 7722 | (("^TIMESTAMP.*") "TIMESTAMP=19700101\n")) |
| 7723 | #t)) |
| 7724 | (add-after 'configure 'fix-bin-ls |
| 7725 | (lambda _ |
| 7726 | (substitute* (find-files "." "Makefile") |
| 7727 | (("/bin/ls") "ls")) |
| 7728 | #t))))) |
| 7729 | (native-inputs |
| 7730 | `(("which" ,which) |
| 7731 | ("zip" ,zip) |
| 7732 | ("java" ,icedtea "jdk"))) |
| 7733 | (inputs |
| 7734 | `(("java" ,icedtea))) |
| 7735 | (home-page "https://www.antlr2.org") |
| 7736 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
| 7737 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) |
| 7738 | is a language tool that provides a framework for constructing recognizers, |
| 7739 | compilers, and translators from grammatical descriptions containing Java, C#, |
| 7740 | C++, or Python actions. ANTLR provides excellent support for tree construction, |
| 7741 | tree walking, and translation.") |
| 7742 | (license license:public-domain))) |
| 7743 | |
| 7744 | (define-public java-stringtemplate-3 |
| 7745 | (package |
| 7746 | (name "java-stringtemplate") |
| 7747 | (version "3.2.1") |
| 7748 | (source (origin |
| 7749 | (method url-fetch) |
| 7750 | (uri (string-append "https://github.com/antlr/website-st4/raw/" |
| 7751 | "gh-pages/download/stringtemplate-" |
| 7752 | version ".tar.gz")) |
| 7753 | (sha256 |
| 7754 | (base32 |
| 7755 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) |
| 7756 | (build-system ant-build-system) |
| 7757 | (arguments |
| 7758 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 7759 | #:test-dir "test" |
| 7760 | #:modules ((guix build ant-build-system) |
| 7761 | (guix build utils) |
| 7762 | (srfi srfi-1)) |
| 7763 | #:phases |
| 7764 | (modify-phases %standard-phases |
| 7765 | (add-before 'check 'fix-tests |
| 7766 | (lambda _ |
| 7767 | (substitute* "build.xml" |
| 7768 | (("\\$\\{test.home\\}/java") |
| 7769 | "${test.home}/org")) |
| 7770 | #t)) |
| 7771 | (add-before 'build 'generate-grammar |
| 7772 | (lambda _ |
| 7773 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
| 7774 | (for-each (lambda (file) |
| 7775 | (format #t "~a\n" file) |
| 7776 | (invoke "antlr" file)) |
| 7777 | '("template.g" "angle.bracket.template.g" "action.g" |
| 7778 | "eval.g" "group.g" "interface.g"))) |
| 7779 | #t))))) |
| 7780 | (native-inputs |
| 7781 | `(("antlr" ,antlr2) |
| 7782 | ("java-junit" ,java-junit))) |
| 7783 | (home-page "https://www.stringtemplate.org") |
| 7784 | (synopsis "Template engine to generate formatted text output") |
| 7785 | (description "StringTemplate is a java template engine (with ports for C#, |
| 7786 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, |
| 7787 | or any other formatted text output. StringTemplate is particularly good at |
| 7788 | code generators, multiple site skins, and internationalization / localization. |
| 7789 | StringTemplate also powers ANTLR.") |
| 7790 | (license license:bsd-3))) |
| 7791 | |
| 7792 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on |
| 7793 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar |
| 7794 | ;; files and uses antlr3 at runtime. The latest version requires a recent version |
| 7795 | ;; of antlr3 at runtime. |
| 7796 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. |
| 7797 | ;; This version of ST4 is sufficient for the latest antlr3. |
| 7798 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build |
| 7799 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked |
| 7800 | ;; against the latest ST4. |
| 7801 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an |
| 7802 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses |
| 7803 | ;; only grammar files with the antlr2 syntax. |
| 7804 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. |
| 7805 | |
| 7806 | (define-public java-stringtemplate |
| 7807 | (package (inherit java-stringtemplate-3) |
| 7808 | (name "java-stringtemplate") |
| 7809 | (version "4.0.8") |
| 7810 | (source (origin |
| 7811 | (method url-fetch) |
| 7812 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" |
| 7813 | version ".tar.gz")) |
| 7814 | (file-name (string-append name "-" version ".tar.gz")) |
| 7815 | (sha256 |
| 7816 | (base32 |
| 7817 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) |
| 7818 | (build-system ant-build-system) |
| 7819 | (arguments |
| 7820 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 7821 | #:tests? #f ; FIXME: tests fail for unknown reasons |
| 7822 | #:test-dir "test" |
| 7823 | #:modules ((guix build ant-build-system) |
| 7824 | (guix build utils) |
| 7825 | (srfi srfi-1)) |
| 7826 | #:phases |
| 7827 | (modify-phases %standard-phases |
| 7828 | (add-before 'check 'fix-test-target |
| 7829 | (lambda _ |
| 7830 | (substitute* "build.xml" |
| 7831 | (("\\$\\{test.home\\}/java") "${test.home}/") |
| 7832 | (("\\*Test.java") "Test*.java")) |
| 7833 | #t)) |
| 7834 | (add-before 'build 'generate-grammar |
| 7835 | (lambda _ |
| 7836 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" |
| 7837 | (for-each (lambda (file) |
| 7838 | (format #t "~a\n" file) |
| 7839 | (invoke "antlr3" file)) |
| 7840 | '("STParser.g" "Group.g" "CodeGenerator.g"))) |
| 7841 | #t))))) |
| 7842 | (inputs |
| 7843 | `(("antlr3" ,antlr3-bootstrap) |
| 7844 | ("antlr2" ,antlr2) |
| 7845 | ("java-stringtemplate" ,java-stringtemplate-3) |
| 7846 | ("java-junit" ,java-junit))))) |
| 7847 | |
| 7848 | (define java-stringtemplate-4.0.6 |
| 7849 | (package (inherit java-stringtemplate) |
| 7850 | (name "java-stringtemplate") |
| 7851 | (version "4.0.6") |
| 7852 | (source (origin |
| 7853 | (method url-fetch) |
| 7854 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" |
| 7855 | version ".tar.gz")) |
| 7856 | (file-name (string-append name "-" version ".tar.gz")) |
| 7857 | (sha256 |
| 7858 | (base32 |
| 7859 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) |
| 7860 | (inputs |
| 7861 | `(("antlr3" ,antlr3-3.3) |
| 7862 | ("antlr2" ,antlr2) |
| 7863 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
| 7864 | |
| 7865 | (define-public antlr3 |
| 7866 | (package |
| 7867 | (name "antlr3") |
| 7868 | (version "3.5.2") |
| 7869 | (source (origin |
| 7870 | (method git-fetch) |
| 7871 | (uri (git-reference |
| 7872 | (url "https://github.com/antlr/antlr3") |
| 7873 | (commit version))) |
| 7874 | (file-name (git-file-name name version)) |
| 7875 | (sha256 |
| 7876 | (base32 |
| 7877 | "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf")))) |
| 7878 | (build-system ant-build-system) |
| 7879 | (arguments |
| 7880 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 7881 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" |
| 7882 | #:tests? #f |
| 7883 | #:phases |
| 7884 | (modify-phases %standard-phases |
| 7885 | (add-after 'install 'bin-install |
| 7886 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 7887 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
| 7888 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 7889 | (mkdir-p bin) |
| 7890 | (with-output-to-file (string-append bin "/antlr3") |
| 7891 | (lambda _ |
| 7892 | (display |
| 7893 | (string-append "#!" (which "sh") "\n" |
| 7894 | "java -cp " jar "/" ,name "-" ,version ".jar:" |
| 7895 | (string-concatenate |
| 7896 | (find-files (assoc-ref inputs "stringtemplate") |
| 7897 | ".*\\.jar")) |
| 7898 | ":" |
| 7899 | (string-concatenate |
| 7900 | (find-files (assoc-ref inputs "stringtemplate4") |
| 7901 | ".*\\.jar")) |
| 7902 | ":" |
| 7903 | (string-concatenate |
| 7904 | (find-files (string-append |
| 7905 | (assoc-ref inputs "antlr") |
| 7906 | "/lib") |
| 7907 | ".*\\.jar")) |
| 7908 | " org.antlr.Tool $*")))) |
| 7909 | (chmod (string-append bin "/antlr3") #o755)) |
| 7910 | #t)) |
| 7911 | (add-before 'build 'generate-grammar |
| 7912 | (lambda _ |
| 7913 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") |
| 7914 | (for-each (lambda (file) |
| 7915 | (display file) |
| 7916 | (newline) |
| 7917 | (invoke "antlr3" file)) |
| 7918 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" |
| 7919 | "AssignTokenTypesWalker.g" |
| 7920 | "ActionTranslator.g" "TreeToNFAConverter.g" |
| 7921 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" |
| 7922 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) |
| 7923 | (substitute* "ANTLRParser.java" |
| 7924 | (("public Object getTree") "public GrammarAST getTree")) |
| 7925 | (substitute* "ANTLRv3Parser.java" |
| 7926 | (("public Object getTree") "public CommonTree getTree")) |
| 7927 | (chdir "../../../../../java") |
| 7928 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
| 7929 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; |
| 7930 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) |
| 7931 | (substitute* "org/antlr/tool/ErrorManager.java" |
| 7932 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) |
| 7933 | (chdir "../../../..") |
| 7934 | #t)) |
| 7935 | (add-before 'build 'fix-build-xml |
| 7936 | (lambda _ |
| 7937 | (substitute* "build.xml" |
| 7938 | (("target name=\"compile\">") |
| 7939 | "target name=\"compile\"> |
| 7940 | <copy todir=\"${classes.dir}\"> |
| 7941 | <fileset dir=\"tool/src/main/resources\"> |
| 7942 | <include name=\"**/*.stg\"/> |
| 7943 | <include name=\"**/*.st\"/> |
| 7944 | <include name=\"**/*.sti\"/> |
| 7945 | <include name=\"**/STLexer.tokens\"/> |
| 7946 | </fileset> |
| 7947 | </copy>")) |
| 7948 | #t))))) |
| 7949 | (native-inputs |
| 7950 | `(("antlr" ,antlr2) |
| 7951 | ("antlr3" ,antlr3-bootstrap))) |
| 7952 | (inputs |
| 7953 | `(("junit" ,java-junit) |
| 7954 | ("stringtemplate" ,java-stringtemplate-3) |
| 7955 | ("stringtemplate4" ,java-stringtemplate))) |
| 7956 | (propagated-inputs |
| 7957 | `(("stringtemplate" ,java-stringtemplate-3) |
| 7958 | ("antlr" ,antlr2) |
| 7959 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
| 7960 | (home-page "https://www.antlr3.org") |
| 7961 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
| 7962 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) |
| 7963 | is a language tool that provides a framework for constructing recognizers, |
| 7964 | compilers, and translators from grammatical descriptions containing Java, C#, |
| 7965 | C++, or Python actions. ANTLR provides excellent support for tree construction, |
| 7966 | tree walking, and translation.") |
| 7967 | (license license:bsd-3))) |
| 7968 | |
| 7969 | (define antlr3-bootstrap |
| 7970 | (package |
| 7971 | (inherit antlr3) |
| 7972 | (name "antlr3-bootstrap") |
| 7973 | (native-inputs |
| 7974 | `(("antlr" ,antlr2) |
| 7975 | ("antlr3" ,antlr3-3.3))) |
| 7976 | (inputs |
| 7977 | `(("junit" ,java-junit))))) |
| 7978 | |
| 7979 | (define-public antlr3-3.3 |
| 7980 | (package |
| 7981 | (inherit antlr3) |
| 7982 | (name "antlr3") |
| 7983 | (version "3.3") |
| 7984 | (source (origin |
| 7985 | (method url-fetch) |
| 7986 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
| 7987 | "gh-pages/download/antlr-" |
| 7988 | version ".tar.gz")) |
| 7989 | (sha256 |
| 7990 | (base32 |
| 7991 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
| 7992 | (patches |
| 7993 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) |
| 7994 | (arguments |
| 7995 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 7996 | #:source-dir (string-join '("tool/src/main/java" |
| 7997 | "runtime/Java/src/main/java" |
| 7998 | "tool/src/main/antlr2" |
| 7999 | "tool/src/main/antlr3") |
| 8000 | ":") |
| 8001 | #:tests? #f ; FIXME: tests seem to require maven plugin |
| 8002 | #:modules ((guix build ant-build-system) |
| 8003 | (guix build utils) |
| 8004 | (srfi srfi-1)) |
| 8005 | #:phases |
| 8006 | (modify-phases %standard-phases |
| 8007 | (add-after 'install 'bin-install |
| 8008 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 8009 | (let* ((out (assoc-ref outputs "out")) |
| 8010 | (jar (string-append out "/share/java")) |
| 8011 | (bin (string-append out "/bin"))) |
| 8012 | (mkdir-p bin) |
| 8013 | (with-output-to-file (string-append bin "/antlr3") |
| 8014 | (lambda _ |
| 8015 | (display |
| 8016 | (string-append |
| 8017 | "#!" (which "sh") "\n" |
| 8018 | "java -cp " jar "/antlr3-3.3.jar:" |
| 8019 | (string-join |
| 8020 | (append (find-files (assoc-ref inputs "java-stringtemplate") |
| 8021 | ".*\\.jar$") |
| 8022 | (find-files (string-append (assoc-ref inputs "antlr") |
| 8023 | "/lib") |
| 8024 | ".*\\.jar$")) |
| 8025 | ":") |
| 8026 | " org.antlr.Tool $*")))) |
| 8027 | (chmod (string-append bin "/antlr3") #o755) |
| 8028 | #t))) |
| 8029 | (add-before 'build 'generate-grammar |
| 8030 | (lambda _ |
| 8031 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
| 8032 | (("import org.antlr.grammar.v2.\\*;") |
| 8033 | "import org.antlr.grammar.v2.*;\n |
| 8034 | import org.antlr.grammar.v2.TreeToNFAConverter;\n |
| 8035 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n |
| 8036 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
| 8037 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" |
| 8038 | (for-each (lambda (file) |
| 8039 | (format #t "~a\n" file) |
| 8040 | (invoke "antlr" file)) |
| 8041 | '("antlr.g" "antlr.print.g" "assign.types.g" |
| 8042 | "buildnfa.g" "codegen.g" "define.g"))) |
| 8043 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" |
| 8044 | (for-each (lambda (file) |
| 8045 | (format #t "~a\n" file) |
| 8046 | (invoke "antlr3" file)) |
| 8047 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" |
| 8048 | "ANTLRv3Tree.g"))) |
| 8049 | #t)) |
| 8050 | (add-before 'build 'fix-build-xml |
| 8051 | (lambda _ |
| 8052 | (substitute* "build.xml" |
| 8053 | (("target name=\"compile\">") |
| 8054 | "target name=\"compile\"> |
| 8055 | <copy todir=\"${classes.dir}\"> |
| 8056 | <fileset dir=\"tool/src/main/resources\"> |
| 8057 | <include name=\"**/*.stg\"/> |
| 8058 | <include name=\"**/*.st\"/> |
| 8059 | <include name=\"**/*.sti\"/> |
| 8060 | <include name=\"**/STLexer.tokens\"/> |
| 8061 | </fileset> |
| 8062 | </copy>")) |
| 8063 | #t))))) |
| 8064 | (native-inputs |
| 8065 | `(("antlr" ,antlr2) |
| 8066 | ("antlr3" ,antlr3-3.1))) |
| 8067 | (inputs |
| 8068 | `(("junit" ,java-junit))) |
| 8069 | (propagated-inputs |
| 8070 | `(("java-stringtemplate" ,java-stringtemplate-3) |
| 8071 | ("antlr" ,antlr2))))) |
| 8072 | |
| 8073 | (define-public antlr3-3.1 |
| 8074 | (package |
| 8075 | (inherit antlr3) |
| 8076 | (version "3.1") |
| 8077 | (source (origin |
| 8078 | (method url-fetch) |
| 8079 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
| 8080 | "gh-pages/download/antlr-" |
| 8081 | version ".tar.gz")) |
| 8082 | (sha256 |
| 8083 | (base32 |
| 8084 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
| 8085 | (patches |
| 8086 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) |
| 8087 | (arguments |
| 8088 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
| 8089 | #:source-dir "src:runtime/Java/src" |
| 8090 | #:tests? #f |
| 8091 | #:phases |
| 8092 | (modify-phases %standard-phases |
| 8093 | (add-after 'install 'bin-install |
| 8094 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 8095 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
| 8096 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 8097 | (mkdir-p bin) |
| 8098 | (with-output-to-file (string-append bin "/antlr3") |
| 8099 | (lambda _ |
| 8100 | (display |
| 8101 | (string-append "#!" (which "sh") "\n" |
| 8102 | "java -cp " jar "/antlr3-3.1.jar:" |
| 8103 | (string-concatenate |
| 8104 | (find-files (assoc-ref inputs "stringtemplate") |
| 8105 | ".*\\.jar")) |
| 8106 | ":" |
| 8107 | (string-concatenate |
| 8108 | (find-files (string-append |
| 8109 | (assoc-ref inputs "antlr") |
| 8110 | "/lib") |
| 8111 | ".*\\.jar")) |
| 8112 | " org.antlr.Tool $*")))) |
| 8113 | (chmod (string-append bin "/antlr3") #o755)) |
| 8114 | #t)) |
| 8115 | (add-before 'build 'generate-grammar |
| 8116 | (lambda _ |
| 8117 | (let ((dir "src/org/antlr/tool/")) |
| 8118 | (for-each (lambda (file) |
| 8119 | (display file) |
| 8120 | (newline) |
| 8121 | (invoke "antlr" "-o" dir (string-append dir file))) |
| 8122 | '("antlr.g" "antlr.print.g" "assign.types.g" |
| 8123 | "buildnfa.g" "define.g"))) |
| 8124 | (format #t "codegen.g\n") |
| 8125 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
| 8126 | "src/org/antlr/codegen/codegen.g") |
| 8127 | #t)) |
| 8128 | (add-before 'build 'fix-build-xml |
| 8129 | (lambda _ |
| 8130 | (substitute* "build.xml" |
| 8131 | (("target name=\"compile\">") |
| 8132 | "target name=\"compile\"> |
| 8133 | <copy todir=\"${classes.dir}\"> |
| 8134 | <fileset dir=\"src\"> |
| 8135 | <include name=\"**/*.stg\"/> |
| 8136 | <include name=\"**/*.st\"/> |
| 8137 | <include name=\"**/*.sti\"/> |
| 8138 | <include name=\"**/STLexer.tokens\"/> |
| 8139 | </fileset> |
| 8140 | </copy>")) |
| 8141 | #t))))) |
| 8142 | (native-inputs |
| 8143 | `(("antlr" ,antlr2))) |
| 8144 | (inputs |
| 8145 | `(("junit" ,java-junit))) |
| 8146 | (propagated-inputs |
| 8147 | `(("stringtemplate" ,java-stringtemplate-3))))) |
| 8148 | |
| 8149 | (define-public java-commons-cli-1.2 |
| 8150 | ;; This is a bootstrap dependency for Maven2. |
| 8151 | (package |
| 8152 | (inherit java-commons-cli) |
| 8153 | (version "1.2") |
| 8154 | (source (origin |
| 8155 | (method url-fetch) |
| 8156 | (uri (string-append "mirror://apache/commons/cli/source/" |
| 8157 | "commons-cli-" version "-src.tar.gz")) |
| 8158 | (sha256 |
| 8159 | (base32 |
| 8160 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) |
| 8161 | (arguments |
| 8162 | `(#:jar-name "commons-cli.jar" |
| 8163 | #:phases |
| 8164 | (modify-phases %standard-phases |
| 8165 | (add-before 'check 'fix-build-xml |
| 8166 | (lambda* (#:key inputs #:allow-other-keys) |
| 8167 | (substitute* "build.xml" |
| 8168 | (("dir=\"\\$\\{test.home\\}/java\"") |
| 8169 | "dir=\"${test.home}\"")) |
| 8170 | #t))))) |
| 8171 | (native-inputs |
| 8172 | `(("java-junit" ,java-junit))))) |
| 8173 | |
| 8174 | (define-public java-microemulator-cldc |
| 8175 | (package |
| 8176 | (name "java-microemulator-cldc") |
| 8177 | (version "2.0.4") |
| 8178 | (source (origin |
| 8179 | (method url-fetch) |
| 8180 | (uri (string-append "https://github.com/barteo/microemu/archive/" |
| 8181 | "microemulator_" |
| 8182 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) |
| 8183 | version) |
| 8184 | ".tar.gz")) |
| 8185 | (file-name (string-append name "-" version ".tar.gz")) |
| 8186 | (sha256 |
| 8187 | (base32 |
| 8188 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) |
| 8189 | (build-system ant-build-system) |
| 8190 | (arguments |
| 8191 | `(#:jar-name "microemulator-cldc.jar" |
| 8192 | #:source-dir "microemu-cldc/src/main/java" |
| 8193 | #:tests? #f)); Requires even older software |
| 8194 | (home-page "https://github.com/barteo/microemu") |
| 8195 | (synopsis "J2ME CLDC emulator") |
| 8196 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP |
| 8197 | Emulator. It demonstrates MIDlet based applications in web browser |
| 8198 | applet and can be run as a standalone java application.") |
| 8199 | (license (list license:asl2.0 |
| 8200 | ;; or altenatively: |
| 8201 | license:lgpl2.1+)))) |
| 8202 | |
| 8203 | (define-public java-datanucleus-javax-persistence |
| 8204 | (package |
| 8205 | (name "java-datanucleus-javax-persistence") |
| 8206 | (version "2.2.0") |
| 8207 | (source (origin |
| 8208 | (method url-fetch) |
| 8209 | (uri (string-append "https://github.com/datanucleus/" |
| 8210 | "javax.persistence/archive/javax.persistence-" |
| 8211 | version "-release.tar.gz")) |
| 8212 | (sha256 |
| 8213 | (base32 |
| 8214 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) |
| 8215 | (build-system ant-build-system) |
| 8216 | (arguments |
| 8217 | `(#:jar-name "java-datanucleus-javax-persistence.jar" |
| 8218 | #:jdk ,icedtea-8 |
| 8219 | #:source-dir "src/main/java" |
| 8220 | #:tests? #f)); no tests |
| 8221 | (home-page "https://github.com/datanucleus/javax.persistence") |
| 8222 | (synopsis "JPA API") |
| 8223 | (description "This package contains a clean definition of JPA API intended |
| 8224 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API |
| 8225 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification |
| 8226 | used to generate this API.") |
| 8227 | (license (list license:edl1.0 license:epl1.0)))) |
| 8228 | |
| 8229 | (define-public java-osgi-cmpn |
| 8230 | (package |
| 8231 | (name "java-osgi-cmpn") |
| 8232 | (version "6.0.0") |
| 8233 | (source (origin |
| 8234 | (method url-fetch) |
| 8235 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8236 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" |
| 8237 | version "-sources.jar")) |
| 8238 | (sha256 |
| 8239 | (base32 |
| 8240 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) |
| 8241 | (build-system ant-build-system) |
| 8242 | (arguments |
| 8243 | `(#:jar-name "osgi-cmpn.jar" |
| 8244 | #:tests? #f)); no tests |
| 8245 | (inputs |
| 8246 | `(("annotation" ,java-osgi-annotation) |
| 8247 | ("core" ,java-osgi-core) |
| 8248 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) |
| 8249 | ("microemulator" ,java-microemulator-cldc) |
| 8250 | ("servlet" ,java-classpathx-servletapi))) |
| 8251 | (home-page "https://www.osgi.org") |
| 8252 | (synopsis "Compendium specification module of OSGi framework") |
| 8253 | (description |
| 8254 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8255 | and service platform for the Java programming language. This package contains |
| 8256 | the compendium specification module, providing interfaces and classes for use |
| 8257 | in compiling bundles.") |
| 8258 | (license license:asl2.0))) |
| 8259 | |
| 8260 | (define-public java-osgi-service-component-annotations |
| 8261 | (package |
| 8262 | (name "java-osgi-service-component-annotations") |
| 8263 | (version "1.3.0") |
| 8264 | (source (origin |
| 8265 | (method url-fetch) |
| 8266 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8267 | "org.osgi.service.component.annotations/" |
| 8268 | version "/org.osgi.service.component.annotations-" |
| 8269 | version "-sources.jar")) |
| 8270 | (sha256 |
| 8271 | (base32 |
| 8272 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) |
| 8273 | (build-system ant-build-system) |
| 8274 | (arguments |
| 8275 | `(#:jar-name "osgi-service-component-annotations.jar" |
| 8276 | #:tests? #f)); no tests |
| 8277 | (inputs |
| 8278 | `(("annotation" ,java-osgi-annotation))) |
| 8279 | (home-page "https://www.osgi.org") |
| 8280 | (synopsis "Support annotations for osgi-service-component") |
| 8281 | (description |
| 8282 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8283 | and service platform for the Java programming language. This package contains |
| 8284 | the support annotations for osgi-service-component.") |
| 8285 | (license license:asl2.0))) |
| 8286 | |
| 8287 | (define-public java-osgi-dto |
| 8288 | (package |
| 8289 | (name "java-osgi-dto") |
| 8290 | (version "1.0.0") |
| 8291 | (source (origin |
| 8292 | (method url-fetch) |
| 8293 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8294 | "org.osgi.dto/" version "/org.osgi.dto-" |
| 8295 | version "-sources.jar")) |
| 8296 | (sha256 |
| 8297 | (base32 |
| 8298 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) |
| 8299 | (build-system ant-build-system) |
| 8300 | (arguments |
| 8301 | `(#:jar-name "osgi-dto.jar" |
| 8302 | #:tests? #f)); no tests |
| 8303 | (inputs |
| 8304 | `(("annotation" ,java-osgi-annotation))) |
| 8305 | (home-page "https://www.osgi.org") |
| 8306 | (synopsis "Data Transfer Objects") |
| 8307 | (description |
| 8308 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8309 | and service platform for the Java programming language. This package contains |
| 8310 | the Data Transfer Objects. It is easily serializable having only public fields |
| 8311 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, |
| 8312 | Map and array aggregates may also be used. The aggregates must only hold |
| 8313 | objects of the listed types or aggregates.") |
| 8314 | (license license:asl2.0))) |
| 8315 | |
| 8316 | (define-public java-osgi-resource |
| 8317 | (package |
| 8318 | (name "java-osgi-resource") |
| 8319 | (version "1.0.0") |
| 8320 | (source (origin |
| 8321 | (method url-fetch) |
| 8322 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8323 | "org.osgi.resource/" |
| 8324 | version "/org.osgi.resource-" |
| 8325 | version "-sources.jar")) |
| 8326 | (sha256 |
| 8327 | (base32 |
| 8328 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) |
| 8329 | (build-system ant-build-system) |
| 8330 | (arguments |
| 8331 | `(#:jar-name "osgi-resource.jar" |
| 8332 | #:tests? #f)); no tests |
| 8333 | (inputs |
| 8334 | `(("annotation" ,java-osgi-annotation) |
| 8335 | ("dto" ,java-osgi-dto))) |
| 8336 | (home-page "https://www.osgi.org") |
| 8337 | (synopsis "OSGI Resource") |
| 8338 | (description |
| 8339 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8340 | and service platform for the Java programming language. This package contains |
| 8341 | the definition of common types in osgi packages.") |
| 8342 | (license license:asl2.0))) |
| 8343 | |
| 8344 | (define-public java-osgi-namespace-contract |
| 8345 | (package |
| 8346 | (name "java-osgi-namespace-contract") |
| 8347 | (version "1.0.0") |
| 8348 | (source (origin |
| 8349 | (method url-fetch) |
| 8350 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8351 | "org.osgi.namespace.contract/" |
| 8352 | version "/org.osgi.namespace.contract-" |
| 8353 | version "-sources.jar")) |
| 8354 | (sha256 |
| 8355 | (base32 |
| 8356 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) |
| 8357 | (build-system ant-build-system) |
| 8358 | (inputs |
| 8359 | `(("resource" ,java-osgi-resource) |
| 8360 | ("annotation" ,java-osgi-annotation))) |
| 8361 | (arguments |
| 8362 | `(#:jar-name "osgi-namespace-contract.jar" |
| 8363 | #:tests? #f)); no tests |
| 8364 | (home-page "https://www.osgi.org") |
| 8365 | (synopsis "Contract Capability and Requirement Namespace") |
| 8366 | (description |
| 8367 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8368 | and service platform for the Java programming language. This package contains |
| 8369 | the names for the attributes and directives for a namespace with contracts.") |
| 8370 | (license license:asl2.0))) |
| 8371 | |
| 8372 | (define-public java-osgi-namespace-extender |
| 8373 | (package |
| 8374 | (name "java-osgi-namespace-extender") |
| 8375 | (version "1.0.1") |
| 8376 | (source (origin |
| 8377 | (method url-fetch) |
| 8378 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8379 | "org.osgi.namespace.extender/" |
| 8380 | version "/org.osgi.namespace.extender-" |
| 8381 | version "-sources.jar")) |
| 8382 | (sha256 |
| 8383 | (base32 |
| 8384 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) |
| 8385 | (build-system ant-build-system) |
| 8386 | (inputs |
| 8387 | `(("resource" ,java-osgi-resource) |
| 8388 | ("annotation" ,java-osgi-annotation))) |
| 8389 | (arguments |
| 8390 | `(#:jar-name "osgi-namespace-extendent.jar" |
| 8391 | #:tests? #f)); no tests |
| 8392 | (home-page "https://www.osgi.org") |
| 8393 | (synopsis "Extender Capability and Requirement Namespace") |
| 8394 | (description |
| 8395 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8396 | and service platform for the Java programming language. This package contains |
| 8397 | the names for the attributes and directives for an extender namespace.") |
| 8398 | (license license:asl2.0))) |
| 8399 | |
| 8400 | (define-public java-osgi-namespace-service |
| 8401 | (package |
| 8402 | (name "java-osgi-namespace-service") |
| 8403 | (version "1.0.0") |
| 8404 | (source (origin |
| 8405 | (method url-fetch) |
| 8406 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8407 | "org.osgi.namespace.service/" |
| 8408 | version "/org.osgi.namespace.service-" |
| 8409 | version "-sources.jar")) |
| 8410 | (sha256 |
| 8411 | (base32 |
| 8412 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) |
| 8413 | (build-system ant-build-system) |
| 8414 | (inputs |
| 8415 | `(("resource" ,java-osgi-resource) |
| 8416 | ("annotation" ,java-osgi-annotation))) |
| 8417 | (arguments |
| 8418 | `(#:jar-name "osgi-namespace-service.jar" |
| 8419 | #:tests? #f)); no tests |
| 8420 | (home-page "https://www.osgi.org") |
| 8421 | (synopsis "Service Capability and Requirement Namespace") |
| 8422 | (description |
| 8423 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8424 | and service platform for the Java programming language. This package contains |
| 8425 | the names for the attributes and directives for a service namespace.") |
| 8426 | (license license:asl2.0))) |
| 8427 | |
| 8428 | (define-public java-osgi-util-function |
| 8429 | (package |
| 8430 | (name "java-osgi-util-function") |
| 8431 | (version "1.0.0") |
| 8432 | (source (origin |
| 8433 | (method url-fetch) |
| 8434 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8435 | "org.osgi.util.function/" |
| 8436 | version "/org.osgi.util.function-" |
| 8437 | version "-sources.jar")) |
| 8438 | (sha256 |
| 8439 | (base32 |
| 8440 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) |
| 8441 | (build-system ant-build-system) |
| 8442 | (arguments |
| 8443 | `(#:jar-name "osgi-util-function.jar" |
| 8444 | #:tests? #f)); no tests |
| 8445 | (inputs |
| 8446 | `(("annotation" ,java-osgi-annotation))) |
| 8447 | (home-page "https://www.osgi.org") |
| 8448 | (synopsis "OSGI Util Function") |
| 8449 | (description |
| 8450 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8451 | and service platform for the Java programming language. This package contains |
| 8452 | an interface for a function that accepts a single argument and produces a result.") |
| 8453 | (license license:asl2.0))) |
| 8454 | |
| 8455 | (define-public java-osgi-util-promise |
| 8456 | (package |
| 8457 | (name "java-osgi-util-promise") |
| 8458 | (version "1.0.0") |
| 8459 | (source (origin |
| 8460 | (method url-fetch) |
| 8461 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8462 | "org.osgi.util.promise/" |
| 8463 | version "/org.osgi.util.promise-" |
| 8464 | version "-sources.jar")) |
| 8465 | (sha256 |
| 8466 | (base32 |
| 8467 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) |
| 8468 | (build-system ant-build-system) |
| 8469 | (arguments |
| 8470 | `(#:jar-name "osgi-util-promise.jar" |
| 8471 | #:tests? #f)); no tests |
| 8472 | (inputs |
| 8473 | `(("annotation" ,java-osgi-annotation) |
| 8474 | ("function" ,java-osgi-util-function))) |
| 8475 | (home-page "https://www.osgi.org") |
| 8476 | (synopsis "Promise of a value") |
| 8477 | (description |
| 8478 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8479 | and service platform for the Java programming language. This package contains |
| 8480 | an interface and utilitary classes for promises. A Promise represents a future |
| 8481 | value. It handles the interactions for asynchronous processing.") |
| 8482 | (license license:asl2.0))) |
| 8483 | |
| 8484 | (define-public java-osgi-service-metatype-annotations |
| 8485 | (package |
| 8486 | (name "java-osgi-service-metatype-annotations") |
| 8487 | (version "1.3.0") |
| 8488 | (source (origin |
| 8489 | (method url-fetch) |
| 8490 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8491 | "org.osgi.service.metatype.annotations/" |
| 8492 | version "/org.osgi.service.metatype.annotations-" |
| 8493 | version "-sources.jar")) |
| 8494 | (sha256 |
| 8495 | (base32 |
| 8496 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) |
| 8497 | (build-system ant-build-system) |
| 8498 | (arguments |
| 8499 | `(#:jar-name "osgi-service-metatype-annotations.jar" |
| 8500 | #:tests? #f)); no tests |
| 8501 | (inputs |
| 8502 | `(("annotation" ,java-osgi-annotation))) |
| 8503 | (home-page "https://www.osgi.org") |
| 8504 | (synopsis "Support annotations for metatype") |
| 8505 | (description |
| 8506 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8507 | and service platform for the Java programming language. This package contains |
| 8508 | the support annotations for metatype.") |
| 8509 | (license license:asl2.0))) |
| 8510 | |
| 8511 | (define-public java-osgi-service-repository |
| 8512 | (package |
| 8513 | (name "java-osgi-service-repository") |
| 8514 | (version "1.1.0") |
| 8515 | (source (origin |
| 8516 | (method url-fetch) |
| 8517 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8518 | "org.osgi.service.repository/" |
| 8519 | version "/org.osgi.service.repository-" |
| 8520 | version "-sources.jar")) |
| 8521 | (sha256 |
| 8522 | (base32 |
| 8523 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) |
| 8524 | (build-system ant-build-system) |
| 8525 | (arguments |
| 8526 | `(#:jar-name "osgi-service-repository.jar" |
| 8527 | #:tests? #f)); no tests |
| 8528 | (inputs |
| 8529 | `(("annotation" ,java-osgi-annotation) |
| 8530 | ("promise" ,java-osgi-util-promise) |
| 8531 | ("resource" ,java-osgi-resource))) |
| 8532 | (home-page "https://www.osgi.org") |
| 8533 | (synopsis "OSGI service repository") |
| 8534 | (description |
| 8535 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8536 | and service platform for the Java programming language. This package contains |
| 8537 | a repository service that contains resources.") |
| 8538 | (license license:asl2.0))) |
| 8539 | |
| 8540 | (define-public java-osgi-framework |
| 8541 | (package |
| 8542 | (name "java-osgi-framework") |
| 8543 | (version "1.8.0") |
| 8544 | (source (origin |
| 8545 | (method url-fetch) |
| 8546 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8547 | "org.osgi.framework/" version "/org.osgi.framework-" |
| 8548 | version "-sources.jar")) |
| 8549 | (sha256 |
| 8550 | (base32 |
| 8551 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) |
| 8552 | (build-system ant-build-system) |
| 8553 | (arguments |
| 8554 | `(#:jar-name "osgi-framework.jar" |
| 8555 | #:tests? #f)); no tests |
| 8556 | (inputs |
| 8557 | `(("annotation" ,java-osgi-annotation) |
| 8558 | ("resource" ,java-osgi-resource) |
| 8559 | ("dto" ,java-osgi-dto))) |
| 8560 | (home-page "https://www.osgi.org") |
| 8561 | (synopsis "OSGi framework") |
| 8562 | (description |
| 8563 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8564 | and service platform for the Java programming language.") |
| 8565 | (license license:asl2.0))) |
| 8566 | |
| 8567 | (define-public java-osgi-service-log |
| 8568 | (package |
| 8569 | (name "java-osgi-service-log") |
| 8570 | (version "1.3.0") |
| 8571 | (source (origin |
| 8572 | (method url-fetch) |
| 8573 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8574 | "org.osgi.service.log/" |
| 8575 | version "/org.osgi.service.log-" |
| 8576 | version "-sources.jar")) |
| 8577 | (sha256 |
| 8578 | (base32 |
| 8579 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) |
| 8580 | (build-system ant-build-system) |
| 8581 | (arguments |
| 8582 | `(#:jar-name "osgi-service-log.jar" |
| 8583 | #:tests? #f)); no tests |
| 8584 | (inputs |
| 8585 | `(("java-osgi-framework" ,java-osgi-framework))) |
| 8586 | (home-page "https://www.osgi.org") |
| 8587 | (synopsis "Provides methods for bundles to write messages to the log") |
| 8588 | (description |
| 8589 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8590 | and service platform for the Java programming language. This package contains |
| 8591 | the log service.") |
| 8592 | (license license:asl2.0))) |
| 8593 | |
| 8594 | (define-public java-osgi-service-jdbc |
| 8595 | (package |
| 8596 | (name "java-osgi-service-jdbc") |
| 8597 | (version "1.0.0") |
| 8598 | (source (origin |
| 8599 | (method url-fetch) |
| 8600 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8601 | "org.osgi.service.jdbc/" |
| 8602 | version "/org.osgi.service.jdbc-" |
| 8603 | version "-sources.jar")) |
| 8604 | (sha256 |
| 8605 | (base32 |
| 8606 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) |
| 8607 | (build-system ant-build-system) |
| 8608 | (arguments |
| 8609 | `(#:jar-name "osgi-service-jdbc.jar" |
| 8610 | #:tests? #f)); no tests |
| 8611 | (home-page "https://www.osgi.org") |
| 8612 | (synopsis "Factory for JDBC connection factories") |
| 8613 | (description |
| 8614 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8615 | and service platform for the Java programming language. This package contains |
| 8616 | a factory for JDBC connection factories. There are 3 preferred connection |
| 8617 | factories for getting JDBC connections: |
| 8618 | |
| 8619 | @itemize |
| 8620 | @item @code{javax.sql.DataSource}; |
| 8621 | @item @code{javax.sql.ConnectionPoolDataSource}; |
| 8622 | @item @code{javax.sql.XADataSource}. |
| 8623 | @end itemize") |
| 8624 | (license license:asl2.0))) |
| 8625 | |
| 8626 | (define-public java-osgi-service-resolver |
| 8627 | (package |
| 8628 | (name "java-osgi-service-resolver") |
| 8629 | (version "1.0.1") |
| 8630 | (source (origin |
| 8631 | (method url-fetch) |
| 8632 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8633 | "org.osgi.service.resolver/" |
| 8634 | version "/org.osgi.service.resolver-" |
| 8635 | version "-sources.jar")) |
| 8636 | (sha256 |
| 8637 | (base32 |
| 8638 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) |
| 8639 | (build-system ant-build-system) |
| 8640 | (arguments |
| 8641 | `(#:jar-name "osgi-service-resolver.jar" |
| 8642 | #:tests? #f)); no tests |
| 8643 | (inputs |
| 8644 | `(("annotation" ,java-osgi-annotation) |
| 8645 | ("resource" ,java-osgi-resource))) |
| 8646 | (home-page "https://www.osgi.org") |
| 8647 | (synopsis "OSGI Resolver service") |
| 8648 | (description |
| 8649 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8650 | and service platform for the Java programming language. This package contains |
| 8651 | a resolver service that resolves the specified resources in the context supplied |
| 8652 | by the caller.") |
| 8653 | (license license:asl2.0))) |
| 8654 | |
| 8655 | (define-public java-osgi-util-tracker |
| 8656 | (package |
| 8657 | (name "java-osgi-util-tracker") |
| 8658 | (version "1.5.1") |
| 8659 | (source (origin |
| 8660 | (method url-fetch) |
| 8661 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8662 | "org.osgi.util.tracker/" |
| 8663 | version "/org.osgi.util.tracker-" |
| 8664 | version "-sources.jar")) |
| 8665 | (sha256 |
| 8666 | (base32 |
| 8667 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) |
| 8668 | (build-system ant-build-system) |
| 8669 | (arguments |
| 8670 | `(#:jar-name "osgi-util-tracker.jar" |
| 8671 | #:tests? #f)); no tests |
| 8672 | (inputs |
| 8673 | `(("framework" ,java-osgi-framework) |
| 8674 | ("annotation" ,java-osgi-annotation))) |
| 8675 | (home-page "https://www.osgi.org") |
| 8676 | (synopsis "Bundle tracking") |
| 8677 | (description |
| 8678 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8679 | and service platform for the Java programming language. This package contains |
| 8680 | bundle tracking utility classes.") |
| 8681 | (license license:asl2.0))) |
| 8682 | |
| 8683 | (define-public java-osgi-service-cm |
| 8684 | (package |
| 8685 | (name "java-osgi-service-cm") |
| 8686 | (version "1.5.0") |
| 8687 | (source (origin |
| 8688 | (method url-fetch) |
| 8689 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8690 | "org.osgi.service.cm/" |
| 8691 | version "/org.osgi.service.cm-" |
| 8692 | version "-sources.jar")) |
| 8693 | (sha256 |
| 8694 | (base32 |
| 8695 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) |
| 8696 | (build-system ant-build-system) |
| 8697 | (arguments |
| 8698 | `(#:jar-name "osgi-service-cm.jar" |
| 8699 | #:tests? #f)); no tests |
| 8700 | (inputs |
| 8701 | `(("framework" ,java-osgi-framework) |
| 8702 | ("annotation" ,java-osgi-annotation))) |
| 8703 | (home-page "https://www.osgi.org") |
| 8704 | (synopsis "OSGI Configuration Management") |
| 8705 | (description |
| 8706 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8707 | and service platform for the Java programming language. This package contains |
| 8708 | utility classes for the configuration of services.") |
| 8709 | (license license:asl2.0))) |
| 8710 | |
| 8711 | (define-public java-osgi-service-packageadmin |
| 8712 | (package |
| 8713 | (name "java-osgi-service-packageadmin") |
| 8714 | (version "1.2.0") |
| 8715 | (source (origin |
| 8716 | (method url-fetch) |
| 8717 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 8718 | "org.osgi.service.packageadmin/" |
| 8719 | version "/org.osgi.service.packageadmin-" |
| 8720 | version "-sources.jar")) |
| 8721 | (sha256 |
| 8722 | (base32 |
| 8723 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) |
| 8724 | (build-system ant-build-system) |
| 8725 | (arguments |
| 8726 | `(#:jar-name "osgi-service-packageadmin.jar" |
| 8727 | #:tests? #f)); no tests |
| 8728 | (inputs |
| 8729 | `(("framework" ,java-osgi-framework))) |
| 8730 | (home-page "https://www.osgi.org") |
| 8731 | (synopsis "OSGI Package Administration") |
| 8732 | (description |
| 8733 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8734 | and service platform for the Java programming language. This package contains |
| 8735 | the packageadmin service.") |
| 8736 | (license license:asl2.0))) |
| 8737 | |
| 8738 | (define-public java-ops4j-base-lang |
| 8739 | (package |
| 8740 | (name "java-ops4j-base-lang") |
| 8741 | (version "1.5.0") |
| 8742 | (source (origin |
| 8743 | (method url-fetch) |
| 8744 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" |
| 8745 | "archive/base-" version ".tar.gz")) |
| 8746 | (sha256 |
| 8747 | (base32 |
| 8748 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) |
| 8749 | (build-system ant-build-system) |
| 8750 | (arguments |
| 8751 | `(#:jar-name "java-ops4j-base-lang.jar" |
| 8752 | #:source-dir "ops4j-base-lang/src/main/java" |
| 8753 | #:tests? #f; no tests |
| 8754 | #:phases |
| 8755 | (modify-phases %standard-phases |
| 8756 | (add-before 'build 'add-test-file |
| 8757 | (lambda _ |
| 8758 | ;; That file is required by a test in ops4j-pax-exam-core-spi |
| 8759 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") |
| 8760 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" |
| 8761 | (lambda _ |
| 8762 | (display |
| 8763 | (string-append |
| 8764 | "version=" ,version "\n" |
| 8765 | "groupId=org.ops4j.base" |
| 8766 | "artifactId=ops4j-base-lang\n")))) |
| 8767 | #t))))) |
| 8768 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") |
| 8769 | (synopsis "Utility classes and extensions to be used in OPS4J projects") |
| 8770 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8771 | package contains utilities and extensions related to @code{java.lang}.") |
| 8772 | (license license:asl2.0))) |
| 8773 | |
| 8774 | (define-public java-ops4j-base-monitors |
| 8775 | (package |
| 8776 | (inherit java-ops4j-base-lang) |
| 8777 | (name "java-ops4j-base-monitors") |
| 8778 | (arguments |
| 8779 | `(#:jar-name "java-ops4j-base-monitors.jar" |
| 8780 | #:source-dir "ops4j-base-monitors/src/main/java" |
| 8781 | #:tests? #f)); no tests |
| 8782 | (inputs |
| 8783 | `(("lang" ,java-ops4j-base-lang))) |
| 8784 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8785 | package contains utilities and extensions related to monitoring."))) |
| 8786 | |
| 8787 | (define-public java-ops4j-base-io |
| 8788 | (package |
| 8789 | (inherit java-ops4j-base-lang) |
| 8790 | (name "java-ops4j-base-io") |
| 8791 | (arguments |
| 8792 | `(#:jar-name "java-ops4j-base-io.jar" |
| 8793 | #:source-dir "ops4j-base-io/src/main/java" |
| 8794 | #:test-dir "ops4j-base-io/src/test" |
| 8795 | #:test-exclude |
| 8796 | (list "**/ListerTest.java"))) |
| 8797 | (inputs |
| 8798 | `(("lang" ,java-ops4j-base-monitors) |
| 8799 | ("lang" ,java-ops4j-base-lang))) |
| 8800 | (native-inputs |
| 8801 | `(("junit" ,java-junit) |
| 8802 | ("hamcrest" ,java-hamcrest-core))) |
| 8803 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8804 | package contains utilities and extensions related to handling streams and files."))) |
| 8805 | |
| 8806 | (define-public java-ops4j-base-util |
| 8807 | (package |
| 8808 | (inherit java-ops4j-base-lang) |
| 8809 | (name "java-ops4j-base-util") |
| 8810 | (arguments |
| 8811 | `(#:jar-name "java-ops4j-base-util.jar" |
| 8812 | #:source-dir "ops4j-base-util/src/main/java" |
| 8813 | #:test-dir "ops4j-base-util/src/test")) |
| 8814 | (inputs |
| 8815 | `(("lang" ,java-ops4j-base-lang))) |
| 8816 | (native-inputs |
| 8817 | `(("junit" ,java-junit))) |
| 8818 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8819 | package contains utilities and extensions related to environment, i18n and |
| 8820 | mime types."))) |
| 8821 | |
| 8822 | (define-public java-ops4j-base-util-property |
| 8823 | (package |
| 8824 | (inherit java-ops4j-base-lang) |
| 8825 | (name "java-ops4j-base-util-property") |
| 8826 | (arguments |
| 8827 | `(#:jar-name "java-ops4j-base-util-property.jar" |
| 8828 | #:source-dir "ops4j-base-util-property/src/main/java" |
| 8829 | #:tests? #f)); no tests |
| 8830 | (inputs |
| 8831 | `(("lang" ,java-ops4j-base-lang) |
| 8832 | ("util" ,java-ops4j-base-util))) |
| 8833 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8834 | package contains utilities and extensions related to resolving properties from |
| 8835 | different sources."))) |
| 8836 | |
| 8837 | (define-public java-ops4j-base-store |
| 8838 | (package |
| 8839 | (inherit java-ops4j-base-lang) |
| 8840 | (name "java-ops4j-base-store") |
| 8841 | (arguments |
| 8842 | `(#:jar-name "java-ops4j-base-store.jar" |
| 8843 | #:source-dir "ops4j-base-store/src/main/java" |
| 8844 | #:tests? #f)); no tests |
| 8845 | (inputs |
| 8846 | `(("lang" ,java-ops4j-base-lang) |
| 8847 | ("slf4j" ,java-slf4j-api) |
| 8848 | ("io" ,java-ops4j-base-io))) |
| 8849 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8850 | package contains utilities for storing and retrieving data from an |
| 8851 | @code{InputStream}."))) |
| 8852 | |
| 8853 | (define-public java-ops4j-base-spi |
| 8854 | (package |
| 8855 | (inherit java-ops4j-base-lang) |
| 8856 | (name "java-ops4j-base-spi") |
| 8857 | (arguments |
| 8858 | `(#:jar-name "java-ops4j-base-spi.jar" |
| 8859 | #:source-dir "ops4j-base-spi/src/main/java" |
| 8860 | #:test-dir "ops4j-base-spi/src/test")) |
| 8861 | (native-inputs |
| 8862 | `(("junit" ,java-junit) |
| 8863 | ("hamcrest" ,java-hamcrest-core))) |
| 8864 | (description "OPS4J stands for Open Participation Software for Java. This |
| 8865 | package contains utilities for obtaining services via the Java SE 6 |
| 8866 | @code{ServiceLoader}."))) |
| 8867 | |
| 8868 | (define-public java-aqute-bnd-annotation |
| 8869 | (package |
| 8870 | (name "java-aqute-bnd-annotation") |
| 8871 | (version "3.5.0") |
| 8872 | (source (origin |
| 8873 | (method url-fetch) |
| 8874 | (uri (string-append "https://github.com/bndtools/bnd/archive/" |
| 8875 | version ".REL.tar.gz")) |
| 8876 | (file-name (string-append name "-" version ".tar.gz")) |
| 8877 | (sha256 |
| 8878 | (base32 |
| 8879 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
| 8880 | (build-system ant-build-system) |
| 8881 | (arguments |
| 8882 | `(#:jar-name "java-aqute-bnd-annotation.jar" |
| 8883 | #:source-dir "biz.aQute.bnd.annotation/src" |
| 8884 | #:tests? #f)); empty test dir |
| 8885 | (home-page "https://bnd.bndtools.org/") |
| 8886 | (synopsis "Tools for OSGi") |
| 8887 | (description "Bnd is a swiss army knife for OSGi, it creates manifest |
| 8888 | headers based on analyzing the class code, it verifies the project settings, |
| 8889 | it manages project dependencies, gives diffs jars, and much more.") |
| 8890 | (license license:asl2.0))) |
| 8891 | |
| 8892 | (define-public java-aqute-libg |
| 8893 | (package |
| 8894 | (inherit java-aqute-bnd-annotation) |
| 8895 | (name "java-aqute-libg") |
| 8896 | (arguments |
| 8897 | `(#:jar-name "java-aqute-libg.jar" |
| 8898 | ;; The build fails when source/target more recent than 1.7. This |
| 8899 | ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 |
| 8900 | ;; |
| 8901 | ;; It is closed as won't fix. There is no way to change the source |
| 8902 | ;; so that it works on 1.8, and still works on 1.6, the upstream |
| 8903 | ;; target. It work fine on 1.7, so we use 1.7. |
| 8904 | #:make-flags (list "-Dant.build.javac.source=1.7" |
| 8905 | "-Dant.build.javac.target=1.7") |
| 8906 | #:phases |
| 8907 | (modify-phases %standard-phases |
| 8908 | (add-before 'configure 'chdir |
| 8909 | ;; Change to aQute.libg directory, so that the relative |
| 8910 | ;; paths in the tests aren't broken. |
| 8911 | (lambda _ |
| 8912 | (chdir "aQute.libg") |
| 8913 | #t)) |
| 8914 | (add-before 'check 'create-test-directory |
| 8915 | ;; Copy the test directory to test/java, since that's where |
| 8916 | ;; ant-build-system's default project in build.xml expects to find |
| 8917 | ;; the test classes. Leave a copy in the original place to not |
| 8918 | ;; break paths in tests. |
| 8919 | (lambda _ |
| 8920 | (mkdir "src/test") |
| 8921 | (copy-recursively "test" "src/test/java") |
| 8922 | #t))))) |
| 8923 | (inputs |
| 8924 | `(("slf4j" ,java-slf4j-api) |
| 8925 | ("osgi-annot" ,java-osgi-annotation) |
| 8926 | ("java-osgi-cmpn" ,java-osgi-cmpn) |
| 8927 | ("osgi" ,java-osgi-core))) |
| 8928 | (native-inputs |
| 8929 | `(("hamcrest" ,java-hamcrest-core) |
| 8930 | ("java-junit" ,java-junit))))) |
| 8931 | |
| 8932 | (define-public java-aqute-bndlib |
| 8933 | (package |
| 8934 | (inherit java-aqute-bnd-annotation) |
| 8935 | (name "java-aqute-bndlib") |
| 8936 | (arguments |
| 8937 | `(#:jar-name "java-bndlib.jar" |
| 8938 | #:source-dir "biz.aQute.bndlib/src" |
| 8939 | #:tests? #f)); no tests |
| 8940 | (inputs |
| 8941 | `(("slf4j" ,java-slf4j-api) |
| 8942 | ("osgi-annot" ,java-osgi-annotation) |
| 8943 | ("java-aqute-libg" ,java-aqute-libg) |
| 8944 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) |
| 8945 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) |
| 8946 | ("java-osgi-service-repository" ,java-osgi-service-repository) |
| 8947 | ("java-osgi-service-log" ,java-osgi-service-log) |
| 8948 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) |
| 8949 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) |
| 8950 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) |
| 8951 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) |
| 8952 | ("promise" ,java-osgi-util-promise) |
| 8953 | ("osgi" ,java-osgi-core))))) |
| 8954 | |
| 8955 | (define-public java-ops4j-pax-tinybundles |
| 8956 | (package |
| 8957 | (name "java-ops4j-pax-tinybundles") |
| 8958 | (version "2.1.1") |
| 8959 | (source (origin |
| 8960 | (method url-fetch) |
| 8961 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" |
| 8962 | "archive/tinybundles-" version ".tar.gz")) |
| 8963 | (sha256 |
| 8964 | (base32 |
| 8965 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) |
| 8966 | (arguments |
| 8967 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" |
| 8968 | #:source-dir "src/main/java" |
| 8969 | #:test-exclude |
| 8970 | ;; Abstract base classes for other tests |
| 8971 | (list "**/BndTest.java" "**/CoreTest.java") |
| 8972 | #:phases |
| 8973 | (modify-phases %standard-phases |
| 8974 | (add-before 'check 'fix-version |
| 8975 | (lambda _ |
| 8976 | ;; This test has a reference to an old version of bndlib we are not |
| 8977 | ;; packaging. It uses the version referenced in pom.xml. We replace |
| 8978 | ;; it with our own version. |
| 8979 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" |
| 8980 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
| 8981 | ,(package-version java-aqute-bndlib))) |
| 8982 | #t))))) |
| 8983 | (inputs |
| 8984 | `(("lang" ,java-ops4j-base-lang) |
| 8985 | ("io" ,java-ops4j-base-io) |
| 8986 | ("store" ,java-ops4j-base-store) |
| 8987 | ("slf4j" ,java-slf4j-api) |
| 8988 | ("libg" ,java-aqute-libg) |
| 8989 | ("bndlib" ,java-aqute-bndlib))) |
| 8990 | (native-inputs |
| 8991 | `(("junit" ,java-junit) |
| 8992 | ("hamcrest" ,java-hamcrest-core) |
| 8993 | ("log4j" ,java-log4j-api) |
| 8994 | ("bndannotation" ,java-aqute-bnd-annotation) |
| 8995 | ("framework" ,java-osgi-framework))) |
| 8996 | (build-system ant-build-system) |
| 8997 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") |
| 8998 | (synopsis "Java APIs to create OSGi related artifacts") |
| 8999 | (description "Tinybundles is all about creating OSGi related artifacts like |
| 9000 | Bundles, Fragments and Deployment Packages with Java Api. It is very convenient |
| 9001 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the |
| 9002 | other hand, this library can be a foundation of real end user tools that need |
| 9003 | to create those artifacts.") |
| 9004 | (license license:asl2.0))) |
| 9005 | |
| 9006 | (define-public java-ops4j-pax-exam-core |
| 9007 | (package |
| 9008 | (name "java-ops4j-pax-exam-core") |
| 9009 | (version "4.11.0") |
| 9010 | (source (origin |
| 9011 | (method url-fetch) |
| 9012 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" |
| 9013 | "archive/exam-reactor-" version ".tar.gz")) |
| 9014 | (sha256 |
| 9015 | (base32 |
| 9016 | "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g")))) |
| 9017 | (arguments |
| 9018 | `(#:jar-name "java-ops4j-pax-exam-core.jar" |
| 9019 | #:source-dir "core/pax-exam/src/main/java" |
| 9020 | #:test-dir "core/pax-exam/src/test")) |
| 9021 | (inputs |
| 9022 | `(("slf4j" ,java-slf4j-api) |
| 9023 | ("lang" ,java-ops4j-base-lang) |
| 9024 | ("io" ,java-ops4j-base-io) |
| 9025 | ("util-property" ,java-ops4j-base-util-property) |
| 9026 | ("util-store" ,java-ops4j-base-store) |
| 9027 | ("java-osgi-core" ,java-osgi-core))) |
| 9028 | (native-inputs |
| 9029 | `(("junit" ,java-junit) |
| 9030 | ("hamcrest" ,java-hamcrest-core))) |
| 9031 | (build-system ant-build-system) |
| 9032 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") |
| 9033 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") |
| 9034 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets |
| 9035 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and |
| 9036 | the system under test at the same time.") |
| 9037 | (license license:asl2.0))) |
| 9038 | |
| 9039 | (define-public java-ops4j-pax-exam-core-spi |
| 9040 | (package |
| 9041 | (inherit java-ops4j-pax-exam-core) |
| 9042 | (name "java-ops4j-pax-exam-core-spi") |
| 9043 | (arguments |
| 9044 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" |
| 9045 | #:source-dir "src/main/java" |
| 9046 | #:test-exclude |
| 9047 | (list |
| 9048 | ;; Abstract base class, not a test |
| 9049 | "**/BaseStagedReactorTest.java" |
| 9050 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump |
| 9051 | "**/WarBuilderTest.java") |
| 9052 | #:phases |
| 9053 | (modify-phases %standard-phases |
| 9054 | (add-before 'configure 'chdir |
| 9055 | (lambda _ |
| 9056 | ;; Tests assume we are in this directory |
| 9057 | (chdir "core/pax-exam-spi") |
| 9058 | #t)) |
| 9059 | (add-before 'check 'fix-tests |
| 9060 | (lambda _ |
| 9061 | ;; One test checks that this file is present. |
| 9062 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") |
| 9063 | (with-output-to-file |
| 9064 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" |
| 9065 | (lambda _ |
| 9066 | (display |
| 9067 | (string-append "artifactId = pax-exam-spi\n" |
| 9068 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) |
| 9069 | ;; Maven puts compilation results in the target directory, while we |
| 9070 | ;; put them in the build directory. |
| 9071 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" |
| 9072 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" |
| 9073 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") |
| 9074 | (("target") "build")) |
| 9075 | ;; One test is expected to fail, but it doesn't throw the expected exception |
| 9076 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" |
| 9077 | (("AssertionError") "IllegalArgumentException")) |
| 9078 | #t))))) |
| 9079 | (inputs |
| 9080 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) |
| 9081 | ("lang" ,java-ops4j-base-lang) |
| 9082 | ("monitors" ,java-ops4j-base-monitors) |
| 9083 | ("store" ,java-ops4j-base-store) |
| 9084 | ("io" ,java-ops4j-base-io) |
| 9085 | ("spi" ,java-ops4j-base-spi) |
| 9086 | ("osgi" ,java-osgi-core) |
| 9087 | ("slf4j" ,java-slf4j-api) |
| 9088 | ("tinybundles" ,java-ops4j-pax-tinybundles))) |
| 9089 | (native-inputs |
| 9090 | `(("mockito" ,java-mockito-1) |
| 9091 | ("junit" ,java-junit) |
| 9092 | ("hamcrest" ,java-hamcrest-core) |
| 9093 | ("cglib" ,java-cglib) |
| 9094 | ("objenesis" ,java-objenesis) |
| 9095 | ("asm" ,java-asm))))) |
| 9096 | |
| 9097 | (define-public java-ops4j-pax-exam-core-junit |
| 9098 | (package |
| 9099 | (inherit java-ops4j-pax-exam-core) |
| 9100 | (name "java-ops4j-pax-exam-core-junit") |
| 9101 | (arguments |
| 9102 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" |
| 9103 | #:source-dir "drivers/pax-exam-junit4/src/main/java" |
| 9104 | #:tests? #f)); no tests |
| 9105 | (inputs |
| 9106 | `(("junit" ,java-junit) |
| 9107 | ("slf4j" ,java-slf4j-api) |
| 9108 | ("core" ,java-ops4j-pax-exam-core) |
| 9109 | ("spi" ,java-ops4j-pax-exam-core-spi))) |
| 9110 | (native-inputs '()))) |
| 9111 | |
| 9112 | (define-public java-fasterxml-jackson-annotations |
| 9113 | (package |
| 9114 | (name "java-fasterxml-jackson-annotations") |
| 9115 | (version "2.9.4") |
| 9116 | (source (origin |
| 9117 | (method url-fetch) |
| 9118 | (uri (string-append "https://github.com/FasterXML/" |
| 9119 | "jackson-annotations/archive/" |
| 9120 | "jackson-annotations-" version ".tar.gz")) |
| 9121 | (sha256 |
| 9122 | (base32 |
| 9123 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
| 9124 | (build-system ant-build-system) |
| 9125 | (arguments |
| 9126 | `(#:jar-name "jackson-annotations.jar" |
| 9127 | #:source-dir "src/main/java" |
| 9128 | #:test-dir "src/test")) |
| 9129 | (native-inputs |
| 9130 | `(("junit" ,java-junit))) |
| 9131 | (home-page "https://github.com/FasterXML/jackson-annotations") |
| 9132 | (synopsis "General purpose annotations for the Jackson Data Processor") |
| 9133 | (description "This package contains general purpose annotations for the |
| 9134 | Jackson Data Processor, used on value and handler types. The only annotations |
| 9135 | not included are ones that require dependency to the Databind package.") |
| 9136 | (license license:asl2.0))) |
| 9137 | |
| 9138 | (define-public java-fasterxml-jackson-core |
| 9139 | (package |
| 9140 | (name "java-fasterxml-jackson-core") |
| 9141 | (version "2.9.4") |
| 9142 | (source (origin |
| 9143 | (method url-fetch) |
| 9144 | (uri (string-append "https://github.com/FasterXML/" |
| 9145 | "jackson-core/archive/" |
| 9146 | "jackson-core-" version ".tar.gz")) |
| 9147 | (sha256 |
| 9148 | (base32 |
| 9149 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
| 9150 | (build-system ant-build-system) |
| 9151 | (arguments |
| 9152 | `(#:jar-name "jackson-core.jar" |
| 9153 | #:source-dir "src/main/java" |
| 9154 | #:test-dir "src/test" |
| 9155 | #:test-exclude |
| 9156 | (list |
| 9157 | ;; Expected failure. pom.xml excludes these |
| 9158 | "**/failing/**" |
| 9159 | ;; Base classes that have no constructor for junit |
| 9160 | "**/BaseTest.java" |
| 9161 | "**/ConcurrencyReadTest.java" |
| 9162 | "**/ManualCharAccessTest.java" |
| 9163 | "**/ManualCharAccessTest.java" |
| 9164 | "**/TrailingCommasTest.java" |
| 9165 | "**/AsyncMissingValuesInObjectTest.java" |
| 9166 | "**/AsyncMissingValuesInArrayTest.java") |
| 9167 | #:phases |
| 9168 | (modify-phases %standard-phases |
| 9169 | (add-before 'configure 'generate-PackageVersion.java |
| 9170 | (lambda _ |
| 9171 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") |
| 9172 | (in (string-append out ".in"))) |
| 9173 | (copy-file in out) |
| 9174 | (substitute* out |
| 9175 | (("@package@") "com.fasterxml.jackson.core.json") |
| 9176 | (("@projectversion@") ,version) |
| 9177 | (("@projectgroupid@") "com.fasterxml.jackson.core") |
| 9178 | (("@projectartifactid@") "jackson-core"))) |
| 9179 | #t)) |
| 9180 | (add-before 'build 'copy-resources |
| 9181 | (lambda _ |
| 9182 | (copy-recursively "src/main/resources" |
| 9183 | "build/classes") |
| 9184 | #t)) |
| 9185 | (add-before 'check 'copy-test-resources |
| 9186 | (lambda _ |
| 9187 | (copy-recursively "src/test/resources" |
| 9188 | "build/test-classes") |
| 9189 | #t))))) |
| 9190 | (native-inputs |
| 9191 | `(("junit" ,java-junit) |
| 9192 | ("hamcrest" ,java-hamcrest-core))) |
| 9193 | (home-page "https://github.com/FasterXML/jackson-core") |
| 9194 | (synopsis "") |
| 9195 | (description "") |
| 9196 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 9197 | |
| 9198 | (define-public java-fasterxml-jackson-databind |
| 9199 | (package |
| 9200 | (name "java-fasterxml-jackson-databind") |
| 9201 | (version "2.9.4") |
| 9202 | (source (origin |
| 9203 | (method url-fetch) |
| 9204 | (uri (string-append "https://github.com/FasterXML/" |
| 9205 | "jackson-databind/archive/" |
| 9206 | "jackson-databind-" version ".tar.gz")) |
| 9207 | (sha256 |
| 9208 | (base32 |
| 9209 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
| 9210 | (build-system ant-build-system) |
| 9211 | (arguments |
| 9212 | `(#:jar-name "jackson-databind.jar" |
| 9213 | #:source-dir "src/main/java" |
| 9214 | #:tests? #f; requires javax.measures for which I can't find a free implementation |
| 9215 | #:phases |
| 9216 | (modify-phases %standard-phases |
| 9217 | (add-before 'configure 'generate-PackageVersion.java |
| 9218 | (lambda _ |
| 9219 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") |
| 9220 | (in (string-append out ".in"))) |
| 9221 | (copy-file in out) |
| 9222 | (substitute* out |
| 9223 | (("@package@") "com.fasterxml.jackson.databind.cfg") |
| 9224 | (("@projectversion@") ,version) |
| 9225 | (("@projectgroupid@") "com.fasterxml.jackson.databind") |
| 9226 | (("@projectartifactid@") "jackson-databind"))) |
| 9227 | #t)) |
| 9228 | (add-before 'build 'copy-resources |
| 9229 | (lambda _ |
| 9230 | (copy-recursively "src/main/resources" "build/classes") |
| 9231 | #t))))) |
| 9232 | (inputs |
| 9233 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 9234 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core))) |
| 9235 | (home-page "https://github.com/FasterXML/jackson-databind") |
| 9236 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") |
| 9237 | (description "This package contains the general-purpose data-binding |
| 9238 | functionality and tree-model for Jackson Data Processor. It builds on core |
| 9239 | streaming parser/generator package, and uses Jackson Annotations for |
| 9240 | configuration.") |
| 9241 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 9242 | |
| 9243 | (define-public java-fasterxml-jackson-modules-base-jaxb |
| 9244 | (package |
| 9245 | (name "java-fasterxml-jackson-modules-base-jaxb") |
| 9246 | (version "2.9.4") |
| 9247 | (source (origin |
| 9248 | (method url-fetch) |
| 9249 | (uri (string-append "https://github.com/FasterXML/" |
| 9250 | "jackson-modules-base/archive/" |
| 9251 | "jackson-modules-base-" version ".tar.gz")) |
| 9252 | (sha256 |
| 9253 | (base32 |
| 9254 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
| 9255 | (build-system ant-build-system) |
| 9256 | (arguments |
| 9257 | `(#:jar-name "jackson-modules-base-jaxb.jar" |
| 9258 | #:source-dir "jaxb/src/main/java" |
| 9259 | #:test-dir "jaxb/src/test" |
| 9260 | #:test-exclude |
| 9261 | ;; Base class for tests |
| 9262 | (list "**/BaseJaxbTest.java") |
| 9263 | #:phases |
| 9264 | (modify-phases %standard-phases |
| 9265 | (add-before 'configure 'generate-PackageVersion.java |
| 9266 | (lambda _ |
| 9267 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" |
| 9268 | "jackson/module/jaxb/PackageVersion.java")) |
| 9269 | (in (string-append out ".in"))) |
| 9270 | (copy-file in out) |
| 9271 | (substitute* out |
| 9272 | (("@package@") "com.fasterxml.jackson.module.jaxb") |
| 9273 | (("@projectversion@") ,version) |
| 9274 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") |
| 9275 | (("@projectartifactid@") "jackson-module-jaxb"))) |
| 9276 | #t)) |
| 9277 | (add-before 'build 'copy-resources |
| 9278 | (lambda _ |
| 9279 | (copy-recursively "jaxb/src/main/resources" "build/classes") |
| 9280 | #t))))) |
| 9281 | (inputs |
| 9282 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 9283 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) |
| 9284 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) |
| 9285 | (native-inputs |
| 9286 | `(("java-junit" ,java-junit))) |
| 9287 | (home-page "https://github.com/FasterXML/jackson-modules-base") |
| 9288 | (synopsis "Jaxb annotations jackson module") |
| 9289 | (description "This package is the jaxb annotations module for jackson.") |
| 9290 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 9291 | |
| 9292 | (define-public java-fasterxml-jackson-modules-base-mrbean |
| 9293 | (package |
| 9294 | (name "java-fasterxml-jackson-modules-base-mrbean") |
| 9295 | (version "2.9.4") |
| 9296 | (source (origin |
| 9297 | (method url-fetch) |
| 9298 | (uri (string-append "https://github.com/FasterXML/" |
| 9299 | "jackson-modules-base/archive/" |
| 9300 | "jackson-modules-base-" version ".tar.gz")) |
| 9301 | (sha256 |
| 9302 | (base32 |
| 9303 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
| 9304 | (build-system ant-build-system) |
| 9305 | (arguments |
| 9306 | `(#:jar-name "jackson-modules-base-mrbean.jar" |
| 9307 | #:source-dir "mrbean/src/main/java" |
| 9308 | #:test-dir "mrbean/src/test" |
| 9309 | #:test-exclude |
| 9310 | ;; Base class for tests |
| 9311 | (list "**/BaseTest.java") |
| 9312 | #:phases |
| 9313 | (modify-phases %standard-phases |
| 9314 | (add-before 'configure 'generate-PackageVersion.java |
| 9315 | (lambda _ |
| 9316 | (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/" |
| 9317 | "jackson/module/mrbean/PackageVersion.java")) |
| 9318 | (in (string-append out ".in"))) |
| 9319 | (copy-file in out) |
| 9320 | (substitute* out |
| 9321 | (("@package@") "com.fasterxml.jackson.module.mrbean") |
| 9322 | (("@projectversion@") ,version) |
| 9323 | (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean") |
| 9324 | (("@projectartifactid@") "jackson-module-mrbean"))) |
| 9325 | #t))))) |
| 9326 | (inputs |
| 9327 | `(("java-asm" ,java-asm) |
| 9328 | ("java-fasterxml-jackson-annotations" |
| 9329 | ,java-fasterxml-jackson-annotations) |
| 9330 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) |
| 9331 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind))) |
| 9332 | (native-inputs |
| 9333 | `(("java-junit" ,java-junit))) |
| 9334 | (home-page "https://github.com/FasterXML/jackson-modules-base") |
| 9335 | (synopsis "POJO type materialization for Java") |
| 9336 | (description "This package implements POJO type materialization. |
| 9337 | Databinders can construct implementation classes for Java interfaces as part |
| 9338 | of deserialization.") |
| 9339 | (license license:asl2.0))) |
| 9340 | |
| 9341 | (define-public java-snakeyaml |
| 9342 | (package |
| 9343 | (name "java-snakeyaml") |
| 9344 | (version "1.18") |
| 9345 | (source (origin |
| 9346 | (method url-fetch) |
| 9347 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" |
| 9348 | version ".tar.gz")) |
| 9349 | (file-name (string-append name "-" version ".tar.gz")) |
| 9350 | (sha256 |
| 9351 | (base32 |
| 9352 | "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh")))) |
| 9353 | (build-system ant-build-system) |
| 9354 | (arguments |
| 9355 | `(#:jar-name "java-snakeyaml.jar" |
| 9356 | #:source-dir "src/main/java" |
| 9357 | ;; Tests require velocity, a cyclic dependency, and |
| 9358 | ;; java-spring-framework-context which is not packaged. |
| 9359 | #:tests? #f)) |
| 9360 | (home-page "https://bitbucket.org/asomov/snakeyaml") |
| 9361 | (synopsis "YAML processor") |
| 9362 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") |
| 9363 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 9364 | |
| 9365 | (define-public java-fasterxml-jackson-dataformat-yaml |
| 9366 | (package |
| 9367 | (name "java-fasterxml-jackson-dataformat-yaml") |
| 9368 | (version "2.9.4") |
| 9369 | (source (origin |
| 9370 | (method url-fetch) |
| 9371 | (uri (string-append "https://github.com/FasterXML/" |
| 9372 | "jackson-dataformats-text/archive/" |
| 9373 | "jackson-dataformats-text-" version ".tar.gz")) |
| 9374 | (sha256 |
| 9375 | (base32 |
| 9376 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
| 9377 | (build-system ant-build-system) |
| 9378 | (arguments |
| 9379 | `(#:jar-name "jackson-dataformat-yaml.jar" |
| 9380 | #:source-dir "yaml/src/main/java" |
| 9381 | #:test-dir "yaml/src/test" |
| 9382 | #:test-exclude (list "**/failing/**.java") |
| 9383 | #:phases |
| 9384 | (modify-phases %standard-phases |
| 9385 | (add-before 'configure 'generate-PackageVersion.java |
| 9386 | (lambda _ |
| 9387 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") |
| 9388 | (in (string-append out ".in"))) |
| 9389 | (copy-file in out) |
| 9390 | (substitute* out |
| 9391 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") |
| 9392 | (("@projectversion@") ,version) |
| 9393 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") |
| 9394 | (("@projectartifactid@") "jackson-dataformat-yaml"))) |
| 9395 | #t))))) |
| 9396 | (inputs |
| 9397 | `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 9398 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) |
| 9399 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) |
| 9400 | ("java-snakeyaml" ,java-snakeyaml))) |
| 9401 | (native-inputs |
| 9402 | `(("junit" ,java-junit) |
| 9403 | ("hamcrest" ,java-hamcrest-core) |
| 9404 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) |
| 9405 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) |
| 9406 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) |
| 9407 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") |
| 9408 | (synopsis "Yaml backend for Jackson") |
| 9409 | (description "Dataformat backends are used to support format alternatives |
| 9410 | to JSON, supported by default. This is done by sub-classing Jackson core |
| 9411 | abstractions.") |
| 9412 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 9413 | |
| 9414 | (define-public java-stax2-api |
| 9415 | (package |
| 9416 | (name "java-stax2-api") |
| 9417 | (version "4.0.0") |
| 9418 | (source (origin |
| 9419 | (method url-fetch) |
| 9420 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" |
| 9421 | "stax2-api-" version ".tar.gz")) |
| 9422 | (sha256 |
| 9423 | (base32 |
| 9424 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) |
| 9425 | (build-system ant-build-system) |
| 9426 | (arguments |
| 9427 | `(#:jar-name "java-stax2-api.jar" |
| 9428 | #:source-dir "src/main/java" |
| 9429 | #:tests? #f)); no tests |
| 9430 | (home-page "https://github.com/FasterXML/stax2-api") |
| 9431 | (synopsis "Stax2 API") |
| 9432 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds |
| 9433 | significant new functionalities, such as full-featured bi-direction validation |
| 9434 | interface and high-performance Typed Access API.") |
| 9435 | (license license:bsd-2))) |
| 9436 | |
| 9437 | (define-public java-woodstox-core |
| 9438 | (package |
| 9439 | (name "java-woodstox-core") |
| 9440 | (version "5.0.3") |
| 9441 | (source (origin |
| 9442 | (method url-fetch) |
| 9443 | (uri (string-append "https://github.com/FasterXML/woodstox/archive/" |
| 9444 | "woodstox-core-" version ".tar.gz")) |
| 9445 | (sha256 |
| 9446 | (base32 |
| 9447 | "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4")))) |
| 9448 | (build-system ant-build-system) |
| 9449 | (arguments |
| 9450 | `(#:jar-name "woodstox.jar" |
| 9451 | #:test-exclude |
| 9452 | (list "**/Base*.java" "failing/**") |
| 9453 | #:phases |
| 9454 | (modify-phases %standard-phases |
| 9455 | (add-before 'build 'remove-msv-dep |
| 9456 | (lambda _ |
| 9457 | ;; we don't need osgi, and it depends on msv |
| 9458 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") |
| 9459 | ;; msv's latest release is from 2011 and we don't need it |
| 9460 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") |
| 9461 | (delete-file-recursively "src/test/java/wstxtest/osgi") |
| 9462 | (delete-file-recursively "src/test/java/wstxtest/msv") |
| 9463 | #t)) |
| 9464 | (add-before 'build 'copy-resources |
| 9465 | (lambda _ |
| 9466 | (copy-recursively "src/main/resources" "build/classes") |
| 9467 | #t))))) |
| 9468 | (inputs |
| 9469 | `(("stax2" ,java-stax2-api))) |
| 9470 | (native-inputs |
| 9471 | `(("junit" ,java-junit))) |
| 9472 | (home-page "https://github.com/FasterXML/woodstox") |
| 9473 | (synopsis "Stax XML API implementation") |
| 9474 | (description "Woodstox is a stax XML API implementation.") |
| 9475 | (license license:asl2.0))) |
| 9476 | |
| 9477 | (define-public java-fasterxml-jackson-dataformat-xml |
| 9478 | (package |
| 9479 | (name "java-fasterxml-jackson-dataformat-xml") |
| 9480 | (version "2.9.4") |
| 9481 | (source (origin |
| 9482 | (method url-fetch) |
| 9483 | (uri (string-append "https://github.com/FasterXML/" |
| 9484 | "jackson-dataformat-xml/archive/" |
| 9485 | "jackson-dataformat-xml-" version ".tar.gz")) |
| 9486 | (sha256 |
| 9487 | (base32 |
| 9488 | "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq")))) |
| 9489 | (build-system ant-build-system) |
| 9490 | (arguments |
| 9491 | `(#:jar-name "jackson-dataformat-xml.jar" |
| 9492 | #:source-dir "src/main/java" |
| 9493 | #:test-exclude |
| 9494 | (list "**/failing/**") |
| 9495 | #:phases |
| 9496 | (modify-phases %standard-phases |
| 9497 | (add-before 'configure 'generate-PackageVersion.java |
| 9498 | (lambda _ |
| 9499 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") |
| 9500 | (in (string-append out ".in"))) |
| 9501 | (copy-file in out) |
| 9502 | (newline) |
| 9503 | (substitute* out |
| 9504 | (("@package@") "com.fasterxml.jackson.dataformat.xml") |
| 9505 | (("@projectversion@") ,version) |
| 9506 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") |
| 9507 | (("@projectartifactid@") "jackson-dataformat-xml"))) |
| 9508 | #t)) |
| 9509 | (add-before 'build 'copy-resources |
| 9510 | (lambda _ |
| 9511 | (copy-recursively "src/main/resources" "build/classes") |
| 9512 | #t))))) |
| 9513 | (inputs |
| 9514 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 9515 | ("jackson-core" ,java-fasterxml-jackson-core) |
| 9516 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) |
| 9517 | ("jackson-databind" ,java-fasterxml-jackson-databind) |
| 9518 | ("stax2-api" ,java-stax2-api) |
| 9519 | ("woodstox" ,java-woodstox-core))) |
| 9520 | (native-inputs |
| 9521 | `(("junit" ,java-junit) |
| 9522 | ("hamcrest" ,java-hamcrest-core))) |
| 9523 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") |
| 9524 | (synopsis "Read and write XML") |
| 9525 | (description "This package contains Jackson extension component for reading |
| 9526 | and writing XML encoded data. |
| 9527 | |
| 9528 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" |
| 9529 | approach (that is, no support is added for \"Schema-first\" approach). Support |
| 9530 | for JAXB annotations is provided by JAXB annotation module; this module |
| 9531 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, |
| 9532 | @code{JsonFactory}) as well as small number of higher level overrides needed to |
| 9533 | make data-binding work.") |
| 9534 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 9535 | |
| 9536 | (define-public java-hdrhistogram |
| 9537 | (package |
| 9538 | (name "java-hdrhistogram") |
| 9539 | (version "2.1.9") |
| 9540 | (source (origin |
| 9541 | (method url-fetch) |
| 9542 | (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/" |
| 9543 | "archive/HdrHistogram-" version ".tar.gz")) |
| 9544 | (sha256 |
| 9545 | (base32 |
| 9546 | "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv")))) |
| 9547 | (build-system ant-build-system) |
| 9548 | (arguments |
| 9549 | `(#:jar-name "java-hdrhistogram.jar" |
| 9550 | #:source-dir "src/main/java" |
| 9551 | #:phases |
| 9552 | (modify-phases %standard-phases |
| 9553 | (add-before 'configure 'set-version |
| 9554 | (lambda _ |
| 9555 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") |
| 9556 | (template (string-append version-java ".template"))) |
| 9557 | (copy-file template version-java) |
| 9558 | (substitute* version-java |
| 9559 | (("\\$VERSION\\$") ,version) |
| 9560 | (("\\$BUILD_TIME\\$") "0")) |
| 9561 | #t)))))) |
| 9562 | (native-inputs |
| 9563 | `(("junit" ,java-junit) |
| 9564 | ("hamcrest" ,java-hamcrest-core))) |
| 9565 | (home-page "https://hdrhistogram.github.io/HdrHistogram") |
| 9566 | (synopsis "High dynamic range histogram") |
| 9567 | (description "Hdrhistogram creates histograms that support |
| 9568 | recording and analyzing sampled data value counts across a configurable integer |
| 9569 | value range with configurable value precision within the range. Value precision |
| 9570 | is expressed as the number of significant digits in the value recording, and |
| 9571 | provides control over value quantization behavior across the value range and |
| 9572 | the subsequent value resolution at any given level.") |
| 9573 | (license license:public-domain))) |
| 9574 | |
| 9575 | (define-public java-cofoja |
| 9576 | (package |
| 9577 | (name "java-cofoja") |
| 9578 | (version "1.3") |
| 9579 | (source (origin |
| 9580 | (method git-fetch) |
| 9581 | (uri (git-reference |
| 9582 | (url "https://github.com/nhatminhle/cofoja") |
| 9583 | (commit (string-append "v" version)))) |
| 9584 | (file-name (string-append "java-cofoja-" version "-checkout")) |
| 9585 | (sha256 |
| 9586 | (base32 |
| 9587 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) |
| 9588 | (build-system ant-build-system) |
| 9589 | (arguments |
| 9590 | `(#:build-target "dist" |
| 9591 | #:test-target "test" |
| 9592 | #:jdk ,icedtea-8 |
| 9593 | #:make-flags |
| 9594 | (list "-Ddist.dir=dist") |
| 9595 | #:modules ((guix build ant-build-system) |
| 9596 | (guix build java-utils) |
| 9597 | (guix build utils) |
| 9598 | (srfi srfi-1) |
| 9599 | (ice-9 match)) |
| 9600 | #:phases |
| 9601 | (modify-phases %standard-phases |
| 9602 | ;; The bulid system ignores the class path the ant-build-system sets |
| 9603 | ;; up and instead expects to find all dependencies in the "lib" |
| 9604 | ;; directory. |
| 9605 | (add-after 'unpack 'create-libdir |
| 9606 | (lambda* (#:key inputs #:allow-other-keys) |
| 9607 | (mkdir-p "lib") |
| 9608 | (for-each |
| 9609 | (lambda (file) |
| 9610 | (let ((target (string-append "lib/" (basename file)))) |
| 9611 | (unless (file-exists? target) |
| 9612 | (symlink file target)))) |
| 9613 | (append-map (match-lambda |
| 9614 | ((label . dir) |
| 9615 | (find-files dir "\\.jar$"))) |
| 9616 | inputs)) |
| 9617 | #t)) |
| 9618 | (replace 'install (install-jars "dist"))))) |
| 9619 | (inputs |
| 9620 | `(("java-asm" ,java-asm))) |
| 9621 | (native-inputs |
| 9622 | `(("java-junit" ,java-junit))) |
| 9623 | (home-page "https://github.com/nhatminhle/cofoja") |
| 9624 | (synopsis "Contracts for Java") |
| 9625 | (description "Contracts for Java, or Cofoja for short, is a contract |
| 9626 | programming framework and test tool for Java, which uses annotation processing |
| 9627 | and bytecode instrumentation to provide run-time checking. (In particular, |
| 9628 | this is not a static analysis tool.)") |
| 9629 | (license license:lgpl3+))) |
| 9630 | |
| 9631 | (define-public java-aopalliance |
| 9632 | (package |
| 9633 | (name "java-aopalliance") |
| 9634 | (version "1.0") |
| 9635 | (source (origin |
| 9636 | (method git-fetch) |
| 9637 | ;; Note: this git repository is not official, but contains the |
| 9638 | ;; source code that is in the CVS repository. Downloading the |
| 9639 | ;; tarball from sourceforge is undeterministic, and the cvs download |
| 9640 | ;; fails. |
| 9641 | (uri (git-reference |
| 9642 | (url "https://github.com/hoverruan/aopalliance") |
| 9643 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) |
| 9644 | (file-name (string-append name "-" version)) |
| 9645 | (sha256 |
| 9646 | (base32 |
| 9647 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) |
| 9648 | (build-system ant-build-system) |
| 9649 | (arguments |
| 9650 | `(#:jar-name "java-aopalliance.jar" |
| 9651 | #:jdk ,icedtea-8 |
| 9652 | #:tests? #f; no tests |
| 9653 | #:source-dir "aopalliance/src/main" |
| 9654 | #:modules ((guix build ant-build-system) |
| 9655 | (guix build utils) |
| 9656 | (guix build maven pom) |
| 9657 | (guix build java-utils) |
| 9658 | (sxml simple)) |
| 9659 | #:phases |
| 9660 | (modify-phases %standard-phases |
| 9661 | (add-before 'install 'create-pom |
| 9662 | (lambda _ |
| 9663 | (with-output-to-file "pom.xml" |
| 9664 | (lambda _ |
| 9665 | (sxml->xml |
| 9666 | `((project |
| 9667 | (modelVersion "4.0.0") |
| 9668 | (name "aopalliance") |
| 9669 | (groupId "aopalliance") |
| 9670 | (artifactId "aopalliance") |
| 9671 | (version "1.0")))))) |
| 9672 | #t)) |
| 9673 | (replace 'install |
| 9674 | (install-from-pom "pom.xml"))))) |
| 9675 | (home-page "http://aopalliance.sourceforge.net") |
| 9676 | (synopsis "Aspect-Oriented Programming") |
| 9677 | (description "The AOP Alliance project is a joint project between several |
| 9678 | software engineering people who are interested in Aspect-Oriented Programming |
| 9679 | (AOP) and Java.") |
| 9680 | (license license:public-domain))) |
| 9681 | |
| 9682 | (define-public java-javax-inject |
| 9683 | (package |
| 9684 | (name "java-javax-inject") |
| 9685 | (version "1") |
| 9686 | (source (origin |
| 9687 | (method git-fetch) |
| 9688 | (uri (git-reference |
| 9689 | (url "https://github.com/javax-inject/javax-inject") |
| 9690 | (commit version))) |
| 9691 | (file-name (git-file-name name version)) |
| 9692 | (sha256 |
| 9693 | (base32 |
| 9694 | "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x")))) |
| 9695 | (build-system ant-build-system) |
| 9696 | (arguments |
| 9697 | `(#:jar-name "java-javax-inject.jar" |
| 9698 | #:tests? #f; no tests |
| 9699 | #:phases |
| 9700 | (modify-phases %standard-phases |
| 9701 | (replace 'install |
| 9702 | (install-from-pom "pom.xml"))))) |
| 9703 | (home-page "https://github.com/javax-inject/javax-inject") |
| 9704 | (synopsis "JSR-330: Dependency Injection for Java") |
| 9705 | (description "This package specifies a means for obtaining objects in such |
| 9706 | a way as to maximize reusability, testability and maintainability compared to |
| 9707 | traditional approaches such as constructors, factories, and service locators |
| 9708 | (e.g., JNDI). This process, known as dependency injection, is beneficial to |
| 9709 | most nontrivial applications. |
| 9710 | |
| 9711 | Many types depend on other types. For example, a @var{Stopwatch} might depend |
| 9712 | on a @var{TimeSource}. The types on which a type depends are known as its |
| 9713 | dependencies. The process of finding an instance of a dependency to use at run |
| 9714 | time is known as resolving the dependency. If no such instance can be found, |
| 9715 | the dependency is said to be unsatisfied, and the application is broken.") |
| 9716 | (license license:asl2.0))) |
| 9717 | |
| 9718 | (define-public java-guice |
| 9719 | (package |
| 9720 | (name "java-guice") |
| 9721 | (version "4.1") |
| 9722 | (source (origin |
| 9723 | (method git-fetch) |
| 9724 | (uri (git-reference |
| 9725 | (url "https://github.com/google/guice") |
| 9726 | (commit version))) |
| 9727 | (file-name (git-file-name name version)) |
| 9728 | (modules '((guix build utils))) |
| 9729 | (snippet |
| 9730 | `(begin |
| 9731 | (for-each delete-file (find-files "." ".*.jar")) #t)) |
| 9732 | (sha256 |
| 9733 | (base32 |
| 9734 | "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq")))) |
| 9735 | (build-system ant-build-system) |
| 9736 | (arguments |
| 9737 | `(#:jar-name "java-guice.jar" |
| 9738 | #:jdk ,icedtea-8 |
| 9739 | #:tests? #f; FIXME: tests are not in a java sub directory |
| 9740 | #:source-dir "core/src" |
| 9741 | #:phases |
| 9742 | (modify-phases %standard-phases |
| 9743 | (add-after 'unpack 'make-files-writable |
| 9744 | (lambda _ |
| 9745 | (for-each make-file-writable (find-files ".")) |
| 9746 | #t)) |
| 9747 | (replace 'install |
| 9748 | (install-from-pom "core/pom.xml"))))) |
| 9749 | (propagated-inputs |
| 9750 | `(("java-aopalliance" ,java-aopalliance) |
| 9751 | ("java-asm" ,java-asm) |
| 9752 | ("java-cglib" ,java-cglib) |
| 9753 | ("java-guava" ,java-guava) |
| 9754 | ("java-javax-inject" ,java-javax-inject) |
| 9755 | ("java-guice-parent-pom" ,java-guice-parent-pom))) |
| 9756 | (home-page "https://github.com/google/guice") |
| 9757 | (synopsis "Lightweight dependency injection framework") |
| 9758 | (description "Guice is a lightweight dependency injection framework for |
| 9759 | Java 6 and above.") |
| 9760 | (license license:asl2.0))) |
| 9761 | |
| 9762 | (define-public java-guice-servlet |
| 9763 | (package |
| 9764 | (inherit java-guice) |
| 9765 | (name "java-guice-servlet") |
| 9766 | (arguments |
| 9767 | `(#:jar-name "guice-servlet.jar" |
| 9768 | #:source-dir "extensions/servlet/src/" |
| 9769 | #:jdk ,icedtea-8 |
| 9770 | #:tests? #f ; FIXME: not in a java subdir |
| 9771 | #:phases |
| 9772 | (modify-phases %standard-phases |
| 9773 | (add-after 'unpack 'make-files-writable |
| 9774 | (lambda _ |
| 9775 | (for-each make-file-writable (find-files ".")) |
| 9776 | #t))))) |
| 9777 | (inputs |
| 9778 | `(("guice" ,java-guice) |
| 9779 | ("servlet" ,java-classpathx-servletapi) |
| 9780 | ,@(package-inputs java-guice))))) |
| 9781 | |
| 9782 | (define java-guice-parent-pom |
| 9783 | (package |
| 9784 | (inherit java-guice) |
| 9785 | (name "java-guice-parent-pom") |
| 9786 | (arguments |
| 9787 | `(#:tests? #f |
| 9788 | #:phases |
| 9789 | (modify-phases %standard-phases |
| 9790 | (delete 'configure) |
| 9791 | (delete 'build) |
| 9792 | (add-after 'install 'install-extensions |
| 9793 | (install-pom-file "extensions/pom.xml")) |
| 9794 | (replace 'install |
| 9795 | (install-pom-file "pom.xml"))))) |
| 9796 | (propagated-inputs |
| 9797 | `(("java-google-parent-pom" ,java-google-parent-pom-5))))) |
| 9798 | |
| 9799 | (define java-google-parent-pom-5 |
| 9800 | (package |
| 9801 | (name "java-google-parent-pom") |
| 9802 | (version "5") |
| 9803 | (source (origin |
| 9804 | (method git-fetch) |
| 9805 | (uri (git-reference |
| 9806 | (url "https://github.com/google/google-maven-parents") |
| 9807 | (commit (string-append "google-" version)))) |
| 9808 | (file-name (git-file-name name version)) |
| 9809 | (sha256 |
| 9810 | (base32 |
| 9811 | "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv")))) |
| 9812 | (build-system ant-build-system) |
| 9813 | (arguments |
| 9814 | `(#:tests? #f |
| 9815 | #:phases |
| 9816 | (modify-phases %standard-phases |
| 9817 | (delete 'configure) |
| 9818 | (delete 'build) |
| 9819 | (replace 'install |
| 9820 | (install-pom-file "pom.xml"))))) |
| 9821 | (home-page "https://github.com/google/google-maven-parents") |
| 9822 | (synopsis "Google parent pom") |
| 9823 | (description "This package contains the Maven parent POM for other Google |
| 9824 | Java projects.") |
| 9825 | (license license:asl2.0))) |
| 9826 | |
| 9827 | (define-public java-assertj |
| 9828 | (package |
| 9829 | (name "java-assertj") |
| 9830 | (version "3.8.0") |
| 9831 | (source (origin |
| 9832 | (method git-fetch) |
| 9833 | (uri (git-reference |
| 9834 | (url "https://github.com/joel-costigliola/assertj-core") |
| 9835 | (commit (string-append "assertj-core-" version)))) |
| 9836 | (file-name (git-file-name name version)) |
| 9837 | (sha256 |
| 9838 | (base32 |
| 9839 | "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1")))) |
| 9840 | (build-system ant-build-system) |
| 9841 | (arguments |
| 9842 | `(#:jar-name "java-assertj.jar" |
| 9843 | #:jdk ,icedtea-8 |
| 9844 | #:source-dir "src/main/java" |
| 9845 | #:tests? #f)); depends on tng-junit which depends on assertj |
| 9846 | (inputs |
| 9847 | `(("cglib" ,java-cglib) |
| 9848 | ("junit" ,java-junit) |
| 9849 | ("hamcrest" ,java-hamcrest-core))) |
| 9850 | (native-inputs |
| 9851 | `(("mockito" ,java-mockito-1))) |
| 9852 | (home-page "https://joel-costigliola.github.io/assertj/index.html") |
| 9853 | (synopsis "Fluent assertions for java") |
| 9854 | (description "AssertJ core is a Java library that provides a fluent |
| 9855 | interface for writing assertions. Its main goal is to improve test code |
| 9856 | readability and make maintenance of tests easier.") |
| 9857 | (license license:asl2.0))) |
| 9858 | |
| 9859 | (define-public java-jboss-javassist |
| 9860 | (package |
| 9861 | (name "java-jboss-javassist") |
| 9862 | (version "3.21.0") |
| 9863 | (source (origin |
| 9864 | (method git-fetch) |
| 9865 | (uri (git-reference |
| 9866 | (url "https://github.com/jboss-javassist/javassist") |
| 9867 | (commit |
| 9868 | (string-append "rel_" |
| 9869 | (string-map |
| 9870 | (lambda (x) (if (eq? x #\.) #\_ x)) version) |
| 9871 | "_ga")))) |
| 9872 | (file-name (git-file-name name version)) |
| 9873 | (sha256 |
| 9874 | (base32 |
| 9875 | "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm")) |
| 9876 | (modules '((guix build utils))) |
| 9877 | (snippet |
| 9878 | '(begin |
| 9879 | (delete-file "javassist.jar"))))) |
| 9880 | (build-system ant-build-system) |
| 9881 | (arguments |
| 9882 | `(#:jar-name "java-jboss-javassist.jar" |
| 9883 | #:jdk ,icedtea-8 |
| 9884 | #:source-dir "src/main" |
| 9885 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 |
| 9886 | #:phases |
| 9887 | (modify-phases %standard-phases |
| 9888 | (add-after 'unpack 'make-files-writable |
| 9889 | (lambda _ |
| 9890 | (for-each make-file-writable (find-files ".")) |
| 9891 | #t))))) |
| 9892 | (native-inputs |
| 9893 | `(("junit" ,java-junit))) |
| 9894 | (home-page "https://github.com/jboss-javassist/javassist") |
| 9895 | (synopsis "Java bytecode engineering toolkit") |
| 9896 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode |
| 9897 | manipulation simple. It is a class library for editing bytecodes in Java; it |
| 9898 | enables Java programs to define a new class at runtime and to modify a class |
| 9899 | file when the JVM loads it.") |
| 9900 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. |
| 9901 | |
| 9902 | (define-public java-jcommander |
| 9903 | (package |
| 9904 | (name "java-jcommander") |
| 9905 | (version "1.71") |
| 9906 | (source (origin |
| 9907 | (method git-fetch) |
| 9908 | (uri (git-reference |
| 9909 | (url "https://github.com/cbeust/jcommander") |
| 9910 | (commit version))) |
| 9911 | (file-name (git-file-name name version)) |
| 9912 | (sha256 |
| 9913 | (base32 |
| 9914 | "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57")))) |
| 9915 | (build-system ant-build-system) |
| 9916 | (arguments |
| 9917 | `(#:jar-name "java-jcommander.jar" |
| 9918 | #:jdk ,icedtea-8 |
| 9919 | #:tests? #f; requires testng which depends on jcommander |
| 9920 | #:source-dir "src/main/java")) |
| 9921 | (home-page "https://jcommander.org") |
| 9922 | (synopsis "Command line parameters parser") |
| 9923 | (description "JCommander is a very small Java framework that makes it |
| 9924 | trivial to parse command line parameters. Parameters are declared with |
| 9925 | annotations.") |
| 9926 | (license license:asl2.0))) |
| 9927 | |
| 9928 | (define-public java-bsh |
| 9929 | (package |
| 9930 | (name "java-bsh") |
| 9931 | (version "2.0b6") |
| 9932 | (source (origin |
| 9933 | (method git-fetch) |
| 9934 | (uri (git-reference |
| 9935 | (url "https://github.com/beanshell/beanshell") |
| 9936 | (commit version))) |
| 9937 | (file-name (git-file-name name version)) |
| 9938 | (sha256 |
| 9939 | (base32 |
| 9940 | "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw")) |
| 9941 | (modules '((guix build utils))) |
| 9942 | (snippet |
| 9943 | '(begin |
| 9944 | ;; Delete bundled third-party jar archives. |
| 9945 | (for-each delete-file (find-files "." ".*.jar$")) |
| 9946 | (for-each (lambda (file) (chmod file #o644)) |
| 9947 | (find-files "." ".")) |
| 9948 | #t)))) |
| 9949 | (build-system ant-build-system) |
| 9950 | (arguments |
| 9951 | `(#:build-target "jarall" |
| 9952 | #:test-target "junit-tests-all" |
| 9953 | #:make-flags (list "-DDATE" "(no date for reproducibility)") |
| 9954 | #:phases |
| 9955 | (modify-phases %standard-phases |
| 9956 | (add-before 'install 'fix-pom |
| 9957 | (lambda _ |
| 9958 | (substitute* "pom.xml" |
| 9959 | (("org.apache-extras.beanshell") "org.beanshell")) |
| 9960 | #t)) |
| 9961 | (replace 'install |
| 9962 | (install-from-pom "pom.xml"))))) |
| 9963 | (inputs |
| 9964 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) |
| 9965 | ("java-commons-bsf" ,java-commons-bsf))) |
| 9966 | (native-inputs |
| 9967 | `(("java-junit" ,java-junit) |
| 9968 | ("javacc" ,javacc-3))) |
| 9969 | (home-page "http://beanshell.org/") |
| 9970 | (synopsis "Lightweight Scripting for Java") |
| 9971 | (description "BeanShell is a small, free, embeddable Java source |
| 9972 | interpreter with object scripting language features, written in Java. |
| 9973 | BeanShell dynamically executes standard Java syntax and extends it with common |
| 9974 | scripting conveniences such as loose types, commands, and method closures like |
| 9975 | those in Perl and JavaScript.") |
| 9976 | (license license:asl2.0))) |
| 9977 | |
| 9978 | (define-public java-fest-util |
| 9979 | (package |
| 9980 | (name "java-fest-util") |
| 9981 | (version "1.2.5") |
| 9982 | (source (origin |
| 9983 | (method git-fetch) |
| 9984 | (uri (git-reference |
| 9985 | (url "https://github.com/alexruiz/fest-util/") |
| 9986 | (commit (string-append "fest-util-" version)))) |
| 9987 | (file-name (git-file-name name version)) |
| 9988 | (sha256 |
| 9989 | (base32 |
| 9990 | "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz")))) |
| 9991 | (build-system ant-build-system) |
| 9992 | (arguments |
| 9993 | `(#:jar-name "java-fest-util.jar" |
| 9994 | #:source-dir "src/main/java")) |
| 9995 | (native-inputs |
| 9996 | `(("junit" ,java-junit) |
| 9997 | ("hamcrest" ,java-hamcrest-core))) |
| 9998 | (home-page "https://github.com/alexruiz/fest-util") |
| 9999 | (synopsis "FEST common utilities") |
| 10000 | (description "Common utilities used in all FEST module.") |
| 10001 | (license license:asl2.0))) |
| 10002 | |
| 10003 | (define-public java-fest-test |
| 10004 | (package |
| 10005 | (name "java-fest-test") |
| 10006 | (version "2.1.0") |
| 10007 | (source (origin |
| 10008 | (method git-fetch) |
| 10009 | (uri (git-reference |
| 10010 | (url "https://github.com/alexruiz/fest-test/") |
| 10011 | (commit (string-append "fest-test-" version)))) |
| 10012 | (file-name (git-file-name name version)) |
| 10013 | (sha256 |
| 10014 | (base32 |
| 10015 | "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn")))) |
| 10016 | (build-system ant-build-system) |
| 10017 | (arguments |
| 10018 | `(#:jar-name "java-fest-test.jar" |
| 10019 | #:source-dir "src/main/java" |
| 10020 | #:tests? #f)); no tests |
| 10021 | (inputs |
| 10022 | `(("junit" ,java-junit))) |
| 10023 | (home-page "https://github.com/alexruiz/fest-test") |
| 10024 | (synopsis "Common FEST testing infrastructure") |
| 10025 | (description "Fest-test contains the common FEST testing infrastructure.") |
| 10026 | (license license:asl2.0))) |
| 10027 | |
| 10028 | (define-public java-fest-assert |
| 10029 | (package |
| 10030 | (name "java-fest-assert") |
| 10031 | (version "2.0M10") |
| 10032 | (source (origin |
| 10033 | (method git-fetch) |
| 10034 | (uri (git-reference |
| 10035 | (url "https://github.com/alexruiz/fest-assert-2.x/") |
| 10036 | (commit (string-append "fest-assert-core-" version)))) |
| 10037 | (file-name (git-file-name name version)) |
| 10038 | (sha256 |
| 10039 | (base32 |
| 10040 | "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by")))) |
| 10041 | (build-system ant-build-system) |
| 10042 | (arguments |
| 10043 | `(#:jar-name "java-fest-assert.jar" |
| 10044 | #:source-dir "src/main/java" |
| 10045 | #:test-exclude |
| 10046 | (list |
| 10047 | "**/Abstract*.java" |
| 10048 | "**/*BaseTest.java" |
| 10049 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses |
| 10050 | "**/MessageFormatter_format_Test.java" |
| 10051 | "**/internal/*/*_assert*_Test.java"))) |
| 10052 | (inputs |
| 10053 | `(("java-fest-util" ,java-fest-util))) |
| 10054 | (native-inputs |
| 10055 | `(("java-junit" ,java-junit) |
| 10056 | ("java-fest-test" ,java-fest-test) |
| 10057 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 10058 | ("java-mockito" ,java-mockito-1) |
| 10059 | ("java-cglib" ,java-cglib) |
| 10060 | ("java-objenesis" ,java-objenesis) |
| 10061 | ("java-asm" ,java-asm))) |
| 10062 | (home-page "https://github.com/alexruiz/fest-assert-2.x") |
| 10063 | (synopsis "FEST fluent assertions") |
| 10064 | (description "FEST-Assert provides a fluent interface for assertions.") |
| 10065 | (license license:asl2.0))) |
| 10066 | |
| 10067 | (define-public java-testng |
| 10068 | (package |
| 10069 | (name "java-testng") |
| 10070 | (version "6.14.3") |
| 10071 | (source (origin |
| 10072 | (method git-fetch) |
| 10073 | (uri (git-reference |
| 10074 | (url "https://github.com/cbeust/testng") |
| 10075 | (commit version))) |
| 10076 | (file-name (string-append name "-" version "-checkout")) |
| 10077 | (sha256 |
| 10078 | (base32 |
| 10079 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
| 10080 | (build-system ant-build-system) |
| 10081 | (arguments |
| 10082 | `(#:jdk ,icedtea-8; java.util.function |
| 10083 | #:jar-name "java-testng.jar" |
| 10084 | #:source-dir "src/main/java" |
| 10085 | #:phases |
| 10086 | (modify-phases %standard-phases |
| 10087 | ;; FIXME: I don't know why these tests fail |
| 10088 | (add-after 'unpack 'delete-failing-tests |
| 10089 | (lambda _ |
| 10090 | (substitute* "src/test/resources/testng.xml" |
| 10091 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") |
| 10092 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")) |
| 10093 | #t)) |
| 10094 | ;; We don't have groovy |
| 10095 | (add-after 'unpack 'delete-groovy-tests |
| 10096 | (lambda _ |
| 10097 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") |
| 10098 | (substitute* "src/test/resources/testng.xml" |
| 10099 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")) |
| 10100 | #t)) |
| 10101 | (add-before 'build 'copy-resources |
| 10102 | (lambda _ |
| 10103 | (copy-recursively "src/main/resources" "build/classes") |
| 10104 | #t)) |
| 10105 | (add-before 'check 'copy-test-resources |
| 10106 | (lambda _ |
| 10107 | (copy-recursively "src/test/resources" "build/test-classes") |
| 10108 | #t)) |
| 10109 | (replace 'check |
| 10110 | (lambda _ |
| 10111 | (invoke "ant" "compile-tests") |
| 10112 | ;; we don't have groovy |
| 10113 | (substitute* "src/test/resources/testng.xml" |
| 10114 | (("<class name=\"test.groovy.GroovyTest\" />") "")) |
| 10115 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 10116 | ":build/classes" |
| 10117 | ":build/test-classes") |
| 10118 | "-Dtest.resources.dir=src/test/resources" |
| 10119 | "org.testng.TestNG" "src/test/resources/testng.xml")))))) |
| 10120 | (propagated-inputs |
| 10121 | `(("junit" ,java-junit) |
| 10122 | ("java-jsr305" ,java-jsr305) |
| 10123 | ("java-bsh" ,java-bsh) |
| 10124 | ("java-jcommander" ,java-jcommander) |
| 10125 | ("java-guice" ,java-guice) |
| 10126 | ("snakeyaml" ,java-snakeyaml))) |
| 10127 | (native-inputs |
| 10128 | `(("guava" ,java-guava) |
| 10129 | ("java-javax-inject" ,java-javax-inject) |
| 10130 | ("java-hamcrest" ,java-hamcrest-all) |
| 10131 | ("java-assertj" ,java-assertj) |
| 10132 | ("java-mockito" ,java-mockito-1) |
| 10133 | ("cglib" ,java-cglib) |
| 10134 | ("asm" ,java-asm) |
| 10135 | ("aopalliance" ,java-aopalliance))) |
| 10136 | (home-page "https://testng.org") |
| 10137 | (synopsis "Testing framework") |
| 10138 | (description "TestNG is a testing framework inspired from JUnit and NUnit |
| 10139 | but introducing some new functionalities that make it more powerful and easier |
| 10140 | to use.") |
| 10141 | (license license:asl2.0))) |
| 10142 | |
| 10143 | (define-public java-jnacl |
| 10144 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
| 10145 | (revision "2")) |
| 10146 | (package |
| 10147 | (name "java-jnacl") |
| 10148 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) |
| 10149 | (source (origin |
| 10150 | (method git-fetch) |
| 10151 | (uri (git-reference |
| 10152 | (url "https://github.com/neilalexander/jnacl") |
| 10153 | (commit commit))) |
| 10154 | (file-name (git-file-name name version)) |
| 10155 | (sha256 |
| 10156 | (base32 |
| 10157 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) |
| 10158 | (build-system ant-build-system) |
| 10159 | (arguments |
| 10160 | `(#:jar-name "jnacl.jar" |
| 10161 | #:source-dir "src/main/java" |
| 10162 | #:jdk ,icedtea-8 |
| 10163 | #:phases |
| 10164 | (modify-phases %standard-phases |
| 10165 | (add-before 'build 'fix-tests |
| 10166 | (lambda _ |
| 10167 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" |
| 10168 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") |
| 10169 | (("assertions.Assertions") "assertions.api.Assertions")) |
| 10170 | #t)) |
| 10171 | (replace 'check |
| 10172 | (lambda _ |
| 10173 | (invoke "ant" "compile-tests") |
| 10174 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 10175 | ":build/classes" |
| 10176 | ":build/test-classes") |
| 10177 | "org.testng.TestNG" "-testclass" |
| 10178 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") |
| 10179 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 10180 | ":build/classes" |
| 10181 | ":build/test-classes") |
| 10182 | "org.testng.TestNG" "-testclass" |
| 10183 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class")))))) |
| 10184 | (native-inputs |
| 10185 | `(("java-testng" ,java-testng) |
| 10186 | ("java-fest-util" ,java-fest-util) |
| 10187 | ("java-fest-assert" ,java-fest-assert))) |
| 10188 | (home-page "https://github.com/neilalexander/jnacl") |
| 10189 | (synopsis "Java implementation of NaCl") |
| 10190 | (description "Pure Java implementation of the NaCl: Networking and |
| 10191 | Cryptography library.") |
| 10192 | (license license:bsd-2)))) |
| 10193 | |
| 10194 | (define-public java-mvel2 |
| 10195 | (package |
| 10196 | (name "java-mvel2") |
| 10197 | (version "2.3.1") |
| 10198 | (source (origin |
| 10199 | (method url-fetch) |
| 10200 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" |
| 10201 | version ".Final.tar.gz")) |
| 10202 | (sha256 |
| 10203 | (base32 |
| 10204 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) |
| 10205 | (build-system ant-build-system) |
| 10206 | (arguments |
| 10207 | `(#:jar-name "mvel2.jar" |
| 10208 | #:source-dir "src/main/java" |
| 10209 | #:test-exclude |
| 10210 | (list "**/Abstract*.java" |
| 10211 | ;; Base class with no tests |
| 10212 | "**/MVELThreadTest.java") |
| 10213 | #:phases |
| 10214 | (modify-phases %standard-phases |
| 10215 | (add-after 'install 'install-bin |
| 10216 | (lambda* (#:key outputs #:allow-other-keys) |
| 10217 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 10218 | (mkdir-p bin) |
| 10219 | (with-output-to-file (string-append bin "/mvel2") |
| 10220 | (lambda _ |
| 10221 | (display |
| 10222 | (string-append |
| 10223 | "#!" (which "bash") "\n" |
| 10224 | "if [ \"$#\" -ne \"2\" ]; then\n" |
| 10225 | "echo 'Usage: mvel2 <script> <out.dir>'\n" |
| 10226 | "exit\n" |
| 10227 | "fi\n" |
| 10228 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") |
| 10229 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" |
| 10230 | " org.mvel2.sh.Main $1")))) |
| 10231 | (chmod (string-append bin "/mvel2") #o755)) |
| 10232 | #t))))) |
| 10233 | (native-inputs |
| 10234 | `(("junit" ,java-junit) |
| 10235 | ("hamcrest" ,java-hamcrest-core))) |
| 10236 | (home-page "https://github.com/mvel/mvel") |
| 10237 | (synopsis "MVFLEX Expression Language") |
| 10238 | (description "MVEL has largely been inspired by Java syntax, but has some |
| 10239 | fundamental differences aimed at making it more efficient as an expression |
| 10240 | language, such as operators that directly support collection, array and string |
| 10241 | matching, as well as regular expressions. MVEL is used to evaluate expressions |
| 10242 | written using Java syntax. |
| 10243 | |
| 10244 | In addition to the expression language, MVEL serves as a templating language for |
| 10245 | configuration and string construction.") |
| 10246 | (license license:asl2.0))) |
| 10247 | |
| 10248 | (define-public java-commons-jexl-2 |
| 10249 | (package |
| 10250 | (name "java-commons-jexl") |
| 10251 | (version "2.1.1") |
| 10252 | (source (origin |
| 10253 | (method url-fetch) |
| 10254 | (uri (string-append "mirror://apache/commons/jexl/source/" |
| 10255 | "commons-jexl-" version "-src.tar.gz")) |
| 10256 | (sha256 |
| 10257 | (base32 |
| 10258 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) |
| 10259 | (build-system ant-build-system) |
| 10260 | (arguments |
| 10261 | `(#:jar-name "commons-jexl-2.jar" |
| 10262 | #:jdk ,icedtea-8 |
| 10263 | #:source-dir "src/main/java" |
| 10264 | #:phases |
| 10265 | (modify-phases %standard-phases |
| 10266 | (add-before 'check 'disable-broken-tests |
| 10267 | (lambda* (#:key inputs #:allow-other-keys) |
| 10268 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" |
| 10269 | (substitute* "ArithmeticTest.java" |
| 10270 | (("asserter.assertExpression\\(\"3 / 0\"") "//") |
| 10271 | (("asserter.assertExpression\\(\"imanull") "//")) |
| 10272 | ;; This test fails with "ambiguous method invocation" |
| 10273 | (delete-file "CacheTest.java") |
| 10274 | ;; This test doesn't have access to the temp directory |
| 10275 | (substitute* "ClassCreatorTest.java" |
| 10276 | (("java.io.tmpdir") "user.dir")) |
| 10277 | ;; This test fails in trying to detect whether it can run. |
| 10278 | (substitute* "ClassCreator.java" |
| 10279 | (("boolean canRun =.*") "boolean canRun = false;\n")) |
| 10280 | ;; ...and these tests depend on it. |
| 10281 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") |
| 10282 | (delete-file "scripting/JexlScriptEngineTest.java")) |
| 10283 | #t)) |
| 10284 | (add-before 'build 'run-javacc |
| 10285 | (lambda _ |
| 10286 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" |
| 10287 | (invoke "java" "jjtree" "Parser.jjt") |
| 10288 | (invoke "java" "javacc" "Parser.jj")) |
| 10289 | #t))))) |
| 10290 | (inputs |
| 10291 | `(("java-commons-logging-minimal" ,java-commons-logging-minimal))) |
| 10292 | (native-inputs |
| 10293 | `(("java-junit" ,java-junit) |
| 10294 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 10295 | ("javacc" ,javacc-4))) |
| 10296 | (home-page "https://commons.apache.org/proper/commons-jexl/") |
| 10297 | (synopsis "Java Expression Language ") |
| 10298 | (description "JEXL is a library intended to facilitate the implementation |
| 10299 | of dynamic and scripting features in applications and frameworks written in |
| 10300 | Java. JEXL implements an Expression Language based on some extensions to the |
| 10301 | JSTL Expression Language supporting most of the constructs seen in |
| 10302 | shell-script or ECMAScript. Its goal is to expose scripting features usable |
| 10303 | by technical operatives or consultants working with enterprise platforms.") |
| 10304 | (license license:asl2.0))) |
| 10305 | |
| 10306 | (define-public java-lz4 |
| 10307 | (package |
| 10308 | (name "java-lz4") |
| 10309 | (version "1.4.0") |
| 10310 | (source (origin |
| 10311 | (method git-fetch) |
| 10312 | (uri (git-reference |
| 10313 | (url "https://github.com/lz4/lz4-java") |
| 10314 | (commit version))) |
| 10315 | (file-name (git-file-name name version)) |
| 10316 | (sha256 |
| 10317 | (base32 |
| 10318 | "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y")))) |
| 10319 | (build-system ant-build-system) |
| 10320 | (arguments |
| 10321 | `(#:jar-name "lz4.jar" |
| 10322 | #:jdk ,icedtea-8 |
| 10323 | #:source-dir "src/java:src/java-unsafe" |
| 10324 | #:tests? #f; FIXME: requires more dependencies |
| 10325 | #:phases |
| 10326 | (modify-phases %standard-phases |
| 10327 | (add-after 'unpack 'make-files-writable |
| 10328 | (lambda _ |
| 10329 | (for-each make-file-writable (find-files ".")) |
| 10330 | #t)) |
| 10331 | (add-before 'configure 'generate-source |
| 10332 | (lambda _ |
| 10333 | (with-directory-excursion "src/build/source_templates" |
| 10334 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
| 10335 | #t))))) |
| 10336 | (native-inputs |
| 10337 | `(("mvel" ,java-mvel2))) |
| 10338 | (home-page "https://jpountz.github.io/lz4-java") |
| 10339 | (synopsis "Compression algorithm") |
| 10340 | (description "LZ4 - Java is a Java port of the popular lz4 compression |
| 10341 | algorithms and xxHash hashing algorithm.") |
| 10342 | (license license:asl2.0))) |
| 10343 | |
| 10344 | (define-public java-bouncycastle |
| 10345 | (package |
| 10346 | (name "java-bouncycastle") |
| 10347 | (version "1.60") |
| 10348 | (source (origin |
| 10349 | (method git-fetch) |
| 10350 | (uri (git-reference |
| 10351 | (url "http://git.bouncycastle.org/repositories/bc-java") |
| 10352 | ;(url "https://github.com/bcgit/bc-java") |
| 10353 | (commit (string-append "r1rv" (substring version 2 4))))) |
| 10354 | (file-name (git-file-name name version)) |
| 10355 | (sha256 |
| 10356 | (base32 |
| 10357 | "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb")) |
| 10358 | (modules '((guix build utils))) |
| 10359 | (snippet |
| 10360 | '(begin |
| 10361 | (for-each delete-file |
| 10362 | (find-files "." "\\.jar$")) |
| 10363 | #t)))) |
| 10364 | (build-system ant-build-system) |
| 10365 | (arguments |
| 10366 | `(#:jdk ,icedtea-8 |
| 10367 | #:tests? #f |
| 10368 | #:phases |
| 10369 | (modify-phases %standard-phases |
| 10370 | (replace 'build |
| 10371 | (lambda _ |
| 10372 | (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") |
| 10373 | (invoke "ant" "-f" "ant/jdk15+.xml" "build"))) |
| 10374 | ;; FIXME: the tests freeze. |
| 10375 | ;; (replace 'check |
| 10376 | ;; (lambda _ |
| 10377 | ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test"))) |
| 10378 | (replace 'install |
| 10379 | (install-jars "build/artifacts/jdk1.5/jars"))))) |
| 10380 | (inputs |
| 10381 | `(("java-javax-mail" ,java-javax-mail))) |
| 10382 | (native-inputs |
| 10383 | `(("unzip" ,unzip) |
| 10384 | ("junit" ,java-junit) |
| 10385 | ("java-native-access" ,java-native-access) |
| 10386 | ("java-native-access-platform" ,java-native-access-platform))) |
| 10387 | (home-page "https://www.bouncycastle.org") |
| 10388 | (synopsis "Cryptographic library") |
| 10389 | (description "Bouncy Castle is a cryptographic library for the Java |
| 10390 | programming language.") |
| 10391 | (license license:expat))) |
| 10392 | |
| 10393 | (define-public java-lmax-disruptor |
| 10394 | (package |
| 10395 | (name "java-lmax-disruptor") |
| 10396 | (version "3.3.7") |
| 10397 | (source (origin |
| 10398 | (method url-fetch) |
| 10399 | (uri (string-append "https://github.com/LMAX-Exchange/disruptor/" |
| 10400 | "archive/" version ".tar.gz")) |
| 10401 | (file-name (string-append name "-" version ".tar.gz")) |
| 10402 | (sha256 |
| 10403 | (base32 |
| 10404 | "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g")))) |
| 10405 | (build-system ant-build-system) |
| 10406 | (arguments |
| 10407 | `(#:jar-name "java-lmax-disruptor.jar" |
| 10408 | #:jdk ,icedtea-8 |
| 10409 | #:tests? #f)); tests hang |
| 10410 | (inputs |
| 10411 | `(("junit" ,java-junit) |
| 10412 | ("java-hdrhistogram" ,java-hdrhistogram) |
| 10413 | ("java-jmock" ,java-jmock) |
| 10414 | ("java-jmock-legacy" ,java-jmock-legacy) |
| 10415 | ("java-jmock-junit4" ,java-jmock-junit4) |
| 10416 | ("java-hamcrest-all" ,java-hamcrest-all))) |
| 10417 | (native-inputs |
| 10418 | `(("cglib" ,java-cglib) |
| 10419 | ("objenesis" ,java-objenesis) |
| 10420 | ("asm" ,java-asm))) |
| 10421 | (home-page "https://www.lmax.com/disruptor") |
| 10422 | (synopsis "High performance inter-thread communication") |
| 10423 | (description "LMAX Disruptor is a software pattern and software component |
| 10424 | for high performance inter-thread communication that avoids the need for |
| 10425 | message queues or resource locking.") |
| 10426 | (license license:asl2.0))) |
| 10427 | |
| 10428 | (define-public java-commons-bcel |
| 10429 | (package |
| 10430 | (name "java-commons-bcel") |
| 10431 | (version "6.1") |
| 10432 | (source (origin |
| 10433 | (method url-fetch) |
| 10434 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" |
| 10435 | version "-src.tar.gz")) |
| 10436 | (sha256 |
| 10437 | (base32 |
| 10438 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) |
| 10439 | (build-system ant-build-system) |
| 10440 | (arguments |
| 10441 | `(#:jar-name "bcel.jar" |
| 10442 | #:jdk ,icedtea-8 |
| 10443 | #:source-dir "src/main/java" |
| 10444 | #:test-dir "src/test/java" |
| 10445 | ;; FIXME: Tests require the unpackaged jna. |
| 10446 | #:tests? #f)) |
| 10447 | (home-page "https://commons.apache.org/proper/commons-bcel/") |
| 10448 | (synopsis "Byte code engineering library") |
| 10449 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is |
| 10450 | intended to give users a convenient way to analyze, create, and |
| 10451 | manipulate (binary) Java class files. Classes are represented by objects |
| 10452 | which contain all the symbolic information of the given class: methods, fields |
| 10453 | and byte code instructions, in particular. |
| 10454 | |
| 10455 | Such objects can be read from an existing file, be transformed by a |
| 10456 | program (e.g. a class loader at run-time) and written to a file again. An |
| 10457 | even more interesting application is the creation of classes from scratch at |
| 10458 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful |
| 10459 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format |
| 10460 | of Java @code{.class} files.") |
| 10461 | (license license:asl2.0))) |
| 10462 | |
| 10463 | (define-public java-xerial-core |
| 10464 | (package |
| 10465 | (name "java-xerial-core") |
| 10466 | (version "2.1") |
| 10467 | (source (origin |
| 10468 | (method url-fetch) |
| 10469 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" |
| 10470 | version ".tar.gz")) |
| 10471 | (file-name (string-append name "-" version ".tar.gz")) |
| 10472 | (sha256 |
| 10473 | (base32 |
| 10474 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) |
| 10475 | (build-system ant-build-system) |
| 10476 | (arguments |
| 10477 | `(#:jar-name "xerial-core.jar" |
| 10478 | #:source-dir "xerial-core/src/main/java" |
| 10479 | #:test-dir "xerial-core/src/test" |
| 10480 | #:phases |
| 10481 | (modify-phases %standard-phases |
| 10482 | (add-before 'build 'copy-resources |
| 10483 | (lambda _ |
| 10484 | (copy-recursively "xerial-core/src/main/resources" |
| 10485 | "build/classes") |
| 10486 | #t))))) |
| 10487 | (native-inputs |
| 10488 | `(("junit" ,java-junit) |
| 10489 | ("hamcrest" ,java-hamcrest-core))) |
| 10490 | (home-page "https://github.com/xerial/xerial-java") |
| 10491 | (synopsis "Data management libraries for Java") |
| 10492 | (description "Xerial is a set of data management libraries for the Java |
| 10493 | programming language. The ultimate goal of the Xerial project is to manage |
| 10494 | everything as database, including class objects, text format data, data |
| 10495 | streams, etc.") |
| 10496 | (license license:asl2.0))) |
| 10497 | |
| 10498 | (define-public java-powermock-reflect |
| 10499 | (package |
| 10500 | (name "java-powermock-reflect") |
| 10501 | (version "1.7.3") |
| 10502 | (source (origin |
| 10503 | (method url-fetch) |
| 10504 | (uri (string-append "https://github.com/powermock/powermock/" |
| 10505 | "archive/powermock-" version ".tar.gz")) |
| 10506 | (file-name (string-append name "-" version ".tar.gz")) |
| 10507 | (sha256 |
| 10508 | (base32 |
| 10509 | "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy")) |
| 10510 | (patches |
| 10511 | (search-patches "java-powermock-fix-java-files.patch")))) |
| 10512 | (build-system ant-build-system) |
| 10513 | (arguments |
| 10514 | `(#:jar-name "java-powermock-reflect.jar" |
| 10515 | #:jdk ,icedtea-8 |
| 10516 | #:source-dir "powermock-reflect/src/main/java" |
| 10517 | #:test-dir "powermock-reflect/src/test")) |
| 10518 | (inputs |
| 10519 | `(("java-objenesis" ,java-objenesis))) |
| 10520 | (native-inputs |
| 10521 | `(("junit" ,java-junit) |
| 10522 | ("cglib" ,java-cglib) |
| 10523 | ("asm" ,java-asm) |
| 10524 | ("hamcrest" ,java-hamcrest-core) |
| 10525 | ("assertj" ,java-assertj))) |
| 10526 | (home-page "https://github.com/powermock/powermock") |
| 10527 | (synopsis "Mock library extension framework") |
| 10528 | (description "PowerMock is a framework that extends other mock libraries |
| 10529 | such as EasyMock with more powerful capabilities. PowerMock uses a custom |
| 10530 | classloader and bytecode manipulation to enable mocking of static methods, |
| 10531 | constructors, final classes and methods, private methods, removal of static |
| 10532 | initializers and more. By using a custom classloader no changes need to be |
| 10533 | done to the IDE or continuous integration servers which simplifies adoption.") |
| 10534 | (license license:asl2.0))) |
| 10535 | |
| 10536 | (define-public java-powermock-core |
| 10537 | (package |
| 10538 | (inherit java-powermock-reflect) |
| 10539 | (name "java-powermock-core") |
| 10540 | (arguments |
| 10541 | `(#:jar-name "java-powermock-core.jar" |
| 10542 | #:source-dir "powermock-core/src/main/java" |
| 10543 | #:test-dir "powermock-core/src/test" |
| 10544 | #:tests? #f; requires powermock-api |
| 10545 | #:jdk ,icedtea-8 |
| 10546 | #:phases |
| 10547 | (modify-phases %standard-phases |
| 10548 | (add-before 'build 'copy-resources |
| 10549 | (lambda _ |
| 10550 | (copy-recursively "powermock-core/src/main/resources" |
| 10551 | "build/classes") |
| 10552 | #t))))) |
| 10553 | (inputs |
| 10554 | `(("reflect" ,java-powermock-reflect) |
| 10555 | ("javassist" ,java-jboss-javassist))) |
| 10556 | (native-inputs |
| 10557 | `(("junit" ,java-junit) |
| 10558 | ("assertj" ,java-assertj) |
| 10559 | ("mockito" ,java-mockito-1))))) |
| 10560 | |
| 10561 | (define-public java-powermock-api-support |
| 10562 | (package |
| 10563 | (inherit java-powermock-reflect) |
| 10564 | (name "java-powermock-api-support") |
| 10565 | (build-system ant-build-system) |
| 10566 | (arguments |
| 10567 | `(#:jar-name "java-powermock-api-support.jar" |
| 10568 | #:jdk ,icedtea-8 |
| 10569 | #:source-dir "powermock-api/powermock-api-support/src/main/java" |
| 10570 | #:tests? #f)); no tests |
| 10571 | (inputs |
| 10572 | `(("core" ,java-powermock-core) |
| 10573 | ("reflect" ,java-powermock-reflect))))) |
| 10574 | |
| 10575 | (define-public java-powermock-modules-junit4-common |
| 10576 | (package |
| 10577 | (inherit java-powermock-reflect) |
| 10578 | (name "java-powermock-modules-junit4-common") |
| 10579 | (build-system ant-build-system) |
| 10580 | (arguments |
| 10581 | `(#:jar-name "java-powermock-modules-junit4-common.jar" |
| 10582 | #:jdk ,icedtea-8 |
| 10583 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" |
| 10584 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) |
| 10585 | (inputs |
| 10586 | `(("core" ,java-powermock-core) |
| 10587 | ("easymock" ,java-easymock) |
| 10588 | ("reflect" ,java-powermock-reflect) |
| 10589 | ("hamcrest" ,java-hamcrest-core) |
| 10590 | ("cglib" ,java-cglib))))) |
| 10591 | |
| 10592 | (define-public java-powermock-modules-junit4 |
| 10593 | (package |
| 10594 | (inherit java-powermock-reflect) |
| 10595 | (name "java-powermock-modules-junit4") |
| 10596 | (build-system ant-build-system) |
| 10597 | (arguments |
| 10598 | `(#:jar-name "java-powermock-modules-junit4.jar" |
| 10599 | #:jdk ,icedtea-8 |
| 10600 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" |
| 10601 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
| 10602 | #:phases |
| 10603 | (modify-phases %standard-phases |
| 10604 | (add-before 'build 'fix-junit-detection |
| 10605 | (lambda _ |
| 10606 | ;; Our junit version is 4.12-SNAPSHOT |
| 10607 | (substitute* (find-files "powermock-modules/powermock-module-junit4" |
| 10608 | "PowerMockJUnit4MethodValidator.java") |
| 10609 | (("4.12") "4.12-SNAPSHOT")) |
| 10610 | #t))))) |
| 10611 | (inputs |
| 10612 | `(("core" ,java-powermock-core) |
| 10613 | ("reflect" ,java-powermock-reflect) |
| 10614 | ("common" ,java-powermock-modules-junit4-common) |
| 10615 | ("cglib" ,java-cglib))) |
| 10616 | (native-inputs |
| 10617 | `(("easymock" ,java-easymock) |
| 10618 | ("hamcrest" ,java-hamcrest-core) |
| 10619 | ("objenesis" ,java-objenesis) |
| 10620 | ("asm" ,java-asm) |
| 10621 | ("junit" ,java-junit))))) |
| 10622 | |
| 10623 | (define-public java-powermock-api-easymock |
| 10624 | (package |
| 10625 | (inherit java-powermock-reflect) |
| 10626 | (name "java-powermock-api-easymock") |
| 10627 | (build-system ant-build-system) |
| 10628 | (arguments |
| 10629 | `(#:jar-name "java-powermock-api-easymock.jar" |
| 10630 | #:jdk ,icedtea-8 |
| 10631 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" |
| 10632 | #:tests? #f; no tests |
| 10633 | #:phases |
| 10634 | (modify-phases %standard-phases |
| 10635 | (add-before 'build 'fix-file |
| 10636 | (lambda _ |
| 10637 | ;; FIXME: This looks wrong, but it fixes a build error. |
| 10638 | (with-directory-excursion "powermock-api/powermock-api-easymock" |
| 10639 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" |
| 10640 | (("classLoader instanceof MockClassLoader") "false") |
| 10641 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) |
| 10642 | #t))))) |
| 10643 | (inputs |
| 10644 | `(("core" ,java-powermock-core) |
| 10645 | ("easymock" ,java-easymock) |
| 10646 | ("reflect" ,java-powermock-reflect) |
| 10647 | ("support" ,java-powermock-api-support) |
| 10648 | ("cglib" ,java-cglib))))) |
| 10649 | |
| 10650 | (define-public java-jboss-jms-api-spec |
| 10651 | (package |
| 10652 | (name "java-jboss-jms-api-spec") |
| 10653 | (version "2.0") |
| 10654 | (source (origin |
| 10655 | (method url-fetch) |
| 10656 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" |
| 10657 | "archive/jboss-jms-api_" version |
| 10658 | "_spec-1.0.1.Final.tar.gz")) |
| 10659 | (sha256 |
| 10660 | (base32 |
| 10661 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) |
| 10662 | (build-system ant-build-system) |
| 10663 | (arguments |
| 10664 | `(#:jar-name "java-jboss-jms-api_spec.jar" |
| 10665 | #:jdk ,icedtea-8 |
| 10666 | #:source-dir "." |
| 10667 | #:tests? #f)); no tests |
| 10668 | (home-page "https://github.com/jboss/jboss-jms-api_spec") |
| 10669 | (synopsis "Java Message Service API specification") |
| 10670 | (description "Java Message Service (JMS) API is used to send messages |
| 10671 | messages between two or more clients. It is a messaging standard that allows |
| 10672 | application components to create, send, receive, and read messages.") |
| 10673 | ; either gpl2 only with GPL Classpath Exception, or cddl. |
| 10674 | (license (list license:gpl2 license:cddl1.0)))) |
| 10675 | |
| 10676 | (define-public java-mail |
| 10677 | (package |
| 10678 | (name "java-mail") |
| 10679 | (version "1.6.0") |
| 10680 | (source (origin |
| 10681 | (method url-fetch) |
| 10682 | (uri (string-append "https://github.com/javaee/javamail/archive/" |
| 10683 | "JAVAMAIL-1_6_0.tar.gz")) |
| 10684 | (sha256 |
| 10685 | (base32 |
| 10686 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) |
| 10687 | (build-system ant-build-system) |
| 10688 | (arguments |
| 10689 | `(#:jar-name "java-mail.jar" |
| 10690 | #:jdk ,icedtea-8 |
| 10691 | #:source-dir "mail/src/main/java" |
| 10692 | #:test-dir "mail/src/test" |
| 10693 | #:test-exclude |
| 10694 | (list "**/CollectorFormatterTest.java" |
| 10695 | "**/CompactFormatterTest.java" |
| 10696 | "**/DurationFilterTest.java" |
| 10697 | "**/MailHandlerTest.java" |
| 10698 | "**/GetLocalAddressTest.java" |
| 10699 | ;; FIXME: both end with: |
| 10700 | ;; java.lang.ClassNotFoundException: |
| 10701 | ;; javax.mail.internet.MimeMultipartParseTest |
| 10702 | "**/MimeMultipartParseTest.java" |
| 10703 | "**/SearchTermSerializationTest.java") |
| 10704 | #:phases |
| 10705 | (modify-phases %standard-phases |
| 10706 | (add-before 'configure 'move-version.java |
| 10707 | (lambda _ |
| 10708 | (copy-file "mail/src/main/resources/javax/mail/Version.java" |
| 10709 | "mail/src/main/java/javax/mail/Version.java") |
| 10710 | #t)) |
| 10711 | (add-before 'build 'copy-resources |
| 10712 | (lambda _ |
| 10713 | (copy-recursively "mail/src/main/resources/META-INF" |
| 10714 | "build/classes/META-INF") |
| 10715 | #t))))) |
| 10716 | (native-inputs |
| 10717 | `(("junit" ,java-junit) |
| 10718 | ("hamcrest" ,java-hamcrest-core))) |
| 10719 | (home-page "https://javaee.github.io/javamail/") |
| 10720 | (synopsis "Mail-related functionnalities in Java") |
| 10721 | (description "The JavaMail API provides a platform-independent and |
| 10722 | protocol-independent framework to build mail and messaging applications.") |
| 10723 | ;; General Public License Version 2 only ("GPL") or the Common Development |
| 10724 | ;; and Distribution License("CDDL") |
| 10725 | (license (list license:cddl1.1 |
| 10726 | license:gpl2)))); with classpath exception |
| 10727 | |
| 10728 | (define-public java-jeromq |
| 10729 | (package |
| 10730 | (name "java-jeromq") |
| 10731 | (version "0.4.3") |
| 10732 | (source (origin |
| 10733 | (method git-fetch) |
| 10734 | (uri (git-reference |
| 10735 | (url "https://github.com/zeromq/jeromq") |
| 10736 | (commit (string-append "v" version)))) |
| 10737 | (file-name (string-append name "-" version "-checkout")) |
| 10738 | (sha256 |
| 10739 | (base32 |
| 10740 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
| 10741 | (patches (search-patches "java-jeromq-fix-tests.patch")))) |
| 10742 | (build-system ant-build-system) |
| 10743 | (arguments |
| 10744 | `(#:jar-name "java-jeromq.jar" |
| 10745 | #:source-dir "src/main/java" |
| 10746 | #:jdk ,icedtea-8 |
| 10747 | #:test-exclude |
| 10748 | (list |
| 10749 | "**/Abstract*.java" |
| 10750 | ;; Requires network |
| 10751 | "**/ZBeaconTest.java" |
| 10752 | ;; Failures |
| 10753 | "**/DealerSpecTest.java" |
| 10754 | "**/CustomDecoderTest.java" |
| 10755 | "**/CustomEncoderTest.java" |
| 10756 | "**/ConnectRidTest.java" |
| 10757 | "**/ReqSpecTest.java" |
| 10758 | "**/PushPullSpecTest.java" |
| 10759 | "**/PubSubHwmTest.java" |
| 10760 | "**/RouterSpecTest.java" |
| 10761 | "**/ProxyTest.java"))) |
| 10762 | (inputs |
| 10763 | `(("java-jnacl" ,java-jnacl))) |
| 10764 | (native-inputs |
| 10765 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 10766 | ("junit" ,java-junit))) |
| 10767 | (home-page "http://zeromq.org/bindings:java") |
| 10768 | (synopsis "Java binding for 0MQ") |
| 10769 | (description "Jeromq provides the java bindings for 0MQ.") |
| 10770 | (license license:mpl2.0))) |
| 10771 | |
| 10772 | (define-public java-kafka-clients |
| 10773 | (package |
| 10774 | (name "java-kafka-clients") |
| 10775 | (version "1.0.0") |
| 10776 | (source (origin |
| 10777 | (method url-fetch) |
| 10778 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" |
| 10779 | version "-src.tgz")) |
| 10780 | (sha256 |
| 10781 | (base32 |
| 10782 | "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq")))) |
| 10783 | (build-system ant-build-system) |
| 10784 | (arguments |
| 10785 | `(#:jar-name "java-kafka-clients.jar" |
| 10786 | #:jdk ,icedtea-8 |
| 10787 | #:source-dir "clients/src/main/java" |
| 10788 | #:test-dir "clients/src/test" |
| 10789 | #:test-exclude |
| 10790 | (list |
| 10791 | ;; This file does not contain a class |
| 10792 | "**/IntegrationTest.java" |
| 10793 | ;; Requires network |
| 10794 | "**/ClientUtilsTest.java" |
| 10795 | ;; End with errors that seem related to our powermock |
| 10796 | "**/KafkaProducerTest.java" |
| 10797 | "**/BufferPoolTest.java"))) |
| 10798 | (inputs |
| 10799 | `(("java-slf4j-api" ,java-slf4j-api) |
| 10800 | ("java-lz4" ,java-lz4))) |
| 10801 | (native-inputs |
| 10802 | `(("junit" ,java-junit) |
| 10803 | ("hamcrest" ,java-hamcrest-all) |
| 10804 | ("objenesis" ,java-objenesis) |
| 10805 | ("asm" ,java-asm) |
| 10806 | ("cglib" ,java-cglib) |
| 10807 | ("javassist" ,java-jboss-javassist) |
| 10808 | ("snappy" ,java-snappy) |
| 10809 | ("easymock" ,java-easymock) |
| 10810 | ("powermock" ,java-powermock-core) |
| 10811 | ("powermock-easymock" ,java-powermock-api-easymock) |
| 10812 | ("powermock-junit4-common" ,java-powermock-modules-junit4-common) |
| 10813 | ("powermock-junit4" ,java-powermock-modules-junit4) |
| 10814 | ("powermock-support" ,java-powermock-api-support) |
| 10815 | ("java-bouncycastle" ,java-bouncycastle))) |
| 10816 | (home-page "https://kafka.apache.org") |
| 10817 | (synopsis "Distributed streaming platform") |
| 10818 | (description "Kafka is a distributed streaming platform, which means: |
| 10819 | @itemize |
| 10820 | @item it can publish and subscribe to streams of records; |
| 10821 | @item it can store streams of records in a fault-tolerant way; |
| 10822 | @item it can process streams of records as they occur. |
| 10823 | @end itemize") |
| 10824 | ;; Either cddl or gpl2 only. |
| 10825 | (license (list license:cddl1.1; actually cddl1.1 |
| 10826 | license:gpl2)))); with classpath exception |
| 10827 | |
| 10828 | (define-public java-jdom |
| 10829 | (package |
| 10830 | (name "java-jdom") |
| 10831 | (version "1.1.3") |
| 10832 | (source (origin |
| 10833 | (method url-fetch) |
| 10834 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" |
| 10835 | version ".tar.gz")) |
| 10836 | (sha256 |
| 10837 | (base32 |
| 10838 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) |
| 10839 | (build-system ant-build-system) |
| 10840 | (arguments |
| 10841 | `(#:build-target "package" |
| 10842 | #:tests? #f; tests are run as part of the build process |
| 10843 | #:phases |
| 10844 | (modify-phases %standard-phases |
| 10845 | (replace 'install |
| 10846 | (install-jars "build"))))) |
| 10847 | (home-page "http://jdom.org/") |
| 10848 | (synopsis "Access, manipulate, and output XML data") |
| 10849 | (description "Java-based solution for accessing, manipulating, and |
| 10850 | outputting XML data from Java code.") |
| 10851 | (license license:bsd-4))) |
| 10852 | |
| 10853 | (define-public java-geronimo-xbean-reflect |
| 10854 | (package |
| 10855 | (name "java-geronimo-xbean-reflect") |
| 10856 | (version "4.5") |
| 10857 | (source (origin |
| 10858 | (method svn-fetch) |
| 10859 | (uri (svn-reference |
| 10860 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") |
| 10861 | (revision 1807396))) |
| 10862 | (file-name (string-append name "-" version)) |
| 10863 | (sha256 |
| 10864 | (base32 |
| 10865 | "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja")))) |
| 10866 | (build-system ant-build-system) |
| 10867 | (arguments |
| 10868 | `(#:jar-name "geronimo-xbean-reflect.jar" |
| 10869 | #:source-dir "xbean-reflect/src/main/java" |
| 10870 | #:test-dir "xbean-reflect/src/test" |
| 10871 | #:jdk ,icedtea-8 |
| 10872 | #:test-exclude |
| 10873 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" |
| 10874 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" |
| 10875 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") |
| 10876 | #:phases |
| 10877 | (modify-phases %standard-phases |
| 10878 | (add-before 'build 'fix-source |
| 10879 | (lambda _ |
| 10880 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) |
| 10881 | ;; org.apache.xbean.asm6 is actually repackaged java-asm |
| 10882 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") |
| 10883 | (("org.apache.xbean.asm5") "org.objectweb.asm")) |
| 10884 | #t))) |
| 10885 | (replace 'install (install-from-pom "xbean-reflect/pom.xml"))))) |
| 10886 | (inputs |
| 10887 | `(("asm" ,java-asm) |
| 10888 | ("log4j" ,java-log4j-api) |
| 10889 | ("log4j-1.2" ,java-log4j-1.2-api) |
| 10890 | ("log4j-core" ,java-log4j-core) |
| 10891 | ("logging" ,java-commons-logging-minimal))) |
| 10892 | (propagated-inputs |
| 10893 | `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom))) |
| 10894 | (native-inputs |
| 10895 | `(("junit" ,java-junit))) |
| 10896 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") |
| 10897 | (synopsis "Dependency injection helper") |
| 10898 | (description "Xbean-reflect provides very flexible ways to create objects |
| 10899 | and graphs of objects for dependency injection frameworks") |
| 10900 | (license license:asl2.0))) |
| 10901 | |
| 10902 | (define java-geronimo-genesis-2.1 |
| 10903 | (package |
| 10904 | (name "java-geronimo-genesis") |
| 10905 | (version "2.1") |
| 10906 | (source (origin |
| 10907 | (method svn-fetch) |
| 10908 | (uri (svn-reference |
| 10909 | (url (string-append "https://svn.apache.org/repos/asf/" |
| 10910 | "geronimo/genesis/tags/genesis-" |
| 10911 | version)) |
| 10912 | (revision 1807396))) |
| 10913 | (file-name (string-append name "-" version "-source")) |
| 10914 | (sha256 |
| 10915 | (base32 |
| 10916 | "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31")))) |
| 10917 | (build-system ant-build-system) |
| 10918 | (arguments |
| 10919 | `(#:tests? #f |
| 10920 | #:phases |
| 10921 | (modify-phases %standard-phases |
| 10922 | (delete 'configure) |
| 10923 | (delete 'build) |
| 10924 | (replace 'install |
| 10925 | (install-pom-file "pom.xml")) |
| 10926 | (add-after 'install 'install-enforcer-rules |
| 10927 | (install-pom-file "genesis-enforcer-rules/pom.xml")) |
| 10928 | (add-after 'install 'install-flava |
| 10929 | (install-pom-file "genesis-default-flava/pom.xml")) |
| 10930 | (add-after 'install 'install-packaging |
| 10931 | (install-pom-file "genesis-packaging/pom.xml")) |
| 10932 | (add-after 'install-flava 'install-flava-java4 |
| 10933 | (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml")) |
| 10934 | (add-after 'install-flava 'install-flava-java5 |
| 10935 | (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml")) |
| 10936 | (add-after 'install-flava 'install-flava-java6 |
| 10937 | (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml"))))) |
| 10938 | (propagated-inputs |
| 10939 | `(("apache-parent-pom" ,apache-parent-pom-13))) |
| 10940 | (home-page "https://geronimo.apache.org") |
| 10941 | (synopsis "Collection of maven POM files for the Geronimo project") |
| 10942 | (description "Apache Geronimo is a server runtime. This package contains |
| 10943 | only pom files used by other components in the Geronimo project.") |
| 10944 | (license license:asl2.0))) |
| 10945 | |
| 10946 | (define java-geronimo-parent-pom |
| 10947 | (package |
| 10948 | (inherit java-geronimo-xbean-reflect) |
| 10949 | (name "java-geronimo-parent-pom") |
| 10950 | (arguments |
| 10951 | `(#:tests? #f |
| 10952 | #:phases |
| 10953 | (modify-phases %standard-phases |
| 10954 | (delete 'configure) |
| 10955 | (delete 'build) |
| 10956 | (replace 'install |
| 10957 | (install-pom-file "pom.xml"))))) |
| 10958 | (propagated-inputs |
| 10959 | `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1))))) |
| 10960 | |
| 10961 | (define-public java-geronimo-xbean-bundleutils |
| 10962 | (package |
| 10963 | (inherit java-geronimo-xbean-reflect) |
| 10964 | (name "java-geronimo-xbean-bundleutils") |
| 10965 | (arguments |
| 10966 | `(#:jar-name "geronimo-xbean-bundleutils.jar" |
| 10967 | #:source-dir "xbean-bundleutils/src/main/java" |
| 10968 | #:test-dir "xbean-bundleutils/src/test" |
| 10969 | #:phases |
| 10970 | (modify-phases %standard-phases |
| 10971 | (add-before 'build 'fix-java |
| 10972 | (lambda _ |
| 10973 | ;; We use a more recent version of osgi, so this file requires |
| 10974 | ;; more interface method implementations. |
| 10975 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" |
| 10976 | (("import org.osgi.framework.ServiceRegistration;") |
| 10977 | "import org.osgi.framework.ServiceRegistration; |
| 10978 | import org.osgi.framework.ServiceFactory; |
| 10979 | import java.util.Collection; |
| 10980 | import org.osgi.framework.ServiceObjects;") |
| 10981 | (("public Bundle getBundle\\(\\)") |
| 10982 | "@Override |
| 10983 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { |
| 10984 | throw new UnsupportedOperationException(); |
| 10985 | } |
| 10986 | @Override |
| 10987 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, |
| 10988 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { |
| 10989 | throw new UnsupportedOperationException(); |
| 10990 | } |
| 10991 | public Bundle getBundle()")) |
| 10992 | #t))))) |
| 10993 | (inputs |
| 10994 | `(("java-slf4j" ,java-slf4j-api) |
| 10995 | ("java-asm" ,java-asm) |
| 10996 | ("java-osgi-framework" ,java-osgi-framework) |
| 10997 | ("java-eclipse-osgi" ,java-eclipse-osgi) |
| 10998 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) |
| 10999 | |
| 11000 | (define-public java-geronimo-xbean-asm-util |
| 11001 | (package |
| 11002 | (inherit java-geronimo-xbean-reflect) |
| 11003 | (name "java-geronimo-xbean-asm-util") |
| 11004 | (arguments |
| 11005 | `(#:jar-name "geronimo-xbean-asm-util.jar" |
| 11006 | #:source-dir "xbean-asm-util/src/main/java" |
| 11007 | #:tests? #f)); no tests |
| 11008 | (inputs |
| 11009 | `(("java-asm" ,java-asm))) |
| 11010 | (native-inputs '()))) |
| 11011 | |
| 11012 | (define-public java-geronimo-xbean-finder |
| 11013 | (package |
| 11014 | (inherit java-geronimo-xbean-reflect) |
| 11015 | (name "java-geronimo-xbean-finder") |
| 11016 | (arguments |
| 11017 | `(#:jar-name "geronimo-xbean-finder.jar" |
| 11018 | #:source-dir "xbean-finder/src/main/java" |
| 11019 | #:test-dir "xbean-finder/src/test")) |
| 11020 | (inputs |
| 11021 | `(("java-slf4j-api" ,java-slf4j-api) |
| 11022 | ("java-asm" ,java-asm) |
| 11023 | ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils) |
| 11024 | ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util) |
| 11025 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin) |
| 11026 | ("java-osgi-framework" ,java-osgi-framework))) |
| 11027 | (native-inputs |
| 11028 | `(("java-junit" ,java-junit) |
| 11029 | ("java-hamcrest-core" ,java-hamcrest-core))))) |
| 11030 | |
| 11031 | (define-public java-gson |
| 11032 | (package |
| 11033 | (name "java-gson") |
| 11034 | (version "2.8.2") |
| 11035 | (source (origin |
| 11036 | (method url-fetch) |
| 11037 | (uri (string-append "https://github.com/google/gson/archive/" |
| 11038 | "gson-parent-" version ".tar.gz")) |
| 11039 | (sha256 |
| 11040 | (base32 |
| 11041 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) |
| 11042 | (build-system ant-build-system) |
| 11043 | (arguments |
| 11044 | `(#:jar-name "gson.jar" |
| 11045 | #:source-dir "gson/src/main/java" |
| 11046 | #:test-dir "gson/src/test")) |
| 11047 | (native-inputs |
| 11048 | `(("java-junit" ,java-junit) |
| 11049 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 11050 | (home-page "https://github.com/google/gson") |
| 11051 | (synopsis "Java serialization/deserialization library from/to JSON") |
| 11052 | (description "Gson is a Java library that can be used to convert Java |
| 11053 | Objects into their JSON representation. It can also be used to convert a JSON |
| 11054 | string to an equivalent Java object. Gson can work with arbitrary Java objects |
| 11055 | including pre-existing objects that you do not have source-code of.") |
| 11056 | (license license:asl2.0))) |
| 11057 | |
| 11058 | (define-public java-hawtjni |
| 11059 | (package |
| 11060 | (name "java-hawtjni") |
| 11061 | (version "1.15") |
| 11062 | (source (origin |
| 11063 | (method url-fetch) |
| 11064 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" |
| 11065 | "hawtjni-project-" version ".tar.gz")) |
| 11066 | (sha256 |
| 11067 | (base32 |
| 11068 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) |
| 11069 | (build-system ant-build-system) |
| 11070 | (arguments |
| 11071 | `(#:jar-name "hawtjni.jar" |
| 11072 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" |
| 11073 | #:tests? #f; no tests |
| 11074 | #:phases |
| 11075 | (modify-phases %standard-phases |
| 11076 | (add-before 'build 'build-native |
| 11077 | (lambda* (#:key inputs #:allow-other-keys) |
| 11078 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
| 11079 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
| 11080 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" |
| 11081 | "-fPIC" "-O2" include) |
| 11082 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" |
| 11083 | "-fPIC" "-O2" include) |
| 11084 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" |
| 11085 | "hawtjni.o" "hawtjni-callback.o"))) |
| 11086 | #t)) |
| 11087 | (add-after 'install 'install-native |
| 11088 | (lambda* (#:key outputs #:allow-other-keys) |
| 11089 | (let* ((out (assoc-ref outputs "out")) |
| 11090 | (lib (string-append out "/lib")) |
| 11091 | (inc (string-append out "/include"))) |
| 11092 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
| 11093 | (install-file "libhawtjni.so" lib) |
| 11094 | (install-file "hawtjni.h" inc))) |
| 11095 | #t)) |
| 11096 | (add-before 'install 'install-parent |
| 11097 | (install-pom-file "pom.xml")) |
| 11098 | (replace 'install |
| 11099 | (install-from-pom "hawtjni-runtime/pom.xml"))))) |
| 11100 | (inputs |
| 11101 | `(("java-commons-cli" ,java-commons-cli) |
| 11102 | ("java-asm" ,java-asm) |
| 11103 | ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder))) |
| 11104 | (home-page "https://fusesource.github.io/hawtjni/") |
| 11105 | (synopsis "JNI code generator") |
| 11106 | (description "HawtJNI is a code generator that produces the JNI code needed |
| 11107 | to implement Java native methods. It is based on the jnigen code generator |
| 11108 | that is part of the SWT Tools project.") |
| 11109 | (license license:asl2.0))) |
| 11110 | |
| 11111 | (define-public java-jansi-native |
| 11112 | (package |
| 11113 | (name "java-jansi-native") |
| 11114 | (version "1.7") |
| 11115 | (source (origin |
| 11116 | (method url-fetch) |
| 11117 | (uri (string-append "https://github.com/fusesource/jansi-native/" |
| 11118 | "archive/jansi-native-" version ".tar.gz")) |
| 11119 | (sha256 |
| 11120 | (base32 |
| 11121 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) |
| 11122 | (build-system ant-build-system) |
| 11123 | (arguments |
| 11124 | `(#:jar-name "jansi-native.jar" |
| 11125 | #:source-dir "src/main/java" |
| 11126 | #:tests? #f; no tests |
| 11127 | #:phases |
| 11128 | (modify-phases %standard-phases |
| 11129 | (add-before 'build 'build-native |
| 11130 | (lambda* (#:key inputs #:allow-other-keys) |
| 11131 | ;; there are more required files for windows in windows/ |
| 11132 | (with-directory-excursion "src/main/native-package/src" |
| 11133 | (substitute* "jansi_ttyname.c" |
| 11134 | (("#include \"jansi_.*") "")) |
| 11135 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
| 11136 | (string-append "-I" (assoc-ref inputs "java-hawtjni") |
| 11137 | "/include") |
| 11138 | (string-append "-I" (assoc-ref inputs "jdk") |
| 11139 | "/include/linux") |
| 11140 | "-fPIC" "-O2") |
| 11141 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))) |
| 11142 | (add-before 'build 'install-native |
| 11143 | (lambda _ |
| 11144 | (let ((dir (string-append "build/classes/META-INF/native/" |
| 11145 | ,(match (%current-system) |
| 11146 | ((or "i686-linux" "armhf-linux") |
| 11147 | "linux32") |
| 11148 | ((or "x86_64-linux" "aarch64-linux" |
| 11149 | "mips64el-linux") |
| 11150 | "linux64") |
| 11151 | (_ "unknown-kernel"))))) |
| 11152 | (install-file "src/main/native-package/src/libjansi.so" dir)) |
| 11153 | #t)) |
| 11154 | (add-after 'install 'install-native |
| 11155 | (lambda* (#:key outputs #:allow-other-keys) |
| 11156 | (install-file "src/main/native-package/src/jansi.h" |
| 11157 | (string-append (assoc-ref outputs "out") "/include")) |
| 11158 | #t)) |
| 11159 | (add-before 'install 'fix-pom |
| 11160 | (lambda _ |
| 11161 | ;; pom contains variables to complete name, but we don't support that |
| 11162 | (substitute* "pom.xml" |
| 11163 | (("\\$\\{platform\\}") "native")) |
| 11164 | #t)) |
| 11165 | (replace 'install |
| 11166 | (install-from-pom "pom.xml"))))) |
| 11167 | (propagated-inputs |
| 11168 | `(("java-hawtjni" ,java-hawtjni))) |
| 11169 | (home-page "https://fusesource.github.io/jansi/") |
| 11170 | (synopsis "Native library for jansi") |
| 11171 | (description "This package provides the native library for jansi, a small |
| 11172 | Java library that allows you to use ANSI escape sequences to format your |
| 11173 | console output.") |
| 11174 | (license license:asl2.0))) |
| 11175 | |
| 11176 | (define-public java-jansi |
| 11177 | (package |
| 11178 | (name "java-jansi") |
| 11179 | (version "1.16") |
| 11180 | (source (origin |
| 11181 | (method url-fetch) |
| 11182 | (uri (string-append "https://github.com/fusesource/jansi/archive/" |
| 11183 | "jansi-project-" version ".tar.gz")) |
| 11184 | (sha256 |
| 11185 | (base32 |
| 11186 | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) |
| 11187 | (build-system ant-build-system) |
| 11188 | (arguments |
| 11189 | `(#:jar-name "jansi.jar" |
| 11190 | #:source-dir "jansi/src/main/java" |
| 11191 | #:test-dir "jansi/src/test" |
| 11192 | #:phases |
| 11193 | (modify-phases %standard-phases |
| 11194 | (add-after 'check 'clear-term |
| 11195 | (lambda _ |
| 11196 | (invoke "echo" "-e" "\\e[0m"))) |
| 11197 | (add-before 'install 'install-parent |
| 11198 | (install-pom-file "pom.xml")) |
| 11199 | (add-before 'install 'fix-pom |
| 11200 | (lambda _ |
| 11201 | ;; pom adds jansi native versions for different platforms, but we |
| 11202 | ;; only need one, so use native instead |
| 11203 | (substitute* "jansi/pom.xml" |
| 11204 | (("windows32") "native") |
| 11205 | (("windows64") "native") |
| 11206 | (("osx") "native") |
| 11207 | (("linux32") "native") |
| 11208 | (("linux64") "native") |
| 11209 | (("freebsd32") "native") |
| 11210 | (("freebsd64") "native")) |
| 11211 | #t)) |
| 11212 | (replace 'install |
| 11213 | (install-from-pom "jansi/pom.xml"))))) |
| 11214 | (propagated-inputs |
| 11215 | `(("java-jansi-native" ,java-jansi-native))) |
| 11216 | (native-inputs |
| 11217 | `(("java-junit" ,java-junit) |
| 11218 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 11219 | (home-page "https://fusesource.github.io/jansi/") |
| 11220 | (synopsis "Portable ANSI escape sequences") |
| 11221 | (description "Jansi is a Java library that allows you to use ANSI escape |
| 11222 | sequences to format your console output which works on every platform.") |
| 11223 | (license license:asl2.0))) |
| 11224 | |
| 11225 | (define-public java-jboss-el-api-spec |
| 11226 | (package |
| 11227 | (name "java-jboss-el-api-spec") |
| 11228 | (version "3.0") |
| 11229 | (source (origin |
| 11230 | (method url-fetch) |
| 11231 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" |
| 11232 | "archive/jboss-el-api_" version |
| 11233 | "_spec-1.0.7.Final.tar.gz")) |
| 11234 | (sha256 |
| 11235 | (base32 |
| 11236 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) |
| 11237 | (build-system ant-build-system) |
| 11238 | (arguments |
| 11239 | `(#:jar-name "java-jboss-el-api_spec.jar" |
| 11240 | #:modules ((guix build ant-build-system) |
| 11241 | (guix build utils) |
| 11242 | (guix build maven pom) |
| 11243 | (guix build java-utils) |
| 11244 | (sxml simple)) |
| 11245 | #:phases |
| 11246 | (modify-phases %standard-phases |
| 11247 | ;; the origin of javax.el:javax.el-api is unknown, so we use this package |
| 11248 | ;; instead, which implements the same thing. We override the pom file |
| 11249 | ;; to "rename" the package so it can be found by maven. |
| 11250 | (add-before 'install 'override-pom |
| 11251 | (lambda _ |
| 11252 | (delete-file "pom.xml") |
| 11253 | (with-output-to-file "pom.xml" |
| 11254 | (lambda _ |
| 11255 | (sxml->xml |
| 11256 | `(project |
| 11257 | (modelVersion "4.0.0") |
| 11258 | (name "el-api") |
| 11259 | (groupId "javax.el") |
| 11260 | (artifactId "javax.el-api") |
| 11261 | (version "3.0"))))) |
| 11262 | #t)) |
| 11263 | (replace 'install |
| 11264 | (install-from-pom "pom.xml"))))) |
| 11265 | (inputs |
| 11266 | `(("java-junit" ,java-junit))) |
| 11267 | (home-page "https://github.com/jboss/jboss-el-api_spec") |
| 11268 | (synopsis "JSR-341 expression language 3.0 API") |
| 11269 | (description "This package contains an implementation of the JSR-341 |
| 11270 | specification for the expression language 3.0. It implements an expression |
| 11271 | language inspired by ECMAScript and XPath. This language is used with |
| 11272 | JavaServer Pages (JSP).") |
| 11273 | ;; Either GPL2 only or CDDL. |
| 11274 | (license (list license:gpl2 license:cddl1.1)))) |
| 11275 | |
| 11276 | (define-public java-jboss-interceptors-api-spec |
| 11277 | (package |
| 11278 | (name "java-jboss-interceptors-api-spec") |
| 11279 | (version "1.2") |
| 11280 | (source (origin |
| 11281 | (method url-fetch) |
| 11282 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" |
| 11283 | "archive/jboss-interceptors-api_" version |
| 11284 | "_spec-1.0.0.Final.tar.gz")) |
| 11285 | (sha256 |
| 11286 | (base32 |
| 11287 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) |
| 11288 | (build-system ant-build-system) |
| 11289 | (arguments |
| 11290 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" |
| 11291 | #:jdk ,icedtea-8 |
| 11292 | #:source-dir "." |
| 11293 | #:tests? #f; no tests |
| 11294 | #:modules ((guix build ant-build-system) |
| 11295 | (guix build utils) |
| 11296 | (guix build maven pom) |
| 11297 | (guix build java-utils) |
| 11298 | (sxml simple)) |
| 11299 | #:phases |
| 11300 | (modify-phases %standard-phases |
| 11301 | ;; the origin of javax.interceptor:javax.interceptor-api is unknown, |
| 11302 | ;; so we use this package instead, which implements the same thing. |
| 11303 | ;; We override the pom file to "rename" the package so it can be found |
| 11304 | ;; by maven. |
| 11305 | (add-before 'install 'override-pom |
| 11306 | (lambda _ |
| 11307 | (delete-file "pom.xml") |
| 11308 | (with-output-to-file "pom.xml" |
| 11309 | (lambda _ |
| 11310 | (sxml->xml |
| 11311 | `(project |
| 11312 | (modelVersion "4.0.0") |
| 11313 | (name "interceptor-api") |
| 11314 | (groupId "javax.interceptor") |
| 11315 | (artifactId "javax.interceptor-api") |
| 11316 | (version "3.0"))))) |
| 11317 | #t)) |
| 11318 | (replace 'install |
| 11319 | (install-from-pom "pom.xml"))))) |
| 11320 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") |
| 11321 | (synopsis "Interceptors 1.2 API classes from JSR 318") |
| 11322 | (description "Java-jboss-interceptors-api-spec implements the Interceptors |
| 11323 | API. Interceptors are used to interpose on business method invocations and |
| 11324 | specific events.") |
| 11325 | ;; Either GPL2 only or CDDL. |
| 11326 | (license (list license:gpl2 license:cddl1.1)))) |
| 11327 | |
| 11328 | (define-public java-cdi-api |
| 11329 | (package |
| 11330 | (name "java-cdi-api") |
| 11331 | (version "2.0") |
| 11332 | (source (origin |
| 11333 | (method url-fetch) |
| 11334 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" |
| 11335 | version ".tar.gz")) |
| 11336 | (file-name (string-append name "-" version ".tar.gz")) |
| 11337 | (sha256 |
| 11338 | (base32 |
| 11339 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) |
| 11340 | (build-system ant-build-system) |
| 11341 | (arguments |
| 11342 | `(#:source-dir "api/src/main/java" |
| 11343 | #:jar-name "java-cdi-api.jar" |
| 11344 | #:test-dir "api/src/test" |
| 11345 | #:jdk ,icedtea-8 |
| 11346 | #:tests? #f; Tests fail because we don't have a CDI provider yet |
| 11347 | #:phases |
| 11348 | (modify-phases %standard-phases |
| 11349 | (replace 'install |
| 11350 | (install-from-pom "api/pom.xml"))))) |
| 11351 | (propagated-inputs |
| 11352 | `(("java-javax-inject" ,java-javax-inject) |
| 11353 | ("java-jboss-el-api-spec" ,java-jboss-el-api-spec) |
| 11354 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec) |
| 11355 | ("java-weld-parent-pom" ,java-weld-parent-pom))) |
| 11356 | (native-inputs |
| 11357 | `(("java-testng" ,java-testng) |
| 11358 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 11359 | (home-page "http://cdi-spec.org/") |
| 11360 | (synopsis "Contexts and Dependency Injection APIs") |
| 11361 | (description "Java-cdi-api contains the required APIs for Contexts and |
| 11362 | Dependency Injection (CDI).") |
| 11363 | (license license:asl2.0))) |
| 11364 | |
| 11365 | (define-public java-joda-convert |
| 11366 | (package |
| 11367 | (name "java-joda-convert") |
| 11368 | (version "1.9.2") |
| 11369 | (source (origin |
| 11370 | (method url-fetch) |
| 11371 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" |
| 11372 | version ".tar.gz")) |
| 11373 | (file-name (string-append name "-" version ".tar.gz")) |
| 11374 | (sha256 |
| 11375 | (base32 |
| 11376 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) |
| 11377 | (build-system ant-build-system) |
| 11378 | (arguments |
| 11379 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 11380 | #:source-dir "src/main/java" |
| 11381 | #:test-include (list "**/Test*.java") |
| 11382 | ;; Contains only interfaces and base classes (no test) |
| 11383 | #:test-exclude (list "**/test*/**.java"))) |
| 11384 | (inputs |
| 11385 | `(("java-guava" ,java-guava))) |
| 11386 | (native-inputs |
| 11387 | `(("java-junit" ,java-junit) |
| 11388 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 11389 | (home-page "https://www.joda.org/joda-convert/") |
| 11390 | (synopsis "Conversion between Objects and Strings") |
| 11391 | (description "Joda-Convert provides a small set of classes to aid |
| 11392 | conversion between Objects and Strings. It is not intended to tackle the |
| 11393 | wider problem of Object to Object transformation.") |
| 11394 | (license license:asl2.0))) |
| 11395 | |
| 11396 | (define-public java-joda-time |
| 11397 | (package |
| 11398 | (name "java-joda-time") |
| 11399 | (version "2.9.9") |
| 11400 | (source (origin |
| 11401 | (method url-fetch) |
| 11402 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" |
| 11403 | version ".tar.gz")) |
| 11404 | (file-name (string-append name "-" version ".tar.gz")) |
| 11405 | (sha256 |
| 11406 | (base32 |
| 11407 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) |
| 11408 | (build-system ant-build-system) |
| 11409 | (arguments |
| 11410 | `(#:jar-name "java-joda-time.jar" |
| 11411 | #:source-dir "src/main/java" |
| 11412 | #:test-include (list "**/Test*.java") |
| 11413 | ;; There is no runnable test in these files |
| 11414 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") |
| 11415 | #:phases |
| 11416 | (modify-phases %standard-phases |
| 11417 | (add-after 'build 'build-resources |
| 11418 | (lambda _ |
| 11419 | (mkdir-p "build/classes/org/joda/time/tz/data") |
| 11420 | (mkdir-p "build/classes/org/joda/time/format") |
| 11421 | ;; This will produce the following exception: |
| 11422 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" |
| 11423 | ;; which is normal, because it doesn't exist yet. It still generates |
| 11424 | ;; the same file as in the binary one can find on maven. |
| 11425 | (invoke "java" "-cp" |
| 11426 | (string-append "build/classes:" (getenv "CLASSPATH")) |
| 11427 | "org.joda.time.tz.ZoneInfoCompiler" |
| 11428 | "-src" "src/main/java/org/joda/time/tz/src" |
| 11429 | "-dst" "build/classes/org/joda/time/tz/data" |
| 11430 | "africa" "antarctica" "asia" "australasia" |
| 11431 | "europe" "northamerica" "southamerica" |
| 11432 | "pacificnew" "etcetera" "backward" "systemv") |
| 11433 | (for-each (lambda (f) |
| 11434 | (copy-file f (string-append |
| 11435 | "build/classes/org/joda/time/format/" |
| 11436 | (basename f)))) |
| 11437 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) |
| 11438 | #t)) |
| 11439 | (add-before 'install 'regenerate-jar |
| 11440 | (lambda _ |
| 11441 | ;; We need to regenerate the jar file to add generated data. |
| 11442 | (delete-file "build/jar/java-joda-time.jar") |
| 11443 | (invoke "ant" "jar"))) |
| 11444 | (add-before 'check 'copy-test-resources |
| 11445 | (lambda _ |
| 11446 | (mkdir-p "build/test-classes/org/joda/time/tz/data") |
| 11447 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" |
| 11448 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") |
| 11449 | (copy-recursively "src/test/resources" "build/test-classes") |
| 11450 | #t))))) |
| 11451 | (inputs |
| 11452 | `(("java-joda-convert" ,java-joda-convert))) |
| 11453 | (native-inputs |
| 11454 | `(("java-junit" ,java-junit) |
| 11455 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 11456 | ("tzdata" ,tzdata))) |
| 11457 | (home-page "https://www.joda.org/joda-time/") |
| 11458 | (synopsis "Replacement for the Java date and time classes") |
| 11459 | (description "Joda-Time is a replacement for the Java date and time |
| 11460 | classes prior to Java SE 8.") |
| 11461 | (license license:asl2.0))) |
| 11462 | |
| 11463 | (define-public java-xerces |
| 11464 | (package |
| 11465 | (name "java-xerces") |
| 11466 | (version "2.12.1") |
| 11467 | (source |
| 11468 | (origin |
| 11469 | (method url-fetch) |
| 11470 | (uri (string-append "mirror://apache/xerces/j/source/" |
| 11471 | "Xerces-J-src." version ".tar.gz")) |
| 11472 | (sha256 |
| 11473 | (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s")) |
| 11474 | (patches (search-patches |
| 11475 | "java-xerces-xjavac_taskdef.patch" |
| 11476 | "java-xerces-build_dont_unzip.patch" |
| 11477 | "java-xerces-bootclasspath.patch")))) |
| 11478 | (build-system ant-build-system) |
| 11479 | (arguments |
| 11480 | `(#:tests? #f;; Test files are not present |
| 11481 | #:test-target "test" |
| 11482 | #:jdk ,icedtea-8 |
| 11483 | #:phases |
| 11484 | (modify-phases %standard-phases |
| 11485 | (add-after 'unpack 'create-build.properties |
| 11486 | (lambda* (#:key inputs #:allow-other-keys) |
| 11487 | (let ((jaxp (assoc-ref inputs "java-jaxp")) |
| 11488 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) |
| 11489 | (with-output-to-file "build.properties" |
| 11490 | (lambda _ |
| 11491 | (format #t |
| 11492 | "jar.jaxp = ~a/share/java/jaxp.jar~@ |
| 11493 | jar.apis-ext = ~a/share/java/jaxp.jar~@ |
| 11494 | jar.resolver = ~a/share/java/xml-resolver.jar~%" |
| 11495 | jaxp jaxp resolver))) |
| 11496 | ;; Make xerces use our version of jaxp in tests |
| 11497 | (substitute* "build.xml" |
| 11498 | (("xml-apis.jar") |
| 11499 | (string-append jaxp "/share/java/jaxp.jar")) |
| 11500 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") |
| 11501 | "${jar.apis}"))) |
| 11502 | #t)) |
| 11503 | (replace 'install (install-jars "build"))))) |
| 11504 | (inputs |
| 11505 | `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver) |
| 11506 | ("java-jaxp" ,java-jaxp))) |
| 11507 | (home-page "https://xerces.apache.org/xerces2-j/") |
| 11508 | (synopsis "Validating XML parser for Java with DOM level 3 support") |
| 11509 | (description "The Xerces2 Java parser is the reference implementation of |
| 11510 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema |
| 11511 | processor. |
| 11512 | |
| 11513 | Xerces2-J supports the following standards and APIs: |
| 11514 | |
| 11515 | @itemize |
| 11516 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation |
| 11517 | @item Namespaces in XML Recommendation |
| 11518 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and |
| 11519 | Range Recommendations |
| 11520 | @item Simple API for XML (SAX) 2.0.1 Core and Extension |
| 11521 | @item Java APIs for XML Processing (JAXP) 1.2.01 |
| 11522 | @item XML Schema 1.0 Structures and Datatypes Recommendations |
| 11523 | @item Experimental implementation of the Document Object Model (DOM) Level 3 |
| 11524 | Core and Load/Save Working Drafts |
| 11525 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C |
| 11526 | Candidate Recommendation |
| 11527 | @end itemize |
| 11528 | |
| 11529 | Xerces is now able to parse documents written according to the XML 1.1 |
| 11530 | Candidate Recommendation, except that it does not yet provide an option to |
| 11531 | enable normalization checking as described in section 2.13 of this |
| 11532 | specification. It also handles namespaces according to the XML Namespaces 1.1 |
| 11533 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if |
| 11534 | the DOM level 3 load/save API's are in use.") |
| 11535 | (license license:asl2.0))) |
| 11536 | |
| 11537 | (define-public java-jakarta-regexp |
| 11538 | (package |
| 11539 | (name "java-jakarta-regexp") |
| 11540 | (version "1.5") |
| 11541 | (source |
| 11542 | (origin |
| 11543 | (method url-fetch) |
| 11544 | (uri (string-append |
| 11545 | "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-" |
| 11546 | version ".tar.gz")) |
| 11547 | (sha256 |
| 11548 | (base32 |
| 11549 | "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r")))) |
| 11550 | (build-system ant-build-system) |
| 11551 | (arguments |
| 11552 | `(#:test-target "test" |
| 11553 | #:phases |
| 11554 | (modify-phases %standard-phases |
| 11555 | (replace 'install |
| 11556 | (lambda* (#:key outputs #:allow-other-keys) |
| 11557 | (let* ((out (assoc-ref outputs "out")) |
| 11558 | (out-share (string-append out "/share/java"))) |
| 11559 | (mkdir-p out-share) |
| 11560 | (for-each (lambda (name) |
| 11561 | (install-file name out-share)) |
| 11562 | (find-files "build" "^jakarta-regexp-.*\\.jar$")) |
| 11563 | #t)))))) |
| 11564 | (home-page "https://attic.apache.org/projects/jakarta-regexp.html") |
| 11565 | (synopsis "Regular expression parser generator for Java.") |
| 11566 | (description "@code{jakarta-regexp} is an old regular expression parser |
| 11567 | generator for Java.") |
| 11568 | (license license:asl2.0))) |
| 11569 | |
| 11570 | (define-public java-jline |
| 11571 | (package |
| 11572 | (name "java-jline") |
| 11573 | (version "1.0") |
| 11574 | (source (origin |
| 11575 | (method url-fetch) |
| 11576 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" |
| 11577 | version ".tar.gz")) |
| 11578 | (sha256 |
| 11579 | (base32 |
| 11580 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) |
| 11581 | (build-system ant-build-system) |
| 11582 | (arguments |
| 11583 | `(#:jar-name "jline.jar" |
| 11584 | #:source-dir "src/main/java" |
| 11585 | #:test-dir "src/test" |
| 11586 | #:phases |
| 11587 | (modify-phases %standard-phases |
| 11588 | (add-before 'build 'copy-resources |
| 11589 | (lambda _ |
| 11590 | (copy-recursively "src/main/resources" "build/classes") |
| 11591 | #t))))) |
| 11592 | (native-inputs |
| 11593 | `(("java-junit" ,java-junit))) |
| 11594 | (home-page "https://jline.github.io") |
| 11595 | (synopsis "Console input handling library") |
| 11596 | (description "JLine is a Java library for handling console input. It is |
| 11597 | similar in functionality to BSD editline and GNU readline but with additional |
| 11598 | features that bring it on par with the Z shell line editor.") |
| 11599 | (license license:bsd-3))) |
| 11600 | |
| 11601 | (define-public java-jline-2 |
| 11602 | (package |
| 11603 | (inherit java-jline) |
| 11604 | (version "2.14.5") |
| 11605 | (source (origin |
| 11606 | (method url-fetch) |
| 11607 | (uri (string-append "https://github.com/jline/jline2/archive/jline-" |
| 11608 | version ".tar.gz")) |
| 11609 | (sha256 |
| 11610 | (base32 |
| 11611 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) |
| 11612 | (arguments |
| 11613 | `(#:jdk ,icedtea-8 |
| 11614 | ,@(package-arguments java-jline))) |
| 11615 | (inputs |
| 11616 | `(("java-jansi" ,java-jansi) |
| 11617 | ("java-jansi-native" ,java-jansi-native))) |
| 11618 | (native-inputs |
| 11619 | `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4) |
| 11620 | ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common) |
| 11621 | ("java-powermock-api-easymock" ,java-powermock-api-easymock) |
| 11622 | ("java-powermock-api-support" ,java-powermock-api-support) |
| 11623 | ("java-powermock-core" ,java-powermock-core) |
| 11624 | ("java-powermock-reflect" ,java-powermock-reflect) |
| 11625 | ("java-easymock" ,java-easymock) |
| 11626 | ("java-jboss-javassist" ,java-jboss-javassist) |
| 11627 | ("java-objenesis" ,java-objenesis) |
| 11628 | ("java-asm" ,java-asm) |
| 11629 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 11630 | ("java-cglib" ,java-cglib) |
| 11631 | ("java-junit" ,java-junit) |
| 11632 | ("java-hawtjni" ,java-hawtjni))))) |
| 11633 | |
| 11634 | (define-public java-xmlunit |
| 11635 | (package |
| 11636 | (name "java-xmlunit") |
| 11637 | (version "2.5.1") |
| 11638 | (source (origin |
| 11639 | (method url-fetch) |
| 11640 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" |
| 11641 | version ".tar.gz")) |
| 11642 | (file-name (string-append name "-" version ".tar.gz")) |
| 11643 | (sha256 |
| 11644 | (base32 |
| 11645 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) |
| 11646 | (build-system ant-build-system) |
| 11647 | (arguments |
| 11648 | `(#:jar-name "java-xmlunit.jar" |
| 11649 | #:source-dir "xmlunit-core/src/main/java" |
| 11650 | #:test-dir "xmlunit-core/src/test" |
| 11651 | #:phases |
| 11652 | (modify-phases %standard-phases |
| 11653 | (add-before 'check 'copy-test-resources |
| 11654 | (lambda* (#:key inputs #:allow-other-keys) |
| 11655 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") |
| 11656 | #t))))) |
| 11657 | (native-inputs |
| 11658 | `(("java-junit" ,java-junit) |
| 11659 | ("java-mockito-1" ,java-mockito-1) |
| 11660 | ("java-hamcrest-all" ,java-hamcrest-all) |
| 11661 | ("java-objenesis" ,java-objenesis) |
| 11662 | ("java-asm" ,java-asm) |
| 11663 | ("java-cglib" ,java-cglib) |
| 11664 | ("resources" |
| 11665 | ,(origin |
| 11666 | (method git-fetch) |
| 11667 | (uri (git-reference |
| 11668 | (url "https://github.com/xmlunit/test-resources") |
| 11669 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) |
| 11670 | (file-name "java-xmlunit-test-resources") |
| 11671 | (sha256 |
| 11672 | (base32 |
| 11673 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) |
| 11674 | (home-page "https://www.xmlunit.org/") |
| 11675 | (synopsis "XML output testing") |
| 11676 | (description "XMLUnit provides you with the tools to verify the XML you |
| 11677 | emit is the one you want to create. It provides helpers to validate against |
| 11678 | an XML Schema, assert the values of XPath queries or compare XML documents |
| 11679 | against expected outcomes.") |
| 11680 | (license license:asl2.0))) |
| 11681 | |
| 11682 | (define-public java-xmlunit-legacy |
| 11683 | (package |
| 11684 | (inherit java-xmlunit) |
| 11685 | (name "java-xmlunit-legacy") |
| 11686 | (arguments |
| 11687 | `(#:jar-name "java-xmlunit-legacy.jar" |
| 11688 | #:source-dir "xmlunit-legacy/src/main/java" |
| 11689 | #:test-dir "xmlunit-legacy/src/test")) |
| 11690 | (inputs |
| 11691 | `(("java-xmlunit" ,java-xmlunit) |
| 11692 | ("java-junit" ,java-junit))) |
| 11693 | (native-inputs |
| 11694 | `(("java-mockito-1" ,java-mockito-1))))) |
| 11695 | |
| 11696 | (define-public java-xmlunit-matchers |
| 11697 | (package |
| 11698 | (inherit java-xmlunit) |
| 11699 | (name "java-xmlunit-matchers") |
| 11700 | (arguments |
| 11701 | `(#:jar-name "java-xmlunit-matchers.jar" |
| 11702 | #:source-dir "xmlunit-matchers/src/main/java" |
| 11703 | #:test-dir "xmlunit-matchers/src/test" |
| 11704 | #:test-exclude |
| 11705 | ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd |
| 11706 | (list "**/ValidationMatcherTest.java") |
| 11707 | #:phases |
| 11708 | (modify-phases %standard-phases |
| 11709 | (add-before 'build 'copy-test-class |
| 11710 | (lambda _ |
| 11711 | (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java" |
| 11712 | "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java") |
| 11713 | #t)) |
| 11714 | (add-before 'build 'fix-test-resources-path |
| 11715 | (lambda _ |
| 11716 | (substitute* (find-files "xmlunit-matchers/src/test" ".*.java") |
| 11717 | (("../test-resources") "test-resources")) |
| 11718 | #t)) |
| 11719 | (add-before 'check 'copy-test-resources |
| 11720 | (lambda* (#:key inputs #:allow-other-keys) |
| 11721 | (copy-recursively (assoc-ref inputs "resources") "test-resources") |
| 11722 | #t))))) |
| 11723 | (inputs |
| 11724 | `(("java-xmlunit" ,java-xmlunit) |
| 11725 | ("java-junit" ,java-junit))))) |
| 11726 | |
| 11727 | (define-public java-openchart2 |
| 11728 | (package |
| 11729 | (name "java-openchart2") |
| 11730 | (version "1.4.3") |
| 11731 | (source (origin |
| 11732 | (method url-fetch) |
| 11733 | (uri (string-append "http://download.approximatrix.com/openchart2/" |
| 11734 | "openchart2-" version ".source.zip")) |
| 11735 | (sha256 |
| 11736 | (base32 |
| 11737 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) |
| 11738 | (build-system ant-build-system) |
| 11739 | (arguments |
| 11740 | `(#:test-target "test" |
| 11741 | #:phases |
| 11742 | (modify-phases %standard-phases |
| 11743 | (add-after 'unpack 'fix-junit-errors |
| 11744 | (lambda _ |
| 11745 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" |
| 11746 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" |
| 11747 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" |
| 11748 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" |
| 11749 | "model/DefaultChartDataModelConstraintsTest.java" |
| 11750 | "model/MultiScatterDataModelConstraintsTest.java" |
| 11751 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") |
| 11752 | (("(assertEquals[^;]+);" before _) |
| 11753 | (string-append (string-drop-right before 2) ", 1E-6);")))) |
| 11754 | #t)) |
| 11755 | (replace 'install (install-jars "."))))) |
| 11756 | (native-inputs |
| 11757 | `(("unzip" ,unzip) |
| 11758 | ("java-junit" ,java-junit) |
| 11759 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 11760 | (home-page "https://approximatrix.com/products/openchart2/") |
| 11761 | (synopsis "Simple plotting for Java") |
| 11762 | (description "Openchart2 provides a simple, yet powerful, interface for |
| 11763 | Java programmers to create two-dimensional charts and plots. The library |
| 11764 | features an assortment of graph styles, including advanced scatter plots, bar |
| 11765 | graphs, and pie charts.") |
| 11766 | (license license:lgpl2.1+))) |
| 11767 | |
| 11768 | (define-public java-commons-httpclient |
| 11769 | (package |
| 11770 | (name "java-commons-httpclient") |
| 11771 | (version "3.1") |
| 11772 | (source (origin |
| 11773 | (method url-fetch) |
| 11774 | (uri (string-append "mirror://apache/httpcomponents/" |
| 11775 | "commons-httpclient/source/commons-httpclient-" |
| 11776 | version "-src.tar.gz")) |
| 11777 | (sha256 |
| 11778 | (base32 |
| 11779 | "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r")))) |
| 11780 | (build-system ant-build-system) |
| 11781 | (arguments |
| 11782 | `(#:build-target "compile" |
| 11783 | #:test-target "test" |
| 11784 | #:tests? #f; requires junit-textui (junit 3) |
| 11785 | #:phases |
| 11786 | (modify-phases %standard-phases |
| 11787 | (add-before 'build 'fix-accent |
| 11788 | (lambda _ |
| 11789 | (for-each (lambda (file) |
| 11790 | (with-fluids ((%default-port-encoding "ISO-8859-1")) |
| 11791 | (substitute* file |
| 11792 | (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n")))) |
| 11793 | '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" |
| 11794 | "src/examples/TrivialApp.java" "src/examples/ClientApp.java" |
| 11795 | "src/test/org/apache/commons/httpclient/TestHttps.java" |
| 11796 | "src/test/org/apache/commons/httpclient/TestURIUtil2.java")) |
| 11797 | #t)) |
| 11798 | (replace 'install |
| 11799 | (lambda* (#:key outputs #:allow-other-keys) |
| 11800 | (invoke "ant" "dist" |
| 11801 | (string-append "-Ddist.home=" (assoc-ref outputs "out") |
| 11802 | "/share/java")) |
| 11803 | #t))))) |
| 11804 | (propagated-inputs |
| 11805 | `(("java-commons-logging" ,java-commons-logging-minimal) |
| 11806 | ("java-commons-codec" ,java-commons-codec))) |
| 11807 | (home-page "https://hc.apache.org") |
| 11808 | (synopsis "HTTP/1.1 compliant HTTP agent implementation") |
| 11809 | (description "This package contains an HTTP/1.1 compliant HTTP agent |
| 11810 | implementation. It also provides reusable components for client-side |
| 11811 | authentication, HTTP state management, and HTTP connection management.") |
| 11812 | (license license:asl2.0))) |
| 11813 | |
| 11814 | (define-public java-commons-vfs |
| 11815 | (package |
| 11816 | (name "java-commons-vfs") |
| 11817 | (version "2.2") |
| 11818 | (source (origin |
| 11819 | (method url-fetch) |
| 11820 | (uri (string-append "mirror://apache/commons/vfs/source/" |
| 11821 | "commons-vfs2-distribution-" version "-src.tar.gz")) |
| 11822 | (file-name (string-append name "-" version ".tar.gz")) |
| 11823 | (sha256 |
| 11824 | (base32 |
| 11825 | "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3")) |
| 11826 | (modules '((guix build utils))) |
| 11827 | (snippet |
| 11828 | '(begin |
| 11829 | (for-each delete-file |
| 11830 | (find-files "." "\\.jar$")) |
| 11831 | #t)))) |
| 11832 | (build-system ant-build-system) |
| 11833 | (arguments |
| 11834 | `(#:jar-name "commons-vfs.jar" |
| 11835 | #:source-dir "commons-vfs2/src/main/java" |
| 11836 | #:test-dir "commons-vfs2/src/test" |
| 11837 | ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ... |
| 11838 | #:tests? #f |
| 11839 | #:phases |
| 11840 | (modify-phases %standard-phases |
| 11841 | (add-before 'build 'remove-hadoop-and-webdav |
| 11842 | ; Remove these files as they are not required and depend on difficult |
| 11843 | ; packages. |
| 11844 | (lambda _ |
| 11845 | (for-each delete-file-recursively |
| 11846 | '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" |
| 11847 | "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")) |
| 11848 | #t))))) |
| 11849 | (inputs |
| 11850 | `(("java-commons-collections4" ,java-commons-collections4) |
| 11851 | ("java-commons-compress" ,java-commons-compress) |
| 11852 | ("java-commons-httpclient" ,java-commons-httpclient) |
| 11853 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
| 11854 | ("java-commons-net" ,java-commons-net) |
| 11855 | ("java-jsch" ,java-jsch))) |
| 11856 | (home-page "https://commons.apache.org/proper/commons-vfs/") |
| 11857 | (synopsis "Java file system library") |
| 11858 | (description "Commons VFS provides a single API for accessing various |
| 11859 | different file systems. It presents a uniform view of the files from various |
| 11860 | different sources, such as the files on local disk, on an HTTP server, or |
| 11861 | inside a Zip archive.") |
| 11862 | (license license:asl2.0))) |
| 11863 | |
| 11864 | (define-public java-jakarta-oro |
| 11865 | (package |
| 11866 | (name "java-jakarta-oro") |
| 11867 | (version "2.0.8") |
| 11868 | (source (origin |
| 11869 | (method url-fetch) |
| 11870 | (uri (string-append "mirror://apache/jakarta/oro/" |
| 11871 | "jakarta-oro-" version ".tar.gz")) |
| 11872 | (sha256 |
| 11873 | (base32 |
| 11874 | "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc")) |
| 11875 | (modules '((guix build utils))) |
| 11876 | (snippet |
| 11877 | `(begin |
| 11878 | (delete-file (string-append "jakarta-oro-" ,version ".jar")) |
| 11879 | #t)))) |
| 11880 | (build-system ant-build-system) |
| 11881 | (arguments |
| 11882 | `(#:build-target "package" |
| 11883 | #:make-flags (list "-DDATE" "(no recorded date for reproducibility)") |
| 11884 | #:tests? #f; tests are run as part of the build process |
| 11885 | #:phases |
| 11886 | (modify-phases %standard-phases |
| 11887 | (replace 'install |
| 11888 | (install-jars ,(string-append "jakarta-oro-" version)))))) |
| 11889 | (home-page "https://jakarta.apache.org/oro/") |
| 11890 | (synopsis "Text-processing for Java") |
| 11891 | (description "The Jakarta-ORO Java classes are a set of text-processing |
| 11892 | Java classes that provide Perl5 compatible regular expressions, AWK-like |
| 11893 | regular expressions, glob expressions, and utility classes for performing |
| 11894 | substitutions, splits, filtering filenames, etc. This library is the successor |
| 11895 | of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally |
| 11896 | from ORO, Inc.") |
| 11897 | (license license:asl1.1))) |
| 11898 | |
| 11899 | (define-public java-native-access |
| 11900 | (package |
| 11901 | (name "java-native-access") |
| 11902 | (version "4.5.1") |
| 11903 | (source (origin |
| 11904 | (method url-fetch) |
| 11905 | (uri (string-append "https://github.com/java-native-access/jna/" |
| 11906 | "archive/" version ".tar.gz")) |
| 11907 | (file-name (string-append name "-" version ".tar.gz")) |
| 11908 | (sha256 |
| 11909 | (base32 |
| 11910 | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) |
| 11911 | (modules '((guix build utils))) |
| 11912 | (snippet |
| 11913 | `(begin |
| 11914 | (for-each delete-file (find-files "." ".*.jar")) |
| 11915 | (delete-file-recursively "native/libffi") |
| 11916 | (delete-file-recursively "dist") |
| 11917 | #t)))) |
| 11918 | (build-system ant-build-system) |
| 11919 | (arguments |
| 11920 | `(#:tests? #f; FIXME: tests require reflections.jar |
| 11921 | #:test-target "test" |
| 11922 | #:make-flags (list "-Ddynlink.native=true") |
| 11923 | #:phases |
| 11924 | (modify-phases %standard-phases |
| 11925 | (add-before 'build 'fix-build.xml |
| 11926 | (lambda* (#:key inputs #:allow-other-keys) |
| 11927 | (substitute* "build.xml" |
| 11928 | ;; Since we removed the bundled ant.jar, give the correct path |
| 11929 | (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar")) |
| 11930 | ;; We removed generated native libraries. We can only rebuild one |
| 11931 | ;; so don't fail if we can't find a native library for another architecture. |
| 11932 | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) |
| 11933 | ;; Copy test dependencies |
| 11934 | (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$")) |
| 11935 | "lib/junit.jar") |
| 11936 | (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 11937 | "jar$")) |
| 11938 | "lib/hamcrest-core.jar") |
| 11939 | ;; FIXME: once reflections.jar is built, copy it to lib/test. |
| 11940 | #t)) |
| 11941 | (add-before 'build 'build-native |
| 11942 | (lambda _ |
| 11943 | (invoke "ant" "-Ddynlink.native=true" "native") |
| 11944 | #t)) |
| 11945 | (replace 'install |
| 11946 | (install-jars "build"))))) |
| 11947 | (inputs |
| 11948 | `(("libffi" ,libffi) |
| 11949 | ("libx11" ,libx11) |
| 11950 | ("libxt" ,libxt))) |
| 11951 | (native-inputs |
| 11952 | `(("java-junit" ,java-junit) |
| 11953 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 11954 | (home-page "https://github.com/java-native-access/jna") |
| 11955 | (synopsis "Access to native shared libraries from Java") |
| 11956 | (description "JNA provides Java programs easy access to native shared |
| 11957 | libraries without writing anything but Java code - no JNI or native code is |
| 11958 | required. JNA allows you to call directly into native functions using natural |
| 11959 | Java method invocation.") |
| 11960 | ;; Java Native Access project (JNA) is dual-licensed under 2 |
| 11961 | ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0. |
| 11962 | (license (list |
| 11963 | license:asl2.0 |
| 11964 | license:lgpl2.1+)))) |
| 11965 | |
| 11966 | (define-public java-native-access-platform |
| 11967 | (package |
| 11968 | (inherit java-native-access) |
| 11969 | (name "java-native-access-platform") |
| 11970 | (arguments |
| 11971 | `(#:test-target "test" |
| 11972 | #:tests? #f; require jna-test.jar |
| 11973 | #:phases |
| 11974 | (modify-phases %standard-phases |
| 11975 | (add-before 'build 'chdir |
| 11976 | (lambda _ |
| 11977 | (chdir "contrib/platform") |
| 11978 | #t)) |
| 11979 | (add-after 'chdir 'fix-ant |
| 11980 | (lambda* (#:key inputs #:allow-other-keys) |
| 11981 | (substitute* "nbproject/project.properties" |
| 11982 | (("../../build/jna.jar") |
| 11983 | (string-append (assoc-ref inputs "java-native-access") |
| 11984 | "/share/java/jna.jar")) |
| 11985 | (("../../lib/hamcrest-core-.*.jar") |
| 11986 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 11987 | "jar$"))) |
| 11988 | (("../../lib/junit.jar") |
| 11989 | (car (find-files (assoc-ref inputs "java-junit") |
| 11990 | "jar$")))) |
| 11991 | #t)) |
| 11992 | (replace 'install |
| 11993 | (install-jars "dist"))))) |
| 11994 | (inputs |
| 11995 | `(("java-native-access" ,java-native-access))) |
| 11996 | (synopsis "Cross-platform mappings for jna") |
| 11997 | (description "java-native-access-platfrom has cross-platform mappings |
| 11998 | and mappings for a number of commonly used platform functions, including a |
| 11999 | large number of Win32 mappings as well as a set of utility classes that |
| 12000 | simplify native access."))) |
| 12001 | |
| 12002 | (define-public java-jsch-agentproxy-core |
| 12003 | (package |
| 12004 | (name "java-jsch-agentproxy-core") |
| 12005 | (version "0.0.8") |
| 12006 | (source (origin |
| 12007 | (method url-fetch) |
| 12008 | (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/" |
| 12009 | version ".tar.gz")) |
| 12010 | (file-name (string-append name "-" version ".tar.gz")) |
| 12011 | (sha256 |
| 12012 | (base32 |
| 12013 | "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q")))) |
| 12014 | (build-system ant-build-system) |
| 12015 | (arguments |
| 12016 | `(#:jar-name "jsch-agentproxy-core.jar" |
| 12017 | #:source-dir "jsch-agent-proxy-core/src/main/java" |
| 12018 | #:tests? #f)); no tests |
| 12019 | (home-page "https://github.com/ymnk/jsch-agent-proxy") |
| 12020 | (synopsis "Core component of the proxy to ssh-agent and Pageant in Java") |
| 12021 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12022 | and Pageant included Putty. It will be easily integrated into JSch, and users |
| 12023 | will be allowed to use these programs for authentication.") |
| 12024 | (license license:bsd-3))) |
| 12025 | |
| 12026 | (define-public java-jsch-agentproxy-sshagent |
| 12027 | (package |
| 12028 | (inherit java-jsch-agentproxy-core) |
| 12029 | (name "java-jsch-agentproxy-sshagent") |
| 12030 | (arguments |
| 12031 | `(#:jar-name "jsch-agentproxy-sshagent.jar" |
| 12032 | #:source-dir "jsch-agent-proxy-sshagent/src/main/java" |
| 12033 | #:tests? #f)); no tests |
| 12034 | (inputs |
| 12035 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) |
| 12036 | (synopsis "Proxy to ssh-agent") |
| 12037 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12038 | and Pageant included in Putty. This component contains the code for a proxy to |
| 12039 | ssh-agent."))) |
| 12040 | |
| 12041 | (define-public java-jsch-agentproxy-usocket-jna |
| 12042 | (package |
| 12043 | (inherit java-jsch-agentproxy-core) |
| 12044 | (name "java-jsch-agentproxy-usocket-jna") |
| 12045 | (arguments |
| 12046 | `(#:jar-name "jsch-agentproxy-usocket-jna.jar" |
| 12047 | #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java" |
| 12048 | #:tests? #f)); no tests |
| 12049 | (inputs |
| 12050 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) |
| 12051 | ("java-native-access" ,java-native-access))) |
| 12052 | (synopsis "USocketFactory implementation using JNA") |
| 12053 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12054 | and Pageant included in Putty. This component contains an implementation of |
| 12055 | USocketFactory using @dfn{JNA} (Java Native Access)."))) |
| 12056 | |
| 12057 | (define-public java-jsch-agentproxy-pageant |
| 12058 | (package |
| 12059 | (inherit java-jsch-agentproxy-core) |
| 12060 | (name "java-jsch-agentproxy-pageant") |
| 12061 | (arguments |
| 12062 | `(#:jar-name "jsch-agentproxy-pageant.jar" |
| 12063 | #:source-dir "jsch-agent-proxy-pageant/src/main/java" |
| 12064 | #:tests? #f)); no tests |
| 12065 | (inputs |
| 12066 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) |
| 12067 | ("java-native-access" ,java-native-access) |
| 12068 | ("java-native-access-platform" ,java-native-access-platform))) |
| 12069 | (synopsis "Proxy to pageant") |
| 12070 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12071 | and Pageant included in Putty. This component contains the code for a proxy to |
| 12072 | pageant."))) |
| 12073 | |
| 12074 | (define-public java-jsch-agentproxy-usocket-nc |
| 12075 | (package |
| 12076 | (inherit java-jsch-agentproxy-core) |
| 12077 | (name "java-jsch-agentproxy-usocket-nc") |
| 12078 | (arguments |
| 12079 | `(#:jar-name "jsch-agentproxy-usocket-nc.jar" |
| 12080 | #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java" |
| 12081 | #:tests? #f)); no tests |
| 12082 | (inputs |
| 12083 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) |
| 12084 | (synopsis "USocketFactory implementation using netcat") |
| 12085 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12086 | and Pageant included in Putty. This component contains an implementation of |
| 12087 | USocketFactory using netcat."))) |
| 12088 | |
| 12089 | (define-public java-jsch-agentproxy-connector-factory |
| 12090 | (package |
| 12091 | (inherit java-jsch-agentproxy-core) |
| 12092 | (name "java-jsch-agentproxy-connector-factory") |
| 12093 | (arguments |
| 12094 | `(#:jar-name "jsch-agentproxy-connector-factory.jar" |
| 12095 | #:source-dir "jsch-agent-proxy-connector-factory/src/main/java" |
| 12096 | #:tests? #f)); no tests |
| 12097 | (inputs |
| 12098 | `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) |
| 12099 | ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent) |
| 12100 | ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna) |
| 12101 | ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant) |
| 12102 | ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc))) |
| 12103 | (synopsis "Connector factory for jsch agent proxy") |
| 12104 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12105 | and Pageant included in Putty. This component contains a connector factory."))) |
| 12106 | |
| 12107 | (define-public java-jsch-agentproxy-jsch |
| 12108 | (package |
| 12109 | (inherit java-jsch-agentproxy-core) |
| 12110 | (name "java-jsch-agentproxy-jsch") |
| 12111 | (arguments |
| 12112 | `(#:jar-name "jsch-agentproxy-jsch.jar" |
| 12113 | #:source-dir "jsch-agent-proxy-jsch/src/main/java" |
| 12114 | #:tests? #f)); no tests |
| 12115 | (inputs |
| 12116 | `(("java-jsch" ,java-jsch) |
| 12117 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core))) |
| 12118 | (synopsis "JSch integration library for agentproxy") |
| 12119 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 12120 | and Pageant included in Putty. This component contains a library to use |
| 12121 | jsch-agent-proxy with JSch."))) |
| 12122 | |
| 12123 | (define-public java-apache-ivy |
| 12124 | (package |
| 12125 | (name "java-apache-ivy") |
| 12126 | (version "2.4.0") |
| 12127 | (source (origin |
| 12128 | (method url-fetch) |
| 12129 | (uri (string-append "mirror://apache//ant/ivy/" version |
| 12130 | "/apache-ivy-" version "-src.tar.gz")) |
| 12131 | (sha256 |
| 12132 | (base32 |
| 12133 | "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0")) |
| 12134 | (patches |
| 12135 | (search-patches |
| 12136 | "java-apache-ivy-port-to-latest-bouncycastle.patch")))) |
| 12137 | (build-system ant-build-system) |
| 12138 | (arguments |
| 12139 | `(#:jar-name "ivy.jar" |
| 12140 | #:tests? #f |
| 12141 | #:phases |
| 12142 | (modify-phases %standard-phases |
| 12143 | (add-before 'build 'remove-example |
| 12144 | (lambda _ |
| 12145 | (delete-file-recursively "src/example") |
| 12146 | #t)) |
| 12147 | (add-before 'build 'copy-resources |
| 12148 | (lambda _ |
| 12149 | (with-directory-excursion "src/java" |
| 12150 | (for-each (lambda (file) |
| 12151 | (install-file file (string-append "../../build/classes/" (dirname file)))) |
| 12152 | (append |
| 12153 | (find-files "." ".*.css") |
| 12154 | (find-files "." ".*.ent") |
| 12155 | (find-files "." ".*.html") |
| 12156 | (find-files "." ".*.properties") |
| 12157 | (find-files "." ".*.xsd") |
| 12158 | (find-files "." ".*.xsl") |
| 12159 | (find-files "." ".*.xml")))) |
| 12160 | #t)) |
| 12161 | (add-before 'build 'fix-vfs |
| 12162 | (lambda _ |
| 12163 | (substitute* |
| 12164 | '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java" |
| 12165 | "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java") |
| 12166 | (("import org.apache.commons.vfs") "import org.apache.commons.vfs2")) |
| 12167 | #t)) |
| 12168 | (add-before 'install 'copy-manifest |
| 12169 | (lambda _ |
| 12170 | (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF") |
| 12171 | #t)) |
| 12172 | (add-before 'install 'repack |
| 12173 | (lambda _ |
| 12174 | (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" |
| 12175 | "-C" "build/classes" "."))) |
| 12176 | (add-after 'install 'install-bin |
| 12177 | (lambda* (#:key outputs #:allow-other-keys) |
| 12178 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) |
| 12179 | (ivy (string-append bin "/ivy")) |
| 12180 | (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar"))) |
| 12181 | (mkdir-p bin) |
| 12182 | (with-output-to-file ivy |
| 12183 | (lambda _ |
| 12184 | (display (string-append |
| 12185 | "#!" (which "sh") "\n" |
| 12186 | "if [[ -z $CLASSPATH ]]; then\n" |
| 12187 | " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n" |
| 12188 | "else\n" |
| 12189 | " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n" |
| 12190 | "fi\n" |
| 12191 | (which "java") " -cp $cp org.apache.ivy.Main $@\n")))) |
| 12192 | (chmod ivy #o755) |
| 12193 | #t)))))) |
| 12194 | (inputs |
| 12195 | `(("java-bouncycastle" ,java-bouncycastle) |
| 12196 | ("java-commons-cli" ,java-commons-cli) |
| 12197 | ("java-commons-collections" ,java-commons-collections) |
| 12198 | ("java-commons-httpclient" ,java-commons-httpclient) |
| 12199 | ("java-commons-lang" ,java-commons-lang) |
| 12200 | ("java-commons-vfs" ,java-commons-vfs) |
| 12201 | ("java-jakarta-oro" ,java-jakarta-oro) |
| 12202 | ("java-jsch" ,java-jsch) |
| 12203 | ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core) |
| 12204 | ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory) |
| 12205 | ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch) |
| 12206 | ("java-junit" ,java-junit))) |
| 12207 | (home-page "https://ant.apache.org/ivy") |
| 12208 | (synopsis "Dependency manager for the Java programming language") |
| 12209 | (description "Ivy is a tool for managing (recording, tracking, resolving |
| 12210 | and reporting) project dependencies. It is characterized by the following: |
| 12211 | |
| 12212 | @itemize |
| 12213 | @item flexibility and configurability - Ivy is essentially process agnostic |
| 12214 | and is not tied to any methodology or structure. Instead it provides the |
| 12215 | necessary flexibility and configurability to be adapted to a broad range |
| 12216 | of dependency management and build processes. |
| 12217 | @item tight integration with Apache Ant - while available as a standalone tool, |
| 12218 | Ivy works particularly well with Apache Ant providing a number of |
| 12219 | powerful Ant tasks ranging from dependency resolution to dependency |
| 12220 | reporting and publication. |
| 12221 | @end itemize") |
| 12222 | (license license:asl2.0))) |
| 12223 | |
| 12224 | (define-public java-eclipse-sisu-inject |
| 12225 | (package |
| 12226 | (name "java-eclipse-sisu-inject") |
| 12227 | (version "0.3.4") |
| 12228 | (source (origin |
| 12229 | (method git-fetch) |
| 12230 | (uri (git-reference |
| 12231 | (url "https://github.com/eclipse/sisu.inject/") |
| 12232 | (commit (string-append "releases/" version)))) |
| 12233 | (file-name (git-file-name name version)) |
| 12234 | (sha256 |
| 12235 | (base32 |
| 12236 | "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6")))) |
| 12237 | (build-system ant-build-system) |
| 12238 | (arguments |
| 12239 | `(#:jar-name "eclipse-sisu-inject.jar" |
| 12240 | #:source-dir "org.eclipse.sisu.inject/src" |
| 12241 | #:tests? #f; no tests |
| 12242 | #:phases |
| 12243 | (modify-phases %standard-phases |
| 12244 | (replace 'install |
| 12245 | (install-from-pom "org.eclipse.sisu.inject/pom.xml"))))) |
| 12246 | (propagated-inputs |
| 12247 | `(("java-guice" ,java-guice) |
| 12248 | ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom))) |
| 12249 | (inputs |
| 12250 | `(("java-guice-servlet" ,java-guice-servlet) |
| 12251 | ("java-javax-inject" ,java-javax-inject) |
| 12252 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
| 12253 | ("java-junit" ,java-junit) |
| 12254 | ("java-slf4j-api" ,java-slf4j-api) |
| 12255 | ("java-jsr305" ,java-jsr305) |
| 12256 | ("java-jsr250" ,java-jsr250) |
| 12257 | ("java-cdi-api" ,java-cdi-api) |
| 12258 | ("java-osgi-framework" ,java-osgi-framework) |
| 12259 | ("java-osgi-util-tracker" ,java-osgi-util-tracker) |
| 12260 | ("java-testng" ,java-testng))) |
| 12261 | (home-page "https://www.eclipse.org/sisu/") |
| 12262 | (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring") |
| 12263 | (description "Sisu is a modular JSR330-based container that supports |
| 12264 | classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses |
| 12265 | Google-Guice to perform dependency injection and provide the core JSR330 |
| 12266 | support, but removes the need to write explicit bindings in Guice modules. |
| 12267 | Integration with other containers via the Eclipse Extension Registry and the |
| 12268 | OSGi Service Registry is a goal of this project.") |
| 12269 | (license license:epl1.0))) |
| 12270 | |
| 12271 | (define java-sisu-inject-parent-pom |
| 12272 | (package |
| 12273 | (inherit java-eclipse-sisu-inject) |
| 12274 | (name "java-sisu-inject-parent-pom") |
| 12275 | (arguments |
| 12276 | `(#:tests? #f |
| 12277 | #:phases |
| 12278 | (modify-phases %standard-phases |
| 12279 | (delete 'configure) |
| 12280 | (delete 'build) |
| 12281 | (replace 'install |
| 12282 | (install-pom-file "pom.xml"))))) |
| 12283 | (propagated-inputs '()))) |
| 12284 | |
| 12285 | (define-public java-eclipse-sisu-plexus |
| 12286 | (package |
| 12287 | (name "java-eclipse-sisu-plexus") |
| 12288 | (version "0.3.4") |
| 12289 | (source (origin |
| 12290 | (method git-fetch) |
| 12291 | (uri (git-reference |
| 12292 | (url "https://github.com/eclipse/sisu.plexus") |
| 12293 | (commit (string-append "releases/" version)))) |
| 12294 | (file-name (git-file-name name version)) |
| 12295 | (sha256 |
| 12296 | (base32 |
| 12297 | "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f")) |
| 12298 | (modules '((guix build utils))) |
| 12299 | (snippet |
| 12300 | '(begin |
| 12301 | (for-each delete-file (find-files "." ".*.jar")) |
| 12302 | (rename-file "org.eclipse.sisu.plexus.tests/src" |
| 12303 | "org.eclipse.sisu.plexus.tests/java") |
| 12304 | #t)))) |
| 12305 | (build-system ant-build-system) |
| 12306 | (arguments |
| 12307 | `(#:jar-name "eclipse-sisu-plexus.jar" |
| 12308 | #:source-dir "org.eclipse.sisu.plexus/src" |
| 12309 | #:test-dir "org.eclipse.sisu.plexus.tests" |
| 12310 | #:test-exclude |
| 12311 | (list |
| 12312 | ;; This test fails probably because we can't generate the necessary |
| 12313 | ;; meta-inf files. |
| 12314 | "**/PlexusLoggingTest.*" |
| 12315 | ;; FIXME: This test fails because of some injection error |
| 12316 | "**/PlexusRequirementTest.*") |
| 12317 | #:jdk ,icedtea-8 |
| 12318 | #:phases |
| 12319 | (modify-phases %standard-phases |
| 12320 | (add-before 'build 'copy-resources |
| 12321 | (lambda _ |
| 12322 | (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml" |
| 12323 | "build/classes/META-INF/plexus") |
| 12324 | #t)) |
| 12325 | (add-before 'check 'build-test-jar |
| 12326 | (lambda _ |
| 12327 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/" |
| 12328 | (mkdir "build") |
| 12329 | (with-directory-excursion "java" |
| 12330 | (apply invoke "javac" "-cp" |
| 12331 | (string-append (getenv "CLASSPATH") |
| 12332 | ":../../../../../build/classes") |
| 12333 | (find-files "." ".*.java")) |
| 12334 | (for-each (lambda (file) (install-file file (string-append "../build/" file))) |
| 12335 | (find-files "." ".*.jar"))) |
| 12336 | (mkdir-p "build/META-INF/plexus") |
| 12337 | (copy-file "resources/META-INF/plexus/components.xml" |
| 12338 | "build/META-INF/plexus/components.xml") |
| 12339 | (with-directory-excursion "build" |
| 12340 | (invoke "jar" "cf" "../../../component-jar-0.1.jar" "."))) |
| 12341 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/" |
| 12342 | (copy-recursively "META-INF" "../build/test-classes/META-INF") |
| 12343 | (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" |
| 12344 | (("resources/component-jar") |
| 12345 | "org.eclipse.sisu.plexus.tests/resources/component-jar"))) |
| 12346 | #t)) |
| 12347 | (replace 'install |
| 12348 | (install-from-pom "org.eclipse.sisu.plexus/pom.xml"))))) |
| 12349 | (propagated-inputs |
| 12350 | `(("java-plexus-classworlds" ,java-plexus-classworlds) |
| 12351 | ("java-plexus-utils" ,java-plexus-utils) |
| 12352 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
| 12353 | ("java-cdi-api" ,java-cdi-api) |
| 12354 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
| 12355 | ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom))) |
| 12356 | (inputs |
| 12357 | `(("java-osgi-framework" ,java-osgi-framework) |
| 12358 | ("java-slf4j-api" ,java-slf4j-api) |
| 12359 | ("java-javax-inject" ,java-javax-inject) |
| 12360 | ("java-guice" ,java-guice) |
| 12361 | ("java-guava" ,java-guava) |
| 12362 | ("java-aopalliance" ,java-aopalliance) |
| 12363 | ("java-asm" ,java-asm) |
| 12364 | ("java-cglib" ,java-cglib))) |
| 12365 | (native-inputs |
| 12366 | `(("java-junit" ,java-junit))) |
| 12367 | (home-page "https://www.eclipse.org/sisu/") |
| 12368 | (synopsis "Plexus support for the sisu container") |
| 12369 | (description "Sisu is a modular JSR330-based container that supports |
| 12370 | classpath scanning, auto-binding, and dynamic auto-wiring. This package |
| 12371 | adds Plexus support to the Sisu-Inject container.") |
| 12372 | (license license:epl1.0))) |
| 12373 | |
| 12374 | (define java-sisu-plexus-parent-pom |
| 12375 | (package |
| 12376 | (inherit java-eclipse-sisu-plexus) |
| 12377 | (name "java-sisu-plexus-parent-pom") |
| 12378 | (arguments |
| 12379 | `(#:tests? #f |
| 12380 | #:phases |
| 12381 | (modify-phases %standard-phases |
| 12382 | (delete 'configure) |
| 12383 | (delete 'build) |
| 12384 | (replace 'install |
| 12385 | (install-pom-file "pom.xml"))))) |
| 12386 | (propagated-inputs |
| 12387 | `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9))))) |
| 12388 | |
| 12389 | (define-public java-commons-compiler |
| 12390 | (package |
| 12391 | (name "java-commons-compiler") |
| 12392 | (version "3.0.8") |
| 12393 | (source (origin |
| 12394 | (method git-fetch) |
| 12395 | (uri (git-reference |
| 12396 | (url "https://github.com/janino-compiler/janino") |
| 12397 | (commit "91aa95686d1e4ca3b16a984a03a38686572331b2"))) |
| 12398 | (file-name (string-append name "-" version)) |
| 12399 | (sha256 |
| 12400 | (base32 |
| 12401 | "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r")) |
| 12402 | (modules '((guix build utils))) |
| 12403 | (snippet |
| 12404 | '(begin |
| 12405 | (for-each delete-file |
| 12406 | (find-files "." "\\.jar$")) |
| 12407 | #t)))) |
| 12408 | (build-system ant-build-system) |
| 12409 | (arguments |
| 12410 | `(#:jar-name "commons-compiler.jar" |
| 12411 | #:source-dir "commons-compiler/src/main" |
| 12412 | #:tests? #f)); no tests |
| 12413 | (home-page "https://github.com/janino-compiler/janino") |
| 12414 | (synopsis "Java compiler") |
| 12415 | (description "Commons-compiler contains an API for janino, including the |
| 12416 | @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator} |
| 12417 | and @code{ISimpleCompiler} interfaces.") |
| 12418 | (license license:bsd-3))) |
| 12419 | |
| 12420 | (define-public java-janino |
| 12421 | (package |
| 12422 | (inherit java-commons-compiler) |
| 12423 | (name "java-janino") |
| 12424 | (arguments |
| 12425 | `(#:jar-name "janino.jar" |
| 12426 | #:source-dir "src/main/java" |
| 12427 | #:phases |
| 12428 | (modify-phases %standard-phases |
| 12429 | (add-before 'configure 'chdir |
| 12430 | (lambda _ |
| 12431 | (chdir "janino") |
| 12432 | #t))))) |
| 12433 | (inputs |
| 12434 | `(("java-commons-compiler" ,java-commons-compiler))) |
| 12435 | (native-inputs |
| 12436 | `(("java-junit" ,java-junit) |
| 12437 | ("java-hamcrest-core" ,java-hamcrest-core))) |
| 12438 | (description "Janino is a Java compiler. Janino can compile a set of |
| 12439 | source files to a set of class files like @code{javac}, but also compile a |
| 12440 | Java expression, block, class body or source file in memory, load the bytecode |
| 12441 | and execute it directly in the same JVM. @code{janino} can also be used for |
| 12442 | static code analysis or code manipulation."))) |
| 12443 | |
| 12444 | (define-public java-logback-core |
| 12445 | (package |
| 12446 | (name "java-logback-core") |
| 12447 | (version "1.2.3") |
| 12448 | (source (origin |
| 12449 | (method url-fetch) |
| 12450 | (uri (string-append "https://github.com/qos-ch/logback/archive/v_" |
| 12451 | version ".tar.gz")) |
| 12452 | (file-name (string-append name "-" version ".tar.gz")) |
| 12453 | (sha256 |
| 12454 | (base32 |
| 12455 | "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) |
| 12456 | (modules '((guix build utils))) |
| 12457 | (snippet |
| 12458 | '(begin |
| 12459 | (delete-file-recursively "logback-access/lib") |
| 12460 | #t)))) |
| 12461 | (build-system ant-build-system) |
| 12462 | (arguments |
| 12463 | `(#:jar-name "logback.jar" |
| 12464 | #:source-dir "src/main/java" |
| 12465 | #:test-dir "src/test" |
| 12466 | #:test-exclude |
| 12467 | ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator |
| 12468 | ;; which creates FastClasses |
| 12469 | (list "**/AllCoreTest.*" |
| 12470 | "**/AutoFlushingObjectWriterTest.*" |
| 12471 | "**/PackageTest.*" |
| 12472 | "**/ResilientOutputStreamTest.*" |
| 12473 | ;; And we still don't want to run abstract classes |
| 12474 | "**/Abstract*.*") |
| 12475 | #:phases |
| 12476 | (modify-phases %standard-phases |
| 12477 | (add-before 'configure 'chdir |
| 12478 | (lambda _ |
| 12479 | (chdir "logback-core") |
| 12480 | #t))))) |
| 12481 | (inputs |
| 12482 | `(("java-javax-mail" ,java-javax-mail) |
| 12483 | ("servlet" ,java-javaee-servletapi) |
| 12484 | ("java-commons-compiler" ,java-commons-compiler) |
| 12485 | ("java-janino" ,java-janino))) |
| 12486 | (native-inputs |
| 12487 | `(("java-junit" ,java-junit) |
| 12488 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 12489 | ("java-mockito-1" ,java-mockito-1) |
| 12490 | ("java-cglib" ,java-cglib) |
| 12491 | ("java-asm" ,java-asm) |
| 12492 | ("java-objenesis" ,java-objenesis) |
| 12493 | ("java-joda-time" ,java-joda-time))) |
| 12494 | (home-page "https://logback.qos.ch") |
| 12495 | (synopsis "Logging for java") |
| 12496 | (description "Logback is intended as a successor to the popular log4j project. |
| 12497 | This module lays the groundwork for the other two modules.") |
| 12498 | ;; Either epl1.0 or lgpl2.1 |
| 12499 | (license (list license:epl1.0 |
| 12500 | license:lgpl2.1)))) |
| 12501 | |
| 12502 | (define-public java-logback-classic |
| 12503 | (package |
| 12504 | (inherit java-logback-core) |
| 12505 | (name "java-logback-classic") |
| 12506 | (arguments |
| 12507 | `(#:jar-name "logback-classic.jar" |
| 12508 | #:source-dir "src/main/java" |
| 12509 | #:test-dir "src/test" |
| 12510 | #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix |
| 12511 | #:jdk ,icedtea-8 |
| 12512 | #:phases |
| 12513 | (modify-phases %standard-phases |
| 12514 | (add-before 'configure 'chdir |
| 12515 | (lambda _ |
| 12516 | (chdir "logback-classic") |
| 12517 | #t)) |
| 12518 | (replace 'build |
| 12519 | (lambda* (#:key inputs #:allow-other-keys) |
| 12520 | (mkdir-p "build/classes") |
| 12521 | (setenv "CLASSPATH" |
| 12522 | (string-join |
| 12523 | (apply append (map (lambda (input) |
| 12524 | (find-files (assoc-ref inputs input) |
| 12525 | ".*.jar")) |
| 12526 | '("java-logback-core" "java-slf4j-api" |
| 12527 | "java-commons-compiler" "servlet" |
| 12528 | "groovy"))) |
| 12529 | ":")) |
| 12530 | (apply invoke "groovyc" "-d" "build/classes" "-j" |
| 12531 | (find-files "src/main/" ".*\\.(groovy|java)$")) |
| 12532 | (invoke "ant" "jar") |
| 12533 | #t))))) |
| 12534 | (inputs |
| 12535 | `(("java-logback-core" ,java-logback-core) |
| 12536 | ("java-slf4j-api" ,java-slf4j-api) |
| 12537 | ,@(package-inputs java-logback-core))) |
| 12538 | (native-inputs |
| 12539 | `(("groovy" ,groovy))) |
| 12540 | (description "Logback is intended as a successor to the popular log4j project. |
| 12541 | This module can be assimilated to a significantly improved version of log4j. |
| 12542 | Moreover, @code{logback-classic} natively implements the slf4j API so that you |
| 12543 | can readily switch back and forth between logback and other logging frameworks |
| 12544 | such as log4j or @code{java.util.logging} (JUL)."))) |
| 12545 | |
| 12546 | (define-public java-jgit |
| 12547 | (package |
| 12548 | (name "java-jgit") |
| 12549 | (version "4.7.0.201704051617-r") |
| 12550 | (source (origin |
| 12551 | (method url-fetch) |
| 12552 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 12553 | "org/eclipse/jgit/org.eclipse.jgit/" |
| 12554 | version "/org.eclipse.jgit-" |
| 12555 | version "-sources.jar")) |
| 12556 | (sha256 |
| 12557 | (base32 |
| 12558 | "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k")))) |
| 12559 | (build-system ant-build-system) |
| 12560 | (arguments |
| 12561 | `(#:tests? #f ; There are no tests to run. |
| 12562 | #:jar-name "jgit.jar" |
| 12563 | ;; JGit must be built with a JDK supporting Java 8. |
| 12564 | #:jdk ,icedtea-8 |
| 12565 | ;; Target our older default JDK. |
| 12566 | #:make-flags (list "-Dtarget=1.7") |
| 12567 | #:phases |
| 12568 | (modify-phases %standard-phases |
| 12569 | ;; The jar file generated by the default build.xml does not include |
| 12570 | ;; the text properties files, so we need to add them. |
| 12571 | (add-after 'build 'add-properties |
| 12572 | (lambda* (#:key jar-name #:allow-other-keys) |
| 12573 | (with-directory-excursion "src" |
| 12574 | (apply invoke "jar" "-uf" |
| 12575 | (string-append "../build/jar/" jar-name) |
| 12576 | (find-files "." "\\.properties$"))) |
| 12577 | #t))))) |
| 12578 | (inputs |
| 12579 | `(("java-classpathx-servletapi" ,java-classpathx-servletapi) |
| 12580 | ("java-javaewah" ,java-javaewah) |
| 12581 | ("java-jsch" ,java-jsch) |
| 12582 | ("java-slf4j-api" ,java-slf4j-api))) |
| 12583 | (home-page "https://eclipse.org/jgit/") |
| 12584 | (synopsis "Java library implementing the Git version control system") |
| 12585 | (description "JGit is a lightweight, pure Java library implementing the |
| 12586 | Git version control system, providing repository access routines, support for |
| 12587 | network protocols, and core version control algorithms.") |
| 12588 | (license license:edl1.0))) |
| 12589 | |
| 12590 | ;; For axoloti. This package can still be built with icedtea-7, which is |
| 12591 | ;; currently used as the default JDK. |
| 12592 | (define-public java-jgit-4.2 |
| 12593 | (package (inherit java-jgit) |
| 12594 | (version "4.2.0.201601211800-r") |
| 12595 | (source (origin |
| 12596 | (method url-fetch) |
| 12597 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 12598 | "org/eclipse/jgit/org.eclipse.jgit/" |
| 12599 | version "/org.eclipse.jgit-" |
| 12600 | version "-sources.jar")) |
| 12601 | (sha256 |
| 12602 | (base32 |
| 12603 | "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm")))) |
| 12604 | (build-system ant-build-system) |
| 12605 | (arguments |
| 12606 | (substitute-keyword-arguments (package-arguments java-jgit) |
| 12607 | ;; Build for default JDK. |
| 12608 | ((#:jdk _) icedtea-7) |
| 12609 | ((#:phases phases) |
| 12610 | `(modify-phases ,phases |
| 12611 | (add-after 'unpack 'use-latest-javaewah-API |
| 12612 | (lambda _ |
| 12613 | (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java" |
| 12614 | (("wordinbits") "WORD_IN_BITS")) |
| 12615 | #t)))))) |
| 12616 | (inputs |
| 12617 | `(("java-javaewah" ,java-javaewah) |
| 12618 | ("java-jsch" ,java-jsch) |
| 12619 | ("java-slf4j-api" ,java-slf4j-api))))) |
| 12620 | |
| 12621 | (define-public abcl |
| 12622 | (package |
| 12623 | (name "abcl") |
| 12624 | (version "1.6.0") |
| 12625 | (source |
| 12626 | (origin |
| 12627 | (method url-fetch) |
| 12628 | (uri (string-append "https://abcl.org/releases/" |
| 12629 | version "/abcl-src-" version ".tar.gz")) |
| 12630 | (sha256 |
| 12631 | (base32 |
| 12632 | "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9")) |
| 12633 | (patches |
| 12634 | (search-patches |
| 12635 | "abcl-fix-build-xml.patch")))) |
| 12636 | (build-system ant-build-system) |
| 12637 | (native-inputs |
| 12638 | `(("java-junit" ,java-junit))) |
| 12639 | (arguments |
| 12640 | `(#:build-target "abcl.jar" |
| 12641 | #:test-target "abcl.test" |
| 12642 | #:phases |
| 12643 | (modify-phases %standard-phases |
| 12644 | (replace 'install |
| 12645 | (lambda* (#:key outputs #:allow-other-keys) |
| 12646 | (let ((share (string-append (assoc-ref outputs "out") |
| 12647 | "/share/java/")) |
| 12648 | (bin (string-append (assoc-ref outputs "out") |
| 12649 | "/bin/"))) |
| 12650 | (mkdir-p share) |
| 12651 | (install-file "dist/abcl.jar" share) |
| 12652 | (install-file "dist/abcl-contrib.jar" share) |
| 12653 | (mkdir-p bin) |
| 12654 | (with-output-to-file (string-append bin "abcl") |
| 12655 | (lambda _ |
| 12656 | (let ((classpath (string-append |
| 12657 | share "abcl.jar" |
| 12658 | ":" |
| 12659 | share "abcl-contrib.jar"))) |
| 12660 | (display (string-append |
| 12661 | "#!" (which "sh") "\n" |
| 12662 | "if [[ -z $CLASSPATH ]]; then\n" |
| 12663 | " cp=\"" classpath "\"\n" |
| 12664 | "else\n" |
| 12665 | " cp=\"" classpath ":$CLASSPATH\"\n" |
| 12666 | "fi\n" |
| 12667 | "exec " (which "java") |
| 12668 | " -cp $cp org.armedbear.lisp.Main $@\n"))))) |
| 12669 | (chmod (string-append bin "abcl") #o755) |
| 12670 | #t)))))) |
| 12671 | (home-page "https://abcl.org/") |
| 12672 | (synopsis "Common Lisp Implementation on the JVM") |
| 12673 | (description |
| 12674 | "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common |
| 12675 | Lisp language featuring both an interpreter and a compiler, running in the |
| 12676 | JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine |
| 12677 | in any Java application. Additionally, it can be used to implement (parts of) |
| 12678 | the application using Java to Lisp integration APIs.") |
| 12679 | (license (list license:gpl2+ |
| 12680 | ;; named-readtables is released under 3 clause BSD |
| 12681 | license:bsd-3 |
| 12682 | ;; jfli is released under CPL 1.0 |
| 12683 | license:cpl1.0)))) |
| 12684 | |
| 12685 | (define-public java-jsonp-api |
| 12686 | (package |
| 12687 | (name "java-jsonp-api") |
| 12688 | (version "1.1.6") |
| 12689 | (source (origin |
| 12690 | (method git-fetch) |
| 12691 | (uri (git-reference |
| 12692 | (url "https://github.com/eclipse-ee4j/jsonp") |
| 12693 | (commit (string-append "1.1-" version "-RELEASE")))) |
| 12694 | (file-name (git-file-name name version)) |
| 12695 | (sha256 |
| 12696 | (base32 |
| 12697 | "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc")))) |
| 12698 | (build-system ant-build-system) |
| 12699 | (arguments |
| 12700 | `(#:jar-name "jsonp-api.jar" |
| 12701 | #:tests? #f |
| 12702 | #:source-dir "api/src/main/java" |
| 12703 | #:test-dir "api/src/test")) |
| 12704 | (home-page "https://eclipse-ee4j.github.io/jsonp/") |
| 12705 | (synopsis "JSON Processing in Java") |
| 12706 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. |
| 12707 | parse, generate, transform and query) JSON messages. It produces and |
| 12708 | consumes JSON text in a streaming fashion (similar to StAX API for XML) |
| 12709 | and allows building a Java object model for JSON text using API classes |
| 12710 | (similar to DOM API for XML).") |
| 12711 | ;; either gpl2 only with classpath exception, or epl2.0. |
| 12712 | (license (list license:gpl2 |
| 12713 | license:epl2.0)))) |
| 12714 | |
| 12715 | (define-public java-jsonp-impl |
| 12716 | (package |
| 12717 | (inherit java-jsonp-api) |
| 12718 | (name "java-jsonp-impl") |
| 12719 | (arguments |
| 12720 | `(#:jar-name "jsonp-impl.jar" |
| 12721 | #:tests? #f |
| 12722 | #:source-dir "impl/src/main/java" |
| 12723 | #:test-dir "impl/src/test" |
| 12724 | #:phases |
| 12725 | (modify-phases %standard-phases |
| 12726 | (add-before 'build 'copy-resources |
| 12727 | (lambda _ |
| 12728 | (copy-recursively |
| 12729 | "impl/src/main/resources/" |
| 12730 | "build/classes") |
| 12731 | #t))))) |
| 12732 | (propagated-inputs |
| 12733 | `(("java-jsonp-api" ,java-jsonp-api))) |
| 12734 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. |
| 12735 | parse, generate, transform and query) JSON messages. This package contains |
| 12736 | a reference implementation of that API."))) |
| 12737 | |
| 12738 | (define-public java-xmp |
| 12739 | (package |
| 12740 | (name "java-xmp") |
| 12741 | (version "5.1.3") |
| 12742 | (source (origin |
| 12743 | (method url-fetch) |
| 12744 | (uri (string-append "http://download.macromedia.com/pub/developer" |
| 12745 | "/xmp/sdk/XMPCoreJava-" version ".zip")) |
| 12746 | (sha256 |
| 12747 | (base32 |
| 12748 | "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7")))) |
| 12749 | (build-system ant-build-system) |
| 12750 | (arguments |
| 12751 | `(#:build-target "build" |
| 12752 | #:tests? #f; no tests |
| 12753 | #:phases |
| 12754 | (modify-phases %standard-phases |
| 12755 | (add-after 'unpack 'chdir |
| 12756 | (lambda _ |
| 12757 | (chdir "XMPCore") |
| 12758 | #t)) |
| 12759 | (add-before 'build 'fix-timestamp |
| 12760 | (lambda _ |
| 12761 | (substitute* "build.xml" |
| 12762 | (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT")) |
| 12763 | #t)) |
| 12764 | (replace 'install |
| 12765 | (install-jars ".")) |
| 12766 | (add-after 'install 'install-doc |
| 12767 | (lambda* (#:key outputs #:allow-other-keys) |
| 12768 | (copy-recursively |
| 12769 | "docs" |
| 12770 | (string-append (assoc-ref outputs "out") "/share/doc/java-xmp")) |
| 12771 | #t))))) |
| 12772 | (native-inputs |
| 12773 | `(("unzip" ,unzip))) |
| 12774 | (home-page "https://www.adobe.com/devnet/xmp.html") |
| 12775 | (synopsis "Extensible Metadat Platform (XMP) support in Java") |
| 12776 | (description "Adobe's Extensible Metadata Platform (XMP) is a labeling |
| 12777 | technology that allows you to embed data about a file, known as metadata, |
| 12778 | into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore |
| 12779 | library and the API is similar.") |
| 12780 | (license license:bsd-3))) |
| 12781 | |
| 12782 | (define-public java-metadata-extractor |
| 12783 | (package |
| 12784 | (name "java-metadata-extractor") |
| 12785 | (version "2.11.0") |
| 12786 | (source (origin |
| 12787 | (method git-fetch) |
| 12788 | (uri (git-reference |
| 12789 | (url "https://github.com/drewnoakes/metadata-extractor") |
| 12790 | (commit version))) |
| 12791 | (file-name (git-file-name name version)) |
| 12792 | (sha256 |
| 12793 | (base32 |
| 12794 | "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj")))) |
| 12795 | (build-system ant-build-system) |
| 12796 | (arguments |
| 12797 | `(#:jar-name "metadata-extractor.jar" |
| 12798 | #:source-dir "Source" |
| 12799 | #:test-dir "Tests" |
| 12800 | #:phases |
| 12801 | (modify-phases %standard-phases |
| 12802 | (add-before 'check 'fix-test-dir |
| 12803 | (lambda _ |
| 12804 | (substitute* "build.xml" |
| 12805 | (("/java\">") "\">")) |
| 12806 | #t))))) |
| 12807 | (propagated-inputs |
| 12808 | `(("java-xmp" ,java-xmp))) |
| 12809 | (native-inputs |
| 12810 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 12811 | ("java-junit" ,java-junit))) |
| 12812 | (home-page "https://github.com/drewnoakes/metadata-extractor") |
| 12813 | (synopsis "Extract metadata from image and video files") |
| 12814 | (description "Metadata-extractor is a straightforward Java library for |
| 12815 | reading metadata from image files. It is able to read metadata in Exif, |
| 12816 | IPTC, XMP, ICC and more formats.") |
| 12817 | (license license:asl2.0))) |
| 12818 | |
| 12819 | (define-public java-svg-salamander |
| 12820 | (package |
| 12821 | (name "java-svg-salamander") |
| 12822 | (version "1.1.2") |
| 12823 | (source (origin |
| 12824 | (method git-fetch) |
| 12825 | (uri (git-reference |
| 12826 | (url "https://github.com/blackears/svgSalamander") |
| 12827 | (commit (string-append "v" version)))) |
| 12828 | (file-name (git-file-name name version)) |
| 12829 | (sha256 |
| 12830 | (base32 |
| 12831 | "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf")) |
| 12832 | (modules '((guix build utils))) |
| 12833 | (snippet |
| 12834 | '(begin |
| 12835 | (for-each delete-file (find-files "." ".*.jar")) |
| 12836 | #t)) |
| 12837 | (patches |
| 12838 | (search-patches "java-svg-salamander-Fix-non-det.patch")))) |
| 12839 | (build-system ant-build-system) |
| 12840 | (arguments |
| 12841 | `(#:tests? #f; no tests |
| 12842 | #:phases |
| 12843 | (modify-phases %standard-phases |
| 12844 | (add-after 'unpack 'chdir |
| 12845 | (lambda _ |
| 12846 | (chdir "svg-core") |
| 12847 | #t)) |
| 12848 | (add-before 'build 'copy-jars |
| 12849 | (lambda* (#:key inputs #:allow-other-keys) |
| 12850 | (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$")) |
| 12851 | "../libraries/javacc.jar") |
| 12852 | (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$")) |
| 12853 | "../libraries/ant.jar") |
| 12854 | #t)) |
| 12855 | (replace 'install |
| 12856 | (install-jars "dist"))))) |
| 12857 | (native-inputs |
| 12858 | `(("javacc" ,javacc))) |
| 12859 | (home-page "https://github.com/blackears/svgSalamander") |
| 12860 | (synopsis "SVG engine for Java") |
| 12861 | (description "SVG Salamander is an SVG engine for Java that's designed |
| 12862 | to be small, fast, and allow programmers to use it with a minimum of fuss. |
| 12863 | It's in particular targeted for making it easy to integrate SVG into Java |
| 12864 | games and making it much easier for artists to design 2D game content - from |
| 12865 | rich interactive menus to charts and graphcs to complex animations.") |
| 12866 | (license license:bsd-2))) |
| 12867 | |
| 12868 | (define-public java-jboss-transaction-api-spec |
| 12869 | (package |
| 12870 | (name "java-jboss-transaction-api-spec") |
| 12871 | (version "1.2+1.1.1") |
| 12872 | (source (origin |
| 12873 | (method git-fetch) |
| 12874 | (uri (git-reference |
| 12875 | (url "https://github.com/jboss/jboss-transaction-api_spec") |
| 12876 | (commit "jboss-transaction-api_1.2_spec-1.1.1.Final"))) |
| 12877 | (file-name (git-file-name name version)) |
| 12878 | (sha256 |
| 12879 | (base32 |
| 12880 | "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy")))) |
| 12881 | (build-system ant-build-system) |
| 12882 | (arguments |
| 12883 | `(#:jar-name "java-jboss-transaction-api_spec.jar" |
| 12884 | #:source-dir "src/main/java" |
| 12885 | #:tests? #f)); no tests |
| 12886 | (inputs |
| 12887 | `(("java-cdi-api" ,java-cdi-api) |
| 12888 | ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec))) |
| 12889 | (home-page "https://github.com/jboss/jboss-transaction-api_spec") |
| 12890 | (synopsis "Generic transaction management API in Java") |
| 12891 | (description "Java-jboss-transaction-api-spec implements the Transactions |
| 12892 | API. A transaction is a unit of work containing one or more operations |
| 12893 | involving one or more shared resources having ACID (Atomicity, Consistency, |
| 12894 | Isolation and Durability) properties.") |
| 12895 | ;; either gpl2 only with classpath exception or cddl. |
| 12896 | (license (list license:gpl2 license:cddl1.0)))) |
| 12897 | |
| 12898 | (define-public java-picocli |
| 12899 | (package |
| 12900 | (name "java-picocli") |
| 12901 | (version "4.3.2") |
| 12902 | (source (origin |
| 12903 | (method git-fetch) |
| 12904 | (uri (git-reference |
| 12905 | (url "https://github.com/remkop/picocli") |
| 12906 | (commit (string-append "v" version)))) |
| 12907 | (file-name (git-file-name name version)) |
| 12908 | (sha256 |
| 12909 | (base32 |
| 12910 | "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c")))) |
| 12911 | (build-system ant-build-system) |
| 12912 | (arguments |
| 12913 | `(#:jar-name "picocli.jar" |
| 12914 | #:source-dir "src/main/java" |
| 12915 | ;; Tests require missing dependencies (junitparams, system-rules) |
| 12916 | #:tests? #f)) |
| 12917 | (home-page "https://picocli.info") |
| 12918 | (synopsis "REPL for the JVM") |
| 12919 | (description "Picocli is a framework for building command line applications |
| 12920 | for the JVM. It supports colors, autocompletion, subcommands, and more. Written |
| 12921 | in Java, usable from Groovy, Kotlin, Scala, etc.") |
| 12922 | (license license:asl2.0))) |
| 12923 | |
| 12924 | (define-public java-jetbrains-annotations |
| 12925 | (package |
| 12926 | (name "java-jetbrains-annotations") |
| 12927 | (version "19.0.0") |
| 12928 | (source (origin |
| 12929 | (method git-fetch) |
| 12930 | (uri (git-reference |
| 12931 | (url "https://github.com/JetBrains/java-annotations") |
| 12932 | (commit version))) |
| 12933 | (file-name (git-file-name name version)) |
| 12934 | (sha256 |
| 12935 | (base32 |
| 12936 | "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v")))) |
| 12937 | (build-system ant-build-system) |
| 12938 | (arguments |
| 12939 | `(#:jar-name "jetbrains-annotations.jar" |
| 12940 | #:source-dir "common/src/main/java:java8/src/main/java" |
| 12941 | #:tests? #f)); no tests |
| 12942 | (home-page "https://github.com/JetBrains/java-annotations") |
| 12943 | (synopsis "Annotations for Java and other JVM languages") |
| 12944 | (description "This package contains a set of Java annotations which can be |
| 12945 | used in JVM-based languages. They serve as an additional documentation and |
| 12946 | can be interpreted by IDEs and static analysis tools to improve code analysis.") |
| 12947 | (license license:expat))) |