| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015-2024 Ricardo Wurmus <[email protected]> |
| 3 | ;;; Copyright © 2016 Leo Famulari <[email protected]> |
| 4 | ;;; Copyright © 2016, 2017 Roel Janssen <[email protected]> |
| 5 | ;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro <[email protected]> |
| 6 | ;;; Copyright © 2017-2022 Julien Lepiller <[email protected]> |
| 7 | ;;; Copyright © 2017 Thomas Danckaert <[email protected]> |
| 8 | ;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]> |
| 9 | ;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <[email protected]> |
| 10 | ;;; Copyright © 2018, 2019 Gábor Boskovits <[email protected]> |
| 11 | ;;; Copyright © 2018 Chris Marusich <[email protected]> |
| 12 | ;;; Copyright © 2018-2024 Efraim Flashner <[email protected]> |
| 13 | ;;; Copyright © 2019, 2020, 2021 Björn Höfling <[email protected]> |
| 14 | ;;; Copyright © 2020, 2025 Janneke Nieuwenhuizen <[email protected]> |
| 15 | ;;; Copyright © 2020 Raghav Gururajan <[email protected]> |
| 16 | ;;; Copyright © 2020, 2022, 2025 Maxim Cournoyer <[email protected]> |
| 17 | ;;; Copyright © 2021 Vincent Legoll <[email protected]> |
| 18 | ;;; Copyright © 2021 Mike Gerwitz <[email protected]> |
| 19 | ;;; Copyright © 2021 Pierre Langlois <[email protected]> |
| 20 | ;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]> |
| 21 | ;;; Copyright © 2022, 2024, 2025 Artyom V. Poptsov <[email protected]> |
| 22 | ;;; Copyright © 2024 Paul A. Patience <[email protected]> |
| 23 | ;;; Copyright © 2024 Raven Hallsby <[email protected]> |
| 24 | ;;; Copyright © 2025 Zheng Junjie <[email protected]> |
| 25 | ;;; Copyright © 2025 Julian Flake <[email protected]> |
| 26 | ;;; |
| 27 | ;;; This file is part of GNU Guix. |
| 28 | ;;; |
| 29 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 30 | ;;; under the terms of the GNU General Public License as published by |
| 31 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 32 | ;;; your option) any later version. |
| 33 | ;;; |
| 34 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 35 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 36 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 37 | ;;; GNU General Public License for more details. |
| 38 | ;;; |
| 39 | ;;; You should have received a copy of the GNU General Public License |
| 40 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 41 | |
| 42 | (define-module (gnu packages java) |
| 43 | #:use-module ((guix licenses) #:prefix license:) |
| 44 | #:use-module (guix packages) |
| 45 | #:use-module (guix download) |
| 46 | #:use-module (guix hg-download) |
| 47 | #:use-module (guix git-download) |
| 48 | #:use-module (guix svn-download) |
| 49 | #:use-module ((guix build utils) #:select (alist-replace)) |
| 50 | #:use-module (guix utils) |
| 51 | #:use-module (guix gexp) |
| 52 | #:use-module (guix build-system ant) |
| 53 | #:use-module (guix build-system cmake) |
| 54 | #:use-module (guix build-system copy) |
| 55 | #:use-module (guix build-system gnu) |
| 56 | #:use-module (guix build-system maven) |
| 57 | #:use-module (guix build-system pyproject) |
| 58 | #:use-module (guix build-system trivial) |
| 59 | #:use-module (gnu packages) |
| 60 | #:use-module (gnu packages attr) |
| 61 | #:use-module (gnu packages autotools) |
| 62 | #:use-module (gnu packages base) |
| 63 | #:use-module (gnu packages bash) |
| 64 | #:use-module (gnu packages nss) |
| 65 | #:use-module (gnu packages cpio) |
| 66 | #:use-module (gnu packages cups) |
| 67 | #:use-module (gnu packages compression) |
| 68 | #:use-module (gnu packages elf) |
| 69 | #:use-module (gnu packages fontutils) |
| 70 | #:use-module (gnu packages freedesktop) ; wayland |
| 71 | #:use-module (gnu packages gawk) |
| 72 | #:use-module (gnu packages gcc) |
| 73 | #:use-module (gnu packages gettext) |
| 74 | #:use-module (gnu packages gl) |
| 75 | #:use-module (gnu packages ghostscript) ;lcms |
| 76 | #:use-module (gnu packages gnome) |
| 77 | #:use-module (gnu packages groovy) |
| 78 | #:use-module (gnu packages gtk) |
| 79 | #:use-module (gnu packages guile) |
| 80 | #:use-module (gnu packages icu4c) |
| 81 | #:use-module (gnu packages image) |
| 82 | #:use-module (gnu packages java-bootstrap) |
| 83 | #:use-module (gnu packages java-compression) |
| 84 | #:use-module (gnu packages java-xml) |
| 85 | #:use-module (gnu packages libffi) |
| 86 | #:use-module (gnu packages linux) ;alsa |
| 87 | #:use-module (gnu packages maths) |
| 88 | #:use-module (gnu packages maven) |
| 89 | #:use-module (gnu packages maven-parent-pom) |
| 90 | #:use-module (gnu packages ncurses) |
| 91 | #:use-module (gnu packages ninja) |
| 92 | #:use-module (gnu packages nss) |
| 93 | #:use-module (gnu packages onc-rpc) |
| 94 | #:use-module (gnu packages web) |
| 95 | #:use-module (gnu packages wget) |
| 96 | #:use-module (gnu packages pkg-config) |
| 97 | #:use-module (gnu packages perl) |
| 98 | #:use-module (gnu packages popt) |
| 99 | #:use-module (gnu packages python-build) |
| 100 | #:use-module (gnu packages kerberos) |
| 101 | #:use-module (gnu packages security-token) |
| 102 | #:use-module (gnu packages xml) |
| 103 | #:use-module (gnu packages xdisorg) |
| 104 | #:use-module (gnu packages xorg) |
| 105 | #:use-module (gnu packages texinfo) |
| 106 | #:use-module ((srfi srfi-1) #:select (fold alist-delete)) |
| 107 | #:use-module (srfi srfi-11) |
| 108 | #:use-module (ice-9 match)) |
| 109 | |
| 110 | (define-public icedtea-7 |
| 111 | (let* ((version "2.6.13") |
| 112 | (drop (lambda* (name hash #:optional (patches '())) |
| 113 | (origin |
| 114 | (method url-fetch) |
| 115 | (uri (string-append |
| 116 | "http://icedtea.classpath.org/download/drops" |
| 117 | "/icedtea7/" version "/" name ".tar.bz2")) |
| 118 | (sha256 (base32 hash)) |
| 119 | (patches patches))))) |
| 120 | (package |
| 121 | (name "icedtea") |
| 122 | (version version) |
| 123 | (source (origin |
| 124 | (method url-fetch) |
| 125 | (uri (string-append |
| 126 | "http://icedtea.wildebeest.org/download/source/icedtea-" |
| 127 | version ".tar.xz")) |
| 128 | (sha256 |
| 129 | (base32 |
| 130 | "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh")) |
| 131 | (modules '((guix build utils))) |
| 132 | (snippet |
| 133 | '(begin |
| 134 | (substitute* "Makefile.in" |
| 135 | ;; do not leak information about the build host |
| 136 | (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"") |
| 137 | "DISTRIBUTION_ID=\"\\\"guix\\\"\"")) |
| 138 | #t)))) |
| 139 | (build-system gnu-build-system) |
| 140 | (outputs '("out" ; Java Runtime Environment |
| 141 | "jdk" ; Java Development Kit |
| 142 | "doc")) ; all documentation |
| 143 | (arguments |
| 144 | `(;; There are many test failures. Some are known to |
| 145 | ;; fail upstream, others relate to not having an X |
| 146 | ;; server running at test time, yet others are a |
| 147 | ;; complete mystery to me. |
| 148 | |
| 149 | ;; hotspot: passed: 241; failed: 45; error: 2 |
| 150 | ;; langtools: passed: 1,934; failed: 26 |
| 151 | ;; jdk: unknown |
| 152 | #:tests? #f |
| 153 | |
| 154 | ;; The DSOs use $ORIGIN to refer to each other, but (guix build |
| 155 | ;; gremlin) doesn't support it yet, so skip this phase. |
| 156 | #:validate-runpath? #f |
| 157 | |
| 158 | #:modules ((guix build utils) |
| 159 | (guix build gnu-build-system) |
| 160 | (ice-9 match) |
| 161 | (ice-9 popen) |
| 162 | (srfi srfi-19) |
| 163 | (srfi srfi-26)) |
| 164 | |
| 165 | #:configure-flags |
| 166 | ;; TODO: package sctp and add to inputs |
| 167 | `("--disable-system-sctp" |
| 168 | "--enable-system-pcsc" |
| 169 | "--enable-system-lcms" |
| 170 | "--enable-bootstrap" |
| 171 | "--enable-nss" |
| 172 | "--without-rhino" |
| 173 | ,(string-append "--with-parallel-jobs=" |
| 174 | (number->string (parallel-job-count))) |
| 175 | "--disable-downloading" |
| 176 | "--disable-tests" ;they are run in the check phase instead |
| 177 | "--with-openjdk-src-dir=./openjdk.src" |
| 178 | ,(string-append "--with-ecj=" |
| 179 | (assoc-ref %build-inputs "ecj4-javac-wrapper") |
| 180 | "/bin/javac") |
| 181 | ,(string-append "--with-jdk-home=" |
| 182 | (assoc-ref %build-inputs "classpath")) |
| 183 | ,(string-append "--with-java=" |
| 184 | (assoc-ref %build-inputs "jamvm") |
| 185 | "/bin/jamvm") |
| 186 | ,(string-append "--with-jar=" |
| 187 | (assoc-ref %build-inputs "classpath") |
| 188 | "/bin/gjar")) |
| 189 | #:phases |
| 190 | (modify-phases %standard-phases |
| 191 | (replace 'unpack |
| 192 | (lambda* (#:key source inputs #:allow-other-keys) |
| 193 | (let ((target (string-append "icedtea-" ,version)) |
| 194 | (unpack (lambda* (name #:optional dir) |
| 195 | (let ((dir (or dir |
| 196 | (string-drop-right name 5)))) |
| 197 | (mkdir dir) |
| 198 | (invoke "tar" "xvf" |
| 199 | (assoc-ref inputs name) |
| 200 | "-C" dir |
| 201 | "--strip-components=1"))))) |
| 202 | (mkdir target) |
| 203 | (invoke "tar" "xvf" source |
| 204 | "-C" target "--strip-components=1") |
| 205 | (chdir target) |
| 206 | (unpack "openjdk-src" "openjdk.src") |
| 207 | (with-directory-excursion "openjdk.src" |
| 208 | (for-each unpack |
| 209 | (filter (cut string-suffix? "-drop" <>) |
| 210 | (map (match-lambda |
| 211 | ((name . _) name)) |
| 212 | inputs))))))) |
| 213 | (add-after 'unpack 'use-classpath |
| 214 | (lambda* (#:key inputs #:allow-other-keys) |
| 215 | (let ((tools (search-input-file inputs "/share/classpath/tools.zip")) |
| 216 | (rt.jar (search-input-file inputs "/lib/rt.jar"))) |
| 217 | ;; GNU Classpath does not provide rt.jar, but jamvm provides |
| 218 | ;; Classpath's glibj.zip as rt.jar, so we just use that. |
| 219 | (substitute* "Makefile.in" |
| 220 | (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar)) |
| 221 | ;; Make sure we can find all classes. |
| 222 | (setenv "CLASSPATH" |
| 223 | (string-append rt.jar ":" tools)) |
| 224 | (setenv "JAVACFLAGS" |
| 225 | (string-append "-cp " rt.jar ":" tools))))) |
| 226 | (add-after 'unpack 'patch-bitrot |
| 227 | (lambda _ |
| 228 | (substitute* '("patches/boot/revert-6973616.patch" |
| 229 | "openjdk.src/jdk/make/common/shared/Defs-versions.gmk") |
| 230 | (("REQUIRED_FREETYPE_VERSION = 2.2.1") |
| 231 | "REQUIRED_FREETYPE_VERSION = 2.10.1")) |
| 232 | ;; As of attr 2.4.48 this header is no longer |
| 233 | ;; included. It is provided by the libc instead. |
| 234 | (substitute* '("configure" |
| 235 | "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") |
| 236 | (("attr/xattr.h") "sys/xattr.h")))) |
| 237 | (add-after 'unpack 'fix-openjdk |
| 238 | (lambda _ |
| 239 | (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk" |
| 240 | (("CFLAGS_COMMON = -fno-strict-aliasing" all) |
| 241 | (string-append all |
| 242 | " -fcommon" |
| 243 | " -Wno-error=implicit-function-declaration" |
| 244 | " -Wno-error=implicit-int" |
| 245 | " -Wno-error=incompatible-pointer-types" |
| 246 | " -Wno-error=int-conversion"))) |
| 247 | (substitute* |
| 248 | '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c" |
| 249 | "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c") |
| 250 | (("#include <sys/sysctl.h>") |
| 251 | "#include <linux/sysctl.h>")) |
| 252 | |
| 253 | ;; XXX 'ldd' in glibc 2.35 segfaults upon reading |
| 254 | ;; openjdk.build-boot/lib/amd64/libnio.so (!). |
| 255 | ;; It is only used as a verification step, so ignore it; |
| 256 | ;; try removing this substitution for newer versions of glibc. |
| 257 | (substitute* "openjdk.src/jdk/make/common/shared/Defs-linux.gmk" |
| 258 | (("\\$\\(LDD\\) \\$1 &&") |
| 259 | "")) |
| 260 | |
| 261 | ;; It looks like the "h = 31 * h + c" line of the jsum() |
| 262 | ;; function gets miscompiled. After a few iterations of the loop |
| 263 | ;; the result of "31 * h" is always 0x8000000000000000. |
| 264 | ;; Disable optimizations of dump.cpp as a workaround. |
| 265 | (substitute* "openjdk.src/hotspot/make/linux/makefiles/gcc.make" |
| 266 | (("OPT_CFLAGS/NOOPT.*" all) |
| 267 | (string-append all "\n" |
| 268 | "OPT_CFLAGS/dump.o += -O0"))))) |
| 269 | (add-after 'unpack 'fix-x11-extension-include-path |
| 270 | (lambda* (#:key inputs #:allow-other-keys) |
| 271 | (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" |
| 272 | (((string-append "\\$\\(firstword \\$\\(wildcard " |
| 273 | "\\$\\(OPENWIN_HOME\\)" |
| 274 | "/include/X11/extensions\\).*$")) |
| 275 | (string-append (assoc-ref inputs "libxrender") |
| 276 | "/include/X11/extensions" |
| 277 | " -I" (assoc-ref inputs "libxtst") |
| 278 | "/include/X11/extensions" |
| 279 | " -I" (assoc-ref inputs "libxinerama") |
| 280 | "/include/X11/extensions")) |
| 281 | (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")))) |
| 282 | (add-after 'unpack 'patch-paths |
| 283 | (lambda* (#:key inputs #:allow-other-keys) |
| 284 | ;; buildtree.make generates shell scripts, so we need to replace |
| 285 | ;; the generated shebang |
| 286 | (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") |
| 287 | (("/bin/sh") (which "bash"))) |
| 288 | |
| 289 | (let ((corebin (string-append |
| 290 | (assoc-ref inputs "coreutils") "/bin/")) |
| 291 | (binbin (string-append |
| 292 | (assoc-ref inputs "binutils") "/bin/")) |
| 293 | (grepbin (string-append |
| 294 | (assoc-ref inputs "grep") "/bin/"))) |
| 295 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" |
| 296 | "openjdk.src/corba/make/common/shared/Defs-linux.gmk") |
| 297 | (("UNIXCOMMAND_PATH = /bin/") |
| 298 | (string-append "UNIXCOMMAND_PATH = " corebin)) |
| 299 | (("USRBIN_PATH = /usr/bin/") |
| 300 | (string-append "USRBIN_PATH = " corebin)) |
| 301 | (("DEVTOOLS_PATH *= */usr/bin/") |
| 302 | (string-append "DEVTOOLS_PATH = " corebin)) |
| 303 | (("COMPILER_PATH *= */usr/bin/") |
| 304 | (string-append "COMPILER_PATH = " |
| 305 | (assoc-ref inputs "gcc") "/bin/")) |
| 306 | (("DEF_OBJCOPY *=.*objcopy") |
| 307 | (string-append "DEF_OBJCOPY = " (which "objcopy")))) |
| 308 | |
| 309 | ;; fix path to alsa header |
| 310 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
| 311 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") |
| 312 | (string-append "ALSA_INCLUDE=" |
| 313 | (assoc-ref inputs "alsa-lib") |
| 314 | "/include/alsa/version.h"))) |
| 315 | |
| 316 | ;; fix hard-coded utility paths |
| 317 | (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" |
| 318 | "openjdk.src/corba/make/common/shared/Defs-utils.gmk") |
| 319 | (("ECHO *=.*echo") |
| 320 | (string-append "ECHO = " (which "echo"))) |
| 321 | (("^GREP *=.*grep") |
| 322 | (string-append "GREP = " (which "grep"))) |
| 323 | (("EGREP *=.*egrep") |
| 324 | (string-append "EGREP = " (which "egrep"))) |
| 325 | (("CPIO *=.*cpio") |
| 326 | (string-append "CPIO = " (which "cpio"))) |
| 327 | (("READELF *=.*readelf") |
| 328 | (string-append "READELF = " (which "readelf"))) |
| 329 | (("^ *AR *=.*ar") |
| 330 | (string-append "AR = " (which "ar"))) |
| 331 | (("^ *TAR *=.*tar") |
| 332 | (string-append "TAR = " (which "tar"))) |
| 333 | (("AS *=.*as") |
| 334 | (string-append "AS = " (which "as"))) |
| 335 | (("LD *=.*ld") |
| 336 | (string-append "LD = " (which "ld"))) |
| 337 | (("STRIP *=.*strip") |
| 338 | (string-append "STRIP = " (which "strip"))) |
| 339 | (("NM *=.*nm") |
| 340 | (string-append "NM = " (which "nm"))) |
| 341 | (("^SH *=.*sh") |
| 342 | (string-append "SH = " (which "bash"))) |
| 343 | (("^FIND *=.*find") |
| 344 | (string-append "FIND = " (which "find"))) |
| 345 | (("LDD *=.*ldd") |
| 346 | (string-append "LDD = " (which "ldd"))) |
| 347 | (("NAWK *=.*(n|g)awk") |
| 348 | (string-append "NAWK = " (which "gawk"))) |
| 349 | (("XARGS *=.*xargs") |
| 350 | (string-append "XARGS = " (which "xargs"))) |
| 351 | (("UNZIP *=.*unzip") |
| 352 | (string-append "UNZIP = " (which "unzip"))) |
| 353 | (("ZIPEXE *=.*zip") |
| 354 | (string-append "ZIPEXE = " (which "zip"))) |
| 355 | (("SED *=.*sed") |
| 356 | (string-append "SED = " (which "sed")))) |
| 357 | |
| 358 | ;; Some of these timestamps cause problems as they are more than |
| 359 | ;; 10 years ago, failing the build process. |
| 360 | (substitute* |
| 361 | "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" |
| 362 | (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") |
| 363 | (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") |
| 364 | (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") |
| 365 | (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))) |
| 366 | (add-before 'configure 'set-additional-paths |
| 367 | (lambda* (#:key inputs #:allow-other-keys) |
| 368 | (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" |
| 369 | (("ALSA_INCLUDE=/usr/include/alsa/version.h") |
| 370 | (string-append "ALSA_INCLUDE=" |
| 371 | (assoc-ref inputs "alsa-lib") |
| 372 | "/include/alsa/version.h"))) |
| 373 | (setenv "CC" "gcc") |
| 374 | (setenv "CPATH" |
| 375 | (string-append (assoc-ref inputs "libxcomposite") |
| 376 | "/include/X11/extensions" ":" |
| 377 | (assoc-ref inputs "libxrender") |
| 378 | "/include/X11/extensions" ":" |
| 379 | (assoc-ref inputs "libxtst") |
| 380 | "/include/X11/extensions" ":" |
| 381 | (assoc-ref inputs "libxinerama") |
| 382 | "/include/X11/extensions" ":" |
| 383 | (or (getenv "CPATH") ""))) |
| 384 | (setenv "ALT_OBJCOPY" (which "objcopy")) |
| 385 | (setenv "ALT_CUPS_HEADERS_PATH" |
| 386 | (string-append (assoc-ref inputs "cups") |
| 387 | "/include")) |
| 388 | (setenv "ALT_FREETYPE_HEADERS_PATH" |
| 389 | (string-append (assoc-ref inputs "freetype") |
| 390 | "/include")) |
| 391 | (setenv "ALT_FREETYPE_LIB_PATH" |
| 392 | (string-append (assoc-ref inputs "freetype") |
| 393 | "/lib")))) |
| 394 | (add-before 'build 'disable-os-version-check |
| 395 | ;; allow build on linux major version change |
| 396 | (lambda _ |
| 397 | (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok"))) |
| 398 | (add-before 'check 'fix-test-framework |
| 399 | (lambda _ |
| 400 | ;; Fix PATH in test environment |
| 401 | (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java" |
| 402 | (("PATH=/bin:/usr/bin") |
| 403 | (string-append "PATH=" (getenv "PATH")))) |
| 404 | (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" |
| 405 | (("/usr/bin/env") (which "env"))) |
| 406 | (substitute* "openjdk.src/hotspot/test/test_env.sh" |
| 407 | (("/bin/rm") (which "rm")) |
| 408 | (("/bin/cp") (which "cp")) |
| 409 | (("/bin/mv") (which "mv"))))) |
| 410 | (add-before 'check 'fix-hotspot-tests |
| 411 | (lambda _ |
| 412 | (with-directory-excursion "openjdk.src/hotspot/test/" |
| 413 | (substitute* "jprt.config" |
| 414 | (("PATH=\"\\$\\{path4sdk\\}\"") |
| 415 | (string-append "PATH=" (getenv "PATH"))) |
| 416 | (("make=/usr/bin/make") |
| 417 | (string-append "make=" (which "make")))) |
| 418 | (substitute* '("runtime/6626217/Test6626217.sh" |
| 419 | "runtime/7110720/Test7110720.sh") |
| 420 | (("/bin/rm") (which "rm")) |
| 421 | (("/bin/cp") (which "cp")) |
| 422 | (("/bin/mv") (which "mv")))))) |
| 423 | (add-before 'check 'fix-jdk-tests |
| 424 | (lambda _ |
| 425 | (with-directory-excursion "openjdk.src/jdk/test/" |
| 426 | (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" |
| 427 | (("/bin/pwd") (which "pwd"))) |
| 428 | (substitute* "com/sun/jdi/ShellScaffold.sh" |
| 429 | (("/bin/kill") (which "kill"))) |
| 430 | (substitute* "start-Xvfb.sh" |
| 431 | ;;(("/usr/bin/X11/Xvfb") (which "Xvfb")) |
| 432 | (("/usr/bin/nohup") (which "nohup"))) |
| 433 | (substitute* "javax/security/auth/Subject/doAs/Test.sh" |
| 434 | (("/bin/rm") (which "rm"))) |
| 435 | (substitute* "tools/launcher/MultipleJRE.sh" |
| 436 | (("echo \"#!/bin/sh\"") |
| 437 | (string-append "echo \"#!" (which "rm") "\"")) |
| 438 | (("/usr/bin/zip") (which "zip"))) |
| 439 | (substitute* "com/sun/jdi/OnThrowTest.java" |
| 440 | (("#!/bin/sh") (string-append "#!" (which "sh")))) |
| 441 | (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java" |
| 442 | (("/usr/bin/uptime") (which "uptime"))) |
| 443 | (substitute* "java/lang/ProcessBuilder/Basic.java" |
| 444 | (("/usr/bin/env") (which "env")) |
| 445 | (("/bin/false") (which "false")) |
| 446 | (("/bin/true") (which "true")) |
| 447 | (("/bin/cp") (which "cp")) |
| 448 | (("/bin/sh") (which "sh"))) |
| 449 | (substitute* "java/lang/ProcessBuilder/FeelingLucky.java" |
| 450 | (("/bin/sh") (which "sh"))) |
| 451 | (substitute* "java/lang/ProcessBuilder/Zombies.java" |
| 452 | (("/usr/bin/perl") (which "perl")) |
| 453 | (("/bin/ps") (which "ps")) |
| 454 | (("/bin/true") (which "true"))) |
| 455 | (substitute* "java/lang/Runtime/exec/ConcurrentRead.java" |
| 456 | (("/usr/bin/tee") (which "tee"))) |
| 457 | (substitute* "java/lang/Runtime/exec/ExecWithDir.java" |
| 458 | (("/bin/true") (which "true"))) |
| 459 | (substitute* "java/lang/Runtime/exec/ExecWithInput.java" |
| 460 | (("/bin/cat") (which "cat"))) |
| 461 | (substitute* "java/lang/Runtime/exec/ExitValue.java" |
| 462 | (("/bin/sh") (which "sh")) |
| 463 | (("/bin/true") (which "true")) |
| 464 | (("/bin/kill") (which "kill"))) |
| 465 | (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java" |
| 466 | (("/usr/bin/echo") (which "echo"))) |
| 467 | (substitute* "java/lang/Runtime/exec/LotsOfOutput.java" |
| 468 | (("/usr/bin/cat") (which "cat"))) |
| 469 | (substitute* "java/lang/Runtime/exec/SleepyCat.java" |
| 470 | (("/bin/cat") (which "cat")) |
| 471 | (("/bin/sleep") (which "sleep")) |
| 472 | (("/bin/sh") (which "sh"))) |
| 473 | (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java" |
| 474 | (("/bin/cat") (which "cat"))) |
| 475 | (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java" |
| 476 | (("/bin/chmod") (which "chmod"))) |
| 477 | (substitute* "java/util/zip/ZipFile/Assortment.java" |
| 478 | (("/bin/sh") (which "sh")))))) |
| 479 | (replace 'check |
| 480 | (lambda* (#:key tests? #:allow-other-keys) |
| 481 | ;; The "make check-*" targets always return zero, so we need to |
| 482 | ;; check for errors in the associated log files to determine |
| 483 | ;; whether any tests have failed. |
| 484 | (when tests? |
| 485 | (use-modules (ice-9 rdelim)) |
| 486 | (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) |
| 487 | (checker (lambda (port) |
| 488 | (let loop () |
| 489 | (let ((line (read-line port))) |
| 490 | (cond |
| 491 | ((eof-object? line) #t) |
| 492 | ((regexp-exec error-pattern line) |
| 493 | (error "test failed")) |
| 494 | (else (loop))))))) |
| 495 | (run-test (lambda (test) |
| 496 | (invoke "make" test) |
| 497 | (call-with-input-file |
| 498 | (string-append "test/" test ".log") |
| 499 | checker)))) |
| 500 | (run-test "check-hotspot") |
| 501 | (run-test "check-langtools") |
| 502 | (run-test "check-jdk"))))) |
| 503 | (replace 'install |
| 504 | (lambda* (#:key outputs #:allow-other-keys) |
| 505 | (let ((doc (string-append (assoc-ref outputs "doc") |
| 506 | "/share/doc/icedtea")) |
| 507 | (jre (assoc-ref outputs "out")) |
| 508 | (jdk (assoc-ref outputs "jdk"))) |
| 509 | (copy-recursively "openjdk.build/docs" doc) |
| 510 | (copy-recursively "openjdk.build/j2re-image" jre) |
| 511 | (copy-recursively "openjdk.build/j2sdk-image" jdk)))) |
| 512 | ;; Some of the libraries in the lib/amd64 folder link to libjvm.so. |
| 513 | ;; But that shared object is located in the server/ folder, so it |
| 514 | ;; cannot be found. This phase creates a symbolic link in the |
| 515 | ;; lib/amd64 folder so that the other libraries can find it. |
| 516 | ;; |
| 517 | ;; See: |
| 518 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html |
| 519 | ;; |
| 520 | ;; FIXME: Find the bug in the build system, so that this symlink is |
| 521 | ;; not needed. |
| 522 | (add-after 'install 'install-libjvm |
| 523 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 524 | (let* ((lib-path (string-append (assoc-ref outputs "out") |
| 525 | ;; See 'INSTALL_ARCH_DIR' in |
| 526 | ;; 'configure'. |
| 527 | ,(match (%current-system) |
| 528 | ("i686-linux" |
| 529 | "/lib/i386") |
| 530 | ("x86_64-linux" |
| 531 | "/lib/amd64") |
| 532 | ("armhf-linux" |
| 533 | "/lib/arm") |
| 534 | ("aarch64-linux" |
| 535 | "/lib/aarch64") |
| 536 | ("powerpc-linux" |
| 537 | "/lib/ppc") |
| 538 | ;; We need a catch-all, dropping |
| 539 | ;; '-linux' works in most cases. |
| 540 | (_ |
| 541 | (string-append |
| 542 | "/lib/" |
| 543 | (string-drop-right |
| 544 | (%current-system) 6))))))) |
| 545 | (symlink (string-append lib-path "/server/libjvm.so") |
| 546 | (string-append lib-path "/libjvm.so"))))) |
| 547 | ;; By default IcedTea only generates an empty keystore. In order to |
| 548 | ;; be able to use certificates in Java programs we need to generate a |
| 549 | ;; keystore from a set of certificates. For convenience we use the |
| 550 | ;; certificates from the nss-certs package. |
| 551 | (add-after 'install 'install-keystore |
| 552 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 553 | (use-modules (ice-9 rdelim)) |
| 554 | (let* ((keystore "cacerts") |
| 555 | (certs-dir (search-input-directory inputs |
| 556 | "etc/ssl/certs")) |
| 557 | (keytool (string-append (assoc-ref outputs "jdk") |
| 558 | "/bin/keytool"))) |
| 559 | (define (extract-cert file target) |
| 560 | (call-with-input-file file |
| 561 | (lambda (in) |
| 562 | (call-with-output-file target |
| 563 | (lambda (out) |
| 564 | (let loop ((line (read-line in 'concat)) |
| 565 | (copying? #f)) |
| 566 | (cond |
| 567 | ((eof-object? line) #t) |
| 568 | ((string-prefix? "-----BEGIN" line) |
| 569 | (display line out) |
| 570 | (loop (read-line in 'concat) #t)) |
| 571 | ((string-prefix? "-----END" line) |
| 572 | (display line out) |
| 573 | #t) |
| 574 | (else |
| 575 | (when copying? (display line out)) |
| 576 | (loop (read-line in 'concat) copying?))))))))) |
| 577 | (define (import-cert cert) |
| 578 | (format #t "Importing certificate ~a\n" (basename cert)) |
| 579 | (let ((temp "tmpcert")) |
| 580 | (extract-cert cert temp) |
| 581 | (let ((port (open-pipe* OPEN_WRITE keytool |
| 582 | "-import" |
| 583 | "-alias" (basename cert) |
| 584 | "-keystore" keystore |
| 585 | "-storepass" "changeit" |
| 586 | "-file" temp))) |
| 587 | (display "yes\n" port) |
| 588 | (when (not (zero? (status:exit-val (close-pipe port)))) |
| 589 | (format #t "failed to import ~a\n" cert))) |
| 590 | (delete-file temp))) |
| 591 | |
| 592 | ;; This is necessary because the certificate directory contains |
| 593 | ;; files with non-ASCII characters in their names. |
| 594 | (setlocale LC_ALL "C.UTF-8") |
| 595 | (setenv "LC_ALL" "C.UTF-8") |
| 596 | |
| 597 | (for-each import-cert (find-files certs-dir "\\.pem$")) |
| 598 | (mkdir-p (string-append (assoc-ref outputs "out") |
| 599 | "/lib/security")) |
| 600 | (mkdir-p (string-append (assoc-ref outputs "jdk") |
| 601 | "/jre/lib/security")) |
| 602 | |
| 603 | ;; The cacerts files we are going to overwrite are chmod'ed as |
| 604 | ;; read-only (444) in icedtea-8 (which derives from this |
| 605 | ;; package). We have to change this so we can overwrite them. |
| 606 | (chmod (string-append (assoc-ref outputs "out") |
| 607 | "/lib/security/" keystore) #o644) |
| 608 | (chmod (string-append (assoc-ref outputs "jdk") |
| 609 | "/jre/lib/security/" keystore) #o644) |
| 610 | |
| 611 | (install-file keystore |
| 612 | (string-append (assoc-ref outputs "out") |
| 613 | "/lib/security")) |
| 614 | (install-file keystore |
| 615 | (string-append (assoc-ref outputs "jdk") |
| 616 | "/jre/lib/security")))))))) |
| 617 | (native-inputs |
| 618 | ;; XXX: Compiling with gcc-14 will encounter the following error: |
| 619 | ;; BUILD FAILED: |
| 620 | ;; /tmp/guix-build-icedtea-2.6.13.drv-0/icedtea-2.6.13/openjdk/langtools/ |
| 621 | ;; make/build.xml:452: The following error occurred while executing this |
| 622 | ;; line: |
| 623 | ;; java.lang.AbstractMethodError: java.lang.Throwable.toString()Ljava/lang/String; |
| 624 | `(("gcc" ,gcc-13) |
| 625 | ("openjdk-src" |
| 626 | ,(drop "openjdk" |
| 627 | "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l")) |
| 628 | ("corba-drop" |
| 629 | ,(drop "corba" |
| 630 | "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz")) |
| 631 | ("jaxp-drop" |
| 632 | ,(drop "jaxp" |
| 633 | "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl")) |
| 634 | ("jaxws-drop" |
| 635 | ,(drop "jaxws" |
| 636 | "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk")) |
| 637 | ("jdk-drop" |
| 638 | ,(drop "jdk" |
| 639 | "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd" |
| 640 | (search-patches "jdk-currency-time-bomb.patch"))) |
| 641 | ("langtools-drop" |
| 642 | ,(drop "langtools" |
| 643 | "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj")) |
| 644 | ("hotspot-drop" |
| 645 | ,(origin |
| 646 | (method url-fetch) |
| 647 | (uri (string-append |
| 648 | "http://icedtea.classpath.org/downloads/drops" |
| 649 | "/icedtea7/" version "/hotspot.tar.bz2")) |
| 650 | (sha256 |
| 651 | (base32 |
| 652 | "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws")) |
| 653 | (patches (search-patches |
| 654 | "icedtea-7-hotspot-aarch64-use-c++98.patch" |
| 655 | "icedtea-7-hotspot-pointer-comparison.patch")))) |
| 656 | ("ant" ,ant-bootstrap) |
| 657 | ("attr" ,attr) |
| 658 | ("classpath" ,classpath-devel) |
| 659 | ("coreutils" ,coreutils) |
| 660 | ("diffutils" ,diffutils) ;for tests |
| 661 | ("ecj4-javac-wrapper" ,ecj4-javac-wrapper) |
| 662 | ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar |
| 663 | ("gawk" ,gawk) |
| 664 | ("grep" ,grep) |
| 665 | ("jamvm" ,jamvm-with-ecj4) |
| 666 | ("libtool" ,libtool) |
| 667 | ("pkg-config" ,pkg-config) |
| 668 | ("wget" ,wget) |
| 669 | ("which" ,which) |
| 670 | ("cpio" ,cpio) |
| 671 | ("zip" ,zip) |
| 672 | ("unzip" ,unzip) |
| 673 | ("libxslt" ,libxslt) ;for xsltproc |
| 674 | ("nss-certs" ,nss-certs) |
| 675 | ("perl" ,perl) |
| 676 | ("procps" ,procps))) ;for "free", even though I'm not sure we should use it |
| 677 | (inputs |
| 678 | (list alsa-lib |
| 679 | cups |
| 680 | fontconfig |
| 681 | freetype |
| 682 | giflib |
| 683 | gtk+-2 |
| 684 | lcms |
| 685 | libjpeg-turbo |
| 686 | libpng |
| 687 | libx11 |
| 688 | libxcomposite |
| 689 | libxi |
| 690 | libxinerama |
| 691 | libxrender |
| 692 | libxt |
| 693 | libxtst |
| 694 | mit-krb5 |
| 695 | nss |
| 696 | pcsc-lite |
| 697 | zlib)) |
| 698 | (home-page "https://icedtea.classpath.org") |
| 699 | (synopsis "Java development kit") |
| 700 | (description |
| 701 | "This package provides the Java development kit OpenJDK built with the |
| 702 | IcedTea build harness.") |
| 703 | |
| 704 | ;; 'configure' lists "mips" and "mipsel", but not "mips64el'. |
| 705 | (supported-systems (delete "mips64el-linux" %supported-systems)) |
| 706 | |
| 707 | ;; IcedTea is released under the GPL2 + Classpath exception, which is the |
| 708 | ;; same license as both GNU Classpath and OpenJDK. |
| 709 | (license license:gpl2+)))) |
| 710 | |
| 711 | (define-public icedtea-8 |
| 712 | (let* ((version "3.19.0") |
| 713 | (drop (lambda* (name hash #:optional (patches '())) |
| 714 | (origin |
| 715 | (method url-fetch) |
| 716 | (uri (string-append |
| 717 | "http://icedtea.classpath.org/download/drops" |
| 718 | "/icedtea8/" version "/" name ".tar.xz")) |
| 719 | (sha256 (base32 hash)) |
| 720 | (patches patches))))) |
| 721 | (package (inherit icedtea-7) |
| 722 | (version "3.19.0") |
| 723 | (source (origin |
| 724 | (method url-fetch) |
| 725 | (uri (string-append |
| 726 | "http://icedtea.wildebeest.org/download/source/icedtea-" |
| 727 | version ".tar.xz")) |
| 728 | (sha256 |
| 729 | (base32 |
| 730 | "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf")) |
| 731 | (modules '((guix build utils))) |
| 732 | (snippet |
| 733 | '(substitute* '("configure" |
| 734 | "acinclude.m4") |
| 735 | ;; Do not embed build time |
| 736 | (("(DIST_ID=\"Custom build).*$" _ prefix) |
| 737 | (string-append prefix "\"\n")) |
| 738 | ;; Do not leak information about the build host |
| 739 | (("DIST_NAME=\"\\$build_os\"") |
| 740 | "DIST_NAME=\"guix\""))))) |
| 741 | (arguments |
| 742 | `(#:imported-modules |
| 743 | ((guix build ant-build-system) |
| 744 | ,@%default-gnu-imported-modules) |
| 745 | |
| 746 | #:disallowed-references ,(list (gexp-input |
| 747 | (this-package-native-input "jdk") |
| 748 | "jdk")) |
| 749 | |
| 750 | ,@(substitute-keyword-arguments (package-arguments icedtea-7) |
| 751 | ((#:modules modules) |
| 752 | `((guix build utils) |
| 753 | (guix build gnu-build-system) |
| 754 | ((guix build ant-build-system) #:prefix ant:) |
| 755 | (ice-9 match) |
| 756 | (ice-9 popen) |
| 757 | (srfi srfi-19) |
| 758 | (srfi srfi-26))) |
| 759 | ((#:configure-flags flags) |
| 760 | `(let ((jdk (assoc-ref %build-inputs "jdk"))) |
| 761 | `(,(string-append "CFLAGS=-fcommon" |
| 762 | " -Wno-error=implicit-function-declaration" |
| 763 | " -Wno-error=implicit-int" |
| 764 | " -Wno-error=incompatible-pointer-types" |
| 765 | " -Wno-error=int-conversion") |
| 766 | "CXXFLAGS=-fcommon" |
| 767 | "--enable-bootstrap" |
| 768 | "--enable-nss" |
| 769 | ,(string-append "--with-parallel-jobs=" |
| 770 | (number->string (parallel-job-count))) |
| 771 | ;; Java Flight Recorder isn't supported on some architectures. |
| 772 | ,@(if ,(target-ppc32?) |
| 773 | `("--enable-jfr=no") |
| 774 | '()) |
| 775 | "--disable-docs" ; This phase can take hours on slow machines. |
| 776 | "--disable-downloading" |
| 777 | "--disable-system-pcsc" |
| 778 | "--disable-system-sctp" |
| 779 | "--disable-tests" ;they are run in the check phase instead |
| 780 | "--with-openjdk-src-dir=./openjdk.src" |
| 781 | ,(string-append "--with-jdk-home=" jdk)))) |
| 782 | ((#:phases phases) |
| 783 | `(modify-phases ,phases |
| 784 | (delete 'fix-x11-extension-include-path) |
| 785 | (delete 'patch-paths) |
| 786 | (delete 'set-additional-paths) |
| 787 | (delete 'patch-patches) |
| 788 | (delete 'patch-bitrot) |
| 789 | (delete 'use-classpath) |
| 790 | ;; Prevent passing -j (parallel-job-count) to make |
| 791 | (replace 'build |
| 792 | (lambda* (#:key (make-flags '()) #:allow-other-keys) |
| 793 | (apply invoke "make" make-flags))) |
| 794 | ;; Prevent the keytool from recording the current time when |
| 795 | ;; adding certificates at build time. |
| 796 | (add-after 'unpack 'patch-keystore |
| 797 | (lambda _ |
| 798 | (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java" |
| 799 | (("date = new Date\\(\\);") |
| 800 | "\ |
| 801 | date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\ |
| 802 | new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\ |
| 803 | new Date();")) |
| 804 | #t)) |
| 805 | (add-after 'unpack 'patch-jni-libs |
| 806 | ;; Hardcode dynamically loaded libraries. |
| 807 | (lambda _ |
| 808 | (define remove |
| 809 | (@ (srfi srfi-1) remove)) |
| 810 | |
| 811 | (define (icedtea-or-openjdk? path) |
| 812 | (or (string-contains path "openjdk") |
| 813 | (string-contains path "icedtea"))) |
| 814 | |
| 815 | (let* ((library-path (remove icedtea-or-openjdk? |
| 816 | (search-path-as-string->list |
| 817 | (getenv "LIBRARY_PATH")))) |
| 818 | (find-library (lambda (name) |
| 819 | (or (search-path |
| 820 | library-path |
| 821 | (string-append "lib" name ".so")) |
| 822 | (string-append "lib" name ".so"))))) |
| 823 | (for-each |
| 824 | (lambda (file) |
| 825 | (catch 'decoding-error |
| 826 | (lambda () |
| 827 | (substitute* file |
| 828 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" |
| 829 | _ name version) |
| 830 | (string-append "\"" (find-library name) "\"")) |
| 831 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) |
| 832 | (string-append "\"" (find-library name) "\"")))) |
| 833 | (lambda _ |
| 834 | ;; Those are safe to skip. |
| 835 | (format (current-error-port) |
| 836 | "warning: failed to substitute: ~a~%" |
| 837 | file)))) |
| 838 | (find-files "openjdk.src/jdk/src/solaris/native" |
| 839 | "\\.c|\\.h"))))) |
| 840 | (replace 'fix-openjdk |
| 841 | (lambda _ |
| 842 | (substitute* |
| 843 | '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c" |
| 844 | "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c") |
| 845 | (("#include <sys/sysctl.h>") |
| 846 | "#include <linux/sysctl.h>")))) |
| 847 | (replace 'install |
| 848 | (lambda* (#:key outputs #:allow-other-keys) |
| 849 | (let ((doc (string-append (assoc-ref outputs "doc") |
| 850 | "/share/doc/icedtea")) |
| 851 | (jre (assoc-ref outputs "out")) |
| 852 | (jdk (assoc-ref outputs "jdk"))) |
| 853 | (copy-recursively "openjdk.build/docs" doc) |
| 854 | (copy-recursively "openjdk.build/images/j2re-image" jre) |
| 855 | (copy-recursively "openjdk.build/images/j2sdk-image" jdk) |
| 856 | ;; Install the nss.cfg file to JRE to enable SSL/TLS |
| 857 | ;; support via NSS. |
| 858 | (copy-file (string-append jdk "/jre/lib/security/nss.cfg") |
| 859 | (string-append jre "/lib/security/nss.cfg"))))) |
| 860 | (add-after 'install 'strip-jar-timestamps |
| 861 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))) |
| 862 | (native-inputs |
| 863 | `(("jdk" ,icedtea-7 "jdk") |
| 864 | ("openjdk-src" |
| 865 | ,(drop "openjdk" |
| 866 | "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69")) |
| 867 | ("aarch32-drop" |
| 868 | ,(drop "aarch32" |
| 869 | "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq")) |
| 870 | ("corba-drop" |
| 871 | ,(drop "corba" |
| 872 | "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r")) |
| 873 | ("jaxp-drop" |
| 874 | ,(drop "jaxp" |
| 875 | "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr")) |
| 876 | ("jaxws-drop" |
| 877 | ,(drop "jaxws" |
| 878 | "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r")) |
| 879 | ("jdk-drop" |
| 880 | ,(drop "jdk" |
| 881 | "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv" |
| 882 | (search-patches "jdk-currency-time-bomb2.patch"))) |
| 883 | ("langtools-drop" |
| 884 | ,(drop "langtools" |
| 885 | "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b")) |
| 886 | ("hotspot-drop" |
| 887 | ,(drop "hotspot" |
| 888 | "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2")) |
| 889 | ("nashorn-drop" |
| 890 | ,(drop "nashorn" |
| 891 | "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94")) |
| 892 | ("shenandoah-drop" |
| 893 | ,(drop "shenandoah" |
| 894 | "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq")) |
| 895 | ,@(fold alist-delete (package-native-inputs icedtea-7) |
| 896 | '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop" |
| 897 | "jdk-drop" "langtools-drop" "hotspot-drop" |
| 898 | "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar"))))))) |
| 899 | |
| 900 | (define-public icedtea icedtea-8) |
| 901 | |
| 902 | (define-public openjdk9 |
| 903 | (package |
| 904 | (name "openjdk") |
| 905 | (version "9.181") |
| 906 | (source (origin |
| 907 | (method hg-fetch) |
| 908 | (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk") |
| 909 | (changeset "jdk-9+181"))) |
| 910 | (file-name (hg-file-name name version)) |
| 911 | (modules '((guix build utils))) |
| 912 | (snippet '(for-each delete-file |
| 913 | (find-files "." ".*.(bin|exe|jar)$"))) |
| 914 | (sha256 |
| 915 | (base32 |
| 916 | "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0")) |
| 917 | (patches |
| 918 | (search-patches "openjdk-9-pointer-comparison.patch" |
| 919 | "openjdk-9-classlist-reproducibility.patch" |
| 920 | "openjdk-currency-time-bomb.patch" |
| 921 | "openjdk-9-jar-reproducibility.patch" |
| 922 | "openjdk-9-module-reproducibility.patch" |
| 923 | "openjdk-9-module2-reproducibility.patch" |
| 924 | "openjdk-9-module3-reproducibility.patch" |
| 925 | "openjdk-9-idlj-reproducibility.patch" |
| 926 | "openjdk-9-setsignalhandler.patch")))) |
| 927 | (build-system gnu-build-system) |
| 928 | (outputs '("out" "jdk" "doc")) |
| 929 | (arguments |
| 930 | `(#:imported-modules |
| 931 | ((guix build ant-build-system) |
| 932 | ,@%default-gnu-imported-modules) |
| 933 | #:modules |
| 934 | ((guix build utils) |
| 935 | (guix build gnu-build-system) |
| 936 | (ice-9 popen)) |
| 937 | #:tests? #f ; require jtreg |
| 938 | #:make-flags '("all") |
| 939 | #:disallowed-references |
| 940 | ,(list (this-package-native-input "icedtea") |
| 941 | (gexp-input (this-package-native-input "icedtea") "jdk")) |
| 942 | |
| 943 | #:phases |
| 944 | (modify-phases %standard-phases |
| 945 | ,@(if (target-aarch64?) |
| 946 | `((add-after 'unpack 'patch-for-aarch64 |
| 947 | (lambda _ |
| 948 | (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp" |
| 949 | ;; This line is duplicated, so remove both occurrences, |
| 950 | ;; then add back one occurrence by substituting a |
| 951 | ;; comment that occurs once. |
| 952 | (("using MacroAssembler::call_VM_leaf_base;") "") |
| 953 | (("Interpreter specific version of call_VM_base") |
| 954 | "Interpreter specific version of call_VM_base |
| 955 | using MacroAssembler::call_VM_leaf_base;"))))) |
| 956 | '()) |
| 957 | (add-after 'patch-source-shebangs 'fix-java-shebangs |
| 958 | (lambda _ |
| 959 | ;; This file was "fixed" by patch-source-shebangs, but it requires |
| 960 | ;; this exact first line. |
| 961 | (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem" |
| 962 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")))) |
| 963 | (replace 'configure |
| 964 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 965 | ;; TODO: unbundle libpng and lcms |
| 966 | (invoke "bash" "./configure" |
| 967 | ;; Add flags for compilation with gcc >= 10 |
| 968 | ,(string-append "--with-extra-cflags=-fcommon" |
| 969 | " -fno-delete-null-pointer-checks" |
| 970 | " -fno-lifetime-dse" |
| 971 | ;; flags for compilation with gcc >= 14. |
| 972 | " -Wno-error=int-conversion") |
| 973 | (string-append "--with-freetype=" |
| 974 | (assoc-ref inputs "freetype")) |
| 975 | "--disable-freetype-bundling" |
| 976 | "--disable-warnings-as-errors" |
| 977 | "--disable-hotspot-gtest" |
| 978 | "--with-giflib=system" |
| 979 | "--with-libjpeg=system" |
| 980 | (string-append "--prefix=" (assoc-ref outputs "out"))))) |
| 981 | (add-before 'build 'write-source-revision-file |
| 982 | (lambda _ |
| 983 | (with-output-to-file ".src-rev" |
| 984 | (lambda _ |
| 985 | (display ,version))))) |
| 986 | (replace 'build |
| 987 | (lambda* (#:key make-flags parallel-build? #:allow-other-keys) |
| 988 | (apply invoke "make" |
| 989 | `(,@(if parallel-build? |
| 990 | (list (string-append "JOBS=" |
| 991 | (number->string (parallel-job-count)))) |
| 992 | '("JOBS=1")) |
| 993 | ,@make-flags)))) |
| 994 | (add-after 'unpack 'patch-jni-libs |
| 995 | ;; Hardcode dynamically loaded libraries. |
| 996 | (lambda _ |
| 997 | (define remove |
| 998 | (@ (srfi srfi-1) remove)) |
| 999 | |
| 1000 | (define (icedtea-or-openjdk? path) |
| 1001 | (or (string-contains path "openjdk") |
| 1002 | (string-contains path "icedtea"))) |
| 1003 | |
| 1004 | (let* ((library-path (remove icedtea-or-openjdk? |
| 1005 | (search-path-as-string->list |
| 1006 | (getenv "LIBRARY_PATH")))) |
| 1007 | (find-library (lambda (name) |
| 1008 | (or (search-path |
| 1009 | library-path |
| 1010 | (string-append "lib" name ".so")) |
| 1011 | (string-append "lib" name ".so"))))) |
| 1012 | (for-each |
| 1013 | (lambda (file) |
| 1014 | (catch 'decoding-error |
| 1015 | (lambda () |
| 1016 | (substitute* file |
| 1017 | (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" |
| 1018 | _ name version) |
| 1019 | (string-append "\"" (find-library name) "\"")) |
| 1020 | (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) |
| 1021 | (string-append "\"" (find-library name) "\"")))) |
| 1022 | (lambda _ |
| 1023 | ;; Those are safe to skip. |
| 1024 | (format (current-error-port) |
| 1025 | "warning: failed to substitute: ~a~%" |
| 1026 | file)))) |
| 1027 | (find-files "." |
| 1028 | "\\.c$|\\.h$"))))) |
| 1029 | ;; By default OpenJDK only generates an empty keystore. In order to |
| 1030 | ;; be able to use certificates in Java programs we need to generate a |
| 1031 | ;; keystore from a set of certificates. For convenience we use the |
| 1032 | ;; certificates from the nss-certs package. |
| 1033 | (add-after 'install 'install-keystore |
| 1034 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1035 | (use-modules (ice-9 rdelim)) |
| 1036 | (let* ((keystore "cacerts") |
| 1037 | (certs-dir (search-input-directory inputs |
| 1038 | "etc/ssl/certs")) |
| 1039 | (keytool (string-append (assoc-ref outputs "jdk") |
| 1040 | "/bin/keytool"))) |
| 1041 | (define (extract-cert file target) |
| 1042 | (call-with-input-file file |
| 1043 | (lambda (in) |
| 1044 | (call-with-output-file target |
| 1045 | (lambda (out) |
| 1046 | (let loop ((line (read-line in 'concat)) |
| 1047 | (copying? #f)) |
| 1048 | (cond |
| 1049 | ((eof-object? line) #t) |
| 1050 | ((string-prefix? "-----BEGIN" line) |
| 1051 | (display line out) |
| 1052 | (loop (read-line in 'concat) #t)) |
| 1053 | ((string-prefix? "-----END" line) |
| 1054 | (display line out) |
| 1055 | #t) |
| 1056 | (else |
| 1057 | (when copying? (display line out)) |
| 1058 | (loop (read-line in 'concat) copying?))))))))) |
| 1059 | (define (import-cert cert) |
| 1060 | (format #t "Importing certificate ~a\n" (basename cert)) |
| 1061 | (let ((temp "tmpcert")) |
| 1062 | (extract-cert cert temp) |
| 1063 | (let ((port (open-pipe* OPEN_WRITE keytool |
| 1064 | "-import" |
| 1065 | "-alias" (basename cert) |
| 1066 | "-keystore" keystore |
| 1067 | "-storepass" "changeit" |
| 1068 | "-file" temp))) |
| 1069 | (display "yes\n" port) |
| 1070 | (when (not (zero? (status:exit-val (close-pipe port)))) |
| 1071 | (format #t "failed to import ~a\n" cert))) |
| 1072 | (delete-file temp))) |
| 1073 | |
| 1074 | ;; This is necessary because the certificate directory contains |
| 1075 | ;; files with non-ASCII characters in their names. |
| 1076 | (setlocale LC_ALL "C.UTF-8") |
| 1077 | (setenv "LC_ALL" "C.UTF-8") |
| 1078 | |
| 1079 | (copy-file (string-append (assoc-ref outputs "out") |
| 1080 | "/lib/security/cacerts") |
| 1081 | keystore) |
| 1082 | (chmod keystore #o644) |
| 1083 | (for-each import-cert (find-files certs-dir "\\.pem$")) |
| 1084 | (mkdir-p (string-append (assoc-ref outputs "out") |
| 1085 | "/lib/security")) |
| 1086 | (mkdir-p (string-append (assoc-ref outputs "jdk") |
| 1087 | "/lib/security")) |
| 1088 | |
| 1089 | ;; The cacerts files we are going to overwrite are chmod'ed as |
| 1090 | ;; read-only (444) in icedtea-8 (which derives from this |
| 1091 | ;; package). We have to change this so we can overwrite them. |
| 1092 | (chmod (string-append (assoc-ref outputs "out") |
| 1093 | "/lib/security/" keystore) #o644) |
| 1094 | (chmod (string-append (assoc-ref outputs "jdk") |
| 1095 | "/lib/security/" keystore) #o644) |
| 1096 | |
| 1097 | (install-file keystore |
| 1098 | (string-append (assoc-ref outputs "out") |
| 1099 | "/lib/security")) |
| 1100 | (install-file keystore |
| 1101 | (string-append (assoc-ref outputs "jdk") |
| 1102 | "/lib/security"))))) |
| 1103 | ;; Some of the libraries in the lib/ folder link to libjvm.so. |
| 1104 | ;; But that shared object is located in the server/ folder, so it |
| 1105 | ;; cannot be found. This phase creates a symbolic link in the |
| 1106 | ;; lib/ folder so that the other libraries can find it. |
| 1107 | ;; |
| 1108 | ;; See: |
| 1109 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html |
| 1110 | ;; |
| 1111 | ;; FIXME: Find the bug in the build system, so that this symlink is |
| 1112 | ;; not needed. |
| 1113 | (add-after 'install 'install-libjvm |
| 1114 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1115 | (let* ((lib-out (string-append (assoc-ref outputs "out") |
| 1116 | "/lib")) |
| 1117 | (lib-jdk (string-append (assoc-ref outputs "jdk") |
| 1118 | "/lib"))) |
| 1119 | (symlink (string-append lib-jdk "/server/libjvm.so") |
| 1120 | (string-append lib-jdk "/libjvm.so")) |
| 1121 | (symlink (string-append lib-out "/server/libjvm.so") |
| 1122 | (string-append lib-out "/libjvm.so"))))) |
| 1123 | (replace 'install |
| 1124 | (lambda* (#:key outputs #:allow-other-keys) |
| 1125 | (let ((out (assoc-ref outputs "out")) |
| 1126 | (jdk (assoc-ref outputs "jdk")) |
| 1127 | (doc (assoc-ref outputs "doc")) |
| 1128 | (images (car (find-files "build" ".*-server-release" |
| 1129 | #:directories? #t)))) |
| 1130 | (copy-recursively (string-append images "/images/jdk") jdk) |
| 1131 | (copy-recursively (string-append images "/images/jre") out) |
| 1132 | (copy-recursively (string-append images "/images/docs") doc)))) |
| 1133 | (add-after 'install 'strip-zip-timestamps |
| 1134 | (lambda* (#:key outputs #:allow-other-keys) |
| 1135 | (for-each |
| 1136 | (lambda (zip) |
| 1137 | (let ((dir (mkdtemp "zip-contents.XXXXXX"))) |
| 1138 | (with-directory-excursion dir |
| 1139 | ;; This is an exact copy of the implementation of invoke, |
| 1140 | ;; but this accepts exit code 1 as OK. |
| 1141 | (let ((code (system* "unzip" "--" zip))) |
| 1142 | ;; jmod files are zip files with an extra header in |
| 1143 | ;; front. unzip will warn about that -- but otherwise |
| 1144 | ;; work. |
| 1145 | (when (> (status:exit-val code) 1) ; 1 is just a warning |
| 1146 | (raise |
| 1147 | (condition |
| 1148 | (&invoke-error |
| 1149 | (program "unzip") |
| 1150 | (arguments (list "--" zip)) |
| 1151 | (exit-status (status:exit-val code)) |
| 1152 | (term-signal (status:term-sig code)) |
| 1153 | (stop-signal (status:stop-sig code)))))))) |
| 1154 | (delete-file zip) |
| 1155 | (for-each (lambda (file) |
| 1156 | (let ((s (lstat file))) |
| 1157 | (format #t "reset ~a~%" file) |
| 1158 | (utime file 1 1 0 0 |
| 1159 | AT_SYMLINK_NOFOLLOW))) |
| 1160 | (find-files dir #:directories? #t)) |
| 1161 | (with-directory-excursion dir |
| 1162 | (let ((files (cons "./META-INF/MANIFEST.MF" |
| 1163 | (append |
| 1164 | (find-files "./META-INF" ".*") |
| 1165 | ;; for jmod: |
| 1166 | (list "./classes/module-info.class") |
| 1167 | (find-files "." ".*"))))) |
| 1168 | (apply invoke "zip" "--symlinks" "-0" "-X" zip files) |
| 1169 | (when (string-suffix? ".jmod" zip) |
| 1170 | (let ((new-zip (string-append zip "n")) |
| 1171 | (contents (call-with-input-file zip |
| 1172 | (@ (ice-9 binary-ports) |
| 1173 | get-bytevector-all)))) |
| 1174 | (call-with-output-file new-zip |
| 1175 | (lambda (output-port) |
| 1176 | ((@ (ice-9 binary-ports) put-bytevector) |
| 1177 | output-port |
| 1178 | #vu8(#x4a #x4d #x01 #x00)) ; JM |
| 1179 | ((@ (ice-9 binary-ports) put-bytevector) |
| 1180 | output-port |
| 1181 | contents))) |
| 1182 | (rename-file new-zip zip))))))) |
| 1183 | (append (find-files (string-append |
| 1184 | (assoc-ref outputs "doc") |
| 1185 | "/api") |
| 1186 | "\\.zip$") |
| 1187 | (find-files (assoc-ref outputs "doc") "src\\.zip$") |
| 1188 | (find-files (assoc-ref outputs "jdk") "src\\.zip$") |
| 1189 | (find-files (assoc-ref outputs "jdk") "\\.jmod$") |
| 1190 | (find-files (assoc-ref outputs "jdk") "\\.diz$") |
| 1191 | (find-files (assoc-ref outputs "out") "\\.diz$") |
| 1192 | |
| 1193 | (list (string-append (assoc-ref outputs "jdk") |
| 1194 | "/lib/jrt-fs.jar")) |
| 1195 | (find-files (string-append (assoc-ref outputs "jdk") |
| 1196 | "/demo") |
| 1197 | "\\.jar$")))))))) |
| 1198 | (inputs |
| 1199 | (list alsa-lib |
| 1200 | cups |
| 1201 | fontconfig |
| 1202 | freetype |
| 1203 | giflib |
| 1204 | lcms |
| 1205 | elfutils |
| 1206 | libjpeg-turbo |
| 1207 | libice |
| 1208 | libpng |
| 1209 | libx11 |
| 1210 | libxcomposite |
| 1211 | libxi |
| 1212 | libxinerama |
| 1213 | libxrender |
| 1214 | libxt |
| 1215 | libxtst)) |
| 1216 | (native-inputs |
| 1217 | (list icedtea-8 |
| 1218 | `(,icedtea-8 "jdk") |
| 1219 | ;; XXX: The build system fails with newer versions of GNU Make. |
| 1220 | gnu-make-4.2 |
| 1221 | nss-certs |
| 1222 | unzip |
| 1223 | which |
| 1224 | zip)) |
| 1225 | (home-page "https://openjdk.org/projects/jdk9/") |
| 1226 | (synopsis "Java development kit") |
| 1227 | (description |
| 1228 | "This package provides the Java development kit OpenJDK.") |
| 1229 | (license license:gpl2+))) |
| 1230 | |
| 1231 | (define-public openjdk10 |
| 1232 | (package |
| 1233 | (inherit openjdk9) |
| 1234 | (name "openjdk") |
| 1235 | (version "10.46") |
| 1236 | (source (origin |
| 1237 | (method hg-fetch) |
| 1238 | (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk") |
| 1239 | (changeset "jdk-10+46"))) |
| 1240 | (file-name (hg-file-name name version)) |
| 1241 | (modules '((guix build utils))) |
| 1242 | (snippet `(begin |
| 1243 | (for-each delete-file |
| 1244 | (find-files "." ".*.(bin|exe|jar)$")))) |
| 1245 | (sha256 |
| 1246 | (base32 |
| 1247 | "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y")) |
| 1248 | (patches (search-patches |
| 1249 | "openjdk-10-char-reproducibility.patch" |
| 1250 | "openjdk-10-classlist-reproducibility.patch" |
| 1251 | "openjdk-10-corba-reproducibility.patch" |
| 1252 | "openjdk-10-idlj-reproducibility.patch" |
| 1253 | "openjdk-10-module-reproducibility.patch" |
| 1254 | "openjdk-10-module3-reproducibility.patch" |
| 1255 | "openjdk-10-module4-reproducibility.patch" |
| 1256 | "openjdk-10-jar-reproducibility.patch" |
| 1257 | "openjdk-10-jtask-reproducibility.patch" |
| 1258 | "openjdk-10-pointer-comparison.patch" |
| 1259 | "openjdk-10-setsignalhandler.patch" |
| 1260 | "openjdk-currency-time-bomb2.patch")))) |
| 1261 | (arguments |
| 1262 | (substitute-keyword-arguments (package-arguments openjdk9) |
| 1263 | ((#:phases phases) |
| 1264 | `(modify-phases ,phases |
| 1265 | ,@(if (target-aarch64?) |
| 1266 | `((replace 'patch-for-aarch64 |
| 1267 | (lambda _ |
| 1268 | (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp" |
| 1269 | ;; This line is duplicated, so remove both occurrences, |
| 1270 | ;; then add back one occurrence by substituting a |
| 1271 | ;; comment that occurs once. |
| 1272 | (("using MacroAssembler::call_VM_leaf_base;") "") |
| 1273 | (("Interpreter specific version of call_VM_base") |
| 1274 | (string-append "Interpreter specific version of call_VM_base\n" |
| 1275 | " using MacroAssembler::call_VM_leaf_base;")))))) |
| 1276 | '()) |
| 1277 | (replace 'fix-java-shebangs |
| 1278 | (lambda _ |
| 1279 | ;; This file was "fixed" by patch-source-shebangs, but it requires |
| 1280 | ;; this exact first line. |
| 1281 | (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem" |
| 1282 | (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n")))) |
| 1283 | (add-after 'unpack 'remove-timestamping |
| 1284 | (lambda _ |
| 1285 | (substitute* "./src/hotspot/share/runtime/vm_version.cpp" |
| 1286 | (("__DATE__") "") |
| 1287 | (("__TIME__") "")))) |
| 1288 | (replace 'configure |
| 1289 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1290 | (invoke "bash" "./configure" |
| 1291 | ;; Add flags for compilation with gcc >= 10 |
| 1292 | ,(string-append "--with-extra-cflags=-fcommon" |
| 1293 | " -fno-delete-null-pointer-checks" |
| 1294 | " -fno-lifetime-dse" |
| 1295 | ;; flags for compilation with gcc >= 14. |
| 1296 | " -Wno-error=int-conversion") |
| 1297 | (string-append "--with-freetype=" |
| 1298 | (assoc-ref inputs "freetype")) |
| 1299 | "--disable-freetype-bundling" |
| 1300 | "--disable-warnings-as-errors" |
| 1301 | "--disable-hotspot-gtest" |
| 1302 | "--with-giflib=system" |
| 1303 | "--with-libjpeg=system" |
| 1304 | "--with-native-debug-symbols=zipped" |
| 1305 | (string-append "--prefix=" (assoc-ref outputs "out"))))) |
| 1306 | (add-after 'unpack 'disable-warnings-as-errors |
| 1307 | (lambda _ |
| 1308 | ;; It looks like the "--disable-warnings-as-errors" option of |
| 1309 | ;; the 'configure' phase is not working. |
| 1310 | (substitute* "make/autoconf/generated-configure.sh" |
| 1311 | (("-Werror") "")))))) |
| 1312 | ((#:disallowed-references _ '()) |
| 1313 | `(,(this-package-native-input "openjdk9") |
| 1314 | ,(gexp-input (this-package-native-input "openjdk9") "jdk"))))) |
| 1315 | (native-inputs |
| 1316 | `(("openjdk9" ,openjdk9) |
| 1317 | ("openjdk9:jdk" ,openjdk9 "jdk") |
| 1318 | ("[email protected]" ,gnu-make-4.2) |
| 1319 | ("nss-certs" ,nss-certs) |
| 1320 | ("unzip" ,unzip) |
| 1321 | ("which" ,which) |
| 1322 | ("zip" ,zip))))) |
| 1323 | |
| 1324 | (define-public openjdk11 |
| 1325 | (package |
| 1326 | (name "openjdk") |
| 1327 | (version "11.0.22") |
| 1328 | (source (origin |
| 1329 | (method url-fetch) |
| 1330 | (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-" |
| 1331 | version "-ga.tar.xz")) |
| 1332 | (file-name (string-append name "-" version ".tar.xz")) |
| 1333 | (sha256 |
| 1334 | (base32 |
| 1335 | "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473")) |
| 1336 | (modules '((guix build utils))) |
| 1337 | (snippet |
| 1338 | '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))) |
| 1339 | (patches |
| 1340 | (search-patches "openjdk-10-module3-reproducibility.patch" |
| 1341 | "openjdk-10-module4-reproducibility.patch" |
| 1342 | "openjdk-10-char-reproducibility.patch" |
| 1343 | "openjdk-11-classlist-reproducibility.patch" |
| 1344 | "openjdk-10-jar-reproducibility.patch" |
| 1345 | "openjdk-10-jtask-reproducibility.patch" |
| 1346 | "openjdk-currency-time-bomb2.patch")))) |
| 1347 | (build-system gnu-build-system) |
| 1348 | (outputs '("out" "jdk" "doc")) |
| 1349 | (arguments |
| 1350 | (list |
| 1351 | ;; Prevent a java.util.ConcurrentModificationException. |
| 1352 | #:parallel-build? #f |
| 1353 | #:modules `((guix build gnu-build-system) |
| 1354 | (guix build utils) |
| 1355 | (ice-9 match) |
| 1356 | (ice-9 popen) |
| 1357 | (srfi srfi-1) |
| 1358 | (srfi srfi-26)) |
| 1359 | |
| 1360 | #:disallowed-references |
| 1361 | (list (this-package-native-input "openjdk") |
| 1362 | (gexp-input (this-package-native-input "openjdk") |
| 1363 | "jdk")) |
| 1364 | |
| 1365 | #:tests? #f ; requires jtreg |
| 1366 | ;; TODO package jtreg |
| 1367 | #:configure-flags |
| 1368 | #~(list |
| 1369 | ;; Add flags for compilation with gcc >= 10. |
| 1370 | #$(string-append "--with-extra-cflags=-fcommon" |
| 1371 | " -fno-delete-null-pointer-checks" |
| 1372 | " -fno-lifetime-dse" |
| 1373 | ;; flags for compilation with gcc >= 14. |
| 1374 | " -Wno-error=int-conversion") |
| 1375 | ;; Otherwise, the '--enable-fast-install' causes an error. |
| 1376 | "--disable-option-checking" |
| 1377 | "--disable-warnings-as-errors" |
| 1378 | ;; Make validate-runpath pass (see: |
| 1379 | ;; http://issues.guix.info/issue/32894). |
| 1380 | "--with-native-debug-symbols=zipped" |
| 1381 | ;; Do not use the bundled libraries. |
| 1382 | "--with-giflib=system" |
| 1383 | "--with-lcms=system" |
| 1384 | "--with-libjpeg=system" |
| 1385 | "--with-libpng=system" |
| 1386 | "--with-version-pre=" |
| 1387 | ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being |
| 1388 | ;; set; do it manually. |
| 1389 | "--with-hotspot-build-time=1970-01-01T00:00:01" |
| 1390 | "--enable-reproducible-build" ; to be sure |
| 1391 | ;; Allow the build system to locate the system freetype. |
| 1392 | (string-append "--with-freetype-include=" |
| 1393 | #$(this-package-input "freetype") "/include") |
| 1394 | (string-append "--with-freetype-lib=" |
| 1395 | #$(this-package-input "freetype") "/lib")) |
| 1396 | #:phases |
| 1397 | #~(modify-phases %standard-phases |
| 1398 | (add-after 'patch-source-shebangs 'fix-java-shebangs |
| 1399 | (lambda _ |
| 1400 | ;; This file was "fixed" by patch-source-shebangs, but it requires |
| 1401 | ;; this exact first line. |
| 1402 | (substitute* "make/data/blockedcertsconverter/blocked.certs.pem" |
| 1403 | (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))) |
| 1404 | (add-after 'unpack 'remove-timestamping |
| 1405 | (lambda _ |
| 1406 | (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp" |
| 1407 | (("__DATE__") "") |
| 1408 | (("__TIME__") "")))) |
| 1409 | (add-after 'unpack 'patch-jni-libs |
| 1410 | ;; Hardcode dynamically loaded libraries. |
| 1411 | (lambda _ |
| 1412 | (define remove |
| 1413 | (@ (srfi srfi-1) remove)) |
| 1414 | |
| 1415 | (define (icedtea-or-openjdk? path) |
| 1416 | (or (string-contains path "openjdk") |
| 1417 | (string-contains path "icedtea"))) |
| 1418 | |
| 1419 | (let* ((library-path (remove icedtea-or-openjdk? |
| 1420 | (search-path-as-string->list |
| 1421 | (getenv "LIBRARY_PATH")))) |
| 1422 | (find-library (lambda (name) |
| 1423 | (or (search-path |
| 1424 | library-path |
| 1425 | (string-append "lib" name ".so")) |
| 1426 | (string-append "lib" name ".so"))))) |
| 1427 | (for-each |
| 1428 | (lambda (file) |
| 1429 | (catch 'decoding-error |
| 1430 | (lambda () |
| 1431 | (substitute* file |
| 1432 | (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)" |
| 1433 | _ name version) |
| 1434 | (string-append "\"" (find-library name) "\"")) |
| 1435 | (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name) |
| 1436 | (string-append "\"" (find-library name) "\"")))) |
| 1437 | (lambda _ |
| 1438 | ;; Those are safe to skip. |
| 1439 | (format (current-error-port) |
| 1440 | "warning: failed to substitute: ~a~%" |
| 1441 | file)))) |
| 1442 | (find-files "." "\\.c$|\\.h$"))))) |
| 1443 | (add-before 'build 'write-source-revision-file |
| 1444 | (lambda _ |
| 1445 | (with-output-to-file ".src-rev" |
| 1446 | (lambda _ |
| 1447 | (display #$version))))) |
| 1448 | (replace 'build |
| 1449 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
| 1450 | (apply invoke "make" "all" |
| 1451 | `(,@(if parallel-build? |
| 1452 | (list (string-append "JOBS=" |
| 1453 | (number->string (parallel-job-count)))) |
| 1454 | '("JOBS=1")) |
| 1455 | ,@make-flags)))) |
| 1456 | ;; jdk 11 does not build jre by default any more; so explicitly build |
| 1457 | ;; it (see: |
| 1458 | ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356). |
| 1459 | (add-after 'build 'build-jre |
| 1460 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
| 1461 | (apply invoke "make" "legacy-jre-image" |
| 1462 | `(,@(if parallel-build? |
| 1463 | (list (string-append "JOBS=" |
| 1464 | (number->string (parallel-job-count)))) |
| 1465 | '("JOBS=1")) |
| 1466 | ,@make-flags)))) |
| 1467 | (replace 'install |
| 1468 | (lambda _ |
| 1469 | (let ((images (car (find-files "build" "-server-release" |
| 1470 | #:directories? #t)))) |
| 1471 | (copy-recursively (string-append images "/images/jdk") |
| 1472 | #$output:jdk) |
| 1473 | (copy-recursively (string-append images "/images/jre") |
| 1474 | #$output) |
| 1475 | (copy-recursively (string-append images "/images/docs") |
| 1476 | #$output:doc)))) |
| 1477 | ;; Some of the libraries in the lib/ folder link to libjvm.so. |
| 1478 | ;; But that shared object is located in the server/ folder, so it |
| 1479 | ;; cannot be found. This phase creates a symbolic link in the |
| 1480 | ;; lib/ folder so that the other libraries can find it. |
| 1481 | ;; |
| 1482 | ;; See: |
| 1483 | ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html |
| 1484 | ;; |
| 1485 | ;; FIXME: Find the bug in the build system, so that this symlink is |
| 1486 | ;; not needed. |
| 1487 | (add-after 'install 'install-libjvm |
| 1488 | (lambda _ |
| 1489 | (let ((lib-out (string-append #$output "/lib")) |
| 1490 | (lib-jdk (string-append #$output:jdk "/lib"))) |
| 1491 | (symlink (string-append lib-jdk "/server/libjvm.so") |
| 1492 | (string-append lib-jdk "/libjvm.so")) |
| 1493 | (symlink (string-append lib-out "/server/libjvm.so") |
| 1494 | (string-append lib-out "/libjvm.so"))))) |
| 1495 | (add-after 'install 'strip-character-data-timestamps |
| 1496 | (lambda _ |
| 1497 | (let ((archive (string-append #$output:jdk "/lib/src.zip")) |
| 1498 | (dir (mkdtemp "zip-contents.XXXXXX"))) |
| 1499 | (with-directory-excursion dir |
| 1500 | (invoke "unzip" archive)) |
| 1501 | (delete-file archive) |
| 1502 | (with-directory-excursion dir |
| 1503 | (let ((char-data-files (find-files "." "CharacterData"))) |
| 1504 | (for-each (lambda (file) |
| 1505 | (substitute* file |
| 1506 | (((string-append "This file was generated " |
| 1507 | "AUTOMATICALLY from a template " |
| 1508 | "file.*")) |
| 1509 | (string-append "This file was generated " |
| 1510 | "AUTOMATICALLY from a template " |
| 1511 | "file")))) |
| 1512 | char-data-files))) |
| 1513 | (with-directory-excursion dir |
| 1514 | (let ((files (find-files "." #:directories? #t))) |
| 1515 | (apply invoke "zip" "-0" "-X" archive files)))))) |
| 1516 | (add-after 'strip-character-data-timestamps 'remove-extraneous-files |
| 1517 | (lambda* (#:key outputs #:allow-other-keys) |
| 1518 | ;; Remove the *.diz and src.zip files for space considerations. |
| 1519 | ;; The former are compressed debuginfo files not typically |
| 1520 | ;; shipped with Java distributions, while the later corresponds |
| 1521 | ;; to Java core API source files. |
| 1522 | (for-each delete-file |
| 1523 | (append-map (cut find-files <> "(^src\\.zip|\\.diz)$") |
| 1524 | (map (match-lambda |
| 1525 | ((name . dir) |
| 1526 | dir)) |
| 1527 | outputs))))) |
| 1528 | (add-after 'remove-extraneous-files 'strip-archive-timestamps |
| 1529 | (lambda _ |
| 1530 | (use-modules (ice-9 binary-ports) |
| 1531 | (rnrs bytevectors)) |
| 1532 | (letrec ((repack-archive |
| 1533 | (lambda (archive) |
| 1534 | (let ((dir (mkdtemp "zip-contents.XXXXXX"))) |
| 1535 | (with-directory-excursion dir |
| 1536 | (invoke "unzip" archive)) |
| 1537 | (delete-file archive) |
| 1538 | (for-each (compose repack-archive canonicalize-path) |
| 1539 | (find-files dir "(ct\\.sym|\\.jar)$")) |
| 1540 | (let ((reset-file-timestamp |
| 1541 | (lambda (file) |
| 1542 | (let ((s (lstat file))) |
| 1543 | (unless (eq? (stat:type s) 'symlink) |
| 1544 | (format #t "reset ~a~%" file) |
| 1545 | (utime file 0 0 0 0)))))) |
| 1546 | (for-each reset-file-timestamp |
| 1547 | (find-files dir #:directories? #t))) |
| 1548 | (with-directory-excursion dir |
| 1549 | (let ((files (find-files "." #:directories? #t))) |
| 1550 | (apply invoke "zip" "-0" "-X" archive files))))))) |
| 1551 | (for-each repack-archive |
| 1552 | (find-files #$output:doc "\\.zip$")) |
| 1553 | (for-each repack-archive |
| 1554 | (find-files #$output:jdk "\\.(zip|jar)$")) |
| 1555 | (repack-archive (string-append #$output:jdk "/lib/ct.sym")) |
| 1556 | (let ((repack-jmod |
| 1557 | (lambda (file-name) |
| 1558 | (call-with-input-file file-name |
| 1559 | (lambda (file) |
| 1560 | (let ((header #vu8(#x4a #x4d #x01 #x00))) |
| 1561 | (if (equal? (get-bytevector-n |
| 1562 | file (bytevector-length header)) |
| 1563 | header) |
| 1564 | (let* ((header-length (bytevector-length header)) |
| 1565 | (temp-file (mkstemp! |
| 1566 | (string-copy |
| 1567 | "temp-file.XXXXXX"))) |
| 1568 | (temp-filename (port-filename temp-file)) |
| 1569 | (content-length |
| 1570 | (- (stat:size (stat file)) |
| 1571 | header-length))) |
| 1572 | (sendfile temp-file file content-length header-length) |
| 1573 | (delete-file file-name) |
| 1574 | (close-port temp-file) |
| 1575 | (repack-archive (canonicalize-path temp-filename)) |
| 1576 | (call-with-output-file file-name |
| 1577 | (lambda (file) |
| 1578 | (put-bytevector file header) |
| 1579 | (call-with-input-file temp-filename |
| 1580 | (lambda (temp-file) |
| 1581 | (sendfile |
| 1582 | file temp-file |
| 1583 | (stat:size (stat temp-file)) 0))))))))))))) |
| 1584 | (for-each repack-jmod |
| 1585 | (find-files #$output:jdk "\\.jmod$")))))) |
| 1586 | (add-after 'install 'remove-timestamp-from-api-summary |
| 1587 | (lambda _ |
| 1588 | (substitute* (string-append #$output:doc |
| 1589 | "/api/overview-summary.html") |
| 1590 | (("Generated by javadoc \\(11-internal\\).*$") |
| 1591 | "Generated by javadoc (11-internal) -->\n"))))))) |
| 1592 | (inputs |
| 1593 | (list alsa-lib |
| 1594 | cups |
| 1595 | fontconfig |
| 1596 | freetype |
| 1597 | giflib |
| 1598 | lcms |
| 1599 | libjpeg-turbo |
| 1600 | libpng |
| 1601 | libx11 |
| 1602 | libxext |
| 1603 | libxrandr |
| 1604 | libxrender |
| 1605 | libxt |
| 1606 | libxtst)) |
| 1607 | (native-inputs |
| 1608 | (list autoconf |
| 1609 | bash ; not bash-minimal, needs ulimit |
| 1610 | openjdk10 |
| 1611 | `(,openjdk10 "jdk") |
| 1612 | gnu-make-4.2 |
| 1613 | nss-certs |
| 1614 | pkg-config |
| 1615 | unzip |
| 1616 | which |
| 1617 | zip)) |
| 1618 | (home-page "https://openjdk.org/projects/jdk/11/") |
| 1619 | (synopsis "Java development kit") |
| 1620 | (description |
| 1621 | "This package provides the Java development kit OpenJDK.") |
| 1622 | (license license:gpl2+))) |
| 1623 | |
| 1624 | (define-syntax make-openjdk |
| 1625 | ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP, |
| 1626 | ;; the bootstrap package. One or more FIELD can be provided to further |
| 1627 | ;; refine the package definition; for convenience, the BASE, NAME and |
| 1628 | ;; VERSION are defined in their scope. |
| 1629 | (lambda (x) |
| 1630 | (syntax-case x () |
| 1631 | ((_ bootstrap version* hash field ...) |
| 1632 | (with-syntax ((base (datum->syntax x 'base)) |
| 1633 | (name (datum->syntax x 'name)) |
| 1634 | (version (datum->syntax x 'version))) |
| 1635 | #'(let ((base (package |
| 1636 | (inherit bootstrap) |
| 1637 | (name "openjdk") |
| 1638 | (version version*) |
| 1639 | (source |
| 1640 | (origin |
| 1641 | (inherit (package-source bootstrap)) |
| 1642 | (method git-fetch) |
| 1643 | (uri (git-reference |
| 1644 | (url (format |
| 1645 | #f "https://github.com/openjdk/jdk~au" |
| 1646 | (version-major version*))) |
| 1647 | (commit (string-append "jdk-" version* |
| 1648 | "-ga")))) |
| 1649 | (file-name (git-file-name name version)) |
| 1650 | (sha256 (base32 hash)))) |
| 1651 | (properties |
| 1652 | '((release-tag-prefix . "jdk-") |
| 1653 | (release-tag-suffix . "-ga") |
| 1654 | (release-tag-version-delimiter . "."))) |
| 1655 | (native-inputs |
| 1656 | (modify-inputs (package-native-inputs bootstrap) |
| 1657 | (replace "openjdk" bootstrap))) |
| 1658 | (home-page (string-append |
| 1659 | "https://openjdk.java.net/projects/jdk/" |
| 1660 | (version-major version))))) |
| 1661 | (name "openjdk") |
| 1662 | (version version*)) |
| 1663 | (package |
| 1664 | (inherit base) |
| 1665 | field |
| 1666 | ...))))))) |
| 1667 | |
| 1668 | (define-public openjdk12 |
| 1669 | (make-openjdk |
| 1670 | openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf" |
| 1671 | (source |
| 1672 | (origin |
| 1673 | (method url-fetch) |
| 1674 | (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2") |
| 1675 | (file-name (string-append name "-" version ".tar.bz2")) |
| 1676 | (sha256 |
| 1677 | (base32 |
| 1678 | "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf")) |
| 1679 | (modules '((guix build utils))) |
| 1680 | (snippet |
| 1681 | '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))) |
| 1682 | (patches (search-patches "openjdk-10-setsignalhandler.patch")))) |
| 1683 | (arguments |
| 1684 | (substitute-keyword-arguments (package-arguments openjdk11) |
| 1685 | ;; Re-enable parallel build. |
| 1686 | ((#:parallel-build? _ #t) #t) |
| 1687 | ((#:phases phases) |
| 1688 | #~(modify-phases #$phases |
| 1689 | #$@(if (target-aarch64?) |
| 1690 | #~((add-after 'unpack 'patch-for-aarch64 |
| 1691 | (lambda _ |
| 1692 | (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp" |
| 1693 | ;; This line is duplicated, so remove both occurrences, |
| 1694 | ;; then add back one occurrence by substituting a |
| 1695 | ;; comment that occurs once. |
| 1696 | (("using MacroAssembler::call_VM_leaf_base;") "") |
| 1697 | (("Interpreter specific version of call_VM_base") |
| 1698 | (string-append "Interpreter specific version of call_VM_base\n" |
| 1699 | " using MacroAssembler::call_VM_leaf_base;")))))) |
| 1700 | #~()) |
| 1701 | (replace 'remove-timestamping |
| 1702 | (lambda _ |
| 1703 | (substitute* "src/hotspot/share/runtime/vm_version.cpp" |
| 1704 | (("__DATE__") "") |
| 1705 | (("__TIME__") "")))) |
| 1706 | (replace 'fix-java-shebangs |
| 1707 | (lambda _ |
| 1708 | ;; 'blocked' was renamed to 'blacklisted' in this version for |
| 1709 | ;; some reason. |
| 1710 | (substitute* "make/data/blacklistedcertsconverter/\ |
| 1711 | blacklisted.certs.pem" |
| 1712 | (("^#!.*") |
| 1713 | "#! java BlacklistedCertsConverter SHA-256\n")))))))))) |
| 1714 | |
| 1715 | (define-public openjdk13 |
| 1716 | (make-openjdk openjdk12 "13.0.14" |
| 1717 | "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755" |
| 1718 | (source (origin |
| 1719 | (inherit (package-source base)) |
| 1720 | (patches (search-patches "openjdk-13-classlist-reproducibility.patch" |
| 1721 | "openjdk-10-jtask-reproducibility.patch")))) |
| 1722 | (arguments |
| 1723 | (substitute-keyword-arguments (package-arguments openjdk12) |
| 1724 | ((#:phases phases) |
| 1725 | #~(modify-phases #$phases |
| 1726 | (replace 'remove-timestamping |
| 1727 | (lambda _ |
| 1728 | (substitute* |
| 1729 | "src/hotspot/share/runtime/abstract_vm_version.cpp" |
| 1730 | (("__DATE__") "") |
| 1731 | (("__TIME__") "")))))))))) |
| 1732 | |
| 1733 | (define-public openjdk14 |
| 1734 | (make-openjdk |
| 1735 | openjdk13 "14.0.2" |
| 1736 | "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6" |
| 1737 | (source (origin |
| 1738 | (inherit (package-source base)) |
| 1739 | (snippet ;override snippet |
| 1740 | '(begin |
| 1741 | ;; The m4 macro uses 'help' to search for builtins, which is |
| 1742 | ;; not available in bash-minimal |
| 1743 | (substitute* "make/autoconf/basics.m4" |
| 1744 | (("if help") "if command -v")) |
| 1745 | (for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))) |
| 1746 | (patches (search-patches "openjdk-10-setsignalhandler.patch" |
| 1747 | "openjdk-10-jtask-reproducibility.patch" |
| 1748 | "openjdk-13-classlist-reproducibility.patch")))))) |
| 1749 | |
| 1750 | (define-public openjdk15 |
| 1751 | (make-openjdk |
| 1752 | openjdk14 "15.0.10" |
| 1753 | "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x" |
| 1754 | (source (origin |
| 1755 | (inherit (package-source base)) |
| 1756 | (modules '()) |
| 1757 | (snippet #f) |
| 1758 | (patches |
| 1759 | (search-patches "openjdk-15-jtask-reproducibility.patch" |
| 1760 | "openjdk-15-xcursor-no-dynamic.patch")))) |
| 1761 | (inputs |
| 1762 | (modify-inputs (package-inputs base) |
| 1763 | (append libxcursor))) ;for our patch to work |
| 1764 | (native-inputs |
| 1765 | (modify-inputs (package-native-inputs base) |
| 1766 | (delete "make" ;remove old gnu-make-4.2 |
| 1767 | "openjdk") ;to remove non-jdk output |
| 1768 | (append `(,openjdk14 "jdk")))))) |
| 1769 | |
| 1770 | (define-public openjdk16 |
| 1771 | (make-openjdk openjdk15 "16.0.2" |
| 1772 | "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz" |
| 1773 | (source (origin |
| 1774 | (inherit (package-source base)) |
| 1775 | (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch" |
| 1776 | "openjdk-10-setsignalhandler.patch")))))) |
| 1777 | |
| 1778 | (define-public openjdk17 |
| 1779 | (make-openjdk |
| 1780 | openjdk16 "17.0.10" |
| 1781 | "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f" |
| 1782 | (source (origin |
| 1783 | (inherit (package-source base)) |
| 1784 | (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch")))) |
| 1785 | (arguments |
| 1786 | (substitute-keyword-arguments (package-arguments openjdk16) |
| 1787 | ((#:phases phases) |
| 1788 | #~(modify-phases #$phases |
| 1789 | (replace 'fix-java-shebangs |
| 1790 | (lambda _ |
| 1791 | ;; 'blacklisted' was renamed back to 'blocked'. |
| 1792 | (substitute* "make/data/blockedcertsconverter/blocked.certs.pem" |
| 1793 | (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))))))))) |
| 1794 | |
| 1795 | (define-public openjdk18 |
| 1796 | (make-openjdk openjdk17 "18.0.2.1" |
| 1797 | "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg")) |
| 1798 | |
| 1799 | (define-public openjdk19 |
| 1800 | (make-openjdk openjdk18 "19.0.2" |
| 1801 | "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4" |
| 1802 | (arguments |
| 1803 | (substitute-keyword-arguments (package-arguments openjdk18) |
| 1804 | ((#:phases phases) |
| 1805 | #~(modify-phases #$phases |
| 1806 | (replace 'fix-java-shebangs |
| 1807 | (lambda _ |
| 1808 | ;; Update file path. |
| 1809 | (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem" |
| 1810 | (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))) |
| 1811 | (add-before 'configure 'define-java-environment-variables |
| 1812 | (lambda* (#:key inputs #:allow-other-keys) |
| 1813 | ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z". |
| 1814 | (setenv "SOURCE_DATE_EPOCH" "1234567890"))))))))) |
| 1815 | |
| 1816 | (define-public openjdk20 |
| 1817 | (make-openjdk openjdk19 "20.0.2" |
| 1818 | "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489")) |
| 1819 | |
| 1820 | (define-public openjdk21 |
| 1821 | (make-openjdk openjdk20 "21.0.2" |
| 1822 | "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj" |
| 1823 | (source (origin |
| 1824 | (inherit (package-source base)) |
| 1825 | (patches (search-patches "openjdk-21-fix-rpath.patch" |
| 1826 | "openjdk-15-xcursor-no-dynamic.patch")))) |
| 1827 | (arguments |
| 1828 | (substitute-keyword-arguments (package-arguments base) |
| 1829 | ((#:phases phases) |
| 1830 | #~(modify-phases #$phases |
| 1831 | (replace 'fix-java-shebangs |
| 1832 | (lambda _ |
| 1833 | ;; 'blacklisted' was renamed back to 'blocked'. |
| 1834 | (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem" |
| 1835 | (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))))))))) |
| 1836 | |
| 1837 | (define-public openjdk22 |
| 1838 | (make-openjdk |
| 1839 | openjdk21 "22.0.2" |
| 1840 | "1nj414yj6v9qrlm48yv5llr4jmgj9g20v6zsd39xrdx4x4x4p3b6" |
| 1841 | (arguments |
| 1842 | (substitute-keyword-arguments (package-arguments base) |
| 1843 | ((#:phases phases) |
| 1844 | #~(modify-phases #$phases |
| 1845 | (add-after 'unpack 'do-not-disable-new-dtags |
| 1846 | (lambda _ |
| 1847 | ;; Our validate-runpath phases checks for RUNPATH, not RPATH. |
| 1848 | (substitute* "make/autoconf/flags-cflags.m4" |
| 1849 | ((" -Wl,--disable-new-dtags") "")))))))))) |
| 1850 | |
| 1851 | (define-public openjdk23 |
| 1852 | (make-openjdk |
| 1853 | openjdk22 "23.0.2" |
| 1854 | "0kxllznzhgqfn8b97krg2yp1ag41g4phmgqahrvzafd2bq6zclnf" |
| 1855 | (source (origin |
| 1856 | (inherit (package-source base)) |
| 1857 | ;; The 'openjdk-21-fix-rpath.patch' no longer applies, and it |
| 1858 | ;; appears not needed anymore. The |
| 1859 | ;; 'openjdk-15-xcursor-no-dynamic.patch' doesn't apply anymore; |
| 1860 | ;; the fix should be pursued in libx11 (see: |
| 1861 | ;; https://issues.guix.gnu.org/54654) |
| 1862 | (patches '()))))) |
| 1863 | |
| 1864 | (define-public openjdk24 |
| 1865 | (make-openjdk |
| 1866 | openjdk23 "24.0.1" |
| 1867 | "0h6sbzbjyqg85iml41pswdh2z3d7h2hhb0sd5yll37r1mj5lsxmx")) |
| 1868 | |
| 1869 | (define-public openjdk25 |
| 1870 | (make-openjdk |
| 1871 | openjdk24 "25.0.1" |
| 1872 | "10v7pr0aplv7qjpnqbgh27lcm89ixhg5g62ydg0dvcj0d24r95xp" |
| 1873 | (outputs '("out" "jdk" "doc" "graal-builder-jdk")) |
| 1874 | (arguments |
| 1875 | (substitute-keyword-arguments (package-arguments base) |
| 1876 | ;; Set version string to "25.0.1+8" instead of "25.0.1+-adhoc...". |
| 1877 | ;; GraalVM's JVMCIVersionCheck requires java.vm.version to be parseable |
| 1878 | ;; as a release version (pre() empty or "ea"), not an adhoc build. |
| 1879 | ;; Build number 8 comes from the jdk-25.0.1+8 tag which points to the |
| 1880 | ;; same commit as jdk-25.0.1-ga (78770bfaefd23ae77ec4f8ddd769c1c2d9c282df). |
| 1881 | ((#:configure-flags flags #~'()) |
| 1882 | #~(append #$flags |
| 1883 | '("--with-version-opt=" |
| 1884 | "--with-version-build=8"))) |
| 1885 | ((#:phases phases) |
| 1886 | #~(modify-phases #$phases |
| 1887 | ;; Build graal-builder-image after the regular images. |
| 1888 | (add-after 'build 'build-graal-builder-image |
| 1889 | (lambda* (#:key parallel-build? make-flags #:allow-other-keys) |
| 1890 | (apply invoke "make" "graal-builder-image" |
| 1891 | `(,@(if parallel-build? |
| 1892 | (list (string-append "JOBS=" |
| 1893 | (number->string (parallel-job-count)))) |
| 1894 | '("JOBS=1")) |
| 1895 | ,@make-flags)))) |
| 1896 | ;; Install the graal-builder-jdk to the extra output. |
| 1897 | (add-after 'install 'install-graal-builder-jdk |
| 1898 | (lambda* (#:key outputs #:allow-other-keys) |
| 1899 | (let ((images (car (find-files "build" "-server-release" |
| 1900 | #:directories? #t)))) |
| 1901 | (copy-recursively (string-append images "/images/graal-builder-jdk") |
| 1902 | (assoc-ref outputs "graal-builder-jdk"))))) |
| 1903 | ;; Create libjvm.so symlink for graal-builder-jdk output. |
| 1904 | (add-after 'install-graal-builder-jdk 'install-libjvm-graal-builder-jdk |
| 1905 | (lambda* (#:key outputs #:allow-other-keys) |
| 1906 | (let ((lib-graal (string-append (assoc-ref outputs "graal-builder-jdk") |
| 1907 | "/lib"))) |
| 1908 | (symlink (string-append lib-graal "/server/libjvm.so") |
| 1909 | (string-append lib-graal "/libjvm.so"))))))))))) |
| 1910 | |
| 1911 | ;;; Convenience alias to point to the latest version of OpenJDK. |
| 1912 | (define-public openjdk openjdk25) |
| 1913 | |
| 1914 | |
| 1915 | |
| 1916 | ;; This version of JBR is here in order to be able to build custom |
| 1917 | ;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for |
| 1918 | ;; tests. |
| 1919 | (define-public jbr11 |
| 1920 | (package |
| 1921 | (inherit openjdk11) |
| 1922 | (name "jbr") |
| 1923 | (version "11_0_16-b2248") |
| 1924 | (source (origin |
| 1925 | (method git-fetch) |
| 1926 | (uri (git-reference |
| 1927 | (url "https://github.com/JetBrains/JetBrainsRuntime.git") |
| 1928 | (commit (string-append "jb" version)))) |
| 1929 | (file-name (string-append name "-" version "-checkout")) |
| 1930 | (sha256 |
| 1931 | (base32 |
| 1932 | "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09")))) |
| 1933 | (arguments |
| 1934 | (substitute-keyword-arguments (package-arguments openjdk11) |
| 1935 | ((#:configure-flags configure-flags) |
| 1936 | #~(append #$configure-flags |
| 1937 | (list "--with-jvm-features=shenandoahgc" |
| 1938 | "--enable-cds=yes" |
| 1939 | "--with-vendor-name=JetBrains s.r.o" |
| 1940 | "--with-vendor-url=https://www.jetbrains.com/" |
| 1941 | "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR"))))) |
| 1942 | (synopsis "JetBrains Java Runtime") |
| 1943 | (description "This package provides a Java runtime environment for |
| 1944 | and Java development kit. It supports enhanced class redefinition (DCEVM), |
| 1945 | includes a number of improvements in font rendering, keyboards support, |
| 1946 | windowing/focus subsystems, HiDPI, accessibility, and performance, |
| 1947 | provides better desktop integration and bugfixes not yet present in |
| 1948 | OpenJDK.") |
| 1949 | (home-page "https://www.jetbrains.com/") |
| 1950 | (license license:gpl2+))) |
| 1951 | |
| 1952 | (define-public jbr17 |
| 1953 | (package |
| 1954 | (inherit openjdk17) |
| 1955 | (name "jbr") |
| 1956 | (version "17.0.11b1207.30") |
| 1957 | (source (origin |
| 1958 | (method git-fetch) |
| 1959 | (uri (git-reference |
| 1960 | (url "https://github.com/JetBrains/JetBrainsRuntime.git") |
| 1961 | (commit (string-append "jbr-release-" version)))) |
| 1962 | (file-name (string-append name "-" version "-checkout")) |
| 1963 | (sha256 |
| 1964 | (base32 |
| 1965 | "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln")) |
| 1966 | (patches (search-patches "jbr-17-xcursor-no-dynamic.patch")))) |
| 1967 | (arguments |
| 1968 | (substitute-keyword-arguments (package-arguments openjdk17) |
| 1969 | ((#:configure-flags configure-flags) |
| 1970 | #~(append #$configure-flags |
| 1971 | (list "--with-jvm-features=shenandoahgc" |
| 1972 | "--enable-cds=yes" |
| 1973 | "--with-vendor-name=JetBrains s.r.o" |
| 1974 | "--with-vendor-url=https://www.jetbrains.com/" |
| 1975 | "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR"))))) |
| 1976 | (synopsis "JetBrains Java Runtime") |
| 1977 | (description "This package provides a Java runtime environment for |
| 1978 | and Java development kit. It supports enhanced class redefinition (DCEVM), |
| 1979 | includes a number of improvements in font rendering, keyboards support, |
| 1980 | windowing/focus subsystems, HiDPI, accessibility, and performance, |
| 1981 | provides better desktop integration and bugfixes not yet present in |
| 1982 | OpenJDK.") |
| 1983 | (home-page "https://www.jetbrains.com/") |
| 1984 | (license license:gpl2+))) |
| 1985 | |
| 1986 | (define-public jbr21 |
| 1987 | (package |
| 1988 | (inherit openjdk21) |
| 1989 | (name "jbr") |
| 1990 | (version "21.0.3b509.11") |
| 1991 | (source (origin |
| 1992 | (method git-fetch) |
| 1993 | (uri (git-reference |
| 1994 | (url "https://github.com/JetBrains/JetBrainsRuntime.git") |
| 1995 | (commit (string-append "jbr-release-" version)))) |
| 1996 | (file-name (string-append name "-" version "-checkout")) |
| 1997 | (sha256 |
| 1998 | (base32 |
| 1999 | "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd")) |
| 2000 | (patches (search-patches "openjdk-21-fix-rpath.patch" |
| 2001 | "jbr-17-xcursor-no-dynamic.patch")))) |
| 2002 | (inputs |
| 2003 | `(("wayland" ,wayland) |
| 2004 | ("libxkbcommon" ,libxkbcommon) ; for wayland |
| 2005 | ,@(package-inputs openjdk21))) |
| 2006 | (arguments |
| 2007 | (substitute-keyword-arguments (package-arguments openjdk21) |
| 2008 | ((#:configure-flags configure-flags) |
| 2009 | #~(append #$configure-flags |
| 2010 | (list "--with-jvm-features=shenandoahgc" |
| 2011 | "--enable-cds=yes" |
| 2012 | "--with-vendor-name=JetBrains s.r.o" |
| 2013 | "--with-vendor-url=https://www.jetbrains.com/" |
| 2014 | "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR"))))) |
| 2015 | (synopsis "JetBrains Java Runtime") |
| 2016 | (description "This package provides a Java runtime environment for |
| 2017 | and Java development kit. It supports enhanced class redefinition (DCEVM), |
| 2018 | includes a number of improvements in font rendering, keyboards support, |
| 2019 | windowing/focus subsystems, HiDPI, accessibility, and performance, |
| 2020 | provides better desktop integration and bugfixes not yet present in |
| 2021 | OpenJDK.") |
| 2022 | (home-page "https://www.jetbrains.com/") |
| 2023 | (license license:gpl2+))) |
| 2024 | |
| 2025 | |
| 2026 | (define-public ant/java8 |
| 2027 | (package |
| 2028 | (name "ant") |
| 2029 | (version "1.10.15") |
| 2030 | (source (origin |
| 2031 | (method url-fetch) |
| 2032 | (uri (string-append "mirror://apache/ant/source/apache-ant-" |
| 2033 | version "-src.tar.gz")) |
| 2034 | (sha256 |
| 2035 | (base32 |
| 2036 | "1ccr852dxg5affdqafg04gi3l89q5c6l9lqrz50jhj05kidljax2")) |
| 2037 | (modules '((guix build utils))) |
| 2038 | (snippet |
| 2039 | '(begin |
| 2040 | (for-each delete-file |
| 2041 | (find-files "lib/optional" "\\.jar$")) |
| 2042 | #t)))) |
| 2043 | (build-system gnu-build-system) |
| 2044 | (arguments |
| 2045 | (list |
| 2046 | #:modules '((srfi srfi-1) |
| 2047 | (guix build gnu-build-system) |
| 2048 | (guix build utils)) |
| 2049 | #:tests? #f ;no "check" target |
| 2050 | #:phases |
| 2051 | #~(modify-phases %standard-phases |
| 2052 | (add-after 'unpack 'remove-scripts |
| 2053 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant |
| 2054 | ;; wrappers. |
| 2055 | (lambda _ |
| 2056 | (for-each delete-file |
| 2057 | (find-files "src/script" |
| 2058 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")))) |
| 2059 | (delete 'bootstrap) |
| 2060 | (delete 'configure) |
| 2061 | (replace 'build |
| 2062 | (lambda* (#:key inputs #:allow-other-keys) |
| 2063 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) |
| 2064 | |
| 2065 | ;; Disable tests to avoid dependency on hamcrest-core, which needs |
| 2066 | ;; Ant to build. This is necessary in addition to disabling the |
| 2067 | ;; "check" phase, because the dependency on "test-jar" would always |
| 2068 | ;; result in the tests to be run. |
| 2069 | (substitute* "build.xml" |
| 2070 | (("depends=\"jars,test-jar") "depends=\"jars")) |
| 2071 | (invoke "bash" "bootstrap.sh" |
| 2072 | (string-append "-Ddist.dir=" #$output)))) |
| 2073 | (add-after 'build 'strip-jar-timestamps ;based on ant-build-system |
| 2074 | (lambda _ |
| 2075 | (define (repack-archive jar) |
| 2076 | (let* ((dir (mkdtemp "jar-contents.XXXXXX")) |
| 2077 | (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) |
| 2078 | (with-directory-excursion dir |
| 2079 | (invoke "unzip" jar)) |
| 2080 | (delete-file jar) |
| 2081 | ;; XXX: copied from (gnu build install) |
| 2082 | (for-each (lambda (file) |
| 2083 | (let ((s (lstat file))) |
| 2084 | (unless (eq? (stat:type s) 'symlink) |
| 2085 | (utime file 0 0 0 0)))) |
| 2086 | (find-files dir #:directories? #t)) |
| 2087 | ;; It is important that the manifest appears first. |
| 2088 | (with-directory-excursion dir |
| 2089 | (let* ((files (find-files "." ".*" #:directories? #t)) |
| 2090 | ;; To ensure that the reference scanner can |
| 2091 | ;; detect all store references in the jars |
| 2092 | ;; we disable compression with the "-0" option. |
| 2093 | (command (if (file-exists? manifest) |
| 2094 | `("zip" "-0" "-X" ,jar ,manifest |
| 2095 | ,@files) |
| 2096 | `("zip" "-0" "-X" ,jar ,@files)))) |
| 2097 | (apply invoke command))))) |
| 2098 | (for-each repack-archive |
| 2099 | (find-files |
| 2100 | (string-append #$output "/lib") |
| 2101 | "\\.jar$")))) |
| 2102 | (delete 'install)))) |
| 2103 | (native-inputs |
| 2104 | `(("jdk" ,icedtea-8 "jdk") |
| 2105 | ("zip" ,zip) |
| 2106 | ("unzip" ,unzip))) |
| 2107 | (home-page "https://ant.apache.org") |
| 2108 | (synopsis "Build tool for Java") |
| 2109 | (description |
| 2110 | "Ant is a platform-independent build tool for Java. It is similar to |
| 2111 | make but is implemented using the Java language, requires the Java platform, |
| 2112 | and is best suited to building Java projects. Ant uses XML to describe the |
| 2113 | build process and its dependencies, whereas Make uses Makefile format.") |
| 2114 | (license license:asl2.0))) |
| 2115 | |
| 2116 | ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series |
| 2117 | ;; requires Java 8. |
| 2118 | (define-public ant |
| 2119 | (package (inherit ant/java8) |
| 2120 | (version "1.9.15") |
| 2121 | (source (origin |
| 2122 | (method url-fetch) |
| 2123 | (uri (string-append "mirror://apache/ant/source/apache-ant-" |
| 2124 | version "-src.tar.gz")) |
| 2125 | (sha256 |
| 2126 | (base32 |
| 2127 | "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd")))) |
| 2128 | ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up |
| 2129 | ;; later. |
| 2130 | (arguments |
| 2131 | (substitute-keyword-arguments |
| 2132 | `(#:modules ((srfi srfi-1) |
| 2133 | (guix build gnu-build-system) |
| 2134 | (guix build utils)) |
| 2135 | #:tests? #f ; no "check" target |
| 2136 | #:phases |
| 2137 | (modify-phases %standard-phases |
| 2138 | (delete 'bootstrap) |
| 2139 | (delete 'configure) |
| 2140 | (add-before 'build 'define-java-environment-variables |
| 2141 | (lambda* (#:key inputs #:allow-other-keys) |
| 2142 | ;; First, set environment variables (eases debugging on -K). |
| 2143 | (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) |
| 2144 | (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm")) |
| 2145 | (setenv "JAVAC" (search-input-file inputs "/bin/jikes")) |
| 2146 | (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar")))) |
| 2147 | (replace 'build |
| 2148 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2149 | ;; Ant complains if this file doesn't exist. |
| 2150 | (setenv "HOME" "/tmp") |
| 2151 | (with-output-to-file "/tmp/.ant.properties" |
| 2152 | (lambda _ (display ""))) |
| 2153 | |
| 2154 | ;; Use jikes instead of javac for <javac ...> tags in build.xml |
| 2155 | (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") |
| 2156 | |
| 2157 | ;; jikes produces lots of warnings, but they are not very |
| 2158 | ;; interesting, so we silence them. |
| 2159 | (setenv "$BOOTJAVAC_OPTS" "-nowarn") |
| 2160 | |
| 2161 | ;; Without these JamVM options the build may freeze. |
| 2162 | (substitute* "bootstrap.sh" |
| 2163 | (("^\"\\$\\{JAVACMD\\}\" " m) |
| 2164 | ,@(if (string-prefix? "armhf" (or (%current-system) |
| 2165 | (%current-target-system))) |
| 2166 | `((string-append m "-Xnocompact ")) |
| 2167 | `((string-append m "-Xnocompact -Xnoinlining "))))) |
| 2168 | |
| 2169 | ;; Disable tests because we are bootstrapping and thus don't have |
| 2170 | ;; any of the dependencies required to build and run the tests. |
| 2171 | (substitute* "build.xml" |
| 2172 | (("depends=\"jars,test-jar\"") "depends=\"jars\"")) |
| 2173 | (invoke "bash" "bootstrap.sh" |
| 2174 | (string-append "-Ddist.dir=" |
| 2175 | (assoc-ref outputs "out"))))) |
| 2176 | (add-after 'build 'strip-jar-timestamps ;based on ant-build-system |
| 2177 | (lambda* (#:key outputs #:allow-other-keys) |
| 2178 | (define (repack-archive jar) |
| 2179 | (let* ((dir (mkdtemp "jar-contents.XXXXXX")) |
| 2180 | (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) |
| 2181 | (with-directory-excursion dir |
| 2182 | (invoke "unzip" jar)) |
| 2183 | (delete-file jar) |
| 2184 | ;; XXX: copied from (gnu build install) |
| 2185 | (for-each (lambda (file) |
| 2186 | (let ((s (lstat file))) |
| 2187 | (unless (eq? (stat:type s) 'symlink) |
| 2188 | (utime file 0 0 0 0)))) |
| 2189 | (find-files dir #:directories? #t)) |
| 2190 | ;; It is important that the manifest appears first. |
| 2191 | (with-directory-excursion dir |
| 2192 | (let* ((files (find-files "." ".*" #:directories? #t)) |
| 2193 | ;; To ensure that the reference scanner can |
| 2194 | ;; detect all store references in the jars |
| 2195 | ;; we disable compression with the "-0" option. |
| 2196 | (command (if (file-exists? manifest) |
| 2197 | `("zip" "-0" "-X" ,jar ,manifest |
| 2198 | ,@files) |
| 2199 | `("zip" "-0" "-X" ,jar ,@files)))) |
| 2200 | (apply invoke command))))) |
| 2201 | (for-each repack-archive |
| 2202 | (find-files |
| 2203 | (string-append (assoc-ref %outputs "out") "/lib") |
| 2204 | "\\.jar$")))) |
| 2205 | (delete 'install))) |
| 2206 | ((#:phases phases) |
| 2207 | `(modify-phases ,phases |
| 2208 | (delete 'define-java-environment-variables) |
| 2209 | (add-after 'unpack 'remove-scripts |
| 2210 | ;; Remove bat / cmd scripts for DOS as well as the antRun and runant |
| 2211 | ;; wrappers. |
| 2212 | (lambda _ |
| 2213 | (for-each delete-file |
| 2214 | (find-files "src/script" |
| 2215 | "(.*\\.(bat|cmd)|runant.*|antRun.*)")) |
| 2216 | #t)) |
| 2217 | (replace 'build |
| 2218 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2219 | (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) |
| 2220 | |
| 2221 | ;; Disable tests to avoid dependency on hamcrest-core, which needs |
| 2222 | ;; Ant to build. This is necessary in addition to disabling the |
| 2223 | ;; "check" phase, because the dependency on "test-jar" would always |
| 2224 | ;; result in the tests to be run. |
| 2225 | (substitute* "build.xml" |
| 2226 | (("depends=\"jars,test-jar") "depends=\"jars")) |
| 2227 | (invoke "bash" "bootstrap.sh" |
| 2228 | (string-append "-Ddist.dir=" |
| 2229 | (assoc-ref outputs "out"))))))))) |
| 2230 | (native-inputs |
| 2231 | `(("jdk" ,icedtea-7 "jdk") |
| 2232 | ("zip" ,zip) |
| 2233 | ("unzip" ,unzip))))) |
| 2234 | |
| 2235 | (define-public ant-apache-bcel |
| 2236 | (package |
| 2237 | (inherit ant/java8) |
| 2238 | (name "ant-apache-bcel") |
| 2239 | (arguments |
| 2240 | (substitute-keyword-arguments (package-arguments ant/java8) |
| 2241 | ((#:phases phases) |
| 2242 | #~(modify-phases #$phases |
| 2243 | (add-after 'unpack 'link-bcel |
| 2244 | (lambda* (#:key inputs #:allow-other-keys) |
| 2245 | (for-each (lambda (file) |
| 2246 | (symlink file |
| 2247 | (string-append "lib/optional/" |
| 2248 | (basename file)))) |
| 2249 | (find-files (assoc-ref inputs "java-commons-bcel") |
| 2250 | "\\.jar$")))) |
| 2251 | (add-after 'build 'install |
| 2252 | (lambda _ |
| 2253 | (let ((share (string-append #$output "/share/java")) |
| 2254 | (bin (string-append #$output "/bin")) |
| 2255 | (lib (string-append #$output "/lib"))) |
| 2256 | (mkdir-p share) |
| 2257 | (install-file (string-append lib "/ant-apache-bcel.jar") share) |
| 2258 | (delete-file-recursively bin) |
| 2259 | (delete-file-recursively lib)))))))) |
| 2260 | (inputs |
| 2261 | (modify-inputs (package-inputs ant/java8) |
| 2262 | (prepend java-commons-bcel))))) |
| 2263 | |
| 2264 | (define-public ant-junit |
| 2265 | (package |
| 2266 | (inherit ant/java8) |
| 2267 | (name "ant-junit") |
| 2268 | (arguments |
| 2269 | (substitute-keyword-arguments (package-arguments ant/java8) |
| 2270 | ((#:phases phases) |
| 2271 | #~(modify-phases #$phases |
| 2272 | (add-after 'unpack 'link-junit |
| 2273 | (lambda* (#:key inputs #:allow-other-keys) |
| 2274 | (for-each (lambda (file) |
| 2275 | (symlink file |
| 2276 | (string-append "lib/optional/" |
| 2277 | (basename file)))) |
| 2278 | (find-files (assoc-ref inputs "java-junit") |
| 2279 | "\\.jar$")))) |
| 2280 | (add-after 'build 'install |
| 2281 | (lambda _ |
| 2282 | (let ((share (string-append #$output "/share/java")) |
| 2283 | (bin (string-append #$output "/bin")) |
| 2284 | (lib (string-append #$output "/lib"))) |
| 2285 | (mkdir-p share) |
| 2286 | (install-file (string-append lib "/ant-junit.jar") share) |
| 2287 | (delete-file-recursively bin) |
| 2288 | (delete-file-recursively lib)))))))) |
| 2289 | (inputs |
| 2290 | (modify-inputs (package-inputs ant/java8) |
| 2291 | (prepend java-junit))))) |
| 2292 | |
| 2293 | (define-public libantlr3c |
| 2294 | (package |
| 2295 | (name "libantlr3c") |
| 2296 | (version "3.4") |
| 2297 | (source |
| 2298 | (origin |
| 2299 | (method url-fetch) |
| 2300 | (uri |
| 2301 | (string-append "https://www.antlr3.org/download/C/" |
| 2302 | name "-" version ".tar.gz")) |
| 2303 | (sha256 |
| 2304 | (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa")))) |
| 2305 | (build-system gnu-build-system) |
| 2306 | (arguments |
| 2307 | (list #:configure-flags |
| 2308 | #~(list "--enable-debuginfo" |
| 2309 | "--disable-static" |
| 2310 | #$@(if (target-64bit?) |
| 2311 | #~("--enable-64bit") |
| 2312 | #~()) |
| 2313 | #$@(if (target-riscv64?) |
| 2314 | #~("--disable-abiflags") |
| 2315 | #~())))) |
| 2316 | (synopsis "ANTLR C Library") |
| 2317 | (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother |
| 2318 | Tool for Language Recognition v3).") |
| 2319 | (home-page "https://www.antlr3.org/") |
| 2320 | (license license:bsd-3))) |
| 2321 | |
| 2322 | (define-public drip |
| 2323 | ;; Last release is from 2014, with a few important commits afterwards. |
| 2324 | (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08")) |
| 2325 | (package |
| 2326 | (name "drip") |
| 2327 | (version (git-version "0.2.4" "1" commit)) |
| 2328 | (source (origin |
| 2329 | (method git-fetch) |
| 2330 | (uri (git-reference |
| 2331 | (url "https://github.com/ninjudd/drip") |
| 2332 | (commit commit))) |
| 2333 | (file-name (git-file-name name version)) |
| 2334 | (sha256 |
| 2335 | (base32 |
| 2336 | "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2")))) |
| 2337 | (build-system gnu-build-system) |
| 2338 | (native-inputs |
| 2339 | `(("jdk" ,icedtea "jdk"))) |
| 2340 | (arguments |
| 2341 | (list #:tests? #f ; No tests. |
| 2342 | #:phases |
| 2343 | #~(modify-phases %standard-phases |
| 2344 | (delete 'configure) |
| 2345 | (add-before 'build 'relax-gcc-14-strictness |
| 2346 | (lambda _ |
| 2347 | (substitute* "Makefile" |
| 2348 | ((" gcc(.*)$" all options) |
| 2349 | (string-append |
| 2350 | " gcc" |
| 2351 | " -Wno-error=incompatible-pointer-types" |
| 2352 | " -Wno-error=implicit-function-declaration" |
| 2353 | options))))) |
| 2354 | (add-before 'install 'fix-wrapper |
| 2355 | (lambda* (#:key inputs #:allow-other-keys) |
| 2356 | (let ((jps (search-input-file inputs "/bin/jps"))) |
| 2357 | (substitute* "bin/drip" |
| 2358 | (("jps") jps) |
| 2359 | (("brew update && brew upgrade drip") "guix pull && guix install drip") |
| 2360 | ;; No need to make: |
| 2361 | (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "") |
| 2362 | ;; No need to include source: |
| 2363 | (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]") |
| 2364 | "true"))))) |
| 2365 | (replace 'install |
| 2366 | (lambda* (#:key outputs #:allow-other-keys) |
| 2367 | (let* ((bin (string-append #$output "/bin")) |
| 2368 | (share (string-append #$output "/share/drip"))) |
| 2369 | (mkdir-p bin) |
| 2370 | (for-each |
| 2371 | (lambda (file) |
| 2372 | (install-file (string-append "bin/" file) bin)) |
| 2373 | '("drip" "drip_daemon" "drip_proxy")) |
| 2374 | (install-file "drip.jar" share) |
| 2375 | (substitute* (string-append bin "/drip") |
| 2376 | (("drip_dir=\\$bin_dir/..") |
| 2377 | (string-append "drip_dir=" share))))))))) |
| 2378 | (home-page "https://github.com/ninjudd/drip") |
| 2379 | (synopsis "Faster Java Virtual Machine launching") |
| 2380 | (description "Drip is a launcher for the Java Virtual Machine that |
| 2381 | provides much faster startup times than the @command{java} command. The @command{drip} |
| 2382 | script is intended to be a drop-in replacement for the @command{java} command, |
| 2383 | only faster.") |
| 2384 | (license license:epl1.0)))) |
| 2385 | |
| 2386 | (define-public java-openjfx-build |
| 2387 | (package |
| 2388 | (name "java-openjfx-build") |
| 2389 | ;; This is a java-8 version |
| 2390 | (version "8.202") |
| 2391 | (source (origin |
| 2392 | (method hg-fetch) |
| 2393 | (uri (hg-reference |
| 2394 | (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt") |
| 2395 | (changeset (string-append |
| 2396 | (string-join (string-split version #\.) "u") |
| 2397 | "-ga")))) |
| 2398 | (file-name (string-append name "-" version "-checkout")) |
| 2399 | (modules '((guix build utils))) |
| 2400 | (snippet |
| 2401 | '(begin |
| 2402 | ;; Delete included gradle jar |
| 2403 | (delete-file-recursively "gradle/wrapper") |
| 2404 | #t)) |
| 2405 | (sha256 |
| 2406 | (base32 |
| 2407 | "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")) |
| 2408 | (patches (search-patches "java-openjfx-build-jdk_version.patch")))) |
| 2409 | (build-system ant-build-system) |
| 2410 | (arguments |
| 2411 | `(#:jar-name "java-openjfx.jar" |
| 2412 | #:source-dir "buildSrc/src/main/java" |
| 2413 | #:test-dir "buildSrc/src/test" |
| 2414 | #:phases |
| 2415 | (modify-phases %standard-phases |
| 2416 | (add-before 'configure 'generate-jsl-parser |
| 2417 | (lambda _ |
| 2418 | (invoke "antlr3" "-o" |
| 2419 | "buildSrc/src/main/java/com/sun/scenario/effect/compiler" |
| 2420 | "buildSrc/src/main/antlr/JSL.g")))))) |
| 2421 | (inputs |
| 2422 | (list antlr3 java-stringtemplate)) |
| 2423 | (native-inputs |
| 2424 | (list java-junit java-hamcrest-core)) |
| 2425 | (home-page "https://openjfx.io") |
| 2426 | (synopsis "Graphical application toolkit in Java") |
| 2427 | (description "OpenJFX is a client application platform for desktop, |
| 2428 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2429 | modern, efficient, and fully featured toolkit for developing rich client |
| 2430 | applications. This package contains base classes for the OpenJFX |
| 2431 | distribution and helper classes for building other parts of the |
| 2432 | distribution.") |
| 2433 | (license license:gpl2))) ;gpl2 only, with classpath exception |
| 2434 | |
| 2435 | (define-public java-openjfx-base |
| 2436 | (package (inherit java-openjfx-build) |
| 2437 | (name "java-openjfx-base") |
| 2438 | (arguments |
| 2439 | `(#:jar-name "java-openjfx-base.jar" |
| 2440 | #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info" |
| 2441 | #:test-dir "modules/base/src/test" |
| 2442 | #:phases |
| 2443 | (modify-phases %standard-phases |
| 2444 | (add-before 'check 'remove-empty-file |
| 2445 | (lambda _ |
| 2446 | (with-directory-excursion "modules/base/src/test/java" |
| 2447 | ;; These files are completely commented, but junit expects them to |
| 2448 | ;; contain a class, so tests fail. |
| 2449 | (delete-file |
| 2450 | "com/sun/javafx/property/adapter/PropertyDescriptorTest.java") |
| 2451 | (delete-file |
| 2452 | "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java") |
| 2453 | (delete-file "javafx/beans/property/PropertiesTest.java") |
| 2454 | (delete-file |
| 2455 | "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java") |
| 2456 | ;; This one fails |
| 2457 | (delete-file "com/sun/javafx/runtime/VersionInfoTest.java")) |
| 2458 | #t))))) |
| 2459 | (propagated-inputs |
| 2460 | (list java-openjfx-build)) |
| 2461 | (description "OpenJFX is a client application platform for desktop, |
| 2462 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2463 | modern, efficient, and fully featured toolkit for developing rich client |
| 2464 | applications. This package contains base classes for the OpenJFX |
| 2465 | distribution."))) |
| 2466 | |
| 2467 | (define-public java-openjfx-graphics |
| 2468 | (package (inherit java-openjfx-build) |
| 2469 | (name "java-openjfx-graphics") |
| 2470 | (arguments |
| 2471 | `(#:jar-name "java-openjfx-graphics.jar" |
| 2472 | #:source-dir "modules/graphics/src/main/java" |
| 2473 | #:tests? #f; require X |
| 2474 | #:test-dir "modules/graphics/src/test" |
| 2475 | #:phases |
| 2476 | (modify-phases %standard-phases |
| 2477 | (add-after 'unpack 'copy-missing-file |
| 2478 | (lambda* (#:key inputs #:allow-other-keys) |
| 2479 | (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c")) |
| 2480 | (copy-file (assoc-ref inputs "JNativeSurface.c") target) |
| 2481 | ;; XXX: looks like the missing file we found isn't *quite* |
| 2482 | ;; compatible... |
| 2483 | (substitute* target |
| 2484 | (("case TYPE_INT_ARGB:") ""))))) |
| 2485 | (add-after 'build 'build-native |
| 2486 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2487 | (let ((jdk (assoc-ref inputs "jdk")) |
| 2488 | (class-file->class-name |
| 2489 | (lambda (class-file) |
| 2490 | (string-map (lambda (c) |
| 2491 | (if (char=? c #\/) #\. c)) |
| 2492 | (string-drop-right class-file |
| 2493 | (string-length ".class")))))) |
| 2494 | (setenv "CPPFLAGS" |
| 2495 | (string-append "-DINLINE=inline " |
| 2496 | "-DLINUX " |
| 2497 | "-I" jdk "/include " |
| 2498 | "-I" jdk "/include/linux " |
| 2499 | "-I " (getcwd) "/build/classes/include " |
| 2500 | "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw")) |
| 2501 | |
| 2502 | ;; Instructions have been adapted from buildSrc/linux.gradle |
| 2503 | (with-directory-excursion "build/classes" |
| 2504 | ;; Build prism |
| 2505 | (mkdir-p "include") |
| 2506 | |
| 2507 | ;; Generate headers for prism |
| 2508 | (apply invoke "javah" "-d" "include" "-cp" "." |
| 2509 | (map class-file->class-name |
| 2510 | (append (find-files "com/sun/prism/impl" "\\.class$") |
| 2511 | (find-files "com/sun/prism" "PresentableState.*\\.class$")))) |
| 2512 | |
| 2513 | ;; ...then for prism_sw |
| 2514 | (apply invoke "javah" "-d" "include" "-cp" "." |
| 2515 | (map class-file->class-name |
| 2516 | (find-files "com/sun/pisces" "\\.class$"))) |
| 2517 | |
| 2518 | ;; ...and for prism_es2 |
| 2519 | (apply invoke "javah" "-d" "include" "-cp" "." |
| 2520 | (map class-file->class-name |
| 2521 | (find-files "com/sun/prism/es2" "\\.class$"))))) |
| 2522 | |
| 2523 | (with-directory-excursion "netbeans/native-prism" |
| 2524 | (invoke "make" "CONF=Release")) |
| 2525 | (with-directory-excursion "netbeans/native-prism-sw" |
| 2526 | (invoke "make" "CONF=Release")) |
| 2527 | ;; TODO: This fails due to unknown EGL procedure names |
| 2528 | #; |
| 2529 | (with-directory-excursion "netbeans/native-prism-es2" |
| 2530 | (invoke "make" "CONF=Release")) |
| 2531 | |
| 2532 | (let* ((out (assoc-ref outputs "out")) |
| 2533 | (dir ,(match (%current-system) |
| 2534 | ("i686-linux" |
| 2535 | "i386") |
| 2536 | ((or "armhf-linux" "aarch64-linux") |
| 2537 | "arm") |
| 2538 | ((or "x86_64-linux") |
| 2539 | "amd64") |
| 2540 | (_ "unknown"))) |
| 2541 | (target (string-append out "/share/" dir "/"))) |
| 2542 | (mkdir-p target) |
| 2543 | (for-each (lambda (file) |
| 2544 | (let ((new-name |
| 2545 | (string-append "lib" |
| 2546 | (string-map |
| 2547 | (lambda (c) |
| 2548 | (if (char=? c #\-) #\_ c)) |
| 2549 | (string-drop (basename file) |
| 2550 | (string-length "libnative-")))))) |
| 2551 | (copy-file file |
| 2552 | (string-append target new-name)))) |
| 2553 | (find-files "netbeans" "\\.so$")))))))) |
| 2554 | (propagated-inputs |
| 2555 | (list java-openjfx-base)) |
| 2556 | (inputs |
| 2557 | (list java-swt)) |
| 2558 | ;; XXX: for unknown reasons |
| 2559 | ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing |
| 2560 | ;; in this revision. |
| 2561 | (native-inputs |
| 2562 | `(("JNativeSurface.c" |
| 2563 | ,(origin |
| 2564 | (method url-fetch) |
| 2565 | (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\ |
| 2566 | /modules/graphics/src/main/native-prism-sw/JNativeSurface.c") |
| 2567 | (sha256 |
| 2568 | (base32 |
| 2569 | "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm")))))) |
| 2570 | (description "OpenJFX is a client application platform for desktop, |
| 2571 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2572 | modern, efficient, and fully featured toolkit for developing rich client |
| 2573 | applications. This package contains graphics-related classes for the |
| 2574 | OpenJFX distribution."))) |
| 2575 | |
| 2576 | (define-public java-openjfx-media |
| 2577 | (package (inherit java-openjfx-build) |
| 2578 | (name "java-openjfx-media") |
| 2579 | (propagated-inputs |
| 2580 | `(("java-openjxf-graphics" ,java-openjfx-graphics))) |
| 2581 | (arguments |
| 2582 | `(#:jar-name "java-openjfx-media.jar" |
| 2583 | #:source-dir "modules/media/src/main/java" |
| 2584 | #:tests? #f)); no tests |
| 2585 | (description "OpenJFX is a client application platform for desktop, |
| 2586 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2587 | modern, efficient, and fully featured toolkit for developing rich client |
| 2588 | applications. This package contains media-related classes for the |
| 2589 | OpenJFX distribution."))) |
| 2590 | |
| 2591 | (define-public java-openjfx-controls |
| 2592 | (package (inherit java-openjfx-build) |
| 2593 | (name "java-openjfx-controls") |
| 2594 | (propagated-inputs |
| 2595 | `(("java-openjxf-graphics" ,java-openjfx-graphics))) |
| 2596 | (arguments |
| 2597 | `(#:jar-name "java-openjfx-controls.jar" |
| 2598 | #:source-dir "modules/controls/src/main/java" |
| 2599 | #:test-dir "modules/controls/src/test" |
| 2600 | ;; TODO: tests require com.sun.javafx.pgstub, |
| 2601 | ;; javafx.collections.MockSetObserver, and |
| 2602 | ;; com.sun.javafx.binding.ExpressionHelperUtility |
| 2603 | #:tests? #false |
| 2604 | #:phases |
| 2605 | (modify-phases %standard-phases |
| 2606 | (add-after 'unpack 'copy-resources |
| 2607 | (lambda _ |
| 2608 | (copy-recursively "modules/controls/src/test/resources" |
| 2609 | "build/test-classes") |
| 2610 | (copy-recursively "modules/controls/src/main/resources" |
| 2611 | "build/classes")))))) |
| 2612 | (description "OpenJFX is a client application platform for desktop, |
| 2613 | mobile and embedded systems built on Java. Its goal is to produce a |
| 2614 | modern, efficient, and fully featured toolkit for developing rich client |
| 2615 | applications. This package contains UI control classes for the |
| 2616 | OpenJFX distribution."))) |
| 2617 | |
| 2618 | (define-public javacc-4 |
| 2619 | (package |
| 2620 | (name "javacc") |
| 2621 | (version "4.1") |
| 2622 | (source (origin |
| 2623 | (method git-fetch) |
| 2624 | (uri (git-reference |
| 2625 | (url "https://github.com/javacc/javacc") |
| 2626 | (commit "release_41"))) |
| 2627 | (file-name (string-append "javacc-" version "-checkout")) |
| 2628 | (sha256 |
| 2629 | (base32 |
| 2630 | "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0")) |
| 2631 | (modules '((guix build utils))) |
| 2632 | ;; delete bundled jars |
| 2633 | (snippet '(begin (delete-file-recursively "lib") #t)))) |
| 2634 | (build-system ant-build-system) |
| 2635 | ;; Tests fail with |
| 2636 | ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60: |
| 2637 | ;; JAVACODE failed |
| 2638 | (arguments |
| 2639 | `(#:tests? #f |
| 2640 | #:phases |
| 2641 | (modify-phases %standard-phases |
| 2642 | ;; Delete tests to avoid build failure (we don't run them anyway). |
| 2643 | (add-after 'unpack 'delete-tests |
| 2644 | (lambda _ |
| 2645 | (for-each delete-file |
| 2646 | '("src/org/javacc/JavaCCTestCase.java" |
| 2647 | "src/org/javacc/parser/ExpansionTest.java" |
| 2648 | "src/org/javacc/parser/OptionsTest.java" |
| 2649 | "src/org/javacc/jjtree/JJTreeOptionsTest.java")) |
| 2650 | (for-each delete-file-recursively |
| 2651 | '("src/org/javacc/parser/test" |
| 2652 | "src/org/javacc/jjdoc/test")) |
| 2653 | #t)) |
| 2654 | (replace 'install (install-jars "bin/lib"))))) |
| 2655 | (home-page "https://javacc.org/") |
| 2656 | (synopsis "Java parser generator") |
| 2657 | (description "Java Compiler Compiler (JavaCC) is the most popular parser |
| 2658 | generator for use with Java applications. A parser generator is a tool that |
| 2659 | reads a grammar specification and converts it to a Java program that can |
| 2660 | recognize matches to the grammar. In addition to the parser generator itself, |
| 2661 | JavaCC provides other standard capabilities related to parser generation such |
| 2662 | as tree building (via a tool called JJTree included with JavaCC), actions, |
| 2663 | debugging, etc.") |
| 2664 | (license license:bsd-3))) |
| 2665 | |
| 2666 | ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar |
| 2667 | ;; in the bootstrap/ directory. |
| 2668 | (define-public javacc-3 |
| 2669 | (package |
| 2670 | (inherit javacc-4) |
| 2671 | (version "3.2") |
| 2672 | (source (origin |
| 2673 | (method git-fetch) |
| 2674 | (uri (git-reference |
| 2675 | (url "https://github.com/javacc/javacc") |
| 2676 | (commit "release_32"))) |
| 2677 | (file-name (string-append "javacc-" version "-checkout")) |
| 2678 | (sha256 |
| 2679 | (base32 |
| 2680 | "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3")))) |
| 2681 | (arguments |
| 2682 | `(#:tests? #f |
| 2683 | #:phases |
| 2684 | (modify-phases %standard-phases |
| 2685 | (add-before 'build 'set-java-version |
| 2686 | (lambda _ |
| 2687 | (for-each |
| 2688 | (lambda (file) |
| 2689 | (substitute* file |
| 2690 | (("debug=") "source=\"1.4\" debug="))) |
| 2691 | (find-files "." "build.xml")) |
| 2692 | #t)) |
| 2693 | (replace 'install (install-jars "bin/lib"))))))) |
| 2694 | |
| 2695 | (define-public javacc |
| 2696 | (package |
| 2697 | (inherit javacc-4) |
| 2698 | (version "7.0.13") |
| 2699 | (source |
| 2700 | (origin |
| 2701 | (method git-fetch) |
| 2702 | (uri (git-reference |
| 2703 | (url "https://github.com/javacc/javacc") |
| 2704 | (commit (string-append "javacc-" version)))) |
| 2705 | (file-name (git-file-name "javacc" version)) |
| 2706 | (sha256 |
| 2707 | (base32 "0mwbgqk41471iqsa9q2zydyw7l76xnmndyzrpp9nswy9hql6yclw")) |
| 2708 | (modules '((guix build utils))) |
| 2709 | ;; Delete bundled jars. |
| 2710 | (snippet '(begin (for-each delete-file-recursively |
| 2711 | '("bootstrap" "lib")))))) |
| 2712 | (arguments |
| 2713 | `(#:make-flags ; bootstrap from javacc-4 |
| 2714 | ,#~(list (string-append "-Dbootstrap-jar=" |
| 2715 | #$(this-package-native-input "javacc") |
| 2716 | "/share/java/javacc.jar")) |
| 2717 | #:test-target "test" |
| 2718 | #:phases |
| 2719 | (modify-phases %standard-phases |
| 2720 | (replace 'install (install-jars "target")) |
| 2721 | (add-after 'install 'install-bin |
| 2722 | (lambda* (#:key outputs inputs #:allow-other-keys) |
| 2723 | (let* ((out (assoc-ref outputs "out")) |
| 2724 | (dir (string-append out "/share/java")) |
| 2725 | (bin (string-append out "/bin")) |
| 2726 | (javacc (string-append bin "/javacc"))) |
| 2727 | (mkdir-p bin) |
| 2728 | (with-output-to-file javacc |
| 2729 | (lambda _ |
| 2730 | (display |
| 2731 | (string-append "#!/bin/sh\n" |
| 2732 | (assoc-ref inputs "icedtea") "/bin/java" |
| 2733 | " -cp " dir "/javacc.jar" " `basename $0`" " $*")))) |
| 2734 | (chmod javacc #o755) |
| 2735 | ;; symlink to different names to affect the first argument and |
| 2736 | ;; change the behavior of the jar file. |
| 2737 | (symlink javacc (string-append bin "/jjdoc")) |
| 2738 | (symlink javacc (string-append bin "/jjtree")))))))) |
| 2739 | (native-inputs |
| 2740 | (list javacc-4)) |
| 2741 | (inputs (list icedtea-8)))) |
| 2742 | |
| 2743 | (define-public java-ecj |
| 2744 | (package |
| 2745 | (name "java-ecj") |
| 2746 | (version "4.6.3") |
| 2747 | (source |
| 2748 | (origin |
| 2749 | (method url-fetch) |
| 2750 | (uri (string-append "http://archive.eclipse.org/eclipse/" |
| 2751 | "downloads/drops4/R-" version "-201703010400/" |
| 2752 | "ecjsrc-" version ".jar")) |
| 2753 | (sha256 |
| 2754 | (base32 |
| 2755 | "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) |
| 2756 | (build-system ant-build-system) |
| 2757 | (arguments |
| 2758 | `(#:tests? #f ; none included |
| 2759 | #:build-target "build" |
| 2760 | #:phases |
| 2761 | (modify-phases %standard-phases |
| 2762 | (add-after 'unpack 'fix-build.xml |
| 2763 | (lambda _ |
| 2764 | (substitute* "src/build.xml" |
| 2765 | (("^.*MANIFEST.*$") |
| 2766 | "") |
| 2767 | (("^.*properties.*$") |
| 2768 | "<include name=\"**/*.properties\"/> |
| 2769 | <include name=\"**/*.props\"/>")))) |
| 2770 | (add-before 'build 'chdir |
| 2771 | (lambda _ (chdir "src"))) |
| 2772 | (replace 'install (install-jars "."))))) |
| 2773 | (home-page "https://eclipse.org") |
| 2774 | (synopsis "Eclipse Java development tools core batch compiler") |
| 2775 | (description "This package provides the Eclipse Java core batch compiler.") |
| 2776 | (license license:epl1.0))) |
| 2777 | |
| 2778 | (define-public java-cisd-base |
| 2779 | (let ((revision 38938) |
| 2780 | (base-version "14.12.0")) |
| 2781 | (package |
| 2782 | (name "java-cisd-base") |
| 2783 | (version (string-append base-version "-" (number->string revision))) |
| 2784 | (source (origin |
| 2785 | (method svn-fetch) |
| 2786 | (uri (svn-reference |
| 2787 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 2788 | "base/tags/release/" |
| 2789 | (version-major+minor base-version) |
| 2790 | ".x/" base-version "/base/")) |
| 2791 | (revision revision))) |
| 2792 | (file-name (string-append "java-cisd-base-" version "-checkout")) |
| 2793 | (sha256 |
| 2794 | (base32 |
| 2795 | "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy")) |
| 2796 | (modules '((guix build utils))) |
| 2797 | (snippet |
| 2798 | '(begin |
| 2799 | ;; Delete included gradle jar |
| 2800 | (delete-file-recursively "gradle/wrapper") |
| 2801 | ;; Delete pre-built native libraries |
| 2802 | (delete-file-recursively "libs") |
| 2803 | #t)))) |
| 2804 | (build-system ant-build-system) |
| 2805 | (arguments |
| 2806 | `(#:make-flags '("-file" "build/build.xml") |
| 2807 | #:test-target "jar-test" |
| 2808 | #:jdk ,icedtea-8 |
| 2809 | #:phases |
| 2810 | (modify-phases %standard-phases |
| 2811 | (add-after 'unpack 'unpack-build-resources |
| 2812 | (lambda* (#:key inputs #:allow-other-keys) |
| 2813 | (copy-recursively (assoc-ref inputs "build-resources") |
| 2814 | "../build_resources") |
| 2815 | #t)) |
| 2816 | (add-after 'unpack-build-resources 'fix-dependencies |
| 2817 | (lambda* (#:key inputs #:allow-other-keys) |
| 2818 | (substitute* "build/build.xml" |
| 2819 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") |
| 2820 | (search-input-file inputs |
| 2821 | "/share/java/java-testng.jar")) |
| 2822 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") |
| 2823 | (search-input-file inputs |
| 2824 | (string-append |
| 2825 | "/share/java/commons-lang-" |
| 2826 | ,(package-version java-commons-lang) |
| 2827 | ".jar"))) |
| 2828 | (("\\$\\{lib\\}/commons-io/commons-io.jar") |
| 2829 | (search-input-file inputs |
| 2830 | (string-append |
| 2831 | "/lib/m2/commons-io/commons-io/" |
| 2832 | ,(package-version java-commons-io) |
| 2833 | "/commons-io-" |
| 2834 | ,(package-version java-commons-io) |
| 2835 | ".jar"))) |
| 2836 | ;; Remove dependency on svn |
| 2837 | (("<build-info.*") "") |
| 2838 | (("\\$\\{revision.number\\}") |
| 2839 | ,(number->string revision)) |
| 2840 | (("\\$\\{version.number\\}") ,base-version)) |
| 2841 | ;; Remove dependency on classycle |
| 2842 | (substitute* "../build_resources/ant/build-common.xml" |
| 2843 | (("<taskdef name=\"dependency-checker.*") "") |
| 2844 | (("classname=\"classycle.*") "") |
| 2845 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) |
| 2846 | #t)) |
| 2847 | ;; A few tests fail because of the lack of a proper /etc/groups and |
| 2848 | ;; /etc/passwd file in the build container. |
| 2849 | (add-after 'unpack 'disable-broken-tests |
| 2850 | (lambda _ |
| 2851 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java" |
| 2852 | (("Unix.isOperational\\(\\)") "false")) |
| 2853 | #t)) |
| 2854 | ;; These decorators are almost useless and pull in an unpackaged |
| 2855 | ;; dependency. |
| 2856 | (add-after 'unpack 'remove-useless-decorators |
| 2857 | (lambda _ |
| 2858 | (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java" |
| 2859 | (("@Private") "") |
| 2860 | (("import ch.rinn.restrictions.Private;") "")) |
| 2861 | (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java" |
| 2862 | (("@Friend.*") "") |
| 2863 | (("import ch.rinn.restrictions.Friend;") "")) |
| 2864 | #t)) |
| 2865 | (add-before 'configure 'build-native-code |
| 2866 | (lambda* (#:key inputs #:allow-other-keys) |
| 2867 | (let ((jdk (assoc-ref inputs "jdk")) |
| 2868 | (dir ,(match (%current-system) |
| 2869 | ("i686-linux" |
| 2870 | "i386-Linux") |
| 2871 | ((or "armhf-linux" "aarch64-linux") |
| 2872 | "arm-Linux") |
| 2873 | ((or "x86_64-linux") |
| 2874 | "amd64-Linux") |
| 2875 | (_ "unknown-Linux")))) |
| 2876 | (with-directory-excursion "source/c" |
| 2877 | (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c" |
| 2878 | (string-append "-I" jdk "/include") |
| 2879 | (string-append "-I" jdk "/include/linux") |
| 2880 | "-o" "libunix.so") |
| 2881 | (invoke "gcc" "-shared" "-O3" "-fPIC" |
| 2882 | "-DMACHINE_BYTE_ORDER=1" |
| 2883 | "copyCommon.c" |
| 2884 | "copyByteChar.c" |
| 2885 | "copyByteDouble.c" |
| 2886 | "copyByteFloat.c" |
| 2887 | "copyByteInt.c" |
| 2888 | "copyByteLong.c" |
| 2889 | "copyByteShort.c" |
| 2890 | (string-append "-I" jdk "/include") |
| 2891 | (string-append "-I" jdk "/include/linux") |
| 2892 | "-o" "libnativedata.so")) |
| 2893 | (install-file "source/c/libunix.so" |
| 2894 | (string-append "libs/native/unix/" dir)) |
| 2895 | (install-file "source/c/libnativedata.so" |
| 2896 | (string-append "libs/native/nativedata/" dir)) |
| 2897 | #t))) |
| 2898 | ;; In the "check" phase we only build the test executable. |
| 2899 | (add-after 'check 'run-tests |
| 2900 | (lambda _ |
| 2901 | (invoke "java" "-jar" "targets/dist/sis-base-test.jar") |
| 2902 | (delete-file "targets/dist/sis-base-test.jar") |
| 2903 | #t)) |
| 2904 | (replace 'install (install-jars "targets/dist"))))) |
| 2905 | (native-inputs |
| 2906 | `(("jdk" ,icedtea-8) |
| 2907 | ("java-commons-lang" ,java-commons-lang) |
| 2908 | ("java-commons-io" ,java-commons-io) |
| 2909 | ("java-testng" ,java-testng) |
| 2910 | ("build-resources" |
| 2911 | ,(origin |
| 2912 | (method svn-fetch) |
| 2913 | (uri (svn-reference |
| 2914 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 2915 | "base/tags/release/" |
| 2916 | (version-major+minor base-version) |
| 2917 | ".x/" base-version |
| 2918 | "/build_resources/")) |
| 2919 | (revision revision))) |
| 2920 | (sha256 |
| 2921 | (base32 |
| 2922 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) |
| 2923 | (home-page "https://svnsis.ethz.ch") |
| 2924 | (synopsis "Utility classes for libraries from ETH Zurich") |
| 2925 | (description "This library supplies some utility classes needed for |
| 2926 | libraries from the SIS division at ETH Zurich like jHDF5.") |
| 2927 | ;; The C sources are under a non-copyleft license, which looks like a |
| 2928 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. |
| 2929 | (license (list license:asl2.0 |
| 2930 | (license:non-copyleft "file://source/c/COPYING")))))) |
| 2931 | |
| 2932 | (define-public java-cisd-args4j |
| 2933 | (let ((revision 39162) |
| 2934 | (base-version "9.11.2")) |
| 2935 | (package |
| 2936 | (name "java-cisd-args4j") |
| 2937 | (version (string-append base-version "-" (number->string revision))) |
| 2938 | (source (origin |
| 2939 | (method svn-fetch) |
| 2940 | (uri (svn-reference |
| 2941 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 2942 | "args4j/tags/release/" |
| 2943 | (version-major+minor base-version) |
| 2944 | ".x/" base-version "/args4j/")) |
| 2945 | (revision revision))) |
| 2946 | (file-name (string-append "java-cisd-args4j-" version "-checkout")) |
| 2947 | (sha256 |
| 2948 | (base32 |
| 2949 | "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2")))) |
| 2950 | (build-system ant-build-system) |
| 2951 | (arguments |
| 2952 | `(#:make-flags '("-file" "build/build.xml") |
| 2953 | #:tests? #f ; there are no tests |
| 2954 | #:modules ((guix build ant-build-system) |
| 2955 | (guix build utils) |
| 2956 | (guix build java-utils) |
| 2957 | (sxml simple) |
| 2958 | (sxml transform) |
| 2959 | (sxml xpath)) |
| 2960 | #:phases |
| 2961 | (modify-phases %standard-phases |
| 2962 | (add-after 'unpack 'unpack-build-resources |
| 2963 | (lambda* (#:key inputs #:allow-other-keys) |
| 2964 | (mkdir-p "../build_resources") |
| 2965 | (copy-recursively (assoc-ref inputs "build-resources") |
| 2966 | "../build_resources") |
| 2967 | (mkdir-p "../build_resources/lib"))) |
| 2968 | (add-after 'unpack-build-resources 'fix-dependencies |
| 2969 | (lambda* (#:key inputs #:allow-other-keys) |
| 2970 | ;; FIXME: There should be a more convenient abstraction for |
| 2971 | ;; editing XML files. |
| 2972 | (with-directory-excursion "../build_resources/ant/" |
| 2973 | (chmod "build-common.xml" #o664) |
| 2974 | (call-with-output-file "build-common.xml.new" |
| 2975 | (lambda (port) |
| 2976 | (sxml->xml |
| 2977 | (pre-post-order |
| 2978 | (with-input-from-file "build-common.xml" |
| 2979 | (lambda _ (xml->sxml #:trim-whitespace? #t))) |
| 2980 | `(;; Remove dependency on classycle and custom ant tasks |
| 2981 | (taskdef . ,(lambda (tag . kids) |
| 2982 | (let ((name ((sxpath '(name *text*)) kids))) |
| 2983 | (if (or (member "build-info" name) |
| 2984 | (member "dependency-checker" name) |
| 2985 | (member "build-java-subprojects" name) |
| 2986 | (member "project-classpath" name)) |
| 2987 | '() ; skip |
| 2988 | `(,tag ,@kids))))) |
| 2989 | (typedef . ,(lambda (tag . kids) |
| 2990 | (let ((name ((sxpath '(name *text*)) kids))) |
| 2991 | (if (member "recursive-jar" name) |
| 2992 | '() ; skip |
| 2993 | `(,tag ,@kids))))) |
| 2994 | (build-java-subprojects . ,(lambda _ '())) |
| 2995 | ;; Ignore everything else |
| 2996 | (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) |
| 2997 | (*text* . ,(lambda (_ txt) txt)))) |
| 2998 | port))) |
| 2999 | (rename-file "build-common.xml.new" "build-common.xml")) |
| 3000 | (substitute* "build/build.xml" |
| 3001 | (("\\$\\{lib\\}/cisd-base/cisd-base.jar") |
| 3002 | (search-input-file inputs "/share/java/sis-base.jar")) |
| 3003 | ;; Remove dependency on svn |
| 3004 | (("<build-info.*") "") |
| 3005 | (("\\$\\{revision.number\\}") |
| 3006 | ,(number->string revision)) |
| 3007 | (("\\$\\{version.number\\}") ,base-version) |
| 3008 | ;; Don't use custom ant tasks. |
| 3009 | (("recursive-jar") "jar") |
| 3010 | (("<project-classpath.*") "")))) |
| 3011 | (replace 'install (install-jars "targets/dist"))))) |
| 3012 | (inputs |
| 3013 | (list java-cisd-base)) |
| 3014 | (native-inputs |
| 3015 | `(("ecj" ,java-ecj) |
| 3016 | ("build-resources" |
| 3017 | ,(origin |
| 3018 | (method svn-fetch) |
| 3019 | (uri (svn-reference |
| 3020 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3021 | "args4j/tags/release/" |
| 3022 | (version-major+minor base-version) |
| 3023 | ".x/" base-version |
| 3024 | "/build_resources/")) |
| 3025 | (revision revision))) |
| 3026 | (sha256 |
| 3027 | (base32 |
| 3028 | "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf")) |
| 3029 | (modules '((guix build utils))) |
| 3030 | ;; Delete bundled pre-built jars. |
| 3031 | (snippet |
| 3032 | '(begin (delete-file-recursively "lib/") #t)))))) |
| 3033 | (home-page "https://svnsis.ethz.ch") |
| 3034 | (synopsis "Command line parser library") |
| 3035 | (description "This package provides a parser for command line arguments.") |
| 3036 | (license license:asl2.0)))) |
| 3037 | |
| 3038 | (define-public java-cisd-jhdf5 |
| 3039 | (let ((revision 39162) |
| 3040 | (base-version "14.12.6")) |
| 3041 | (package |
| 3042 | (name "java-cisd-jhdf5") |
| 3043 | (version (string-append base-version "-" (number->string revision))) |
| 3044 | (source (origin |
| 3045 | (method svn-fetch) |
| 3046 | (uri (svn-reference |
| 3047 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3048 | "jhdf5/tags/release/" |
| 3049 | (version-major+minor base-version) |
| 3050 | ".x/" base-version "/jhdf5/")) |
| 3051 | (revision revision))) |
| 3052 | (file-name (string-append "java-cisd-jhdf5-" version "-checkout")) |
| 3053 | (sha256 |
| 3054 | (base32 |
| 3055 | "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0")) |
| 3056 | (modules '((guix build utils))) |
| 3057 | (snippet |
| 3058 | '(begin |
| 3059 | ;; Delete included gradle jar |
| 3060 | (delete-file-recursively "gradle/wrapper") |
| 3061 | ;; Delete pre-built native libraries |
| 3062 | (delete-file-recursively "libs"))))) |
| 3063 | (build-system ant-build-system) |
| 3064 | (arguments |
| 3065 | `(#:make-flags '("-file" "build/build.xml") |
| 3066 | #:build-target "jar-all" |
| 3067 | #:test-target "jar-test" |
| 3068 | #:phases |
| 3069 | (modify-phases %standard-phases |
| 3070 | ;; FIXME: this build phase fails. |
| 3071 | (delete 'generate-jar-indices) |
| 3072 | ;; Don't erase results from the build phase when building tests. |
| 3073 | (add-after 'unpack 'separate-test-target-from-clean |
| 3074 | (lambda _ |
| 3075 | (substitute* "build/build.xml" |
| 3076 | (("\"jar-test\" depends=\"clean, ") |
| 3077 | "\"jar-test\" depends=\"")))) |
| 3078 | (add-after 'unpack 'unpack-build-resources |
| 3079 | (lambda* (#:key inputs #:allow-other-keys) |
| 3080 | (copy-recursively (assoc-ref inputs "build-resources") |
| 3081 | "../build_resources") |
| 3082 | (delete-file-recursively "../build_resources/lib/") |
| 3083 | (mkdir-p "../build_resources/lib") |
| 3084 | ;; Remove dependency on classycle |
| 3085 | (substitute* "../build_resources/ant/build-common.xml" |
| 3086 | (("<taskdef name=\"dependency-checker.*") "") |
| 3087 | (("classname=\"classycle.*") "") |
| 3088 | (("classpath=\"\\$\\{lib\\}/classycle.*") "")) |
| 3089 | ;; Remove dependency on svn |
| 3090 | (substitute* "build/build.xml" |
| 3091 | (("<build-info.*") "") |
| 3092 | (("\\$\\{revision.number\\}") |
| 3093 | ,(number->string revision)) |
| 3094 | (("\\$\\{version.number\\}") ,base-version)))) |
| 3095 | (add-after 'unpack-build-resources 'fix-dependencies |
| 3096 | (lambda* (#:key inputs #:allow-other-keys) |
| 3097 | (substitute* "../build_resources/ant/build-common.xml" |
| 3098 | (("../libraries/testng/testng-jdk15.jar") |
| 3099 | (search-input-file inputs |
| 3100 | "/share/java/java-testng.jar"))) |
| 3101 | (substitute* "build/build.xml" |
| 3102 | (("\\$\\{lib\\}/sis-base/sis-base.jar") |
| 3103 | (search-input-file inputs |
| 3104 | "/share/java/sis-base.jar")) |
| 3105 | (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar") |
| 3106 | (search-input-file inputs |
| 3107 | "/share/java/cisd-args4j.jar")) |
| 3108 | (("\\$\\{lib\\}/commons-lang/commons-lang.jar") |
| 3109 | (search-input-file inputs |
| 3110 | (string-append |
| 3111 | "/share/java/commons-lang-" |
| 3112 | ,(package-version java-commons-lang) |
| 3113 | ".jar"))) |
| 3114 | (("\\$\\{lib\\}/commons-io/commons-io.jar") |
| 3115 | (search-input-file inputs |
| 3116 | (string-append |
| 3117 | "/lib/m2/commons-io/commons-io/" |
| 3118 | ,(package-version java-commons-io) |
| 3119 | "/commons-io-" |
| 3120 | ,(package-version java-commons-io) |
| 3121 | ".jar"))) |
| 3122 | (("\\$\\{lib\\}/testng/testng-jdk15.jar") |
| 3123 | (search-input-file inputs |
| 3124 | "/share/java/java-testng.jar")) |
| 3125 | (("\\$\\{lib\\}/junit4/junit.jar") |
| 3126 | (car (find-files (assoc-ref inputs "java-junit") "jar$"))) |
| 3127 | (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar") |
| 3128 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 3129 | "jar$")))) |
| 3130 | ;; Remove dependency on ch.rinn.restrictions |
| 3131 | (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/" |
| 3132 | (substitute* '("BitSetConversionUtils.java" |
| 3133 | "HDF5Utils.java") |
| 3134 | (("import ch.rinn.restrictions.Private;") "") |
| 3135 | (("@Private") ""))) |
| 3136 | (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/" |
| 3137 | (substitute* '("BitSetConversionTest.java" |
| 3138 | "h5ar/HDF5ArchiverTest.java") |
| 3139 | (("import ch.rinn.restrictions.Friend;") "") |
| 3140 | (("@Friend.*") "")) |
| 3141 | ;; Remove leftovers from removing @Friend |
| 3142 | (substitute* "h5ar/HDF5ArchiverTest.java" |
| 3143 | (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") |
| 3144 | ""))))) |
| 3145 | (add-before 'configure 'build-native-library |
| 3146 | (lambda* (#:key inputs #:allow-other-keys) |
| 3147 | (let ((jdk (assoc-ref inputs "jdk")) |
| 3148 | (hdf5 (assoc-ref inputs "hdf5")) |
| 3149 | (dir ,(match (%current-system) |
| 3150 | ("i686-linux" |
| 3151 | "i386-Linux") |
| 3152 | ((or "armhf-linux" "aarch64-linux") |
| 3153 | "arm-Linux") |
| 3154 | ((or "x86_64-linux") |
| 3155 | "amd64-Linux") |
| 3156 | (_ "unknown-Linux")))) |
| 3157 | (with-directory-excursion "source/c" |
| 3158 | (apply invoke `("gcc" "-shared" "-O3" |
| 3159 | "-fPIC" |
| 3160 | "-Wl,--exclude-libs,ALL" |
| 3161 | "-Wno-error=implicit-function-declaration" |
| 3162 | ,@(find-files "jhdf5" "\\.c$") |
| 3163 | ,@(find-files "hdf-java" "\\.c$") |
| 3164 | ,(string-append "-I" hdf5 "/include") |
| 3165 | ,(string-append "-I" jdk "/include") |
| 3166 | ,(string-append "-I" jdk "/include/linux") |
| 3167 | ,(string-append hdf5 "/lib/libhdf5.a") |
| 3168 | "-o" "libjhdf5.so" "-lz"))) |
| 3169 | (install-file "source/c/libjhdf5.so" |
| 3170 | (string-append "libs/native/jhdf5/" dir))))) |
| 3171 | ;; In the "check" phase we only build the test executable. |
| 3172 | (add-after 'check 'run-tests |
| 3173 | (lambda _ |
| 3174 | (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") |
| 3175 | (delete-file "targets/dist/sis-jhdf5-test.jar"))) |
| 3176 | (replace 'install |
| 3177 | (install-jars "targets/dist"))))) |
| 3178 | (inputs |
| 3179 | (list java-cisd-base |
| 3180 | java-cisd-args4j |
| 3181 | java-commons-lang |
| 3182 | java-commons-io |
| 3183 | hdf5-1.8 |
| 3184 | zlib)) |
| 3185 | (native-inputs |
| 3186 | `(("jdk" ,icedtea-8) |
| 3187 | ("java-testng" ,java-testng) |
| 3188 | ("java-junit" ,java-junit) |
| 3189 | ("java-jmock" ,java-jmock) |
| 3190 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 3191 | ("build-resources" |
| 3192 | ,(origin |
| 3193 | (method svn-fetch) |
| 3194 | (uri (svn-reference |
| 3195 | (url (string-append "http://svnsis.ethz.ch/repos/cisd/" |
| 3196 | "jhdf5/tags/release/" |
| 3197 | (version-major+minor base-version) |
| 3198 | ".x/" base-version |
| 3199 | "/build_resources/")) |
| 3200 | (revision revision))) |
| 3201 | (sha256 |
| 3202 | (base32 |
| 3203 | "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk")))))) |
| 3204 | (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/") |
| 3205 | (synopsis "Java binding for HDF5") |
| 3206 | (description "JHDF5 is a high-level API in Java for reading and writing |
| 3207 | HDF5 files, building on the libraries provided by the HDF Group.") |
| 3208 | ;; The C sources are under a non-copyleft license, which looks like a |
| 3209 | ;; variant of the BSD licenses. The whole package is under the ASL2.0. |
| 3210 | (license (list license:asl2.0 |
| 3211 | (license:non-copyleft "file://source/c/COPYING")))))) |
| 3212 | |
| 3213 | (define-public java-classpathx-servletapi |
| 3214 | (package |
| 3215 | (name "java-classpathx-servletapi") |
| 3216 | (version "3.0.1") |
| 3217 | (source (origin |
| 3218 | (method url-fetch) |
| 3219 | (uri (string-append "mirror://gnu/classpathx/servletapi/" |
| 3220 | "servletapi-" version ".tar.gz")) |
| 3221 | (sha256 |
| 3222 | (base32 |
| 3223 | "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x")))) |
| 3224 | (build-system ant-build-system) |
| 3225 | (arguments |
| 3226 | `(#:tests? #f ; there is no test target |
| 3227 | #:build-target "compile" |
| 3228 | #:make-flags |
| 3229 | ,#~(list "-Dbuild.compiler=javac1.8" |
| 3230 | (string-append "-Ddist=" #$output)) |
| 3231 | #:phases |
| 3232 | (modify-phases %standard-phases |
| 3233 | (replace 'install |
| 3234 | (lambda* (#:key make-flags #:allow-other-keys) |
| 3235 | (apply invoke `("ant" "dist" ,@make-flags))))))) |
| 3236 | (home-page "https://www.gnu.org/software/classpathx/") |
| 3237 | (synopsis "Java servlet API implementation") |
| 3238 | (description "This is the GNU servlet API distribution, part of the |
| 3239 | ClasspathX project. It provides implementations of version 3.0 of the servlet |
| 3240 | API and version 2.1 of the Java ServerPages API.") |
| 3241 | (license license:gpl3+))) |
| 3242 | |
| 3243 | (define-public java-javaee-servletapi |
| 3244 | (package |
| 3245 | (name "java-javaee-servletapi") |
| 3246 | (version "3.1.0") |
| 3247 | (source (origin |
| 3248 | (method git-fetch) |
| 3249 | (uri (git-reference |
| 3250 | (url "https://github.com/javaee/servlet-spec") |
| 3251 | (commit version))) |
| 3252 | (file-name (git-file-name name version)) |
| 3253 | (sha256 |
| 3254 | (base32 |
| 3255 | "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl")))) |
| 3256 | (build-system ant-build-system) |
| 3257 | (arguments |
| 3258 | `(#:jar-name "javax-servletapi.jar" |
| 3259 | ;; no tests |
| 3260 | #:tests? #f |
| 3261 | #:source-dir "src/main/java" |
| 3262 | #:phases |
| 3263 | (modify-phases %standard-phases |
| 3264 | (add-before 'build 'copy-resources |
| 3265 | (lambda _ |
| 3266 | (mkdir-p "build/classes/javax/servlet/http") |
| 3267 | (let ((from-prefix "src/main/java/javax/servlet/") |
| 3268 | (to-prefix "build/classes/javax/servlet/")) |
| 3269 | (for-each (lambda (f) |
| 3270 | (copy-file (string-append from-prefix f) |
| 3271 | (string-append to-prefix f))) |
| 3272 | (list "LocalStrings_ja.properties" |
| 3273 | "LocalStrings.properties" |
| 3274 | "LocalStrings_fr.properties" |
| 3275 | "http/LocalStrings_es.properties" |
| 3276 | "http/LocalStrings_ja.properties" |
| 3277 | "http/LocalStrings.properties" |
| 3278 | "http/LocalStrings_fr.properties"))) |
| 3279 | #t))))) |
| 3280 | (native-inputs |
| 3281 | (list unzip)) |
| 3282 | (home-page "https://javaee.github.io/servlet-spec/") |
| 3283 | (synopsis "Java servlet API") |
| 3284 | (description "Java Servlet is the foundation web specification in the |
| 3285 | Java Enterprise Platform. Developers can build web applications using the |
| 3286 | Servlet API to interact with the request/response workflow. This project |
| 3287 | provides information on the continued development of the Java Servlet |
| 3288 | specification.") |
| 3289 | ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1. |
| 3290 | ;; Some files are licensed under ASL 2.0. |
| 3291 | (license (list license:asl2.0 license:gpl2 license:cddl1.1)))) |
| 3292 | |
| 3293 | (define-public java-swt |
| 3294 | (package |
| 3295 | (name "java-swt") |
| 3296 | (version "4.7.1a") |
| 3297 | (source |
| 3298 | ;; The types of many variables and procedures differ in the sources |
| 3299 | ;; dependent on whether the target architecture is a 32-bit system or a |
| 3300 | ;; 64-bit system. Instead of patching the sources on demand in a build |
| 3301 | ;; phase we download either the 32-bit archive (which mostly uses "int" |
| 3302 | ;; types) or the 64-bit archive (which mostly uses "long" types). |
| 3303 | (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9") |
| 3304 | (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q") |
| 3305 | (file32 "x86") |
| 3306 | (file64 "x86_64")) |
| 3307 | (let-values (((hash file) |
| 3308 | (match (or (%current-target-system) (%current-system)) |
| 3309 | ("x86_64-linux" (values hash64 file64)) |
| 3310 | (_ (values hash32 file32))))) |
| 3311 | (origin |
| 3312 | (method url-fetch) |
| 3313 | (uri (string-append |
| 3314 | "https://archive.eclipse.org/eclipse/downloads/drops4/" |
| 3315 | "R-" version "-201710090410/swt-" version |
| 3316 | "-gtk-linux-" file ".zip")) |
| 3317 | (sha256 (base32 hash)))))) |
| 3318 | (build-system ant-build-system) |
| 3319 | (arguments |
| 3320 | `(#:jar-name "swt.jar" |
| 3321 | #:jdk ,icedtea-8 |
| 3322 | #:tests? #f ; no "check" target |
| 3323 | #:phases |
| 3324 | (modify-phases %standard-phases |
| 3325 | (replace 'unpack |
| 3326 | (lambda* (#:key source #:allow-other-keys) |
| 3327 | (mkdir "swt") |
| 3328 | (invoke "unzip" source "-d" "swt") |
| 3329 | (chdir "swt") |
| 3330 | (mkdir "src") |
| 3331 | (invoke "unzip" "src.zip" "-d" "src"))) |
| 3332 | ;; The classpath contains invalid icecat jars. Since we don't need |
| 3333 | ;; anything other than the JDK on the classpath, we can simply unset |
| 3334 | ;; it. |
| 3335 | (add-after 'configure 'unset-classpath |
| 3336 | (lambda _ (unsetenv "CLASSPATH") #t)) |
| 3337 | (add-before 'build 'build-native |
| 3338 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3339 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) |
| 3340 | ;; Build shared libraries. Users of SWT have to set the system |
| 3341 | ;; property swt.library.path to the "lib" directory of this |
| 3342 | ;; package output. |
| 3343 | (mkdir-p lib) |
| 3344 | (setenv "OUTPUT_DIR" lib) |
| 3345 | (setenv "CC" ,(cc-for-target)) |
| 3346 | (with-directory-excursion "src" |
| 3347 | (invoke "bash" "build.sh"))))) |
| 3348 | (add-after 'install 'install-native |
| 3349 | (lambda* (#:key outputs #:allow-other-keys) |
| 3350 | (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) |
| 3351 | (for-each (lambda (file) |
| 3352 | (install-file file lib)) |
| 3353 | (find-files "." "\\.so$")) |
| 3354 | #t)))))) |
| 3355 | (inputs |
| 3356 | `(("gtk" ,gtk+-2) |
| 3357 | ("libxtst" ,libxtst) |
| 3358 | ("libxt" ,libxt) |
| 3359 | ("mesa" ,mesa) |
| 3360 | ("glu" ,glu))) |
| 3361 | (native-inputs |
| 3362 | (list pkg-config unzip)) |
| 3363 | (home-page "https://www.eclipse.org/swt/") |
| 3364 | (synopsis "Widget toolkit for Java") |
| 3365 | (description |
| 3366 | "SWT is a widget toolkit for Java designed to provide efficient, portable |
| 3367 | access to the user-interface facilities of the operating systems on which it |
| 3368 | is implemented.") |
| 3369 | ;; SWT code is licensed under EPL1.0 |
| 3370 | ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1 |
| 3371 | ;; Cairo bindings contain code under MPL1.1 |
| 3372 | ;; XULRunner 1.9 bindings contain code under MPL2.0 |
| 3373 | (license (list |
| 3374 | license:epl1.0 |
| 3375 | license:mpl1.1 |
| 3376 | license:mpl2.0 |
| 3377 | license:lgpl2.1+)))) |
| 3378 | |
| 3379 | ;; java-hamcrest-core uses qdox version 1.12. We package this version instead |
| 3380 | ;; of the latest release. |
| 3381 | (define-public java-qdox-1.12 |
| 3382 | (package |
| 3383 | (name "java-qdox") |
| 3384 | (version "1.12.1") |
| 3385 | (source (origin |
| 3386 | (method url-fetch) |
| 3387 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3388 | "com/thoughtworks/qdox/qdox/" version |
| 3389 | "/qdox-" version "-sources.jar")) |
| 3390 | (sha256 |
| 3391 | (base32 |
| 3392 | "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl")))) |
| 3393 | (build-system ant-build-system) |
| 3394 | (arguments |
| 3395 | `(;; Tests require junit |
| 3396 | #:tests? #f |
| 3397 | #:jar-name "qdox.jar" |
| 3398 | #:phases |
| 3399 | (modify-phases %standard-phases |
| 3400 | (replace 'unpack |
| 3401 | (lambda* (#:key source #:allow-other-keys) |
| 3402 | (mkdir "src") |
| 3403 | (with-directory-excursion "src" |
| 3404 | (invoke "jar" "-xf" source)))) |
| 3405 | ;; At this point we don't have junit, so we must remove the API |
| 3406 | ;; tests. |
| 3407 | (add-after 'unpack 'delete-tests |
| 3408 | (lambda _ |
| 3409 | (delete-file-recursively "src/com/thoughtworks/qdox/junit") |
| 3410 | #t))))) |
| 3411 | (home-page "https://github.com/codehaus/qdox") |
| 3412 | (synopsis "Parse definitions from Java source files") |
| 3413 | (description |
| 3414 | "QDox is a high speed, small footprint parser for extracting |
| 3415 | class/interface/method definitions from source files complete with JavaDoc |
| 3416 | @code{@@tags}. It is designed to be used by active code generators or |
| 3417 | documentation tools.") |
| 3418 | (license license:asl2.0))) |
| 3419 | |
| 3420 | (define-public java-qdox |
| 3421 | (package |
| 3422 | (name "java-qdox") |
| 3423 | ; Newer version exists, but this version is required by java-plexus-component-metadata |
| 3424 | (version "2.0-M2") |
| 3425 | (source (origin |
| 3426 | (method url-fetch) |
| 3427 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox |
| 3428 | ;; Older releases at https://github.com/codehaus/qdox/ |
| 3429 | ;; Note: The release at maven is pre-generated. The release at |
| 3430 | ;; github requires jflex. |
| 3431 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3432 | "com/thoughtworks/qdox/qdox/" version |
| 3433 | "/qdox-" version "-sources.jar")) |
| 3434 | (sha256 |
| 3435 | (base32 |
| 3436 | "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x")))) |
| 3437 | (build-system ant-build-system) |
| 3438 | (arguments |
| 3439 | `(#:jar-name "qdox.jar" |
| 3440 | #:tests? #f; no tests |
| 3441 | #:phases |
| 3442 | (modify-phases %standard-phases |
| 3443 | (add-before 'install 'create-pom |
| 3444 | (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version |
| 3445 | #:name "QDox")) |
| 3446 | (replace 'install |
| 3447 | (install-from-pom "pom.xml"))))) |
| 3448 | (home-page "https://github.com/codehaus/qdox") |
| 3449 | (synopsis "Parse definitions from Java source files") |
| 3450 | (description "QDox is a high speed, small footprint parser for extracting |
| 3451 | class/interface/method definitions from source files complete with JavaDoc |
| 3452 | @code{@@tags}. It is designed to be used by active code generators or |
| 3453 | documentation tools.") |
| 3454 | (license license:asl2.0))) |
| 3455 | |
| 3456 | (define-public java-qdox-2 |
| 3457 | (package |
| 3458 | (inherit java-qdox) |
| 3459 | (name "java-qdox-2") |
| 3460 | (version "2.2.0") |
| 3461 | (source (origin |
| 3462 | (method url-fetch) |
| 3463 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3464 | "com/thoughtworks/qdox/qdox/" version |
| 3465 | "/qdox-" version "-sources.jar")) |
| 3466 | (sha256 |
| 3467 | (base32 |
| 3468 | "1j3xdbh590x2yiqqrrbf0bb43djyzjzjibqxfnj80341fgfhcj31")))) |
| 3469 | (arguments |
| 3470 | `(#:jar-name "qdox.jar" |
| 3471 | #:jdk ,openjdk11 |
| 3472 | #:tests? #f |
| 3473 | #:phases |
| 3474 | (modify-phases %standard-phases |
| 3475 | (add-before 'install 'create-pom |
| 3476 | (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version |
| 3477 | #:name "QDox")) |
| 3478 | (replace 'install |
| 3479 | (install-from-pom "pom.xml"))))))) |
| 3480 | |
| 3481 | (define-public java-jarjar |
| 3482 | (package |
| 3483 | (name "java-jarjar") |
| 3484 | (version "1.4") |
| 3485 | (source (origin |
| 3486 | (method url-fetch) |
| 3487 | (uri (string-append |
| 3488 | "https://storage.googleapis.com/google-code-archive-downloads/v2/" |
| 3489 | "code.google.com/jarjar/jarjar-src-" version ".zip")) |
| 3490 | (sha256 |
| 3491 | (base32 |
| 3492 | "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl")) |
| 3493 | (modules '((guix build utils))) |
| 3494 | (snippet |
| 3495 | '(begin |
| 3496 | ;; Delete bundled thirds-party jar archives. |
| 3497 | (delete-file-recursively "lib") |
| 3498 | (delete-file "src/test/enumtest.jar") |
| 3499 | ;; the CLASSPATH needs this directory, create an empty one |
| 3500 | (mkdir-p "lib") |
| 3501 | #t)))) |
| 3502 | (build-system ant-build-system) |
| 3503 | (arguments |
| 3504 | `(;; Tests require junit, which ultimately depends on this package. |
| 3505 | #:tests? #f |
| 3506 | #:build-target "jar" |
| 3507 | #:phases |
| 3508 | (modify-phases %standard-phases |
| 3509 | (add-before 'build 'do-not-use-bundled-asm |
| 3510 | (lambda* (#:key inputs #:allow-other-keys) |
| 3511 | (substitute* "build.xml" |
| 3512 | (("<path id=\"path.build\">") |
| 3513 | (string-append "<path id=\"path.build\"><fileset dir=\"" |
| 3514 | (assoc-ref inputs "java-asm-bootstrap") |
| 3515 | "/lib/m2\" includes=\"**/*.jar\"/>")) |
| 3516 | (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "") |
| 3517 | (("lib/asm-commons-4.0.jar") |
| 3518 | (car (find-files (assoc-ref inputs "java-asm-bootstrap") |
| 3519 | "asm-6.0.jar"))) |
| 3520 | (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>") |
| 3521 | (string-append "<include name=\"org/objectweb/asm/" |
| 3522 | "commons/Remap*.class\"/>" |
| 3523 | "<include name=\"org/objectweb/asm/*.class\"/>" |
| 3524 | "<include name=\"org/objectweb/asm/" |
| 3525 | "signature/*.class\"/>" |
| 3526 | "<include name=\"org/objectweb/asm/" |
| 3527 | "commons/SignatureRemapper.class\"/>"))) |
| 3528 | #t)) |
| 3529 | (add-before 'build 'remove-maven-dependency |
| 3530 | (lambda _ |
| 3531 | ;; We do not need to build jarjar as a maven plugin just yet, so |
| 3532 | ;; remove this file. Maven requires jarjar (but not that plugin), |
| 3533 | ;; so removing it improves the bootstrap. |
| 3534 | (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java") |
| 3535 | #t)) |
| 3536 | (replace 'install |
| 3537 | (lambda* (#:key outputs #:allow-other-keys) |
| 3538 | (let ((target (string-append (assoc-ref outputs "out") |
| 3539 | "/share/java"))) |
| 3540 | (install-file (string-append "dist/jarjar-" ,version ".jar") |
| 3541 | target)) |
| 3542 | #t))))) |
| 3543 | (inputs |
| 3544 | (list java-asm-bootstrap)) |
| 3545 | (native-inputs |
| 3546 | (list unzip)) |
| 3547 | (home-page "https://code.google.com/archive/p/jarjar/") |
| 3548 | (synopsis "Repackage Java libraries") |
| 3549 | (description |
| 3550 | "Jar Jar Links is a utility that makes it easy to repackage Java |
| 3551 | libraries and embed them into your own distribution. Jar Jar Links includes |
| 3552 | an Ant task that extends the built-in @code{jar} task.") |
| 3553 | (license license:asl2.0))) |
| 3554 | |
| 3555 | (define-public java-hamcrest-core |
| 3556 | (package |
| 3557 | (name "java-hamcrest-core") |
| 3558 | (version "1.3") |
| 3559 | (source (origin |
| 3560 | (method git-fetch) |
| 3561 | (uri (git-reference |
| 3562 | (url "https://github.com/hamcrest/JavaHamcrest/") |
| 3563 | (commit (string-append "hamcrest-java-" version)))) |
| 3564 | (file-name (git-file-name name version)) |
| 3565 | (sha256 |
| 3566 | (base32 |
| 3567 | "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63")) |
| 3568 | (modules '((guix build utils))) |
| 3569 | (snippet |
| 3570 | '(begin |
| 3571 | ;; Delete bundled thirds-party jar archives. |
| 3572 | (delete-file-recursively "lib") |
| 3573 | #t)))) |
| 3574 | (build-system ant-build-system) |
| 3575 | (arguments |
| 3576 | `(#:tests? #f ; Tests require junit |
| 3577 | #:modules ((guix build ant-build-system) |
| 3578 | (guix build java-utils) |
| 3579 | (guix build utils) |
| 3580 | (srfi srfi-1)) |
| 3581 | #:make-flags (list (string-append "-Dversion=" ,version)) |
| 3582 | #:test-target "unit-test" |
| 3583 | #:build-target "core" |
| 3584 | #:phases |
| 3585 | (modify-phases %standard-phases |
| 3586 | ;; Disable unit tests, because they require junit, which requires |
| 3587 | ;; hamcrest-core. We also give a fixed value to the "Built-Date" |
| 3588 | ;; attribute from the manifest for reproducibility. |
| 3589 | (add-before 'configure 'patch-build.xml |
| 3590 | (lambda _ |
| 3591 | (substitute* "build.xml" |
| 3592 | (("unit-test, ") "") |
| 3593 | (("\\$\\{build.timestamp\\}") "guix")) |
| 3594 | #t)) |
| 3595 | ;; Java's "getMethods()" returns methods in an unpredictable order. |
| 3596 | ;; To make the output of the generated code deterministic we must |
| 3597 | ;; sort the array of methods. |
| 3598 | (add-after 'unpack 'make-method-order-deterministic |
| 3599 | (lambda _ |
| 3600 | (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java" |
| 3601 | (("import java\\.util\\.Iterator;" line) |
| 3602 | (string-append line "\n" |
| 3603 | "import java.util.Arrays; import java.util.Comparator;")) |
| 3604 | (("allMethods = cls\\.getMethods\\(\\);" line) |
| 3605 | (string-append "_" line |
| 3606 | " |
| 3607 | private Method[] getSortedMethods() { |
| 3608 | Arrays.sort(_allMethods, new Comparator<Method>() { |
| 3609 | @Override |
| 3610 | public int compare(Method a, Method b) { |
| 3611 | return a.toString().compareTo(b.toString()); |
| 3612 | } |
| 3613 | }); |
| 3614 | return _allMethods; |
| 3615 | } |
| 3616 | |
| 3617 | private Method[] allMethods = getSortedMethods();"))) |
| 3618 | #t)) |
| 3619 | (add-before 'build 'do-not-use-bundled-qdox |
| 3620 | (lambda* (#:key inputs #:allow-other-keys) |
| 3621 | (substitute* "build.xml" |
| 3622 | (("lib/generator/qdox-1.12.jar") |
| 3623 | (string-append (assoc-ref inputs "java-qdox-1.12") |
| 3624 | "/share/java/qdox.jar"))) |
| 3625 | #t)) |
| 3626 | ;; build.xml searches for .jar files in this directoy, which |
| 3627 | ;; we remove from the source archive. |
| 3628 | (add-before 'build 'create-dummy-directories |
| 3629 | (lambda _ |
| 3630 | (mkdir-p "lib/integration") |
| 3631 | #t)) |
| 3632 | (add-before 'build 'create-pom |
| 3633 | (lambda _ |
| 3634 | (substitute* "pom/hamcrest-core.pom" |
| 3635 | (("@VERSION@") ,version)) |
| 3636 | #t)) |
| 3637 | (replace 'install |
| 3638 | (install-from-pom "pom/hamcrest-core.pom"))))) |
| 3639 | (native-inputs |
| 3640 | `(("java-qdox-1.12" ,java-qdox-1.12) |
| 3641 | ("java-jarjar" ,java-jarjar))) |
| 3642 | (propagated-inputs |
| 3643 | (list java-hamcrest-parent-pom)) |
| 3644 | (home-page "https://hamcrest.org/") |
| 3645 | (synopsis "Library of matchers for building test expressions") |
| 3646 | (description |
| 3647 | "This package provides a library of matcher objects (also known as |
| 3648 | constraints or predicates) allowing @code{match} rules to be defined |
| 3649 | declaratively, to be used in other frameworks. Typical scenarios include |
| 3650 | testing frameworks, mocking libraries and UI validation rules.") |
| 3651 | (license license:bsd-2))) |
| 3652 | |
| 3653 | (define-public java-hamcrest-parent-pom |
| 3654 | (package |
| 3655 | (inherit java-hamcrest-core) |
| 3656 | (properties '((hidden? . #t))) |
| 3657 | (name "java-hamcrest-parent-pom") |
| 3658 | (propagated-inputs '()) |
| 3659 | (native-inputs '()) |
| 3660 | (arguments |
| 3661 | `(#:tests? #f |
| 3662 | #:phases |
| 3663 | (modify-phases %standard-phases |
| 3664 | (delete 'configure) |
| 3665 | (replace 'build |
| 3666 | (lambda _ |
| 3667 | (substitute* "pom/hamcrest-parent.pom" |
| 3668 | (("@VERSION@") ,(package-version java-hamcrest-core))) |
| 3669 | #t)) |
| 3670 | (replace 'install |
| 3671 | (install-pom-file "pom/hamcrest-parent.pom"))))))) |
| 3672 | |
| 3673 | (define-public java-hamcrest-library |
| 3674 | (package |
| 3675 | (inherit java-hamcrest-core) |
| 3676 | (name "java-hamcrest-library") |
| 3677 | (arguments |
| 3678 | (substitute-keyword-arguments (package-arguments java-hamcrest-core) |
| 3679 | ((#:build-target _) "library") |
| 3680 | ((#:phases phases) |
| 3681 | `(modify-phases ,phases |
| 3682 | (add-after 'unpack 'patch-classpath-for-integration |
| 3683 | (lambda* (#:key inputs #:allow-other-keys) |
| 3684 | (substitute* "build.xml" |
| 3685 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") |
| 3686 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 3687 | "jar$")))) |
| 3688 | #t)) |
| 3689 | (replace 'create-pom |
| 3690 | (lambda _ |
| 3691 | (substitute* "pom/hamcrest-library.pom" |
| 3692 | (("@VERSION@") ,(package-version java-hamcrest-core))) |
| 3693 | #t)) |
| 3694 | (replace 'install |
| 3695 | (install-from-pom "pom/hamcrest-library.pom")))))) |
| 3696 | (propagated-inputs |
| 3697 | (list java-hamcrest-core java-hamcrest-parent-pom)))) |
| 3698 | |
| 3699 | (define-public java-junit |
| 3700 | (package |
| 3701 | (name "java-junit") |
| 3702 | (version "4.12") |
| 3703 | (source (origin |
| 3704 | (method git-fetch) |
| 3705 | (uri (git-reference |
| 3706 | (url "https://github.com/junit-team/junit/") |
| 3707 | (commit (string-append "r" version)))) |
| 3708 | (file-name (git-file-name name version)) |
| 3709 | (sha256 |
| 3710 | (base32 |
| 3711 | "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h")) |
| 3712 | (modules '((guix build utils))) |
| 3713 | (snippet |
| 3714 | '(begin |
| 3715 | ;; Delete bundled jar archives. |
| 3716 | (delete-file-recursively "lib") |
| 3717 | #t)))) |
| 3718 | (build-system ant-build-system) |
| 3719 | (arguments |
| 3720 | `(#:jar-name "junit.jar" |
| 3721 | #:source-dir "src/main/java" |
| 3722 | #:test-dir "src/test" |
| 3723 | #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java" |
| 3724 | "**/RuleChainTest.java" "**/TestWatchmanTest.java") |
| 3725 | #:phases |
| 3726 | (modify-phases %standard-phases |
| 3727 | (add-before 'check 'copy-test-resources |
| 3728 | (lambda _ |
| 3729 | (copy-recursively "src/test/resources" "build/test-classes") |
| 3730 | #t)) |
| 3731 | (replace 'install |
| 3732 | (install-from-pom "pom.xml"))))) |
| 3733 | (propagated-inputs |
| 3734 | (list java-hamcrest-core)) |
| 3735 | (native-inputs |
| 3736 | (list java-hamcrest-library)) |
| 3737 | (home-page "https://junit.org/junit4/") |
| 3738 | (synopsis "Test framework for Java") |
| 3739 | (description |
| 3740 | "JUnit is a simple framework to write repeatable tests for Java projects. |
| 3741 | JUnit provides assertions for testing expected results, test fixtures for |
| 3742 | sharing common test data, and test runners for running tests.") |
| 3743 | (license license:epl1.0))) |
| 3744 | |
| 3745 | (define-public java-junitparams |
| 3746 | (package |
| 3747 | (name "java-junitparams") |
| 3748 | (version "1.1.1") |
| 3749 | (source (origin |
| 3750 | (method git-fetch) |
| 3751 | (uri (git-reference |
| 3752 | (url "https://github.com/Pragmatists/JUnitParams") |
| 3753 | (commit (string-append "JUnitParams-" version)))) |
| 3754 | (file-name (git-file-name name version)) |
| 3755 | (sha256 |
| 3756 | (base32 |
| 3757 | "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b")))) |
| 3758 | (build-system ant-build-system) |
| 3759 | (arguments |
| 3760 | `(#:jar-name "junitparams.jar" |
| 3761 | #:source-dir "src/main/java" |
| 3762 | #:test-dir "src/test" |
| 3763 | #:test-exclude (list "**/SuperclassTest.java"))) |
| 3764 | (inputs |
| 3765 | (list java-junit)) |
| 3766 | (native-inputs |
| 3767 | (list java-junit java-hamcrest-core java-assertj)) |
| 3768 | (home-page "https://github.com/Pragmatists/JUnitParams") |
| 3769 | (synopsis "Parameterised test support for JUnit") |
| 3770 | (description "The JUnitParams project adds a new runner to JUnit and |
| 3771 | provides much easier and readable parametrised tests for JUnit.") |
| 3772 | (license license:asl2.0))) |
| 3773 | |
| 3774 | ;; JUnit BOM (Bill of Materials) for dependency version management |
| 3775 | (define (make-junit-bom version hash) |
| 3776 | (package |
| 3777 | (name "junit-bom") |
| 3778 | (version version) |
| 3779 | (source (origin |
| 3780 | (method url-fetch) |
| 3781 | (uri (string-append |
| 3782 | "https://repo1.maven.org/maven2/org/junit/junit-bom/" |
| 3783 | version "/junit-bom-" version ".pom")) |
| 3784 | (sha256 (base32 hash)))) |
| 3785 | (build-system ant-build-system) |
| 3786 | (arguments |
| 3787 | `(#:tests? #f |
| 3788 | #:phases |
| 3789 | (modify-phases %standard-phases |
| 3790 | (delete 'configure) |
| 3791 | (delete 'build) |
| 3792 | (replace 'install |
| 3793 | (lambda* (#:key source outputs #:allow-other-keys) |
| 3794 | (let* ((out (assoc-ref outputs "out")) |
| 3795 | (pom-dir (string-append out "/lib/m2/org/junit/junit-bom/" |
| 3796 | ,version))) |
| 3797 | (mkdir-p pom-dir) |
| 3798 | (copy-file source (string-append pom-dir "/junit-bom-" ,version ".pom")))))))) |
| 3799 | (home-page "https://junit.org/junit5/") |
| 3800 | (synopsis "JUnit 5 Bill of Materials") |
| 3801 | (description "This package provides a Maven BOM (Bill of Materials) for |
| 3802 | JUnit 5, used for dependency version management.") |
| 3803 | (license license:epl2.0))) |
| 3804 | |
| 3805 | (define-public junit-bom-5.11 |
| 3806 | (make-junit-bom "5.11.4" "05a1br7lqpisb5gcphaag8kn4rcqdwlm6i9knqjm7004n93vgm0r")) |
| 3807 | |
| 3808 | (define-public junit-bom-5.11.0 |
| 3809 | (make-junit-bom "5.11.0" "0kb4whmjm4xyh0n0gfj0nd38ks52yk4b23glfiisq914i3a5jx76")) |
| 3810 | |
| 3811 | (define-public java-plexus-utils |
| 3812 | (package |
| 3813 | (name "java-plexus-utils") |
| 3814 | (version "3.5.1") |
| 3815 | (source (origin |
| 3816 | (method git-fetch) |
| 3817 | (uri (git-reference |
| 3818 | (url "https://github.com/codehaus-plexus/plexus-utils") |
| 3819 | (commit (string-append "plexus-utils-" version)))) |
| 3820 | (file-name (git-file-name name version)) |
| 3821 | (sha256 |
| 3822 | (base32 |
| 3823 | "0zm0svaffdkjqkj778zicxvij87hkbi9hhidx0343dqalikdsmqq")))) |
| 3824 | (build-system ant-build-system) |
| 3825 | ;; FIXME: The default build.xml does not include a target to install |
| 3826 | ;; javadoc files. |
| 3827 | (arguments |
| 3828 | `(#:jar-name "plexus-utils.jar" |
| 3829 | ;; 3.5.x has multi-release JAR structure with java9/java10/java11 dirs |
| 3830 | ;; under src/main/ containing duplicate classes for newer JVMs. |
| 3831 | ;; Use src/main/java to compile only the base implementation. |
| 3832 | #:source-dir "src/main/java" |
| 3833 | #:phases |
| 3834 | (modify-phases %standard-phases |
| 3835 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr |
| 3836 | (lambda _ |
| 3837 | (substitute* "src/main/java/org/codehaus/plexus/util/\ |
| 3838 | cli/shell/BourneShell.java" |
| 3839 | (("/bin/sh") (which "sh")) |
| 3840 | (("/usr/") (getcwd))) |
| 3841 | #t)) |
| 3842 | (add-after 'unpack 'fix-or-disable-broken-tests |
| 3843 | (lambda _ |
| 3844 | (with-directory-excursion "src/test/java/org/codehaus/plexus/util" |
| 3845 | (substitute* '("cli/CommandlineTest.java" |
| 3846 | "cli/shell/BourneShellTest.java") |
| 3847 | (("/bin/sh") (which "sh")) |
| 3848 | (("/bin/echo") (which "echo"))) |
| 3849 | |
| 3850 | ;; This test depends on MavenProjectStub, but we don't have |
| 3851 | ;; a package for Maven. |
| 3852 | (delete-file "introspection/ReflectionValueExtractorTest.java") |
| 3853 | |
| 3854 | ;; FIXME: The command line tests fail, maybe because they use |
| 3855 | ;; absolute paths. |
| 3856 | (delete-file "cli/CommandlineTest.java") |
| 3857 | |
| 3858 | ;; These tests require openjdk jmh, which is not packaged yet |
| 3859 | (for-each delete-file (find-files "." "PerfTest.java$"))) |
| 3860 | #t)) |
| 3861 | (add-before 'build 'copy-resources |
| 3862 | (lambda _ |
| 3863 | (copy-recursively "src/main/resources" "build/classes") |
| 3864 | #t)) |
| 3865 | (replace 'install (install-from-pom "pom.xml"))))) |
| 3866 | (native-inputs |
| 3867 | (list java-hamcrest-core java-junit)) |
| 3868 | (propagated-inputs |
| 3869 | (list plexus-parent-pom-10)) |
| 3870 | (home-page "https://codehaus-plexus.github.io/plexus-utils/") |
| 3871 | (synopsis "Common utilities for the Plexus framework") |
| 3872 | (description "This package provides various Java utility classes for the |
| 3873 | Plexus framework to ease working with strings, files, command lines, XML and |
| 3874 | more.") |
| 3875 | (license license:asl2.0))) |
| 3876 | |
| 3877 | (define-public java-plexus-utils-3.2.1 |
| 3878 | (package |
| 3879 | (inherit java-plexus-utils) |
| 3880 | ;; plexus-build-api needs this version, later versions don't work |
| 3881 | (version "3.2.1") |
| 3882 | (source (origin |
| 3883 | (method git-fetch) |
| 3884 | (uri (git-reference |
| 3885 | (url "https://github.com/codehaus-plexus/plexus-utils") |
| 3886 | (commit (string-append "plexus-utils-" version)))) |
| 3887 | (file-name (git-file-name "java-plexus-utils" version)) |
| 3888 | (sha256 |
| 3889 | (base32 |
| 3890 | "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))))) |
| 3891 | |
| 3892 | (define-public java-plexus-xml |
| 3893 | (package |
| 3894 | (name "java-plexus-xml") |
| 3895 | (version "3.0.1") |
| 3896 | (source (origin |
| 3897 | (method git-fetch) |
| 3898 | (uri (git-reference |
| 3899 | (url "https://github.com/codehaus-plexus/plexus-xml") |
| 3900 | (commit (string-append "plexus-xml-" version)))) |
| 3901 | (file-name (git-file-name name version)) |
| 3902 | (sha256 |
| 3903 | (base32 |
| 3904 | "0agwjmzqay7zg4wf2g7lf3gryl9hivr2cb89k0wvjx49r4rdrnhr")))) |
| 3905 | (build-system ant-build-system) |
| 3906 | (arguments |
| 3907 | `(#:jar-name "plexus-xml.jar" |
| 3908 | #:source-dir "src/main/java" |
| 3909 | #:tests? #f |
| 3910 | #:phases |
| 3911 | (modify-phases %standard-phases |
| 3912 | (replace 'install (install-from-pom "pom.xml"))))) |
| 3913 | (propagated-inputs |
| 3914 | (list plexus-parent-pom-20)) |
| 3915 | (home-page "https://codehaus-plexus.github.io/plexus-xml/") |
| 3916 | (synopsis "Plexus XML utilities") |
| 3917 | (description "Plexus XML provides XML parsing and writing utilities.") |
| 3918 | (license license:asl2.0))) |
| 3919 | |
| 3920 | (define-public java-plexus-utils-4 |
| 3921 | (package |
| 3922 | (inherit java-plexus-utils) |
| 3923 | (version "4.0.1") |
| 3924 | (source (origin |
| 3925 | (method git-fetch) |
| 3926 | (uri (git-reference |
| 3927 | (url "https://github.com/codehaus-plexus/plexus-utils") |
| 3928 | (commit (string-append "plexus-utils-" version)))) |
| 3929 | (file-name (git-file-name "java-plexus-utils" version)) |
| 3930 | (sha256 |
| 3931 | (base32 |
| 3932 | "1prhjyrj985zgis89il5s91jgd3dr980dihl7zam1nda2ibl0mi9")))) |
| 3933 | (arguments |
| 3934 | (substitute-keyword-arguments (package-arguments java-plexus-utils) |
| 3935 | ;; Tests require JUnit 5 (Jupiter) which is not yet available. |
| 3936 | ((#:tests? _ #f) |
| 3937 | #f))) |
| 3938 | ;; In 4.x, the XML utilities (XmlStreamReader, XmlStreamWriter) were split |
| 3939 | ;; out into the separate plexus-xml package. |
| 3940 | (inputs |
| 3941 | (list java-plexus-xml)))) |
| 3942 | |
| 3943 | (define-public java-plexus-interpolation |
| 3944 | (package |
| 3945 | (name "java-plexus-interpolation") |
| 3946 | (version "1.26") |
| 3947 | (source (origin |
| 3948 | (method git-fetch) |
| 3949 | (uri (git-reference |
| 3950 | (url "https://github.com/codehaus-plexus/plexus-interpolation") |
| 3951 | (commit (string-append "plexus-interpolation-" version)))) |
| 3952 | (file-name (git-file-name name version)) |
| 3953 | (sha256 |
| 3954 | (base32 |
| 3955 | "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh")))) |
| 3956 | (build-system ant-build-system) |
| 3957 | (arguments |
| 3958 | `(#:jar-name "plexus-interpolation.jar" |
| 3959 | #:source-dir "src/main" |
| 3960 | #:phases |
| 3961 | (modify-phases %standard-phases |
| 3962 | (replace 'install (install-from-pom "pom.xml"))))) |
| 3963 | (propagated-inputs |
| 3964 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) |
| 3965 | (native-inputs |
| 3966 | (list java-junit java-hamcrest-core)) |
| 3967 | (home-page "https://codehaus-plexus.github.io/plexus-interpolation/") |
| 3968 | (synopsis "Java components for interpolating ${} strings and the like") |
| 3969 | (description "Plexus interpolator is a modular, flexible interpolation |
| 3970 | framework for the expression language style commonly seen in Maven, Plexus, |
| 3971 | and other related projects. |
| 3972 | |
| 3973 | It has its foundation in the @code{org.codehaus.plexus.utils.interpolation} |
| 3974 | package within @code{plexus-utils}, but has been separated in order to allow |
| 3975 | these two libraries to vary independently of one another.") |
| 3976 | (license license:asl2.0))) |
| 3977 | |
| 3978 | (define-public java-jtidy |
| 3979 | (package |
| 3980 | (name "java-jtidy") |
| 3981 | (version "1.0.5") |
| 3982 | (source (origin |
| 3983 | (method git-fetch) |
| 3984 | (uri (git-reference |
| 3985 | (url "https://github.com/jtidy/jtidy") |
| 3986 | (commit (string-append "jtidy-" version)))) |
| 3987 | (file-name (git-file-name name version)) |
| 3988 | (sha256 |
| 3989 | (base32 |
| 3990 | "1i4jcg0ps2wmssk1p6yp9cd6di49pw2j30kplakvy1bnp3x7j4pp")))) |
| 3991 | (build-system ant-build-system) |
| 3992 | (arguments |
| 3993 | `(#:jar-name "jtidy.jar" |
| 3994 | #:source-dir "src/main/java" |
| 3995 | #:tests? #f |
| 3996 | #:phases |
| 3997 | (modify-phases %standard-phases |
| 3998 | (add-before 'install 'generate-pom |
| 3999 | (generate-pom.xml "pom.xml" "net.sf.jtidy" "jtidy" ,version)) |
| 4000 | (replace 'install |
| 4001 | (install-from-pom "pom.xml"))))) |
| 4002 | (home-page "https://jtidy.sourceforge.net/") |
| 4003 | (synopsis "Java port of HTML Tidy") |
| 4004 | (description "JTidy is a Java port of HTML Tidy, a HTML syntax checker |
| 4005 | and pretty printer. Like its non-Java cousin, JTidy can be used as a tool |
| 4006 | for cleaning up malformed and faulty HTML. In addition, JTidy provides a |
| 4007 | DOM interface to the document that is being processed, which effectively |
| 4008 | makes you able to use JTidy as a DOM parser for real-world HTML.") |
| 4009 | (license license:bsd-3))) |
| 4010 | |
| 4011 | (define-public java-plexus-classworlds |
| 4012 | (package |
| 4013 | (name "java-plexus-classworlds") |
| 4014 | (version "2.6.0") |
| 4015 | (source (origin |
| 4016 | (method git-fetch) |
| 4017 | (uri (git-reference |
| 4018 | (url "https://github.com/codehaus-plexus/plexus-classworlds") |
| 4019 | (commit (string-append "plexus-classworlds-" version)))) |
| 4020 | (file-name (git-file-name name version)) |
| 4021 | (sha256 |
| 4022 | (base32 |
| 4023 | "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s")))) |
| 4024 | (build-system ant-build-system) |
| 4025 | (arguments |
| 4026 | `(#:jar-name "plexus-classworlds.jar" |
| 4027 | #:source-dir "src/main" |
| 4028 | #:tests? #f;; FIXME: we need to generate some resources as in pom.xml |
| 4029 | #:phases |
| 4030 | (modify-phases %standard-phases |
| 4031 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4032 | (propagated-inputs |
| 4033 | `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1))) |
| 4034 | (native-inputs |
| 4035 | (list java-junit)) |
| 4036 | (home-page "https://codehaus-plexus.github.io/plexus-classworlds/") |
| 4037 | (synopsis "Java class loader framework") |
| 4038 | (description "Plexus classworlds replaces the native @code{ClassLoader} |
| 4039 | mechanism of Java. It is especially useful for dynamic loading of application |
| 4040 | components.") |
| 4041 | (license license:asl2.0))) |
| 4042 | |
| 4043 | (define java-plexus-container-default-bootstrap |
| 4044 | (package |
| 4045 | (name "java-plexus-container-default-bootstrap") |
| 4046 | (version "2.1.0") |
| 4047 | (source (origin |
| 4048 | (method git-fetch) |
| 4049 | (uri (git-reference |
| 4050 | (url "https://github.com/codehaus-plexus/plexus-containers") |
| 4051 | (commit (string-append "plexus-containers-" version)))) |
| 4052 | (file-name (git-file-name name version)) |
| 4053 | (sha256 |
| 4054 | (base32 |
| 4055 | "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1")))) |
| 4056 | (build-system ant-build-system) |
| 4057 | (arguments |
| 4058 | `(#:jar-name "container-default.jar" |
| 4059 | #:source-dir "plexus-container-default/src/main/java" |
| 4060 | #:test-dir "plexus-container-default/src/test" |
| 4061 | #:tests? #f; requires plexus-archiver, which depends on this package |
| 4062 | #:phases |
| 4063 | (modify-phases %standard-phases |
| 4064 | (add-before 'build 'fix-google-collections |
| 4065 | (lambda _ |
| 4066 | ;; Google collections are now replaced with guava |
| 4067 | (substitute* "plexus-container-default/pom.xml" |
| 4068 | (("google-collections") "guava") |
| 4069 | (("com.google.collections") "com.google.guava")) |
| 4070 | #t)) |
| 4071 | (add-before 'build 'copy-resources |
| 4072 | (lambda _ |
| 4073 | (copy-recursively |
| 4074 | "plexus-container-default/src/main/resources/" |
| 4075 | "build/classes") |
| 4076 | #t)) |
| 4077 | (replace 'install |
| 4078 | (install-from-pom "plexus-container-default/pom.xml"))))) |
| 4079 | (propagated-inputs |
| 4080 | `(("java-plexus-worldclass" ,java-plexus-classworlds) |
| 4081 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
| 4082 | ("java-plexus-utils" ,java-plexus-utils) |
| 4083 | ("java-junit" ,java-junit) |
| 4084 | ("java-guava" ,java-guava) |
| 4085 | ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom))) |
| 4086 | (home-page "https://github.com/codehaus-plexus/plexus-containers") |
| 4087 | (synopsis "Inversion-of-control container") |
| 4088 | (description "Plexus-default-container is Plexus' inversion-of-control |
| 4089 | (@dfn{IoC}) container. It is composed of its public API and its default |
| 4090 | implementation.") |
| 4091 | (license license:asl2.0))) |
| 4092 | |
| 4093 | (define java-plexus-containers-parent-pom |
| 4094 | (package |
| 4095 | (inherit java-plexus-container-default-bootstrap) |
| 4096 | (name "java-plexus-containers-parent-pom") |
| 4097 | (arguments |
| 4098 | `(#:tests? #f |
| 4099 | #:phases |
| 4100 | (modify-phases %standard-phases |
| 4101 | (delete 'configure) |
| 4102 | (delete 'build) |
| 4103 | (replace 'install |
| 4104 | (install-pom-file "pom.xml"))))) |
| 4105 | (propagated-inputs |
| 4106 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) |
| 4107 | |
| 4108 | (define-public java-aircompressor |
| 4109 | (package |
| 4110 | (name "java-aircompressor") |
| 4111 | (version "0.27") |
| 4112 | (source (origin |
| 4113 | (method git-fetch) |
| 4114 | (uri (git-reference |
| 4115 | (url "https://github.com/airlift/aircompressor") |
| 4116 | (commit version))) |
| 4117 | (file-name (git-file-name name version)) |
| 4118 | (sha256 |
| 4119 | (base32 |
| 4120 | "061v9mfazig0350j8326mn0awgzfyk9dcg6jprqah9ajjfps9dry")) |
| 4121 | (patches |
| 4122 | (search-patches "java-aircompressor-remove-hadoop.patch")) |
| 4123 | (modules '((guix build utils))) |
| 4124 | (snippet |
| 4125 | '(begin |
| 4126 | ;; Remove Hadoop-related Java files |
| 4127 | (delete-file-recursively |
| 4128 | "src/main/java/io/airlift/compress/hadoop") |
| 4129 | (for-each delete-file |
| 4130 | (find-files "src/main/java" ".*Hadoop.*\\.java$")) |
| 4131 | (for-each delete-file |
| 4132 | (find-files "src/main/java" ".*Codec\\.java$")))))) |
| 4133 | (build-system ant-build-system) |
| 4134 | (arguments |
| 4135 | `(#:jar-name "aircompressor.jar" |
| 4136 | #:source-dir "src/main/java" |
| 4137 | #:tests? #f |
| 4138 | #:phases |
| 4139 | (modify-phases %standard-phases |
| 4140 | (add-before 'install 'generate-simple-pom |
| 4141 | (lambda _ |
| 4142 | ;; Generate a simple pom without parent, since airbase:112 is not available. |
| 4143 | (with-output-to-file "pom.xml" |
| 4144 | (lambda () |
| 4145 | (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?> |
| 4146 | <project> |
| 4147 | <modelVersion>4.0.0</modelVersion> |
| 4148 | <groupId>io.airlift</groupId> |
| 4149 | <artifactId>aircompressor</artifactId> |
| 4150 | <version>0.27</version> |
| 4151 | <packaging>jar</packaging> |
| 4152 | <name>aircompressor</name> |
| 4153 | </project> |
| 4154 | "))))) |
| 4155 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4156 | (home-page "https://github.com/airlift/aircompressor") |
| 4157 | (synopsis "Java compression library") |
| 4158 | (description "Aircompressor is a Java library with ports of LZ4, Snappy, |
| 4159 | LZO, and Zstandard compression algorithms.") |
| 4160 | (license license:asl2.0))) |
| 4161 | |
| 4162 | (define-public java-plexus-io |
| 4163 | (package |
| 4164 | (name "java-plexus-io") |
| 4165 | (version "3.6.0") |
| 4166 | (source (origin |
| 4167 | (method git-fetch) |
| 4168 | (uri (git-reference |
| 4169 | (url "https://github.com/codehaus-plexus/plexus-io") |
| 4170 | (commit (string-append "plexus-io-" version)))) |
| 4171 | (file-name (git-file-name name version)) |
| 4172 | (sha256 |
| 4173 | (base32 |
| 4174 | "0ln51s9a6wjvkkh4q05g69422856qng467fyvbh39x27i0vhcyb0")))) |
| 4175 | (build-system ant-build-system) |
| 4176 | (arguments |
| 4177 | `(#:jar-name "plexus-io.jar" |
| 4178 | #:source-dir "src/main/java" |
| 4179 | #:tests? #f |
| 4180 | #:phases |
| 4181 | (modify-phases %standard-phases |
| 4182 | (add-before 'build 'copy-resources |
| 4183 | (lambda _ |
| 4184 | (mkdir-p "build/classes") |
| 4185 | (copy-recursively "src/main/resources" "build/classes") |
| 4186 | #t)) |
| 4187 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4188 | (propagated-inputs |
| 4189 | (list java-plexus-utils java-commons-io java-slf4j-api java-javax-inject)) |
| 4190 | (inputs |
| 4191 | (list java-jsr305)) |
| 4192 | (home-page "https://github.com/codehaus-plexus/plexus-io") |
| 4193 | (synopsis "I/O plexus components") |
| 4194 | (description "Plexus IO is a set of plexus components, which are designed |
| 4195 | for use in I/O operations. This implementation using plexus components allows |
| 4196 | reusing it in maven.") |
| 4197 | (license license:asl2.0))) |
| 4198 | |
| 4199 | (define-public java-plexus-archiver |
| 4200 | (package |
| 4201 | (name "java-plexus-archiver") |
| 4202 | (version "4.10.4") |
| 4203 | (source (origin |
| 4204 | (method git-fetch) |
| 4205 | (uri (git-reference |
| 4206 | (url "https://github.com/codehaus-plexus/plexus-archiver") |
| 4207 | (commit (string-append "plexus-archiver-" version)))) |
| 4208 | (file-name (git-file-name name version)) |
| 4209 | (sha256 |
| 4210 | (base32 |
| 4211 | "0azdfcp5fbah8wqxdgs2rmyn0v8a5jciikw5ai4m9d2s92w0ypz4")) |
| 4212 | (patches |
| 4213 | (search-patches "java-plexus-archiver-add-components-xml.patch")))) |
| 4214 | (build-system ant-build-system) |
| 4215 | (arguments |
| 4216 | `(#:jar-name "plexus-archiver.jar" |
| 4217 | #:source-dir "src/main/java" |
| 4218 | #:tests? #f |
| 4219 | #:phases |
| 4220 | (modify-phases %standard-phases |
| 4221 | (add-before 'build 'copy-resources |
| 4222 | (lambda _ |
| 4223 | (mkdir-p "build/classes") |
| 4224 | (copy-recursively "src/main/resources" "build/classes") |
| 4225 | #t)) |
| 4226 | (add-after 'copy-resources 'create-sisu-index |
| 4227 | ;; The sisu index file is normally generated by the sisu-maven-plugin |
| 4228 | ;; during the Maven build. Since we use ant-build-system, we need to |
| 4229 | ;; create it manually. This index is required for Plexus/Sisu to |
| 4230 | ;; discover and inject the archiver components. |
| 4231 | (lambda _ |
| 4232 | (mkdir-p "build/classes/META-INF/sisu") |
| 4233 | (call-with-output-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 4234 | (lambda (port) |
| 4235 | (display "org.codehaus.plexus.archiver.bzip2.BZip2Archiver |
| 4236 | org.codehaus.plexus.archiver.bzip2.BZip2UnArchiver |
| 4237 | org.codehaus.plexus.archiver.bzip2.PlexusIoBz2ResourceCollection |
| 4238 | org.codehaus.plexus.archiver.bzip2.PlexusIoBzip2ResourceCollection |
| 4239 | org.codehaus.plexus.archiver.car.CarUnArchiver |
| 4240 | org.codehaus.plexus.archiver.car.PlexusIoCarFileResourceCollection |
| 4241 | org.codehaus.plexus.archiver.dir.DirectoryArchiver |
| 4242 | org.codehaus.plexus.archiver.ear.EarArchiver |
| 4243 | org.codehaus.plexus.archiver.ear.EarUnArchiver |
| 4244 | org.codehaus.plexus.archiver.ear.PlexusIoEarFileResourceCollection |
| 4245 | org.codehaus.plexus.archiver.esb.EsbUnArchiver |
| 4246 | org.codehaus.plexus.archiver.esb.PlexusIoEsbFileResourceCollection |
| 4247 | org.codehaus.plexus.archiver.filters.JarSecurityFileSelector |
| 4248 | org.codehaus.plexus.archiver.gzip.GZipArchiver |
| 4249 | org.codehaus.plexus.archiver.gzip.GZipUnArchiver |
| 4250 | org.codehaus.plexus.archiver.gzip.PlexusIoGzResourceCollection |
| 4251 | org.codehaus.plexus.archiver.gzip.PlexusIoGzipResourceCollection |
| 4252 | org.codehaus.plexus.archiver.jar.JarArchiver |
| 4253 | org.codehaus.plexus.archiver.jar.JarToolModularJarArchiver |
| 4254 | org.codehaus.plexus.archiver.jar.JarUnArchiver |
| 4255 | org.codehaus.plexus.archiver.jar.PlexusIoJarFileResourceCollection |
| 4256 | org.codehaus.plexus.archiver.manager.DefaultArchiverManager |
| 4257 | org.codehaus.plexus.archiver.nar.NarUnArchiver |
| 4258 | org.codehaus.plexus.archiver.nar.PlexusIoNarFileResourceCollection |
| 4259 | org.codehaus.plexus.archiver.par.ParUnArchiver |
| 4260 | org.codehaus.plexus.archiver.par.PlexusIoJarFileResourceCollection |
| 4261 | org.codehaus.plexus.archiver.rar.PlexusIoRarFileResourceCollection |
| 4262 | org.codehaus.plexus.archiver.rar.RarArchiver |
| 4263 | org.codehaus.plexus.archiver.rar.RarUnArchiver |
| 4264 | org.codehaus.plexus.archiver.sar.PlexusIoSarFileResourceCollection |
| 4265 | org.codehaus.plexus.archiver.sar.SarUnArchiver |
| 4266 | org.codehaus.plexus.archiver.snappy.PlexusIoSnappyResourceCollection |
| 4267 | org.codehaus.plexus.archiver.snappy.SnappyArchiver |
| 4268 | org.codehaus.plexus.archiver.snappy.SnappyUnArchiver |
| 4269 | org.codehaus.plexus.archiver.swc.PlexusIoSwcFileResourceCollection |
| 4270 | org.codehaus.plexus.archiver.swc.SwcUnArchiver |
| 4271 | org.codehaus.plexus.archiver.tar.PlexusIoTBZ2FileResourceCollection |
| 4272 | org.codehaus.plexus.archiver.tar.PlexusIoTGZFileResourceCollection |
| 4273 | org.codehaus.plexus.archiver.tar.PlexusIoTXZFileResourceCollection |
| 4274 | org.codehaus.plexus.archiver.tar.PlexusIoTZstdFileResourceCollection |
| 4275 | org.codehaus.plexus.archiver.tar.PlexusIoTarBZip2FileResourceCollection |
| 4276 | org.codehaus.plexus.archiver.tar.PlexusIoTarFileResourceCollection |
| 4277 | org.codehaus.plexus.archiver.tar.PlexusIoTarGZipFileResourceCollection |
| 4278 | org.codehaus.plexus.archiver.tar.PlexusIoTarSnappyFileResourceCollection |
| 4279 | org.codehaus.plexus.archiver.tar.PlexusIoTarXZFileResourceCollection |
| 4280 | org.codehaus.plexus.archiver.tar.PlexusIoTarZstdFileResourceCollection |
| 4281 | org.codehaus.plexus.archiver.tar.TBZ2Archiver |
| 4282 | org.codehaus.plexus.archiver.tar.TBZ2UnArchiver |
| 4283 | org.codehaus.plexus.archiver.tar.TGZArchiver |
| 4284 | org.codehaus.plexus.archiver.tar.TGZUnArchiver |
| 4285 | org.codehaus.plexus.archiver.tar.TXZArchiver |
| 4286 | org.codehaus.plexus.archiver.tar.TXZUnArchiver |
| 4287 | org.codehaus.plexus.archiver.tar.TZstdArchiver |
| 4288 | org.codehaus.plexus.archiver.tar.TZstdUnArchiver |
| 4289 | org.codehaus.plexus.archiver.tar.TarArchiver |
| 4290 | org.codehaus.plexus.archiver.tar.TarBZip2Archiver |
| 4291 | org.codehaus.plexus.archiver.tar.TarBZip2UnArchiver |
| 4292 | org.codehaus.plexus.archiver.tar.TarGZipArchiver |
| 4293 | org.codehaus.plexus.archiver.tar.TarGZipUnArchiver |
| 4294 | org.codehaus.plexus.archiver.tar.TarSnappyArchiver |
| 4295 | org.codehaus.plexus.archiver.tar.TarSnappyUnArchiver |
| 4296 | org.codehaus.plexus.archiver.tar.TarUnArchiver |
| 4297 | org.codehaus.plexus.archiver.tar.TarXZArchiver |
| 4298 | org.codehaus.plexus.archiver.tar.TarXZUnArchiver |
| 4299 | org.codehaus.plexus.archiver.tar.TarZstdArchiver |
| 4300 | org.codehaus.plexus.archiver.tar.TarZstdUnArchiver |
| 4301 | org.codehaus.plexus.archiver.war.PlexusIoWarFileResourceCollection |
| 4302 | org.codehaus.plexus.archiver.war.WarArchiver |
| 4303 | org.codehaus.plexus.archiver.war.WarUnArchiver |
| 4304 | org.codehaus.plexus.archiver.xz.PlexusIoXZResourceCollection |
| 4305 | org.codehaus.plexus.archiver.xz.XZArchiver |
| 4306 | org.codehaus.plexus.archiver.xz.XZUnArchiver |
| 4307 | org.codehaus.plexus.archiver.zip.PlexusArchiverZipFileResourceCollection |
| 4308 | org.codehaus.plexus.archiver.zip.ZipArchiver |
| 4309 | org.codehaus.plexus.archiver.zip.ZipUnArchiver |
| 4310 | org.codehaus.plexus.archiver.zstd.PlexusIoZstdResourceCollection |
| 4311 | org.codehaus.plexus.archiver.zstd.ZstdArchiver |
| 4312 | org.codehaus.plexus.archiver.zstd.ZstdUnArchiver |
| 4313 | " port))))) |
| 4314 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4315 | (propagated-inputs |
| 4316 | (list java-plexus-utils |
| 4317 | java-plexus-io |
| 4318 | java-commons-compress |
| 4319 | java-aircompressor |
| 4320 | java-slf4j-api |
| 4321 | java-xz |
| 4322 | java-javax-inject)) |
| 4323 | (inputs |
| 4324 | (list java-jsr305)) |
| 4325 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") |
| 4326 | (synopsis "Archiver component of the Plexus project") |
| 4327 | (description "Plexus-archiver contains a component to deal with project |
| 4328 | archives (jar).") |
| 4329 | (license license:asl2.0))) |
| 4330 | |
| 4331 | (define-public java-plexus-container-default |
| 4332 | (package |
| 4333 | (inherit java-plexus-container-default-bootstrap) |
| 4334 | (name "java-plexus-container-default") |
| 4335 | (arguments |
| 4336 | `(#:jar-name "container-default.jar" |
| 4337 | #:source-dir "plexus-container-default/src/main/java" |
| 4338 | #:test-dir "plexus-container-default/src/test" |
| 4339 | #:tests? #f ;tests use ArchiverManager.ROLE removed in java-plexus-archiver 4.10 |
| 4340 | #:test-exclude (list ;"**/*Test.java" |
| 4341 | "**/Abstract*.java" |
| 4342 | ;; Requires plexus-hierarchy |
| 4343 | "**/PlexusHierarchyTest.java" |
| 4344 | ;; Failures |
| 4345 | "**/ComponentRealmCompositionTest.java" |
| 4346 | "**/PlexusContainerTest.java") |
| 4347 | #:phases |
| 4348 | (modify-phases %standard-phases |
| 4349 | (add-before 'build 'fix-google-collections |
| 4350 | (lambda _ |
| 4351 | ;; Google collections are now replaced with guava |
| 4352 | (substitute* "plexus-container-default/pom.xml" |
| 4353 | (("google-collections") "guava") |
| 4354 | (("com.google.collections") "com.google.guava")) |
| 4355 | #t)) |
| 4356 | (add-before 'build 'copy-resources |
| 4357 | (lambda _ |
| 4358 | (copy-recursively |
| 4359 | "plexus-container-default/src/main/resources/" |
| 4360 | "build/classes") |
| 4361 | #t)) |
| 4362 | (add-before 'check 'fix-paths |
| 4363 | (lambda _ |
| 4364 | (let ((dir "plexus-container-default/src/test/java/org/codehaus")) |
| 4365 | (substitute* |
| 4366 | (string-append |
| 4367 | dir "/plexus/component/composition/" |
| 4368 | "ComponentRealmCompositionTest.java") |
| 4369 | (("src/test") "plexus-container-default/src/test")) |
| 4370 | #t))) |
| 4371 | (replace 'install |
| 4372 | (install-from-pom "plexus-container-default/pom.xml"))))) |
| 4373 | (inputs |
| 4374 | `(("worldclass" ,java-plexus-classworlds) |
| 4375 | ("xbean" ,java-geronimo-xbean-reflect) |
| 4376 | ("utils" ,java-plexus-utils) |
| 4377 | ("junit" ,java-junit) |
| 4378 | ("guava" ,java-guava))) |
| 4379 | (native-inputs |
| 4380 | `(("archiver" ,java-plexus-archiver) |
| 4381 | ("hamcrest" ,java-hamcrest-core))))) |
| 4382 | |
| 4383 | (define-public java-plexus-component-annotations |
| 4384 | (package |
| 4385 | (inherit java-plexus-container-default) |
| 4386 | (name "java-plexus-component-annotations") |
| 4387 | (arguments |
| 4388 | `(#:jar-name "plexus-component-annotations.jar" |
| 4389 | #:source-dir "plexus-component-annotations/src/main/java" |
| 4390 | #:tests? #f; no tests |
| 4391 | #:phases |
| 4392 | (modify-phases %standard-phases |
| 4393 | (replace 'install |
| 4394 | (install-from-pom "plexus-component-annotations/pom.xml"))))) |
| 4395 | (propagated-inputs |
| 4396 | (list java-plexus-containers-parent-pom)) |
| 4397 | (inputs '()) |
| 4398 | (native-inputs '()) |
| 4399 | (synopsis "Plexus descriptors generator") |
| 4400 | (description "This package is a Maven plugin to generate Plexus descriptors |
| 4401 | from source tags and class annotations."))) |
| 4402 | |
| 4403 | (define-public java-plexus-component-metadata |
| 4404 | (package |
| 4405 | (inherit java-plexus-container-default) |
| 4406 | (name "java-plexus-component-metadata") |
| 4407 | (arguments |
| 4408 | `(#:jar-name "plexus-component-metadata.jar" |
| 4409 | #:source-dir "src/main/java" |
| 4410 | #:test-dir "src/test" |
| 4411 | #:jdk ,icedtea-8 |
| 4412 | #:phases |
| 4413 | (modify-phases %standard-phases |
| 4414 | (add-before 'configure 'chdir |
| 4415 | (lambda _ |
| 4416 | (chdir "plexus-component-metadata") |
| 4417 | #t)) |
| 4418 | (add-before 'build 'copy-resources |
| 4419 | (lambda _ |
| 4420 | (copy-recursively "src/main/resources" |
| 4421 | "build/classes/") |
| 4422 | #t)) |
| 4423 | (add-before 'build 'fix-jdom |
| 4424 | (lambda _ |
| 4425 | ;; The newer version of jdom now sets multiple features by default |
| 4426 | ;; that are not supported. |
| 4427 | ;; Skip these features |
| 4428 | (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java" |
| 4429 | (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);") |
| 4430 | "// skip")))) |
| 4431 | (add-before 'build 'reinstate-cli |
| 4432 | ;; The CLI was removed in 2.1.0, but we still need it to build some |
| 4433 | ;; maven dependencies, and some parts of maven itself. We can't use |
| 4434 | ;; the maven plugin for that yet. |
| 4435 | (lambda _ |
| 4436 | (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java" |
| 4437 | (lambda _ |
| 4438 | ;; Copied from a previous version of this package. |
| 4439 | (display "package org.codehaus.plexus.metadata; |
| 4440 | |
| 4441 | import java.io.File; |
| 4442 | import java.util.Arrays; |
| 4443 | import java.util.Collections; |
| 4444 | |
| 4445 | import org.apache.commons.cli.CommandLine; |
| 4446 | import org.apache.commons.cli.OptionBuilder; |
| 4447 | import org.apache.commons.cli.Options; |
| 4448 | import org.codehaus.plexus.PlexusContainer; |
| 4449 | import org.codehaus.plexus.tools.cli.AbstractCli; |
| 4450 | |
| 4451 | public class PlexusMetadataGeneratorCli |
| 4452 | extends AbstractCli |
| 4453 | { |
| 4454 | public static final char SOURCE_DIRECTORY = 's'; |
| 4455 | public static final char SOURCE_ENCODING = 'e'; |
| 4456 | public static final char CLASSES_DIRECTORY = 'c'; |
| 4457 | public static final char OUTPUT_FILE = 'o'; |
| 4458 | public static final char DESCRIPTORS_DIRECTORY = 'm'; |
| 4459 | |
| 4460 | public static void main( String[] args ) |
| 4461 | throws Exception |
| 4462 | { |
| 4463 | // Call System.exit() with execute()'s return code so errors |
| 4464 | // actually cause the process to exit with non-zero status. |
| 4465 | System.exit(new PlexusMetadataGeneratorCli().execute( args )); |
| 4466 | } |
| 4467 | |
| 4468 | @Override |
| 4469 | public String getPomPropertiesPath() |
| 4470 | { |
| 4471 | return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\"; |
| 4472 | } |
| 4473 | |
| 4474 | @Override |
| 4475 | @SuppressWarnings(\"static-access\") |
| 4476 | public Options buildCliOptions( Options options ) |
| 4477 | { |
| 4478 | options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) ); |
| 4479 | options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) ); |
| 4480 | options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) ); |
| 4481 | options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) ); |
| 4482 | options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) ); |
| 4483 | return options; |
| 4484 | } |
| 4485 | |
| 4486 | public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus ) |
| 4487 | throws Exception |
| 4488 | { |
| 4489 | MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class ); |
| 4490 | |
| 4491 | MetadataGenerationRequest request = new MetadataGenerationRequest(); |
| 4492 | request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) ); |
| 4493 | request.classpath = Collections.emptyList(); |
| 4494 | request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } ); |
| 4495 | request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING ); |
| 4496 | request.useContextClassLoader = true; |
| 4497 | request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) ); |
| 4498 | request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) ); |
| 4499 | |
| 4500 | metadataGenerator.generateDescriptor( request ); |
| 4501 | } |
| 4502 | }"))))) |
| 4503 | (add-before 'check 'fix-test-location |
| 4504 | (lambda _ |
| 4505 | (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java" |
| 4506 | "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java") |
| 4507 | (("target") "build"))))))) |
| 4508 | (propagated-inputs |
| 4509 | (list java-plexus-container-default |
| 4510 | java-plexus-component-annotations |
| 4511 | java-plexus-utils |
| 4512 | java-plexus-cli |
| 4513 | java-plexus-classworlds |
| 4514 | java-commons-cli |
| 4515 | java-qdox |
| 4516 | java-jdom2 |
| 4517 | java-asm-8 |
| 4518 | maven-plugin-api |
| 4519 | maven-plugin-annotations |
| 4520 | maven-model)) |
| 4521 | (native-inputs |
| 4522 | (list maven-core-bootstrap |
| 4523 | java-junit |
| 4524 | java-guava |
| 4525 | java-geronimo-xbean-reflect)) |
| 4526 | (synopsis "Inversion-of-control container for Maven") |
| 4527 | (description "The Plexus project provides a full software stack for creating |
| 4528 | and executing software projects. Based on the Plexus container, the |
| 4529 | applications can utilise component-oriented programming to build modular, |
| 4530 | reusable components that can easily be assembled and reused. This package |
| 4531 | provides the Maven plugin generating the component metadata."))) |
| 4532 | |
| 4533 | (define-public java-plexus-container-default-1.7 |
| 4534 | (package |
| 4535 | (inherit java-plexus-container-default) |
| 4536 | (version "1.7.1") |
| 4537 | (source (origin |
| 4538 | (method git-fetch) |
| 4539 | (uri (git-reference |
| 4540 | (url "https://github.com/codehaus-plexus/plexus-containers") |
| 4541 | (commit (string-append "plexus-containers-" version)))) |
| 4542 | (file-name (git-file-name "java-plexus-container-default" version)) |
| 4543 | (sha256 |
| 4544 | (base32 |
| 4545 | "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228")))) |
| 4546 | (arguments |
| 4547 | (substitute-keyword-arguments |
| 4548 | (package-arguments java-plexus-container-default) |
| 4549 | ((#:tests? _ #t) #f))))) |
| 4550 | |
| 4551 | (define java-plexus-containers-parent-pom-1.7 |
| 4552 | (package |
| 4553 | (inherit java-plexus-container-default-1.7) |
| 4554 | (name "java-plexus-containers-parent-pom") |
| 4555 | (arguments |
| 4556 | `(#:tests? #f |
| 4557 | #:phases |
| 4558 | (modify-phases %standard-phases |
| 4559 | (delete 'configure) |
| 4560 | (delete 'build) |
| 4561 | (replace 'install |
| 4562 | (install-pom-file "pom.xml"))))) |
| 4563 | (propagated-inputs |
| 4564 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) |
| 4565 | |
| 4566 | (define-public java-plexus-component-annotations-1.7 |
| 4567 | (package |
| 4568 | (inherit java-plexus-container-default-1.7) |
| 4569 | (name "java-plexus-component-annotations") |
| 4570 | (arguments |
| 4571 | `(#:jar-name "plexus-component-annotations.jar" |
| 4572 | #:source-dir "plexus-component-annotations/src/main/java" |
| 4573 | #:tests? #f; no tests |
| 4574 | #:phases |
| 4575 | (modify-phases %standard-phases |
| 4576 | (replace 'install |
| 4577 | (install-from-pom "plexus-component-annotations/pom.xml"))))) |
| 4578 | (propagated-inputs |
| 4579 | `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7))) |
| 4580 | (inputs '()) |
| 4581 | (native-inputs '()) |
| 4582 | (synopsis "Plexus descriptors generator") |
| 4583 | (description "This package is a Maven plugin to generate Plexus descriptors |
| 4584 | from source tags and class annotations."))) |
| 4585 | |
| 4586 | (define-public java-plexus-component-metadata-1.7 |
| 4587 | (package |
| 4588 | (inherit java-plexus-container-default-1.7) |
| 4589 | (name "java-plexus-component-metadata") |
| 4590 | (arguments |
| 4591 | `(#:jar-name "plexus-component-metadata.jar" |
| 4592 | #:source-dir "src/main/java" |
| 4593 | #:test-dir "src/test" |
| 4594 | #:phases |
| 4595 | (modify-phases %standard-phases |
| 4596 | (add-before 'configure 'chdir |
| 4597 | (lambda _ |
| 4598 | (chdir "plexus-component-metadata") |
| 4599 | #t)) |
| 4600 | (add-before 'build 'copy-resources |
| 4601 | (lambda _ |
| 4602 | (copy-recursively "src/main/resources" |
| 4603 | "build/classes/") |
| 4604 | #t)) |
| 4605 | (add-before 'build 'fix-jdom |
| 4606 | (lambda _ |
| 4607 | ;; The newer version of jdom now sets multiple features by default |
| 4608 | ;; that are not supported. |
| 4609 | ;; Skip these features |
| 4610 | (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java" |
| 4611 | (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);") |
| 4612 | "// skip")))) |
| 4613 | (add-before 'check 'fix-test-location |
| 4614 | (lambda _ |
| 4615 | (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java" |
| 4616 | "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java") |
| 4617 | (("target") "build"))))))) |
| 4618 | (propagated-inputs |
| 4619 | (list java-plexus-container-default-1.7 |
| 4620 | java-plexus-component-annotations-1.7 |
| 4621 | java-plexus-utils |
| 4622 | java-plexus-cli |
| 4623 | java-plexus-cli |
| 4624 | java-plexus-classworlds |
| 4625 | maven-plugin-api |
| 4626 | maven-plugin-annotations |
| 4627 | maven-core-bootstrap |
| 4628 | maven-model |
| 4629 | java-commons-cli |
| 4630 | java-qdox |
| 4631 | java-jdom2 |
| 4632 | java-asm-8)) |
| 4633 | (native-inputs |
| 4634 | (list java-junit java-guava java-geronimo-xbean-reflect)) |
| 4635 | (synopsis "Inversion-of-control container for Maven") |
| 4636 | (description "The Plexus project provides a full software stack for creating |
| 4637 | and executing software projects. Based on the Plexus container, the |
| 4638 | applications can utilise component-oriented programming to build modular, |
| 4639 | reusable components that can easily be assembled and reused. This package |
| 4640 | provides the Maven plugin generating the component metadata."))) |
| 4641 | |
| 4642 | (define-public java-plexus-cipher |
| 4643 | (package |
| 4644 | (name "java-plexus-cipher") |
| 4645 | (version "2.0") |
| 4646 | (source (origin |
| 4647 | (method git-fetch) |
| 4648 | (uri (git-reference |
| 4649 | (url "https://github.com/codehaus-plexus/plexus-cipher") |
| 4650 | (commit (string-append "plexus-cipher-" version)))) |
| 4651 | (file-name (git-file-name name version)) |
| 4652 | (sha256 |
| 4653 | (base32 |
| 4654 | "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai")))) |
| 4655 | (build-system ant-build-system) |
| 4656 | (arguments |
| 4657 | `(#:jar-name "plexus-cipher.jar" |
| 4658 | #:source-dir "src/main/java" |
| 4659 | #:phases |
| 4660 | (modify-phases %standard-phases |
| 4661 | (add-before 'build 'generate-javax.inject.Named |
| 4662 | (lambda _ |
| 4663 | (mkdir-p "build/classes/META-INF/sisu") |
| 4664 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 4665 | (lambda _ |
| 4666 | (display |
| 4667 | "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) |
| 4668 | #t)) |
| 4669 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4670 | (inputs |
| 4671 | `(("java-cdi-api" ,java-cdi-api) |
| 4672 | ("java-javax-inject" ,java-javax-inject))) |
| 4673 | (propagated-inputs |
| 4674 | `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15) |
| 4675 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject))) |
| 4676 | (native-inputs |
| 4677 | `(("java-junit" ,java-junit))) |
| 4678 | (home-page "https://github.com/sonatype/plexus-cipher") |
| 4679 | (synopsis "Encryption/decryption Component") |
| 4680 | (description "Plexus-cipher contains a component to deal with encryption |
| 4681 | and decryption.") |
| 4682 | (license license:asl2.0))) |
| 4683 | |
| 4684 | (define-public java-plexus-cipher-1.7 |
| 4685 | (package |
| 4686 | (inherit java-plexus-cipher) |
| 4687 | (version "1.7") |
| 4688 | (source (origin |
| 4689 | (method git-fetch) |
| 4690 | (uri (git-reference |
| 4691 | (url "https://github.com/codehaus-plexus/plexus-cipher") |
| 4692 | (commit (string-append "plexus-cipher-" version)))) |
| 4693 | (file-name (git-file-name "java-plexus-cipher" version)) |
| 4694 | (sha256 |
| 4695 | (base32 |
| 4696 | "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0")))) |
| 4697 | (arguments |
| 4698 | `(#:jar-name "plexus-cipher.jar" |
| 4699 | #:source-dir "src/main/java" |
| 4700 | #:tests? #f; FIXME: requires sisu-inject-bean |
| 4701 | #:phases |
| 4702 | (modify-phases %standard-phases |
| 4703 | (add-before 'build 'copy-resources |
| 4704 | (lambda _ |
| 4705 | (copy-recursively "src/main/resources" "build/classes") |
| 4706 | (mkdir-p "build/classes/META-INF/sisu") |
| 4707 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 4708 | (lambda _ |
| 4709 | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) |
| 4710 | #t)) |
| 4711 | (add-before 'install 'fix-test-dependency |
| 4712 | (lambda _ |
| 4713 | ;; sisu-inject-bean is only used for tests, but its scope is "provided". |
| 4714 | ;; FIXME: Liar. |
| 4715 | (substitute* "pom.xml" |
| 4716 | (("provided") |
| 4717 | "test")) |
| 4718 | #t)) |
| 4719 | (replace 'install |
| 4720 | (install-from-pom "pom.xml"))))) |
| 4721 | (propagated-inputs |
| 4722 | (list java-sonatype-spice-parent-pom-15)))) |
| 4723 | |
| 4724 | (define-public java-plexus-java |
| 4725 | (package |
| 4726 | (name "java-plexus-java") |
| 4727 | (version "0.9.10") |
| 4728 | (source (origin |
| 4729 | (method git-fetch) |
| 4730 | (uri (git-reference |
| 4731 | (url "https://github.com/codehaus-plexus/plexus-languages") |
| 4732 | (commit (string-append "plexus-languages-" version)))) |
| 4733 | (file-name (git-file-name name version)) |
| 4734 | (sha256 |
| 4735 | (base32 |
| 4736 | "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5")) |
| 4737 | (modules '((guix build utils))) |
| 4738 | (snippet |
| 4739 | `(begin |
| 4740 | (for-each delete-file (find-files "." ".*.jar$")) |
| 4741 | #t)))) |
| 4742 | (build-system ant-build-system) |
| 4743 | (arguments |
| 4744 | `(#:jar-name "plexus-java.java" |
| 4745 | #:jdk ,openjdk11 |
| 4746 | #:source-dir "plexus-java/src/main/java" |
| 4747 | #:test-dir "plexus-java/src/test" |
| 4748 | #:tests? #f; require mockito 2 |
| 4749 | #:phases |
| 4750 | (modify-phases %standard-phases |
| 4751 | (add-after 'build 'generate-metadata |
| 4752 | (lambda _ |
| 4753 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
| 4754 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
| 4755 | "--source" "plexus-java/src/main/java" |
| 4756 | "--output" "build/classes/META-INF/plexus/components.xml" |
| 4757 | "--classes" "build/classes" |
| 4758 | "--descriptors" "build/classes/META-INF") |
| 4759 | (invoke "ant" "jar") |
| 4760 | #t)) |
| 4761 | (add-before 'install 'install-parent |
| 4762 | (install-pom-file "pom.xml")) |
| 4763 | (replace 'install |
| 4764 | (install-from-pom "plexus-java/pom.xml"))))) |
| 4765 | (propagated-inputs |
| 4766 | (list java-asm java-qdox-2 java-javax-inject |
| 4767 | plexus-parent-pom-4.0)) |
| 4768 | (inputs |
| 4769 | (list java-plexus-component-annotations-1.7)) |
| 4770 | (native-inputs |
| 4771 | (list java-plexus-component-metadata-1.7 java-junit)) |
| 4772 | (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java") |
| 4773 | (synopsis "Shared language features for Java") |
| 4774 | (description "This package contains shared language features of the Java |
| 4775 | language, for the plexus project.") |
| 4776 | (license license:asl2.0))) |
| 4777 | |
| 4778 | (define-public java-plexus-java-1 |
| 4779 | (package |
| 4780 | (inherit java-plexus-java) |
| 4781 | (version "1.4.0") |
| 4782 | (source (origin |
| 4783 | (method git-fetch) |
| 4784 | (uri (git-reference |
| 4785 | (url "https://github.com/codehaus-plexus/plexus-languages") |
| 4786 | (commit (string-append "plexus-languages-" version)))) |
| 4787 | (file-name (git-file-name "java-plexus-java" version)) |
| 4788 | (sha256 |
| 4789 | (base32 "0xlhg4bz3dzakv8indfgl1k5dl5xll9h190rlyk9v1ghdzzz1iw2")) |
| 4790 | (modules '((guix build utils))) |
| 4791 | (snippet |
| 4792 | '(for-each delete-file (find-files "." "\\.jar$"))))) |
| 4793 | (arguments |
| 4794 | (substitute-keyword-arguments (package-arguments java-plexus-java) |
| 4795 | ((#:phases phases) |
| 4796 | `(modify-phases ,phases |
| 4797 | ;; Replace the plexus metadata generation with Sisu index generation |
| 4798 | (replace 'generate-metadata |
| 4799 | (lambda _ |
| 4800 | ;; Generate Sisu index for @Named components |
| 4801 | (mkdir-p "build/classes/META-INF/sisu") |
| 4802 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 4803 | (lambda _ |
| 4804 | (display "org.codehaus.plexus.languages.java.jpms.LocationManager\n"))) |
| 4805 | (invoke "ant" "jar"))))))) |
| 4806 | (propagated-inputs |
| 4807 | (list java-asm-9 java-qdox-2 java-javax-inject |
| 4808 | plexus-parent-pom-15)) |
| 4809 | (native-inputs |
| 4810 | (modify-inputs (package-native-inputs java-plexus-java) |
| 4811 | (append java-eclipse-sisu-inject))))) |
| 4812 | |
| 4813 | (define-public java-plexus-compiler-api |
| 4814 | (package |
| 4815 | (name "java-plexus-compiler-api") |
| 4816 | (version "2.8.4") |
| 4817 | (source (origin |
| 4818 | (method git-fetch) |
| 4819 | (uri (git-reference |
| 4820 | (url "https://github.com/codehaus-plexus/plexus-compiler") |
| 4821 | (commit (string-append "plexus-compiler-" version)))) |
| 4822 | (file-name (git-file-name name version)) |
| 4823 | (sha256 |
| 4824 | (base32 |
| 4825 | "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk")))) |
| 4826 | (build-system ant-build-system) |
| 4827 | (arguments |
| 4828 | `(#:jar-name "plexus-compiler-api.jar" |
| 4829 | #:source-dir "plexus-compiler-api/src/main/java" |
| 4830 | #:test-dir "plexus-compiler-api/src/test" |
| 4831 | #:phases |
| 4832 | (modify-phases %standard-phases |
| 4833 | (replace 'install |
| 4834 | (install-from-pom "plexus-compiler-api/pom.xml"))))) |
| 4835 | (propagated-inputs |
| 4836 | `(("java-plexus-container-default" ,java-plexus-container-default) |
| 4837 | ("java-plexus-compiler-pom" ,java-plexus-compiler-pom) |
| 4838 | ("java-plexus-util" ,java-plexus-utils))) |
| 4839 | (native-inputs |
| 4840 | (list java-junit)) |
| 4841 | (home-page "https://github.com/codehaus-plexus/plexus-compiler") |
| 4842 | (synopsis "Plexus Compilers component's API to manipulate compilers") |
| 4843 | (description "This package contains the API used by components to manipulate |
| 4844 | compilers.") |
| 4845 | (license (list license:asl2.0 |
| 4846 | license:expat)))) |
| 4847 | |
| 4848 | (define java-plexus-compiler-pom |
| 4849 | (package |
| 4850 | (inherit java-plexus-compiler-api) |
| 4851 | (name "java-plexus-compiler-pom") |
| 4852 | (arguments |
| 4853 | `(#:tests? #f |
| 4854 | #:phases |
| 4855 | (modify-phases %standard-phases |
| 4856 | (delete 'configure) |
| 4857 | (delete 'build) |
| 4858 | (replace 'install |
| 4859 | (install-pom-file "pom.xml")) |
| 4860 | (add-after 'install 'install-compilers |
| 4861 | (install-pom-file "plexus-compilers/pom.xml"))))) |
| 4862 | (propagated-inputs |
| 4863 | `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0))))) |
| 4864 | |
| 4865 | (define plexus-components-parent-pom-4.0 |
| 4866 | (package |
| 4867 | (name "plexus-components-parent-pom") |
| 4868 | (version "4.0") |
| 4869 | (source (origin |
| 4870 | (method git-fetch) |
| 4871 | (uri (git-reference |
| 4872 | (url "https://github.com/codehaus-plexus/plexus-components") |
| 4873 | (commit (string-append "plexus-components-" version)))) |
| 4874 | (file-name (git-file-name name version)) |
| 4875 | (sha256 |
| 4876 | (base32 |
| 4877 | "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi")))) |
| 4878 | (build-system ant-build-system) |
| 4879 | (arguments |
| 4880 | `(#:tests? #f |
| 4881 | #:phases |
| 4882 | (modify-phases %standard-phases |
| 4883 | (delete 'configure) |
| 4884 | (delete 'build) |
| 4885 | (replace 'install |
| 4886 | (install-pom-file "pom.xml"))))) |
| 4887 | (propagated-inputs |
| 4888 | `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0))) |
| 4889 | (home-page "https://codehaus-plexus.github.io/plexus-components") |
| 4890 | (synopsis "Plexus parent pom") |
| 4891 | (description "This package contains the Plexus components parent POM.") |
| 4892 | (license license:asl2.0))) |
| 4893 | |
| 4894 | (define-public java-plexus-compiler-manager |
| 4895 | (package |
| 4896 | (inherit java-plexus-compiler-api) |
| 4897 | (name "java-plexus-compiler-manager") |
| 4898 | (arguments |
| 4899 | `(#:jar-name "compiler-compiler-manager.java" |
| 4900 | #:source-dir "plexus-compiler-manager/src/main/java" |
| 4901 | #:test-dir "plexus-compiler-manager/src/test" |
| 4902 | #:tests? #f |
| 4903 | #:phases |
| 4904 | (modify-phases %standard-phases |
| 4905 | (add-after 'build 'generate-metadata |
| 4906 | (lambda _ |
| 4907 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
| 4908 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
| 4909 | "--source" "plexus-compiler-manager/src/main/java" |
| 4910 | "--output" "build/classes/META-INF/plexus/components.xml" |
| 4911 | "--classes" "build/classes" |
| 4912 | "--descriptors" "build/classes/META-INF") |
| 4913 | (invoke "ant" "jar") |
| 4914 | #t)) |
| 4915 | (add-after 'generate-metadata 'rebuild |
| 4916 | (lambda _ |
| 4917 | (invoke "ant" "jar") |
| 4918 | #t)) |
| 4919 | (replace 'install |
| 4920 | (install-from-pom "plexus-compiler-manager/pom.xml"))))) |
| 4921 | (propagated-inputs |
| 4922 | (list java-plexus-compiler-api java-plexus-compiler-pom |
| 4923 | java-plexus-container-default-1.7)) |
| 4924 | (native-inputs |
| 4925 | (list unzip java-plexus-component-metadata-1.7)) |
| 4926 | (synopsis "Compiler management for Plexus Compiler component") |
| 4927 | (description "Plexus Compiler is a Plexus component to use different |
| 4928 | compilers through a uniform API. This component chooses the compiler |
| 4929 | implementation to use in a project."))) |
| 4930 | |
| 4931 | (define-public java-plexus-compiler-javac |
| 4932 | (package |
| 4933 | (inherit java-plexus-compiler-api) |
| 4934 | (name "java-plexus-compiler-javac") |
| 4935 | (arguments |
| 4936 | `(#:jar-name "plexus-compiler-javac.jar" |
| 4937 | #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java" |
| 4938 | #:jdk ,icedtea-8 |
| 4939 | #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package. |
| 4940 | #:test-dir "plexus-compilers/plexus-compiler-javac/src/test" |
| 4941 | #:modules ((guix build ant-build-system) |
| 4942 | (guix build utils) |
| 4943 | (guix build java-utils) |
| 4944 | (sxml simple)) |
| 4945 | #:phases |
| 4946 | (modify-phases %standard-phases |
| 4947 | ;; We cannot use java-plexus-component-metadata to generate the metadata |
| 4948 | ;; because it ultimately depends on this package. |
| 4949 | ;; Create it manually instead |
| 4950 | (add-before 'build 'create-metadata |
| 4951 | (lambda _ |
| 4952 | (let* ((dir "build/classes/META-INF/plexus") |
| 4953 | (file (string-append dir "/components.xml"))) |
| 4954 | (mkdir-p dir) |
| 4955 | (with-output-to-file file |
| 4956 | (lambda _ |
| 4957 | (sxml->xml |
| 4958 | `(component-set |
| 4959 | (components |
| 4960 | (component |
| 4961 | (role "org.codehaus.plexus.compiler.Compiler") |
| 4962 | (role-hint "javac") |
| 4963 | (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler") |
| 4964 | (isolated-realm "false")))))))) |
| 4965 | #t)) |
| 4966 | (replace 'install |
| 4967 | (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml"))))) |
| 4968 | (propagated-inputs |
| 4969 | (list java-plexus-compiler-api java-plexus-utils |
| 4970 | java-plexus-container-default)) |
| 4971 | (synopsis "Javac Compiler support for Plexus Compiler component") |
| 4972 | (description "This package contains the Javac Compiler support for Plexus |
| 4973 | Compiler component."))) |
| 4974 | |
| 4975 | (define plexus-components-pom-1.1.20 |
| 4976 | (package |
| 4977 | (name "plexus-components-pom-1.1.20") |
| 4978 | (version "1.1.20") |
| 4979 | (source (origin |
| 4980 | (method git-fetch) |
| 4981 | (uri (git-reference |
| 4982 | (url "https://github.com/codehaus-plexus/plexus-components") |
| 4983 | (commit (string-append "plexus-components-" version)))) |
| 4984 | (file-name (git-file-name name version)) |
| 4985 | (sha256 |
| 4986 | (base32 |
| 4987 | "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb")))) |
| 4988 | (build-system ant-build-system) |
| 4989 | (arguments |
| 4990 | `(#:tests? #f |
| 4991 | #:phases |
| 4992 | (modify-phases %standard-phases |
| 4993 | (delete 'configure) |
| 4994 | (delete 'build) |
| 4995 | (replace 'install |
| 4996 | (install-pom-file "pom.xml"))))) |
| 4997 | (propagated-inputs |
| 4998 | `(("plexus-parent-pom" ,plexus-parent-pom-3.1))) |
| 4999 | (home-page "https://github.com/codehaus-plexus/plexus-components") |
| 5000 | (synopsis "Maven parent pom for plexus packages") |
| 5001 | (description "This package contains the parent pom for plexus component |
| 5002 | packages.") |
| 5003 | (license license:asl2.0))) |
| 5004 | |
| 5005 | (define-public plexus-components-pom-6.6 |
| 5006 | (package |
| 5007 | (name "plexus-components-pom") |
| 5008 | (version "6.6") |
| 5009 | (source (origin |
| 5010 | (method git-fetch) |
| 5011 | (uri (git-reference |
| 5012 | (url "https://github.com/codehaus-plexus/plexus-components") |
| 5013 | (commit (string-append "plexus-components-" version)))) |
| 5014 | (file-name (git-file-name name version)) |
| 5015 | (sha256 |
| 5016 | (base32 |
| 5017 | "0vfx6kvvf96zb79y3b6xhm6kppxlmv2i8nz563bymn5jmp0b9d4w")))) |
| 5018 | (build-system ant-build-system) |
| 5019 | (arguments |
| 5020 | `(#:tests? #f |
| 5021 | #:phases |
| 5022 | (modify-phases %standard-phases |
| 5023 | (delete 'configure) |
| 5024 | (delete 'build) |
| 5025 | (replace 'install |
| 5026 | (install-pom-file "pom.xml"))))) |
| 5027 | (propagated-inputs |
| 5028 | (list plexus-parent-pom-8)) |
| 5029 | (home-page "https://github.com/codehaus-plexus/plexus-components") |
| 5030 | (synopsis "Maven parent pom for plexus packages") |
| 5031 | (description "This package contains the parent pom for plexus component |
| 5032 | packages.") |
| 5033 | (license license:asl2.0))) |
| 5034 | |
| 5035 | (define-public java-plexus-digest |
| 5036 | (package |
| 5037 | (name "java-plexus-digest") |
| 5038 | (version "1.2") |
| 5039 | (source (origin |
| 5040 | (method git-fetch) |
| 5041 | (uri (git-reference |
| 5042 | (url "https://github.com/codehaus-plexus/plexus-digest") |
| 5043 | (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430"))) |
| 5044 | (file-name (git-file-name name version)) |
| 5045 | (sha256 |
| 5046 | (base32 |
| 5047 | "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x")))) |
| 5048 | (build-system ant-build-system) |
| 5049 | (arguments |
| 5050 | `(#:jar-name "plexus-digest.jar" |
| 5051 | #:source-dir "src/main/java" |
| 5052 | #:tests? #f |
| 5053 | #:phases |
| 5054 | (modify-phases %standard-phases |
| 5055 | (replace 'install |
| 5056 | (install-from-pom "pom.xml"))))) |
| 5057 | (propagated-inputs |
| 5058 | (list java-plexus-utils plexus-components-pom-1.1.20)) |
| 5059 | (native-inputs |
| 5060 | (list java-junit)) |
| 5061 | (home-page "https://github.com/codehaus-plexus/plexus-digest") |
| 5062 | (synopsis "Hash function utilities for Java") |
| 5063 | (description "This package is a plexus component that contains hash |
| 5064 | function utilities.") |
| 5065 | (license license:asl2.0))) |
| 5066 | |
| 5067 | (define-public java-plexus-sec-dispatcher |
| 5068 | (package |
| 5069 | (name "java-plexus-sec-dispatcher") |
| 5070 | (version "2.0") |
| 5071 | (source (origin |
| 5072 | (method git-fetch) |
| 5073 | (uri (git-reference |
| 5074 | (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher") |
| 5075 | (commit (string-append "plexus-sec-dispatcher-" version)))) |
| 5076 | (sha256 |
| 5077 | (base32 |
| 5078 | "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk")) |
| 5079 | (file-name (git-file-name name version)))) |
| 5080 | (arguments |
| 5081 | `(#:jar-name "plexus-sec-dispatcher.jar" |
| 5082 | #:source-dir "src/main/java" |
| 5083 | #:phases |
| 5084 | (modify-phases %standard-phases |
| 5085 | (add-before 'build 'generate-models |
| 5086 | (lambda* (#:key inputs #:allow-other-keys) |
| 5087 | (define (modello-single-mode file version mode) |
| 5088 | (invoke "java" |
| 5089 | "org.codehaus.modello.ModelloCli" |
| 5090 | file mode "src/main/java" version |
| 5091 | "false" "true")) |
| 5092 | (let ((file "src/main/mdo/settings-security.mdo")) |
| 5093 | (modello-single-mode file "1.0.0" "java") |
| 5094 | (modello-single-mode file "1.0.0" "xpp3-reader") |
| 5095 | (modello-single-mode file "1.0.0" "xpp3-writer")) |
| 5096 | #t)) |
| 5097 | (add-before 'build 'generate-javax.inject.Named |
| 5098 | (lambda _ |
| 5099 | (mkdir-p "build/classes/META-INF/sisu") |
| 5100 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 5101 | (lambda _ |
| 5102 | (display |
| 5103 | "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n"))) |
| 5104 | #t)) |
| 5105 | (add-before 'check 'fix-paths |
| 5106 | (lambda _ |
| 5107 | (copy-recursively "src/test/resources" "target") |
| 5108 | #t)) |
| 5109 | (replace 'install (install-from-pom "pom.xml"))))) |
| 5110 | (propagated-inputs |
| 5111 | (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8)) |
| 5112 | (native-inputs |
| 5113 | (list java-javax-inject |
| 5114 | java-modello-core |
| 5115 | ;; for modello |
| 5116 | java-plexus-container-default |
| 5117 | java-plexus-classworlds |
| 5118 | java-plexus-utils |
| 5119 | java-guava |
| 5120 | java-geronimo-xbean-reflect |
| 5121 | ;; modello plugins |
| 5122 | java-modello-plugins-java |
| 5123 | java-modello-plugins-xml |
| 5124 | java-modello-plugins-xpp3 |
| 5125 | ;; for tests |
| 5126 | java-junit)) |
| 5127 | (build-system ant-build-system) |
| 5128 | (home-page "https://github.com/sonatype/plexus-sec-dispatcher") |
| 5129 | (synopsis "Plexus Security Dispatcher Component") |
| 5130 | (description "This package is the Plexus Security Dispatcher Component. |
| 5131 | This component decrypts a string passed to it.") |
| 5132 | (license license:asl2.0))) |
| 5133 | |
| 5134 | (define-public java-plexus-sec-dispatcher-1.4 |
| 5135 | (package |
| 5136 | (inherit java-plexus-sec-dispatcher) |
| 5137 | (version "1.4") |
| 5138 | (source (origin |
| 5139 | (method git-fetch) |
| 5140 | (uri (git-reference |
| 5141 | (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher") |
| 5142 | (commit (string-append "sec-dispatcher-" version)))) |
| 5143 | (sha256 |
| 5144 | (base32 |
| 5145 | "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs")) |
| 5146 | (file-name (git-file-name "java-plexus-sec-dispatcher" version)))) |
| 5147 | (arguments |
| 5148 | (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher) |
| 5149 | ((#:phases phases) |
| 5150 | `(modify-phases ,phases |
| 5151 | (delete 'generate-javax.inject.Named) |
| 5152 | (add-before 'build 'generate-components.xml |
| 5153 | (lambda _ |
| 5154 | (mkdir-p "build/classes/META-INF/plexus") |
| 5155 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" |
| 5156 | (lambda _ |
| 5157 | (display |
| 5158 | "<component-set>\n |
| 5159 | <components>\n |
| 5160 | <component>\n |
| 5161 | <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n |
| 5162 | <role-hint>default</role-hint>\n |
| 5163 | <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n |
| 5164 | <description></description>\n |
| 5165 | <requirements>\n |
| 5166 | <requirement>\n |
| 5167 | <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n |
| 5168 | <field-name>_cipher</field-name>\n |
| 5169 | </requirement>\n |
| 5170 | <requirement>\n |
| 5171 | <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n |
| 5172 | <field-name>_decryptors</field-name>\n |
| 5173 | </requirement>\n |
| 5174 | </requirements>\n |
| 5175 | <configuration>\n |
| 5176 | <_configuration-file>~/.settings-security.xml</_configuration-file>\n |
| 5177 | </configuration>\n |
| 5178 | </component>\n |
| 5179 | </components>\n |
| 5180 | </component-set>\n"))))))))) |
| 5181 | (propagated-inputs |
| 5182 | (list java-plexus-utils java-plexus-cipher-1.7 |
| 5183 | java-sonatype-spice-parent-pom-12)))) |
| 5184 | |
| 5185 | (define-public java-plexus-cli |
| 5186 | (package |
| 5187 | (name "java-plexus-cli") |
| 5188 | (version "1.7") |
| 5189 | (source (origin |
| 5190 | (method git-fetch) |
| 5191 | (uri (git-reference |
| 5192 | (url "https://github.com/sonatype/plexus-cli") |
| 5193 | (commit "a776afa6bca84e5107bedb69440329cdb24ed645"))) |
| 5194 | (file-name (string-append name "-" version)) |
| 5195 | (sha256 |
| 5196 | (base32 |
| 5197 | "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx")))) |
| 5198 | (build-system ant-build-system) |
| 5199 | (arguments |
| 5200 | `(#:jar-name "plexus-cli.jar" |
| 5201 | #:source-dir "src/main/java" |
| 5202 | #:jdk ,icedtea-8 |
| 5203 | #:test-dir "src/test" |
| 5204 | #:phases |
| 5205 | (modify-phases %standard-phases |
| 5206 | (add-after 'unpack 'fix-error-swallowing |
| 5207 | (lambda _ |
| 5208 | ;; AbstractCli.execute() catches exceptions and calls showFatalError() |
| 5209 | ;; or showError(), but ignores any return value and always returns 0. |
| 5210 | ;; This silently swallows errors. Fix by returning 1 after errors. |
| 5211 | ;; showFatalError returns int, so we can return its value directly. |
| 5212 | ;; showError returns void, so we call it then return 1. |
| 5213 | (substitute* "src/main/java/org/codehaus/plexus/tools/cli/AbstractCli.java" |
| 5214 | (("^([ \t]+)showFatalError\\(" all indent) |
| 5215 | (string-append indent "return showFatalError(")) |
| 5216 | (("^([ \t]+)(showError\\( .* \\);)" all indent call) |
| 5217 | (string-append indent call " return 1;")))))))) |
| 5218 | (inputs |
| 5219 | (list java-commons-cli java-plexus-container-default |
| 5220 | java-plexus-classworlds)) |
| 5221 | (native-inputs |
| 5222 | (list java-plexus-utils java-junit java-guava)) |
| 5223 | (home-page "https://codehaus-plexus.github.io/plexus-cli") |
| 5224 | (synopsis "CLI building library for plexus") |
| 5225 | (description "This package is a library to help creating CLI around |
| 5226 | Plexus components.") |
| 5227 | (license license:asl2.0))) |
| 5228 | |
| 5229 | (define-public java-plexus-build-api |
| 5230 | (package |
| 5231 | (name "java-plexus-build-api") |
| 5232 | (version "0.0.7") |
| 5233 | (source (origin |
| 5234 | (method git-fetch) |
| 5235 | (uri (git-reference |
| 5236 | (url "https://github.com/codehaus-plexus/plexus-build-api") |
| 5237 | (commit (string-append "plexus-build-api-" version)))) |
| 5238 | (file-name (git-file-name name version)) |
| 5239 | (sha256 |
| 5240 | (base32 |
| 5241 | "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0")))) |
| 5242 | (build-system ant-build-system) |
| 5243 | (arguments |
| 5244 | `(#:jar-name "plexus-build-api.jar" |
| 5245 | #:source-dir "src/main/java" |
| 5246 | #:jdk ,icedtea-8 |
| 5247 | #:tests? #f; FIXME: how to run the tests? |
| 5248 | #:phases |
| 5249 | (modify-phases %standard-phases |
| 5250 | (add-before 'build 'copy-resources |
| 5251 | (lambda _ |
| 5252 | (copy-recursively "src/main/resources" "build/classes") |
| 5253 | (substitute* (find-files "build/classes") |
| 5254 | (("\\$\\{project.version\\}") ,version)) |
| 5255 | #t)) |
| 5256 | (add-before 'build 'generate-plexus-compontent |
| 5257 | (lambda _ |
| 5258 | (mkdir-p "build/classes/META-INF/plexus") |
| 5259 | ;; This file is required for plexus to inject this package. |
| 5260 | ;; FIXME: how is it generated? |
| 5261 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" |
| 5262 | (lambda _ |
| 5263 | (display |
| 5264 | "<component-set>\n |
| 5265 | <components>\n |
| 5266 | <component>\n |
| 5267 | <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n |
| 5268 | <role-hint>default</role-hint>\n |
| 5269 | <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n |
| 5270 | <description>Filesystem based non-incremental build context implementation\n |
| 5271 | which behaves as if all files were just created.</description>\n |
| 5272 | </component>\n |
| 5273 | </components>\n |
| 5274 | </component-set>\n"))) |
| 5275 | #t)) |
| 5276 | (replace 'install |
| 5277 | (install-from-pom "pom.xml"))))) |
| 5278 | (inputs |
| 5279 | (list java-plexus-utils-3.2.1 java-plexus-container-default)) |
| 5280 | (home-page "https://github.com/codehaus-plexus/plexus-build-api/") |
| 5281 | (synopsis "Base build API for maven") |
| 5282 | (description "This package contains the base build API for maven and |
| 5283 | a default implementation of it. This API is about scanning files in a |
| 5284 | project and determining what files need to be rebuilt.") |
| 5285 | (license license:asl2.0))) |
| 5286 | |
| 5287 | (define-public java-modello-core |
| 5288 | (package |
| 5289 | (name "java-modello-core") |
| 5290 | (version "1.11") |
| 5291 | (source (origin |
| 5292 | (method git-fetch) |
| 5293 | (uri (git-reference |
| 5294 | (url "https://github.com/codehaus-plexus/modello") |
| 5295 | (commit (string-append "modello-" version)))) |
| 5296 | (file-name (git-file-name name version)) |
| 5297 | (sha256 |
| 5298 | (base32 |
| 5299 | "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2")))) |
| 5300 | (build-system ant-build-system) |
| 5301 | (arguments |
| 5302 | `(#:jar-name "modello-core.jar" |
| 5303 | #:source-dir "modello-core/src/main/java" |
| 5304 | #:test-dir "modello-core/src/test" |
| 5305 | #:main-class "org.codehaus.modello.ModelloCli" |
| 5306 | #:jdk ,icedtea-8 |
| 5307 | #:phases |
| 5308 | (modify-phases %standard-phases |
| 5309 | (add-before 'build 'copy-resources |
| 5310 | (lambda _ |
| 5311 | (mkdir-p "build/classes/META-INF/plexus") |
| 5312 | (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml" |
| 5313 | "build/classes/META-INF/plexus/components.xml") |
| 5314 | #t)) |
| 5315 | (add-before 'check 'fix-tests |
| 5316 | (lambda _ |
| 5317 | (with-directory-excursion "modello-core/src/test/java/org/codehaus" |
| 5318 | (substitute* '("modello/core/DefaultModelloCoreTest.java" |
| 5319 | "modello/core/io/ModelReaderTest.java") |
| 5320 | (("src/test") "modello-core/src/test"))) |
| 5321 | #t))))) |
| 5322 | (propagated-inputs |
| 5323 | (list java-plexus-utils java-plexus-container-default |
| 5324 | java-plexus-build-api)) |
| 5325 | (native-inputs |
| 5326 | (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect |
| 5327 | java-guava)) |
| 5328 | (home-page "https://codehaus-plexus.github.io/modello/") |
| 5329 | (synopsis "Framework for code generation from a simple model") |
| 5330 | (description "Modello is a framework for code generation from a simple model. |
| 5331 | |
| 5332 | Modello generates code from a simple model format: based on a plugin |
| 5333 | architecture, various types of code and descriptors can be generated from the |
| 5334 | single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers, |
| 5335 | XSD and documentation.") |
| 5336 | (license (list |
| 5337 | license:expat |
| 5338 | ;; Although this package uses only files licensed under expat, |
| 5339 | ;; other parts of the source are licensed under different |
| 5340 | ;; licenses. We include them to be inherited by other packages. |
| 5341 | license:asl2.0 |
| 5342 | ;; Some files in modello-plugin-java are licensed under a |
| 5343 | ;; 5-clause BSD license. |
| 5344 | (license:non-copyleft |
| 5345 | (string-append "file:///modello-plugins/modello-plugin-java/" |
| 5346 | "src/main/java/org/codehaus/modello/plugin/" |
| 5347 | "java/javasource/JNaming.java")))))) |
| 5348 | |
| 5349 | (define-public java-modello-plugins-java |
| 5350 | (package |
| 5351 | (inherit java-modello-core) |
| 5352 | (name "java-modello-plugins-java") |
| 5353 | (arguments |
| 5354 | `(#:jar-name "modello-plugins-java.jar" |
| 5355 | #:source-dir "modello-plugins/modello-plugin-java/src/main/java" |
| 5356 | #:test-dir "modello-plugins/modello-plugin-java/src/test" |
| 5357 | #:jdk ,icedtea-8 |
| 5358 | #:tests? #f; requires maven-model, which depends on this package |
| 5359 | #:phases |
| 5360 | (modify-phases %standard-phases |
| 5361 | (add-before 'build 'copy-resources |
| 5362 | (lambda _ |
| 5363 | (mkdir-p "build/classes") |
| 5364 | (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources" |
| 5365 | "build/classes") |
| 5366 | #t))))) |
| 5367 | (inputs |
| 5368 | (list java-modello-core)) |
| 5369 | (synopsis "Modello Java Plugin") |
| 5370 | (description "Modello Java Plugin generates Java objects for the model."))) |
| 5371 | |
| 5372 | (define-public java-modello-plugins-xml |
| 5373 | (package |
| 5374 | (inherit java-modello-core) |
| 5375 | (name "java-modello-plugins-xml") |
| 5376 | (arguments |
| 5377 | `(#:jar-name "modello-plugins-xml.jar" |
| 5378 | #:source-dir "modello-plugins/modello-plugin-xml/src/main/java" |
| 5379 | #:test-dir "modello-plugins/modello-plugin-xml/src/test" |
| 5380 | #:jdk ,icedtea-8 |
| 5381 | #:phases |
| 5382 | (modify-phases %standard-phases |
| 5383 | (add-before 'build 'copy-resources |
| 5384 | (lambda _ |
| 5385 | (mkdir-p "build/classes") |
| 5386 | (copy-recursively |
| 5387 | "modello-plugins/modello-plugin-xml/src/main/resources" |
| 5388 | "build/classes") |
| 5389 | #t)) |
| 5390 | (add-before 'check 'fix-paths |
| 5391 | (lambda _ |
| 5392 | (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" |
| 5393 | (substitute* |
| 5394 | "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" |
| 5395 | (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) |
| 5396 | #t))))) |
| 5397 | (propagated-inputs |
| 5398 | (list java-modello-core java-modello-plugins-java)) |
| 5399 | (synopsis "Modello XML Plugin") |
| 5400 | (description "Modello XML Plugin contains shared code for every plugins |
| 5401 | working on XML representation of the model."))) |
| 5402 | |
| 5403 | (define-public java-modello-test |
| 5404 | (package |
| 5405 | (inherit java-modello-core) |
| 5406 | (name "java-modello-test") |
| 5407 | (arguments |
| 5408 | `(#:jar-name "modello-test.jar" |
| 5409 | #:source-dir "modello-test/src/main/java" |
| 5410 | #:tests? #f; no tests |
| 5411 | #:jdk ,icedtea-8)) |
| 5412 | (inputs |
| 5413 | (list java-plexus-utils java-plexus-compiler-api |
| 5414 | java-plexus-compiler-javac java-plexus-container-default)) |
| 5415 | (synopsis "Modello test package") |
| 5416 | (description "The modello test package contains the basis to create |
| 5417 | Modello generator unit-tests, including sample models and xml files to test |
| 5418 | every feature for every plugin."))) |
| 5419 | |
| 5420 | (define-public java-modello-plugins-xpp3 |
| 5421 | (package |
| 5422 | (inherit java-modello-core) |
| 5423 | (name "java-modello-plugins-xpp3") |
| 5424 | (arguments |
| 5425 | `(#:jar-name "modello-plugins-xpp3.jar" |
| 5426 | #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java" |
| 5427 | #:test-dir "modello-plugins/modello-plugin-xpp3/src/test" |
| 5428 | ;; One of the test dependencies is maven-model which depends on this package. |
| 5429 | #:tests? #f |
| 5430 | #:jdk ,icedtea-8 |
| 5431 | #:phases |
| 5432 | (modify-phases %standard-phases |
| 5433 | (add-before 'build 'copy-resources |
| 5434 | (lambda _ |
| 5435 | (mkdir-p "build/classes") |
| 5436 | (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources" |
| 5437 | "build/classes") |
| 5438 | #t))))) |
| 5439 | (propagated-inputs |
| 5440 | (list java-modello-core java-modello-plugins-java |
| 5441 | java-modello-plugins-xml)) |
| 5442 | (native-inputs |
| 5443 | (modify-inputs (package-native-inputs java-modello-core) |
| 5444 | (prepend java-xmlunit java-modello-test))) |
| 5445 | (synopsis "Modello XPP3 Plugin") |
| 5446 | (description "The modello XPP3 plugin generates XML readers and writers based |
| 5447 | on the XPP3 API (XML Pull Parser)."))) |
| 5448 | |
| 5449 | (define-public java-ow-util-ant-tasks |
| 5450 | (package |
| 5451 | (name "java-ow-util-ant-tasks") |
| 5452 | (version "1.3.2") |
| 5453 | (source (origin |
| 5454 | (method url-fetch) |
| 5455 | (uri (string-append |
| 5456 | "mirror://debian/pool/main/o/ow-util-ant-tasks/" |
| 5457 | "ow-util-ant-tasks_" version ".orig.tar.gz")) |
| 5458 | (sha256 |
| 5459 | (base32 |
| 5460 | "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5")))) |
| 5461 | (build-system ant-build-system) |
| 5462 | (arguments |
| 5463 | `(#:jar-name "ow-util-ant-tasks.jar" |
| 5464 | #:tests? #f; no tests |
| 5465 | #:phases |
| 5466 | (modify-phases %standard-phases |
| 5467 | (add-before 'build 'delete-cyclic-dependency |
| 5468 | (lambda _ |
| 5469 | ;; This file depends on asm-3, which depends on this package |
| 5470 | (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java") |
| 5471 | ;; This file depends on xalan |
| 5472 | (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java"))) |
| 5473 | (add-before 'build 'fix-new-ant |
| 5474 | (lambda _ |
| 5475 | (substitute* "src/org/objectweb/util/ant/MultipleCopy.java" |
| 5476 | ((", destFile.getAbsolutePath\\(\\)") |
| 5477 | ", new String[] { destFile.getAbsolutePath() }"))))))) |
| 5478 | (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks") |
| 5479 | (synopsis "Replacement for base ant tasks") |
| 5480 | (description "This library is used in the legacy build process of several |
| 5481 | key frameworks developed by ObjectWeb, among them legacy versions of the |
| 5482 | ObjectWeb ASM bytecode manipulation framework.") |
| 5483 | (license license:lgpl2.0+))) |
| 5484 | |
| 5485 | (define-public java-asm |
| 5486 | (package |
| 5487 | (name "java-asm") |
| 5488 | (version "6.0") |
| 5489 | (source (origin |
| 5490 | (method url-fetch) |
| 5491 | (uri (string-append "https://download.forge.ow2.org/asm/" |
| 5492 | "asm-" version ".tar.gz")) |
| 5493 | (sha256 |
| 5494 | (base32 |
| 5495 | "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00")))) |
| 5496 | (build-system ant-build-system) |
| 5497 | (arguments |
| 5498 | `(#:build-target "compile" |
| 5499 | ;; The tests require an old version of Janino, which no longer compiles |
| 5500 | ;; with the JDK7. |
| 5501 | #:tests? #f |
| 5502 | #:make-flags |
| 5503 | (list |
| 5504 | ;; We don't need these extra ant tasks, but the build system asks us to |
| 5505 | ;; provide a path anyway. |
| 5506 | "-Dobjectweb.ant.tasks.path=dummy-path" |
| 5507 | ;; The java-aqute.bndlib JAR file will be put onto the classpath and |
| 5508 | ;; used during the build automatically by ant-build-system, but |
| 5509 | ;; java-asm's build.xml fails unless we provide something here. |
| 5510 | "-Dbiz.aQute.bnd.path=dummy-path") |
| 5511 | #:phases |
| 5512 | (modify-phases %standard-phases |
| 5513 | (add-before 'build 'remove-bnd-dependency |
| 5514 | (lambda _ |
| 5515 | ;; This file is the only one to require bnd, and is not needed |
| 5516 | ;; because we don't build a bundle. |
| 5517 | (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java") |
| 5518 | #t)) |
| 5519 | (add-before 'install 'build-jars |
| 5520 | (lambda* (#:key make-flags #:allow-other-keys) |
| 5521 | ;; We cannot use the "jar" target because it depends on a couple |
| 5522 | ;; of unpackaged, complicated tools. |
| 5523 | (mkdir "dist") |
| 5524 | (invoke "jar" |
| 5525 | "-cf" (string-append "dist/asm-" ,version ".jar") |
| 5526 | "-C" "output/build/tmp" "."))) |
| 5527 | (add-before 'install 'fix-pom |
| 5528 | (lambda _ |
| 5529 | (substitute* (find-files "archive" "\\.pom$") |
| 5530 | (("@product.artifact@") ,version)) |
| 5531 | #t)) |
| 5532 | (add-before 'install 'install-parent |
| 5533 | (install-pom-file "archive/asm-parent.pom")) |
| 5534 | (replace 'install |
| 5535 | (install-from-pom "archive/asm.pom"))))) |
| 5536 | (native-inputs |
| 5537 | (list java-junit)) |
| 5538 | (propagated-inputs |
| 5539 | (list java-org-ow2-parent-pom-1.3)) |
| 5540 | (home-page "https://asm.ow2.io/") |
| 5541 | (synopsis "Very small and fast Java bytecode manipulation framework") |
| 5542 | (description "ASM is an all purpose Java bytecode manipulation and |
| 5543 | analysis framework. It can be used to modify existing classes or dynamically |
| 5544 | generate classes, directly in binary form. The provided common |
| 5545 | transformations and analysis algorithms allow easily assembling custom |
| 5546 | complex transformations and code analysis tools.") |
| 5547 | (license license:bsd-3))) |
| 5548 | |
| 5549 | (define-public java-org-ow2-parent-pom-1.3 |
| 5550 | (package |
| 5551 | (name "java-org-ow2-parent-pom") |
| 5552 | (version "1.3") |
| 5553 | (source (origin |
| 5554 | (method url-fetch) |
| 5555 | (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom") |
| 5556 | (sha256 |
| 5557 | (base32 |
| 5558 | "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai")))) |
| 5559 | (build-system ant-build-system) |
| 5560 | (arguments |
| 5561 | `(#:tests? #f |
| 5562 | #:phases |
| 5563 | (modify-phases %standard-phases |
| 5564 | (delete 'unpack) |
| 5565 | (delete 'build) |
| 5566 | (delete 'configure) |
| 5567 | (replace 'install |
| 5568 | ,#~(install-pom-file #$source))))) |
| 5569 | (home-page "https://ow2.org") |
| 5570 | (synopsis "Ow2.org parent pom") |
| 5571 | (description "This package contains the parent pom for projects from ow2.org, |
| 5572 | including java-asm.") |
| 5573 | (properties '((hidden? . #t))) |
| 5574 | (license license:lgpl2.1+))) |
| 5575 | |
| 5576 | (define-public java-asm-bootstrap |
| 5577 | (package |
| 5578 | (inherit java-asm) |
| 5579 | (name "java-asm-bootstrap") |
| 5580 | (properties '((hidden? . #t))) |
| 5581 | (arguments |
| 5582 | (substitute-keyword-arguments (package-arguments java-asm) |
| 5583 | ((#:tests? _) #f))) |
| 5584 | (native-inputs `()))) |
| 5585 | |
| 5586 | (define-public java-asm-3 |
| 5587 | (package |
| 5588 | (inherit java-asm) |
| 5589 | (version "3.1") |
| 5590 | (source (origin |
| 5591 | (method git-fetch) |
| 5592 | (uri (git-reference |
| 5593 | (url "https://gitlab.ow2.org/asm/asm") |
| 5594 | (commit "ASM_3_1"))) |
| 5595 | (file-name (git-file-name "java-asm" version)) |
| 5596 | (sha256 |
| 5597 | (base32 |
| 5598 | "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4")) |
| 5599 | (modules '((guix build utils))) |
| 5600 | (snippet `(for-each delete-file (find-files "." "\\.jar$"))))) |
| 5601 | (arguments |
| 5602 | `(#:build-target "jar" |
| 5603 | #:test-target "test" |
| 5604 | #:tests? #f; require legacy test software |
| 5605 | #:phases |
| 5606 | (modify-phases %standard-phases |
| 5607 | (replace 'install (install-jars "output/dist")) |
| 5608 | (delete 'generate-jar-indices)))) |
| 5609 | (native-inputs (list java-ow-util-ant-tasks)))) |
| 5610 | |
| 5611 | (define-public java-asm-8 |
| 5612 | (package |
| 5613 | (inherit java-asm) |
| 5614 | (version "8.0.1") |
| 5615 | (source (origin |
| 5616 | (method git-fetch) |
| 5617 | (uri (git-reference |
| 5618 | (url "https://gitlab.ow2.org/asm/asm") |
| 5619 | (commit (string-append |
| 5620 | "ASM_" (string-join (string-split version #\.) |
| 5621 | "_"))))) |
| 5622 | (file-name (git-file-name "java-asm" version)) |
| 5623 | (sha256 |
| 5624 | (base32 |
| 5625 | "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69")))) |
| 5626 | (arguments |
| 5627 | `(#:jar-name "asm8.jar" |
| 5628 | #:source-dir "asm/src/main/java" |
| 5629 | #:test-dir "asm/src/test" |
| 5630 | ;; tests depend on junit5 |
| 5631 | #:tests? #f)) |
| 5632 | (propagated-inputs '()) |
| 5633 | (native-inputs '()))) |
| 5634 | |
| 5635 | (define-public java-asm-tree-8 |
| 5636 | (package |
| 5637 | (inherit java-asm-8) |
| 5638 | (name "java-asm-tree") |
| 5639 | (arguments |
| 5640 | `(#:jar-name "asm-tree.jar" |
| 5641 | #:source-dir "asm-tree/src/main/java" |
| 5642 | #:test-dir "asm-tree/src/test" |
| 5643 | ;; tests depend on junit5 |
| 5644 | #:tests? #f)) |
| 5645 | (inputs |
| 5646 | (list java-asm-8)))) |
| 5647 | |
| 5648 | (define-public java-asm-analysis-8 |
| 5649 | (package |
| 5650 | (inherit java-asm-8) |
| 5651 | (name "java-asm-analysis") |
| 5652 | (arguments |
| 5653 | `(#:jar-name "asm-analysis.jar" |
| 5654 | #:source-dir "asm-analysis/src/main/java" |
| 5655 | #:test-dir "asm-analysis/src/test" |
| 5656 | ;; tests depend on junit5 |
| 5657 | #:tests? #f)) |
| 5658 | (inputs |
| 5659 | (list java-asm-8 java-asm-tree-8)))) |
| 5660 | |
| 5661 | (define-public java-asm-util-8 |
| 5662 | (package |
| 5663 | (inherit java-asm-8) |
| 5664 | (name "java-asm-util") |
| 5665 | (arguments |
| 5666 | `(#:jar-name "asm-util8.jar" |
| 5667 | #:source-dir "asm-util/src/main/java" |
| 5668 | #:test-dir "asm-util/src/test" |
| 5669 | ;; tests depend on junit5 |
| 5670 | #:tests? #f)) |
| 5671 | (inputs |
| 5672 | (list java-asm-8 java-asm-analysis-8 java-asm-tree-8)))) |
| 5673 | |
| 5674 | (define-public java-asm-commons-8 |
| 5675 | (package |
| 5676 | (inherit java-asm-8) |
| 5677 | (name "java-asm-commons") |
| 5678 | (arguments |
| 5679 | (list #:jar-name "asm-commons8.jar" |
| 5680 | #:source-dir "asm-commons/src/main/java" |
| 5681 | #:test-dir "asm-commons/src/test" |
| 5682 | ;; tests depend on junit5 |
| 5683 | #:tests? #f)) |
| 5684 | (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8)))) |
| 5685 | |
| 5686 | (define-public java-asm-9 |
| 5687 | (package |
| 5688 | (inherit java-asm) |
| 5689 | (version "9.7.1") |
| 5690 | (source (origin |
| 5691 | (method git-fetch) |
| 5692 | (uri (git-reference |
| 5693 | (url "https://gitlab.ow2.org/asm/asm") |
| 5694 | (commit (string-append |
| 5695 | "ASM_" (string-join (string-split version #\.) |
| 5696 | "_"))))) |
| 5697 | (file-name (git-file-name "java-asm" version)) |
| 5698 | (sha256 |
| 5699 | (base32 |
| 5700 | "0q1i01al9mpggf3256iwmhx9yj9pg52v4vi1gdni2x9jcikq65lf")))) |
| 5701 | (arguments |
| 5702 | `(#:jar-name "asm.jar" |
| 5703 | #:source-dir "asm/src/main/java" |
| 5704 | #:test-dir "asm/src/test" |
| 5705 | #:jdk ,openjdk11 |
| 5706 | ;; tests depend on junit5 |
| 5707 | #:tests? #f |
| 5708 | #:phases |
| 5709 | (modify-phases %standard-phases |
| 5710 | ;; ASM 9.x uses Gradle, not Maven - generate synthetic pom.xml |
| 5711 | (add-before 'install 'generate-pom |
| 5712 | (generate-pom.xml "pom.xml" "org.ow2.asm" "asm" ,version)) |
| 5713 | (replace 'install |
| 5714 | (install-from-pom "pom.xml"))))) |
| 5715 | (propagated-inputs '()) |
| 5716 | (native-inputs '()))) |
| 5717 | |
| 5718 | (define-public java-asm-tree-9 |
| 5719 | (package |
| 5720 | (inherit java-asm-9) |
| 5721 | (name "java-asm-tree") |
| 5722 | (arguments |
| 5723 | `(#:jar-name "asm-tree.jar" |
| 5724 | #:source-dir "asm-tree/src/main/java" |
| 5725 | #:test-dir "asm-tree/src/test" |
| 5726 | #:jdk ,openjdk11 |
| 5727 | ;; tests depend on junit5 |
| 5728 | #:tests? #f)) |
| 5729 | (inputs |
| 5730 | (list java-asm-9)))) |
| 5731 | |
| 5732 | (define-public java-asm-analysis-9 |
| 5733 | (package |
| 5734 | (inherit java-asm-9) |
| 5735 | (name "java-asm-analysis") |
| 5736 | (arguments |
| 5737 | `(#:jar-name "asm-analysis.jar" |
| 5738 | #:source-dir "asm-analysis/src/main/java" |
| 5739 | #:test-dir "asm-analysis/src/test" |
| 5740 | #:jdk ,openjdk11 |
| 5741 | ;; tests depend on junit5 |
| 5742 | #:tests? #f)) |
| 5743 | (inputs |
| 5744 | (list java-asm-9 java-asm-tree-9)))) |
| 5745 | |
| 5746 | (define-public java-asm-util-9 |
| 5747 | (package |
| 5748 | (inherit java-asm-9) |
| 5749 | (name "java-asm-util") |
| 5750 | (arguments |
| 5751 | `(#:jar-name "asm-util.jar" |
| 5752 | #:source-dir "asm-util/src/main/java" |
| 5753 | #:test-dir "asm-util/src/test" |
| 5754 | #:jdk ,openjdk11 |
| 5755 | ;; tests depend on junit5 |
| 5756 | #:tests? #f |
| 5757 | #:phases |
| 5758 | (modify-phases %standard-phases |
| 5759 | (add-before 'install 'generate-pom |
| 5760 | (generate-pom.xml "pom.xml" "org.ow2.asm" "asm-util" |
| 5761 | ,(package-version java-asm-9))) |
| 5762 | (replace 'install |
| 5763 | (install-from-pom "pom.xml"))))) |
| 5764 | (inputs |
| 5765 | (list java-asm-9 java-asm-analysis-9 java-asm-tree-9)))) |
| 5766 | |
| 5767 | (define-public java-asm-commons-9 |
| 5768 | (package |
| 5769 | (inherit java-asm-9) |
| 5770 | (name "java-asm-commons") |
| 5771 | (arguments |
| 5772 | (list #:jar-name "asm-commons8.jar" |
| 5773 | #:source-dir "asm-commons/src/main/java" |
| 5774 | #:test-dir "asm-commons/src/test" |
| 5775 | #:jdk openjdk11 |
| 5776 | ;; tests depend on junit5 |
| 5777 | #:tests? #f)) |
| 5778 | (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9)))) |
| 5779 | |
| 5780 | ;;; Java packages for GraalVM Truffle (specific versions required) |
| 5781 | |
| 5782 | (define-public java-asm-for-graal-truffle |
| 5783 | (package |
| 5784 | (inherit java-asm-9) |
| 5785 | (name "java-asm-for-graal-truffle") |
| 5786 | (version "9.7.1") |
| 5787 | (source (origin |
| 5788 | (method git-fetch) |
| 5789 | (uri (git-reference |
| 5790 | (url "https://gitlab.ow2.org/asm/asm") |
| 5791 | (commit "ASM_9_7_1"))) |
| 5792 | (file-name (git-file-name name version)) |
| 5793 | (sha256 |
| 5794 | (base32 |
| 5795 | "0q1i01al9mpggf3256iwmhx9yj9pg52v4vi1gdni2x9jcikq65lf")))) |
| 5796 | (arguments |
| 5797 | `(#:jar-name "asm9.jar" |
| 5798 | #:source-dir "asm/src/main/java" |
| 5799 | #:test-dir "asm/src/test" |
| 5800 | #:tests? #f |
| 5801 | #:phases |
| 5802 | (modify-phases %standard-phases |
| 5803 | (add-after 'build 'create-sources-jar |
| 5804 | (lambda _ |
| 5805 | (invoke "jar" "cf" "build/jar/asm9-sources.jar" |
| 5806 | "-C" "asm/src/main/java" "."))) |
| 5807 | (add-after 'install 'install-sources-jar |
| 5808 | (lambda* (#:key outputs #:allow-other-keys) |
| 5809 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 5810 | (install-file "build/jar/asm9-sources.jar" share))))))))) |
| 5811 | |
| 5812 | (define-public java-asm-tree-for-graal-truffle |
| 5813 | (package |
| 5814 | (inherit java-asm-tree-9) |
| 5815 | (name "java-asm-tree-for-graal-truffle") |
| 5816 | (version "9.7.1") |
| 5817 | (source (package-source java-asm-for-graal-truffle)) |
| 5818 | (arguments |
| 5819 | `(#:jar-name "asm-tree.jar" |
| 5820 | #:source-dir "asm-tree/src/main/java" |
| 5821 | #:test-dir "asm-tree/src/test" |
| 5822 | #:tests? #f |
| 5823 | #:phases |
| 5824 | (modify-phases %standard-phases |
| 5825 | (add-after 'build 'create-sources-jar |
| 5826 | (lambda _ |
| 5827 | (invoke "jar" "cf" "build/jar/asm-tree-sources.jar" |
| 5828 | "-C" "asm-tree/src/main/java" "."))) |
| 5829 | (add-after 'install 'install-sources-jar |
| 5830 | (lambda* (#:key outputs #:allow-other-keys) |
| 5831 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 5832 | (install-file "build/jar/asm-tree-sources.jar" share))))))) |
| 5833 | (inputs (list java-asm-for-graal-truffle)))) |
| 5834 | |
| 5835 | (define-public java-asm-analysis-for-graal-truffle |
| 5836 | (package |
| 5837 | (inherit java-asm-analysis-9) |
| 5838 | (name "java-asm-analysis-for-graal-truffle") |
| 5839 | (version "9.7.1") |
| 5840 | (source (package-source java-asm-for-graal-truffle)) |
| 5841 | (inputs (list java-asm-for-graal-truffle java-asm-tree-for-graal-truffle)))) |
| 5842 | |
| 5843 | (define-public java-asm-util-for-graal-truffle |
| 5844 | (package |
| 5845 | (inherit java-asm-util-9) |
| 5846 | (name "java-asm-util-for-graal-truffle") |
| 5847 | (version "9.7.1") |
| 5848 | (source (package-source java-asm-for-graal-truffle)) |
| 5849 | (arguments |
| 5850 | `(#:jar-name "asm-util8.jar" |
| 5851 | #:source-dir "asm-util/src/main/java" |
| 5852 | #:test-dir "asm-util/src/test" |
| 5853 | #:jdk ,openjdk11 |
| 5854 | #:tests? #f |
| 5855 | #:phases |
| 5856 | (modify-phases %standard-phases |
| 5857 | (add-after 'build 'create-sources-jar |
| 5858 | (lambda _ |
| 5859 | (invoke "jar" "cf" "build/jar/asm-util-sources.jar" |
| 5860 | "-C" "asm-util/src/main/java" "."))) |
| 5861 | (add-after 'install 'install-sources-jar |
| 5862 | (lambda* (#:key outputs #:allow-other-keys) |
| 5863 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 5864 | (install-file "build/jar/asm-util-sources.jar" share))))))) |
| 5865 | (inputs (list java-asm-for-graal-truffle java-asm-analysis-for-graal-truffle java-asm-tree-for-graal-truffle)))) |
| 5866 | |
| 5867 | (define-public java-asm-commons-for-graal-truffle |
| 5868 | (package |
| 5869 | (inherit java-asm-commons-9) |
| 5870 | (name "java-asm-commons-for-graal-truffle") |
| 5871 | (version "9.7.1") |
| 5872 | (source (package-source java-asm-for-graal-truffle)) |
| 5873 | (arguments |
| 5874 | `(#:jar-name "asm-commons8.jar" |
| 5875 | #:source-dir "asm-commons/src/main/java" |
| 5876 | #:test-dir "asm-commons/src/test" |
| 5877 | #:tests? #f |
| 5878 | #:phases |
| 5879 | (modify-phases %standard-phases |
| 5880 | (add-after 'build 'create-sources-jar |
| 5881 | (lambda _ |
| 5882 | (invoke "jar" "cf" "build/jar/asm-commons-sources.jar" |
| 5883 | "-C" "asm-commons/src/main/java" "."))) |
| 5884 | (add-after 'install 'install-sources-jar |
| 5885 | (lambda* (#:key outputs #:allow-other-keys) |
| 5886 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 5887 | (install-file "build/jar/asm-commons-sources.jar" share))))))) |
| 5888 | (inputs (list java-asm-for-graal-truffle java-asm-analysis-for-graal-truffle java-asm-tree-for-graal-truffle)))) |
| 5889 | |
| 5890 | ;; Truffle needs hamcrest-core 1.3, which is the exact version in Guix. |
| 5891 | ;; We create a separate package to keep graal-truffle dependencies explicit. |
| 5892 | (define-public java-hamcrest-core-for-graal-truffle |
| 5893 | (package |
| 5894 | (inherit java-hamcrest-core) |
| 5895 | (name "java-hamcrest-core-for-graal-truffle"))) |
| 5896 | |
| 5897 | ;; mx expects NINJA as a zip file containing a ninja binary. |
| 5898 | ;; We create a zip from Guix's ninja package. |
| 5899 | (define-public ninja-for-graal-truffle |
| 5900 | (package |
| 5901 | (name "ninja-for-graal-truffle") |
| 5902 | (version "1.10.2") ; Version mx expects |
| 5903 | (source #f) |
| 5904 | (build-system trivial-build-system) |
| 5905 | (arguments |
| 5906 | (list |
| 5907 | #:modules '((guix build utils)) |
| 5908 | #:builder |
| 5909 | #~(begin |
| 5910 | (use-modules (guix build utils)) |
| 5911 | (let* ((ninja-bin (string-append #$(this-package-input "ninja") "/bin/ninja")) |
| 5912 | (out #$output) |
| 5913 | (share (string-append out "/share/ninja")) |
| 5914 | (zip-file (string-append share "/ninja.zip"))) |
| 5915 | (mkdir-p share) |
| 5916 | ;; Create a zip file containing the ninja binary |
| 5917 | (invoke #$(file-append (@ (gnu packages compression) zip) "/bin/zip") |
| 5918 | "-j" zip-file ninja-bin))))) |
| 5919 | (inputs (list (@ (gnu packages ninja) ninja))) |
| 5920 | (home-page "https://ninja-build.org/") |
| 5921 | (synopsis "Ninja build tool packaged for GraalVM mx") |
| 5922 | (description "Ninja build system repackaged as a zip for GraalVM's mx build tool.") |
| 5923 | (license license:asl2.0))) |
| 5924 | |
| 5925 | ;;; TODO: VisualVM need to be built from source for GraalVM Truffle. |
| 5926 | |
| 5927 | ;; ASM 9.8 - required by mx's internal tools (jacoco for code coverage) |
| 5928 | (define-public java-asm-for-graal-mx |
| 5929 | (package |
| 5930 | (inherit java-asm-9) |
| 5931 | (name "java-asm-for-graal-mx") |
| 5932 | (version "9.8") |
| 5933 | (source (origin |
| 5934 | (method git-fetch) |
| 5935 | (uri (git-reference |
| 5936 | (url "https://gitlab.ow2.org/asm/asm") |
| 5937 | (commit "ASM_9_8"))) |
| 5938 | (file-name (git-file-name name version)) |
| 5939 | (sha256 |
| 5940 | (base32 |
| 5941 | "0ky0vz83k0r0n477la0sjyvc44ffym8kf988rqzyxnb1kvwq4b92")))) |
| 5942 | (arguments |
| 5943 | `(#:jar-name "asm9.jar" |
| 5944 | #:source-dir "asm/src/main/java" |
| 5945 | #:test-dir "asm/src/test" |
| 5946 | #:tests? #f |
| 5947 | #:phases |
| 5948 | (modify-phases %standard-phases |
| 5949 | (add-after 'build 'create-sources-jar |
| 5950 | (lambda _ |
| 5951 | (invoke "jar" "cf" "build/jar/asm9-sources.jar" |
| 5952 | "-C" "asm/src/main/java" "."))) |
| 5953 | (add-after 'install 'install-sources-jar |
| 5954 | (lambda* (#:key outputs #:allow-other-keys) |
| 5955 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 5956 | (install-file "build/jar/asm9-sources.jar" share))))))))) |
| 5957 | |
| 5958 | (define-public java-asm-tree-for-graal-mx |
| 5959 | (package |
| 5960 | (inherit java-asm-tree-9) |
| 5961 | (name "java-asm-tree-for-graal-mx") |
| 5962 | (version "9.8") |
| 5963 | (source (package-source java-asm-for-graal-mx)) |
| 5964 | (arguments |
| 5965 | `(#:jar-name "asm-tree.jar" |
| 5966 | #:source-dir "asm-tree/src/main/java" |
| 5967 | #:test-dir "asm-tree/src/test" |
| 5968 | #:tests? #f |
| 5969 | #:phases |
| 5970 | (modify-phases %standard-phases |
| 5971 | (add-after 'build 'create-sources-jar |
| 5972 | (lambda _ |
| 5973 | (invoke "jar" "cf" "build/jar/asm-tree-sources.jar" |
| 5974 | "-C" "asm-tree/src/main/java" "."))) |
| 5975 | (add-after 'install 'install-sources-jar |
| 5976 | (lambda* (#:key outputs #:allow-other-keys) |
| 5977 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 5978 | (install-file "build/jar/asm-tree-sources.jar" share))))))) |
| 5979 | (inputs (list java-asm-for-graal-mx)))) |
| 5980 | |
| 5981 | (define-public java-asm-analysis-for-graal-mx |
| 5982 | (package |
| 5983 | (inherit java-asm-analysis-9) |
| 5984 | (name "java-asm-analysis-for-graal-mx") |
| 5985 | (version "9.8") |
| 5986 | (source (package-source java-asm-for-graal-mx)) |
| 5987 | (inputs (list java-asm-for-graal-mx java-asm-tree-for-graal-mx)))) |
| 5988 | |
| 5989 | (define-public java-asm-commons-for-graal-mx |
| 5990 | (package |
| 5991 | (inherit java-asm-commons-9) |
| 5992 | (name "java-asm-commons-for-graal-mx") |
| 5993 | (version "9.8") |
| 5994 | (source (package-source java-asm-for-graal-mx)) |
| 5995 | (arguments |
| 5996 | `(#:jar-name "asm-commons.jar" |
| 5997 | #:source-dir "asm-commons/src/main/java" |
| 5998 | #:test-dir "asm-commons/src/test" |
| 5999 | #:tests? #f |
| 6000 | #:phases |
| 6001 | (modify-phases %standard-phases |
| 6002 | (add-after 'build 'create-sources-jar |
| 6003 | (lambda _ |
| 6004 | (invoke "jar" "cf" "build/jar/asm-commons-sources.jar" |
| 6005 | "-C" "asm-commons/src/main/java" "."))) |
| 6006 | (add-after 'install 'install-sources-jar |
| 6007 | (lambda* (#:key outputs #:allow-other-keys) |
| 6008 | (let ((share (string-append (assoc-ref outputs "out") "/share/java"))) |
| 6009 | (install-file "build/jar/asm-commons-sources.jar" share))))))) |
| 6010 | (inputs (list java-asm-for-graal-mx java-asm-analysis-for-graal-mx java-asm-tree-for-graal-mx)))) |
| 6011 | |
| 6012 | (define-public java-cglib |
| 6013 | (package |
| 6014 | (name "java-cglib") |
| 6015 | (version "3.3.0") |
| 6016 | (source |
| 6017 | (origin |
| 6018 | (method git-fetch) |
| 6019 | (uri (git-reference |
| 6020 | (url "https://github.com/cglib/cglib") |
| 6021 | (commit (string-append |
| 6022 | "RELEASE_" |
| 6023 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) |
| 6024 | version))))) |
| 6025 | (file-name (git-file-name name version)) |
| 6026 | (sha256 |
| 6027 | (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014")))) |
| 6028 | (build-system ant-build-system) |
| 6029 | (arguments |
| 6030 | `(;; FIXME: tests fail because junit runs |
| 6031 | ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem |
| 6032 | ;; to describe a test at all. |
| 6033 | #:tests? #f |
| 6034 | #:jar-name "cglib.jar" |
| 6035 | #:phases |
| 6036 | (modify-phases %standard-phases |
| 6037 | (add-after 'unpack 'chdir |
| 6038 | (lambda _ (chdir "cglib") #t))))) |
| 6039 | (native-inputs (list java-junit)) |
| 6040 | (propagated-inputs (list java-asm-8)) |
| 6041 | (home-page "https://github.com/cglib/cglib/") |
| 6042 | (synopsis "Java byte code generation library") |
| 6043 | (description "The byte code generation library CGLIB is a high level API |
| 6044 | to generate and transform Java byte code.") |
| 6045 | (license license:asl2.0))) |
| 6046 | |
| 6047 | (define-public java-objenesis |
| 6048 | (package |
| 6049 | (name "java-objenesis") |
| 6050 | (version "3.3") |
| 6051 | (source (origin |
| 6052 | (method git-fetch) |
| 6053 | (uri (git-reference |
| 6054 | (url "https://github.com/easymock/objenesis") |
| 6055 | (commit version))) |
| 6056 | (file-name (git-file-name name version)) |
| 6057 | (sha256 |
| 6058 | (base32 |
| 6059 | "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr")))) |
| 6060 | (build-system ant-build-system) |
| 6061 | (arguments |
| 6062 | `(#:tests? #f; require junit-5 |
| 6063 | #:jar-name "objenesis.jar" |
| 6064 | #:source-dir "main/src/main/java" |
| 6065 | #:test-dir "main/src/test/")) |
| 6066 | (native-inputs |
| 6067 | (list java-junit java-hamcrest-core)) |
| 6068 | (home-page "http://objenesis.org/") |
| 6069 | (synopsis "Bypass the constructor when creating an object") |
| 6070 | (description "Objenesis is a small Java library that serves one purpose: |
| 6071 | to instantiate a new object of a particular class. It is common to see |
| 6072 | restrictions in libraries stating that classes must require a default |
| 6073 | constructor. Objenesis aims to overcome these restrictions by bypassing the |
| 6074 | constructor on object instantiation.") |
| 6075 | (license license:asl2.0))) |
| 6076 | |
| 6077 | (define-public java-easymock |
| 6078 | (package |
| 6079 | (name "java-easymock") |
| 6080 | (version "3.4") |
| 6081 | (source (origin |
| 6082 | (method git-fetch) |
| 6083 | (uri (git-reference |
| 6084 | (url "https://github.com/easymock/easymock/") |
| 6085 | (commit (string-append "easymock-" version)))) |
| 6086 | (file-name (git-file-name name version)) |
| 6087 | (sha256 |
| 6088 | (base32 |
| 6089 | "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq")))) |
| 6090 | (build-system ant-build-system) |
| 6091 | (arguments |
| 6092 | `(#:jar-name "easymock.jar" |
| 6093 | #:source-dir "core/src/main" |
| 6094 | #:test-dir "core/src/test" |
| 6095 | #:phases |
| 6096 | (modify-phases %standard-phases |
| 6097 | ;; FIXME: Android support requires the following packages to be |
| 6098 | ;; available: com.google.dexmaker.stock.ProxyBuilder |
| 6099 | (add-after 'unpack 'delete-android-support |
| 6100 | (lambda _ |
| 6101 | (with-directory-excursion "core/src/main/java/org/easymock/internal" |
| 6102 | (substitute* "MocksControl.java" |
| 6103 | (("AndroidSupport.isAndroid\\(\\)") "false") |
| 6104 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) |
| 6105 | (delete-file "AndroidClassProxyFactory.java")) |
| 6106 | #t)) |
| 6107 | (add-after 'unpack 'delete-broken-tests |
| 6108 | (lambda _ |
| 6109 | (with-directory-excursion "core/src/test/java/org/easymock" |
| 6110 | ;; This test depends on dexmaker. |
| 6111 | (delete-file "tests2/ClassExtensionHelperTest.java") |
| 6112 | |
| 6113 | ;; This is not a test. |
| 6114 | (delete-file "tests/BaseEasyMockRunnerTest.java") |
| 6115 | |
| 6116 | ;; This test should be executed with a different runner... |
| 6117 | (delete-file "tests2/EasyMockAnnotationsTest.java") |
| 6118 | ;; ...but deleting it means that we also have to delete these |
| 6119 | ;; dependent files. |
| 6120 | (delete-file "tests2/EasyMockRunnerTest.java") |
| 6121 | (delete-file "tests2/EasyMockRuleTest.java") |
| 6122 | |
| 6123 | ;; This test fails because the file "easymock.properties" does |
| 6124 | ;; not exist. |
| 6125 | (delete-file "tests2/EasyMockPropertiesTest.java")) |
| 6126 | #t))))) |
| 6127 | (inputs |
| 6128 | (list java-cglib java-objenesis)) |
| 6129 | (native-inputs |
| 6130 | (list java-junit java-hamcrest-core)) |
| 6131 | (home-page "https://easymock.org/") |
| 6132 | (synopsis "Java library providing mock objects for unit tests") |
| 6133 | (description "EasyMock is a Java library that provides an easy way to use |
| 6134 | mock objects in unit testing.") |
| 6135 | (license license:asl2.0))) |
| 6136 | |
| 6137 | (define-public java-easymock-3.2 |
| 6138 | (package |
| 6139 | (inherit java-easymock) |
| 6140 | (name "java-easymock") |
| 6141 | (version "3.2") |
| 6142 | (source (origin |
| 6143 | (method git-fetch) |
| 6144 | (uri (git-reference |
| 6145 | (url "https://github.com/easymock/easymock/") |
| 6146 | (commit (string-append "easymock-" version)))) |
| 6147 | (file-name (git-file-name name version)) |
| 6148 | (sha256 |
| 6149 | (base32 |
| 6150 | "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4")))) |
| 6151 | (arguments |
| 6152 | (list #:jar-name "easymock.jar" |
| 6153 | #:source-dir "easymock/src/main" |
| 6154 | #:test-dir "easymock/src/test" |
| 6155 | #:phases |
| 6156 | #~(modify-phases %standard-phases |
| 6157 | (add-after 'unpack 'delete-android-support |
| 6158 | (lambda _ |
| 6159 | (with-directory-excursion "easymock/src/main/java/org/easymock/internal" |
| 6160 | (substitute* "MocksControl.java" |
| 6161 | (("AndroidSupport.isAndroid\\(\\)") "false") |
| 6162 | (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") "")) |
| 6163 | (delete-file "AndroidClassProxyFactory.java")))) |
| 6164 | (add-after 'unpack 'delete-broken-tests |
| 6165 | (lambda _ |
| 6166 | (with-directory-excursion "easymock/src/test/java/org/easymock" |
| 6167 | ;; This test depends on dexmaker. |
| 6168 | (delete-file "tests2/ClassExtensionHelperTest.java") |
| 6169 | ;; This is not a test. |
| 6170 | (delete-file "tests/BaseEasyMockRunnerTest.java") |
| 6171 | ;; ...but deleting it means that we also have to delete these |
| 6172 | ;; dependent files. |
| 6173 | (delete-file "tests2/EasyMockRunnerTest.java") |
| 6174 | ;; This test fails because the file "easymock.properties" does |
| 6175 | ;; not exist. |
| 6176 | (delete-file "tests2/EasyMockPropertiesTest.java"))))))))) |
| 6177 | |
| 6178 | (define-public java-easymock-class-extension |
| 6179 | (package |
| 6180 | (inherit java-easymock-3.2) |
| 6181 | (name "java-easymock-class-extension") |
| 6182 | (build-system ant-build-system) |
| 6183 | (arguments |
| 6184 | (list #:jar-name "easymock-class-extensions.jar" |
| 6185 | #:source-dir "easymock-classextension/src/main/java" |
| 6186 | #:test-dir "easymock-classextension/src/test")) |
| 6187 | (inputs (list java-asm-8 |
| 6188 | java-easymock-3.2 |
| 6189 | java-cglib |
| 6190 | java-objenesis)) |
| 6191 | (native-inputs |
| 6192 | (list java-junit java-hamcrest-core)) |
| 6193 | (home-page "https://easymock.org/") |
| 6194 | (synopsis "Easymock extension to mock classes") |
| 6195 | (description "This package provides an extension to earlier versions of |
| 6196 | easymock that allows mocking classes.") |
| 6197 | (license license:asl2.0))) |
| 6198 | |
| 6199 | (define-public java-jmock-1 |
| 6200 | (package |
| 6201 | (name "java-jmock") |
| 6202 | (version "1.2.0") |
| 6203 | (source (origin |
| 6204 | (method git-fetch) |
| 6205 | (uri (git-reference |
| 6206 | (url "https://github.com/jmock-developers/jmock-library") |
| 6207 | (commit version))) |
| 6208 | (file-name (git-file-name name version)) |
| 6209 | (sha256 |
| 6210 | (base32 |
| 6211 | "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z")))) |
| 6212 | (build-system ant-build-system) |
| 6213 | (arguments |
| 6214 | `(#:build-target "jars" |
| 6215 | #:test-target "run.tests" |
| 6216 | #:phases |
| 6217 | (modify-phases %standard-phases |
| 6218 | (replace 'install (install-jars "build"))))) |
| 6219 | (home-page "http://jmock.org/") |
| 6220 | (synopsis "Mock object library for test-driven development") |
| 6221 | (description "JMock is a library that supports test-driven development of |
| 6222 | Java code with mock objects. Mock objects help you design and test the |
| 6223 | interactions between the objects in your programs. |
| 6224 | |
| 6225 | The jMock library |
| 6226 | |
| 6227 | @itemize |
| 6228 | @item makes it quick and easy to define mock objects |
| 6229 | @item lets you precisely specify the interactions between |
| 6230 | your objects, reducing the brittleness of your tests |
| 6231 | @item plugs into your favourite test framework |
| 6232 | @item is easy to extend. |
| 6233 | @end itemize\n") |
| 6234 | (license license:bsd-3))) |
| 6235 | |
| 6236 | (define-public java-jmock |
| 6237 | (package |
| 6238 | (inherit java-jmock-1) |
| 6239 | (name "java-jmock") |
| 6240 | (version "2.8.2") |
| 6241 | (source (origin |
| 6242 | (method git-fetch) |
| 6243 | (uri (git-reference |
| 6244 | (url "https://github.com/jmock-developers/jmock-library") |
| 6245 | (commit version))) |
| 6246 | (file-name (git-file-name name version)) |
| 6247 | (sha256 |
| 6248 | (base32 |
| 6249 | "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6")))) |
| 6250 | (inputs |
| 6251 | (list java-hamcrest-all java-bsh java-junit)) |
| 6252 | (native-inputs |
| 6253 | `(("cglib" ,java-cglib))) |
| 6254 | (arguments |
| 6255 | `(#:jar-name "java-jmock.jar" |
| 6256 | #:source-dir "jmock/src/main/java" |
| 6257 | #:test-dir "jmock/src/test")))) |
| 6258 | |
| 6259 | (define-public java-jmock-junit4 |
| 6260 | (package |
| 6261 | (inherit java-jmock) |
| 6262 | (name "java-jmock-junit4") |
| 6263 | (arguments |
| 6264 | `(#:jar-name "java-jmock-junit4.jar" |
| 6265 | #:source-dir "jmock-junit4/src/main/java" |
| 6266 | #:test-dir "jmock-junit4/src/test")) |
| 6267 | (inputs |
| 6268 | `(("java-hamcrest-all" ,java-hamcrest-all) |
| 6269 | ("java-bsh" ,java-bsh) |
| 6270 | ("java-jmock" ,java-jmock) |
| 6271 | ("java-jumit" ,java-junit))))) |
| 6272 | |
| 6273 | (define-public java-jmock-legacy |
| 6274 | (package |
| 6275 | (inherit java-jmock) |
| 6276 | (name "java-jmock-legacy") |
| 6277 | (arguments |
| 6278 | `(#:jar-name "java-jmock-legacy.jar" |
| 6279 | #:source-dir "jmock-legacy/src/main/java" |
| 6280 | #:test-dir "jmock-legacy/src/test" |
| 6281 | #:phases |
| 6282 | (modify-phases %standard-phases |
| 6283 | (add-before 'check 'copy-tests |
| 6284 | (lambda _ |
| 6285 | ;; This file is a dependancy of some tests |
| 6286 | (let ((file "org/jmock/test/acceptance/PackageProtectedType.java")) |
| 6287 | (copy-file (string-append "jmock/src/test/java/" file) |
| 6288 | (string-append "jmock-legacy/src/test/java/" file)) |
| 6289 | #t)))))) |
| 6290 | (inputs |
| 6291 | (list java-hamcrest-all |
| 6292 | java-objenesis |
| 6293 | java-cglib |
| 6294 | java-jmock |
| 6295 | java-bsh |
| 6296 | java-junit)) |
| 6297 | (native-inputs |
| 6298 | (list java-jmock-junit4)))) |
| 6299 | |
| 6300 | (define-public java-hamcrest-all |
| 6301 | (package (inherit java-hamcrest-core) |
| 6302 | (name "java-hamcrest-all") |
| 6303 | (arguments |
| 6304 | `(#:jdk ,icedtea-8 |
| 6305 | ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core) |
| 6306 | ((#:build-target _) "bigjar") |
| 6307 | ((#:phases phases) |
| 6308 | `(modify-phases ,phases |
| 6309 | ;; Some build targets override the classpath, so we need to patch |
| 6310 | ;; the build.xml to ensure that required dependencies are on the |
| 6311 | ;; classpath. |
| 6312 | (add-after 'unpack 'patch-classpath-for-integration |
| 6313 | (lambda* (#:key inputs #:allow-other-keys) |
| 6314 | (substitute* "build.xml" |
| 6315 | ((" build/hamcrest-library-\\$\\{version\\}.jar" line) |
| 6316 | (string-join |
| 6317 | (cons line |
| 6318 | (append |
| 6319 | (find-files (assoc-ref inputs "java-junit") "\\.jar$") |
| 6320 | (find-files (assoc-ref inputs "java-jmock") "\\.jar$") |
| 6321 | (find-files (assoc-ref inputs "java-easymock") "\\.jar$"))) |
| 6322 | ";")) |
| 6323 | (("build/hamcrest-core-\\$\\{version\\}\\.jar") |
| 6324 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 6325 | "jar$")))) |
| 6326 | #t)) |
| 6327 | (replace 'install |
| 6328 | (lambda* (#:key outputs #:allow-other-keys) |
| 6329 | (let* ((target (string-append (assoc-ref outputs "out") |
| 6330 | "/share/java/")) |
| 6331 | (version-suffix |
| 6332 | ,(string-append |
| 6333 | "-" (package-version java-hamcrest-core) ".jar")) |
| 6334 | (install-without-version-suffix |
| 6335 | (lambda (jar) |
| 6336 | (copy-file jar |
| 6337 | (string-append target |
| 6338 | (basename jar version-suffix) |
| 6339 | ".jar"))))) |
| 6340 | (mkdir-p target) |
| 6341 | (for-each |
| 6342 | install-without-version-suffix |
| 6343 | (find-files "build" |
| 6344 | (lambda (name _) |
| 6345 | (and (string-suffix? ".jar" name) |
| 6346 | (not (string-suffix? "-sources.jar" name))))))) |
| 6347 | #t))))))) |
| 6348 | (inputs |
| 6349 | (modify-inputs (package-inputs java-hamcrest-core) |
| 6350 | (prepend java-junit |
| 6351 | java-jmock-1 |
| 6352 | ;; This is necessary because of what seems to be a race condition. |
| 6353 | ;; This package would sometimes fail to build because hamcrest-core.jar |
| 6354 | ;; could not be found, even though it is built as part of this package. |
| 6355 | ;; Adding java-hamcrest-core appears to fix this problem. See |
| 6356 | ;; https://debbugs.gnu.org/31390 for more information. |
| 6357 | java-hamcrest-core |
| 6358 | java-easymock))))) |
| 6359 | |
| 6360 | (define-public java-jopt-simple |
| 6361 | (package |
| 6362 | (name "java-jopt-simple") |
| 6363 | (version "5.0.3") |
| 6364 | (source (origin |
| 6365 | (method url-fetch) |
| 6366 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6367 | "net/sf/jopt-simple/jopt-simple/" |
| 6368 | version "/jopt-simple-" |
| 6369 | version "-sources.jar")) |
| 6370 | (sha256 |
| 6371 | (base32 |
| 6372 | "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa")))) |
| 6373 | (build-system ant-build-system) |
| 6374 | (arguments |
| 6375 | `(#:tests? #f ; there are no tests |
| 6376 | #:jar-name "jopt-simple.jar" |
| 6377 | #:phases |
| 6378 | (modify-phases %standard-phases |
| 6379 | (add-before 'install 'create-pom |
| 6380 | (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version)) |
| 6381 | (replace 'install |
| 6382 | (install-from-pom "pom.xml"))))) |
| 6383 | (home-page "https://jopt-simple.github.io/jopt-simple/") |
| 6384 | (synopsis "Java library for parsing command line options") |
| 6385 | (description "JOpt Simple is a Java library for parsing command line |
| 6386 | options, such as those you might pass to an invocation of @code{javac}. In |
| 6387 | the interest of striving for simplicity, as closely as possible JOpt Simple |
| 6388 | attempts to honor the command line option syntaxes of POSIX @code{getopt} and |
| 6389 | GNU @code{getopt_long}. It also aims to make option parser configuration and |
| 6390 | retrieval of options and their arguments simple and expressive, without being |
| 6391 | overly clever.") |
| 6392 | (license license:expat))) |
| 6393 | |
| 6394 | ;; Required by jmh |
| 6395 | (define-public java-jopt-simple-4 |
| 6396 | (package |
| 6397 | (inherit java-jopt-simple) |
| 6398 | (version "4.6") |
| 6399 | (source (origin |
| 6400 | (method url-fetch) |
| 6401 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 6402 | "net/sf/jopt-simple/jopt-simple/" |
| 6403 | version "/jopt-simple-" |
| 6404 | version "-sources.jar")) |
| 6405 | (sha256 |
| 6406 | (base32 |
| 6407 | "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd")))) |
| 6408 | (arguments |
| 6409 | (substitute-keyword-arguments (package-arguments java-jopt-simple) |
| 6410 | ((#:phases phases) |
| 6411 | `(modify-phases ,phases |
| 6412 | (replace 'create-pom |
| 6413 | (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" |
| 6414 | ,version)))))))) |
| 6415 | |
| 6416 | (define-public java-commons-math3 |
| 6417 | (package |
| 6418 | (name "java-commons-math3") |
| 6419 | (version "3.6.1") |
| 6420 | (source (origin |
| 6421 | (method url-fetch) |
| 6422 | (uri (string-append "mirror://apache/commons/math/source/" |
| 6423 | "commons-math3-" version "-src.tar.gz")) |
| 6424 | (sha256 |
| 6425 | (base32 |
| 6426 | "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) |
| 6427 | (build-system ant-build-system) |
| 6428 | (arguments |
| 6429 | `(#:build-target "jar" |
| 6430 | #:test-target "test" |
| 6431 | #:make-flags |
| 6432 | ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core")) |
| 6433 | (junit #$(this-package-native-input "java-junit"))) |
| 6434 | (list (string-append "-Djunit.jar=" |
| 6435 | (car (find-files junit "jar$"))) |
| 6436 | (string-append "-Dhamcrest.jar=" |
| 6437 | (car (find-files hamcrest ".*.jar$"))))) |
| 6438 | #:phases |
| 6439 | (modify-phases %standard-phases |
| 6440 | ;; We want to build the jar in the build phase and run the tests |
| 6441 | ;; later in a separate phase. |
| 6442 | (add-after 'unpack 'untangle-targets |
| 6443 | (lambda _ |
| 6444 | (substitute* "build.xml" |
| 6445 | (("name=\"jar\" depends=\"test\"") |
| 6446 | "name=\"jar\" depends=\"compile\"")))) |
| 6447 | ;; There is no install target. |
| 6448 | (replace 'install |
| 6449 | (install-from-pom "pom.xml"))))) |
| 6450 | (native-inputs |
| 6451 | (list java-junit java-hamcrest-core)) |
| 6452 | (home-page "https://commons.apache.org/math/") |
| 6453 | (synopsis "Apache Commons mathematics library") |
| 6454 | (description "Commons Math is a library of lightweight, self-contained |
| 6455 | mathematics and statistics components addressing the most common problems not |
| 6456 | available in the Java programming language or Commons Lang.") |
| 6457 | (license license:asl2.0))) |
| 6458 | |
| 6459 | ;; Commons Math 3.2 - required by JMH 1.21 (specified in jmh-parent-1.21.pom) |
| 6460 | (define-public java-commons-math3-for-graal-mx |
| 6461 | (package |
| 6462 | (inherit java-commons-math3) |
| 6463 | (name "java-commons-math3-for-graal-mx") |
| 6464 | (version "3.2") |
| 6465 | (source (origin |
| 6466 | (method url-fetch) |
| 6467 | (uri (string-append "mirror://apache/commons/math/source/" |
| 6468 | "commons-math3-" version "-src.tar.gz")) |
| 6469 | (sha256 |
| 6470 | (base32 |
| 6471 | "041k90pfqqia2ikba1q5qdzqd6qhx07k6d0sqiryk85f6032z687")))) |
| 6472 | (arguments |
| 6473 | (substitute-keyword-arguments (package-arguments java-commons-math3) |
| 6474 | ;; FastMathTest fails on JDK 8+: checks that FastMath implements all |
| 6475 | ;; StrictMath methods, but Java 8 added addExact, floorDiv, etc. |
| 6476 | ((#:tests? _ #f) |
| 6477 | #f))) |
| 6478 | (propagated-inputs |
| 6479 | (list apache-commons-parent-pom-28)))) |
| 6480 | |
| 6481 | (define-public java-jmh |
| 6482 | (package |
| 6483 | (name "java-jmh") |
| 6484 | (version "1.32") |
| 6485 | (source (origin |
| 6486 | (method git-fetch) |
| 6487 | (uri (git-reference |
| 6488 | (url "https://github.com/openjdk/jmh") |
| 6489 | (commit version))) |
| 6490 | (file-name (git-file-name name version)) |
| 6491 | (sha256 |
| 6492 | (base32 |
| 6493 | "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) |
| 6494 | (build-system maven-build-system) |
| 6495 | (arguments |
| 6496 | `(#:jdk ,openjdk11 |
| 6497 | #:exclude |
| 6498 | (("org.apache.maven.plugins" . |
| 6499 | ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin" |
| 6500 | "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin" |
| 6501 | "maven-enforcer-plugin")) |
| 6502 | ("com.mycila.maven-license-plugin" . ("maven-license-plugin")) |
| 6503 | ("org.apache.maven.wagon" . ("wagon-ssh"))) |
| 6504 | #:phases |
| 6505 | (modify-phases %standard-phases |
| 6506 | (add-after 'unpack 'remove-unnecessary |
| 6507 | (lambda _ |
| 6508 | ;; requires org.apache.maven.archetype:archetype-packaging. |
| 6509 | ;; Its subprojects also require groovy, kotlin and scala, |
| 6510 | ;; respectively. |
| 6511 | (delete-file-recursively "jmh-archetypes"))) |
| 6512 | (add-after 'fix-pom-files 'fix-surefire-config |
| 6513 | (lambda _ |
| 6514 | ;; Fix surefire fork crash with NullPointerException in |
| 6515 | ;; ForkedBooter.setupBooter. Per Maven Surefire documentation at |
| 6516 | ;; <https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html>: |
| 6517 | ;; "If you're having problems loading classes, try setting |
| 6518 | ;; useSystemClassLoader=false to see if that helps." |
| 6519 | (substitute* (find-files "." "pom\\.xml$") |
| 6520 | (("<trimStackTrace>false</trimStackTrace>") |
| 6521 | "<trimStackTrace>false</trimStackTrace> |
| 6522 | <useSystemClassLoader>false</useSystemClassLoader>"))))))) |
| 6523 | (propagated-inputs |
| 6524 | (list java-jopt-simple-4 java-commons-math3)) |
| 6525 | (native-inputs |
| 6526 | (list java-junit java-hamcrest-core junit-bom-5.10 junit-bom-5.10.2 |
| 6527 | junit-bom-5.11 junit-bom-5.11.0 junit-bom-5.12 maven-parent-pom-44 |
| 6528 | apache-parent-pom-34 apache-commons-parent-pom-39 |
| 6529 | java-sisu-inject-parent-pom-0.9 java-eclipse-sisu-inject-0.9 |
| 6530 | java-eclipse-sisu-plexus-0.9 java-plexus-utils-4)) |
| 6531 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") |
| 6532 | (synopsis "Benchmark harness for the JVM") |
| 6533 | (description "JMH is a Java harness for building, running, and analysing |
| 6534 | nano/micro/milli/macro benchmarks written in Java and other languages |
| 6535 | targeting the JVM.") |
| 6536 | ;; GPLv2 only |
| 6537 | (license license:gpl2))) |
| 6538 | |
| 6539 | ;; JMH 1.21 - required by mx for compiler benchmarks |
| 6540 | (define-public java-jmh-for-graal-mx |
| 6541 | (package |
| 6542 | (inherit java-jmh) |
| 6543 | (name "java-jmh-for-graal-mx") |
| 6544 | (version "1.21") |
| 6545 | (source (origin |
| 6546 | (method git-fetch) |
| 6547 | (uri (git-reference |
| 6548 | (url "https://github.com/openjdk/jmh") |
| 6549 | (commit version))) |
| 6550 | (file-name (git-file-name "jmh" version)) |
| 6551 | (sha256 |
| 6552 | (base32 |
| 6553 | "1jrbrw7qbnhkzv5m1hh5mlhcxvzyivkqbr3vwnjlswhbrpswy552")))) |
| 6554 | (propagated-inputs |
| 6555 | (list java-jopt-simple-4 java-commons-math3-for-graal-mx)))) |
| 6556 | |
| 6557 | ;; JMH annotation processor - required by mx for compiler benchmarks |
| 6558 | (define-public java-jmh-generator-annprocess-for-graal-mx |
| 6559 | (package |
| 6560 | (name "java-jmh-generator-annprocess-for-graal-mx") |
| 6561 | (version "1.21") |
| 6562 | (source (package-source java-jmh-for-graal-mx)) |
| 6563 | (build-system maven-build-system) |
| 6564 | (arguments |
| 6565 | `(#:exclude |
| 6566 | (("org.apache.maven.plugins" . |
| 6567 | ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin" |
| 6568 | "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin")) |
| 6569 | ("com.mycila.maven-license-plugin" . ("maven-license-plugin")) |
| 6570 | ("org.apache.maven.wagon" . ("wagon-ssh"))) |
| 6571 | #:maven-plugins |
| 6572 | (("maven-enforcer-plugin" ,maven-enforcer-plugin) |
| 6573 | ,@(default-maven-plugins)) |
| 6574 | #:phases |
| 6575 | (modify-phases %standard-phases |
| 6576 | (add-after 'unpack 'chdir |
| 6577 | (lambda _ |
| 6578 | (chdir "jmh-generator-annprocess"))) |
| 6579 | (add-after 'chdir 'remove-unnecessary |
| 6580 | (lambda _ |
| 6581 | (delete-file-recursively "../jmh-archetypes"))) |
| 6582 | (add-after 'remove-unnecessary 'fix-pom |
| 6583 | (lambda _ |
| 6584 | ;; Update maven plugin versions to match what Guix has |
| 6585 | ;; and remove plugins we don't have packaged |
| 6586 | (invoke "sed" "-i" "-e" |
| 6587 | "s|<version>1.4.1</version>|<version>3.0.0</version>|" |
| 6588 | "-e" |
| 6589 | "s|<version>2.6</version>|<version>3.1.0</version>|" |
| 6590 | ;; Remove maven-source-plugin block (lines 104-117) |
| 6591 | "-e" "/<!-- Create source jar -->/,/<\\/plugin>/d" |
| 6592 | ;; Remove maven-javadoc-plugin block (lines 119-135) |
| 6593 | "-e" "/<!-- Create javadoc jar -->/,/<\\/plugin>/d" |
| 6594 | ;; Remove maven-eclipse-plugin block (lines 137-145) |
| 6595 | "-e" "/<!-- Add sources and javadoc/,/<\\/plugin>/d" |
| 6596 | "../pom.xml")))))) |
| 6597 | (propagated-inputs |
| 6598 | (list java-jmh-for-graal-mx)) |
| 6599 | (native-inputs |
| 6600 | (list java-junit java-hamcrest-core)) |
| 6601 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") |
| 6602 | (synopsis "JMH annotation processor") |
| 6603 | (description "JMH annotation processor for generating benchmark code.") |
| 6604 | (license license:gpl2))); GPLv2 only, with classpath exception |
| 6605 | |
| 6606 | (define-public java-commons-collections4 |
| 6607 | (package |
| 6608 | (name "java-commons-collections4") |
| 6609 | (version "4.1") |
| 6610 | (source (origin |
| 6611 | (method url-fetch) |
| 6612 | (uri (string-append "mirror://apache/commons/collections/source/" |
| 6613 | "commons-collections4-" version "-src.tar.gz")) |
| 6614 | (sha256 |
| 6615 | (base32 |
| 6616 | "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl")))) |
| 6617 | (build-system ant-build-system) |
| 6618 | (arguments |
| 6619 | `(#:test-target "test" |
| 6620 | #:make-flags |
| 6621 | ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core")) |
| 6622 | (junit #$(this-package-native-input "java-junit")) |
| 6623 | (easymock #$(this-package-native-input "java-easymock"))) |
| 6624 | (list (string-append "-Djunit.jar=" |
| 6625 | (car (find-files junit "jar$"))) |
| 6626 | (string-append "-Dhamcrest.jar=" |
| 6627 | (car (find-files hamcrest "jar$"))) |
| 6628 | (string-append "-Deasymock.jar=" easymock |
| 6629 | "/share/java/easymock.jar"))) |
| 6630 | #:phases |
| 6631 | (modify-phases %standard-phases |
| 6632 | (replace 'install |
| 6633 | (install-jars "target"))))) |
| 6634 | (native-inputs |
| 6635 | (list java-junit java-hamcrest-core java-easymock)) |
| 6636 | (home-page "https://commons.apache.org/collections/") |
| 6637 | (synopsis "Collections framework") |
| 6638 | (description "The Java Collections Framework is the recognised standard |
| 6639 | for collection handling in Java. Commons-Collections seek to build upon the |
| 6640 | JDK classes by providing new interfaces, implementations and utilities. There |
| 6641 | are many features, including: |
| 6642 | |
| 6643 | @itemize |
| 6644 | @item @code{Bag} interface for collections that have a number of copies of |
| 6645 | each object |
| 6646 | @item @code{BidiMap} interface for maps that can be looked up from value to |
| 6647 | key as well and key to value |
| 6648 | @item @code{MapIterator} interface to provide simple and quick iteration over |
| 6649 | maps |
| 6650 | @item Transforming decorators that alter each object as it is added to the |
| 6651 | collection |
| 6652 | @item Composite collections that make multiple collections look like one |
| 6653 | @item Ordered maps and sets that retain the order elements are added in, |
| 6654 | including an LRU based map |
| 6655 | @item Reference map that allows keys and/or values to be garbage collected |
| 6656 | under close control |
| 6657 | @item Many comparator implementations |
| 6658 | @item Many iterator implementations |
| 6659 | @item Adapter classes from array and enumerations to collections |
| 6660 | @item Utilities to test or create typical set-theory properties of collections |
| 6661 | such as union, intersection, and closure. |
| 6662 | @end itemize\n") |
| 6663 | (license license:asl2.0))) |
| 6664 | |
| 6665 | (define-public java-commons-collections |
| 6666 | (package |
| 6667 | (inherit java-commons-collections4) |
| 6668 | (name "java-commons-collections") |
| 6669 | (version "3.2.2") |
| 6670 | (source (origin |
| 6671 | (method url-fetch) |
| 6672 | (uri (string-append "mirror://apache/commons/collections/source/" |
| 6673 | "commons-collections-" version "-src.tar.gz")) |
| 6674 | (sha256 |
| 6675 | (base32 |
| 6676 | "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387")) |
| 6677 | (patches |
| 6678 | (search-patches "java-commons-collections-fix-java8.patch")))) |
| 6679 | (arguments |
| 6680 | (substitute-keyword-arguments (package-arguments java-commons-collections4) |
| 6681 | ((#:phases phases) |
| 6682 | `(modify-phases ,phases |
| 6683 | ;; The manifest is required by the build procedure |
| 6684 | (add-before 'build 'add-manifest |
| 6685 | (lambda _ |
| 6686 | (mkdir-p "build/conf") |
| 6687 | (call-with-output-file "build/conf/MANIFEST.MF" |
| 6688 | (lambda (file) |
| 6689 | (format file "Manifest-Version: 1.0\n"))) |
| 6690 | #t)) |
| 6691 | (replace 'install |
| 6692 | (install-jars "build")))))))) |
| 6693 | |
| 6694 | (define java-commons-collections-test-classes |
| 6695 | (package |
| 6696 | (inherit java-commons-collections) |
| 6697 | (arguments |
| 6698 | `(#:jar-name "commons-collections-test-classes.jar" |
| 6699 | #:source-dir "src/test" |
| 6700 | #:tests? #f)) |
| 6701 | (inputs |
| 6702 | `(("collection" ,java-commons-collections))))) |
| 6703 | |
| 6704 | (define-public java-commons-beanutils |
| 6705 | (package |
| 6706 | (name "java-commons-beanutils") |
| 6707 | (version "1.9.3") |
| 6708 | (source (origin |
| 6709 | (method url-fetch) |
| 6710 | (uri (string-append "mirror://apache/commons/beanutils/source/" |
| 6711 | "commons-beanutils-" version "-src.tar.gz")) |
| 6712 | (sha256 |
| 6713 | (base32 |
| 6714 | "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk")))) |
| 6715 | (build-system ant-build-system) |
| 6716 | (arguments |
| 6717 | `(#:test-target "test" |
| 6718 | #:tests? #f |
| 6719 | #:phases |
| 6720 | (modify-phases %standard-phases |
| 6721 | (replace 'install |
| 6722 | (lambda* (#:key outputs #:allow-other-keys) |
| 6723 | (rename-file (string-append "dist/commons-beanutils-" ,version |
| 6724 | "-SNAPSHOT.jar") |
| 6725 | "commons-beanutils.jar") |
| 6726 | (install-file "commons-beanutils.jar" |
| 6727 | (string-append (assoc-ref outputs "out") "/share/java/")) |
| 6728 | #t))))) |
| 6729 | (inputs |
| 6730 | `(("logging" ,java-commons-logging-minimal) |
| 6731 | ("collections" ,java-commons-collections))) |
| 6732 | (native-inputs |
| 6733 | `(("junit" ,java-junit) |
| 6734 | ("collections-test" ,java-commons-collections-test-classes))) |
| 6735 | (home-page "https://commons.apache.org/beanutils/") |
| 6736 | (synopsis "Dynamically set or get properties in Java") |
| 6737 | (description "BeanUtils provides a simplified interface to reflection and |
| 6738 | introspection to set or get dynamically determined properties through their |
| 6739 | setter and getter method.") |
| 6740 | (license license:asl2.0))) |
| 6741 | |
| 6742 | (define-public java-commons-io |
| 6743 | (package |
| 6744 | (name "java-commons-io") |
| 6745 | (version "2.18.0") |
| 6746 | (source |
| 6747 | (origin |
| 6748 | (method url-fetch) |
| 6749 | (uri (string-append "mirror://apache/commons/io/source/" |
| 6750 | "commons-io-" version "-src.tar.gz")) |
| 6751 | (sha256 |
| 6752 | (base32 |
| 6753 | "0cr9ryhdbk4gz6bbcdqdd28d80dik8csv2fx7h6mx7yfxgbjsrf4")))) |
| 6754 | (build-system ant-build-system) |
| 6755 | (arguments |
| 6756 | `(#:jar-name "commons-io.jar" |
| 6757 | #:source-dir "src/main/java" |
| 6758 | #:tests? #f |
| 6759 | #:phases |
| 6760 | (modify-phases %standard-phases |
| 6761 | (add-before 'build 'generate-build-xml |
| 6762 | (lambda _ |
| 6763 | (with-output-to-file "build.xml" |
| 6764 | (lambda () |
| 6765 | (display |
| 6766 | "<project><target name=\"jar\"/><target name=\"test\"/></project>\n"))))) |
| 6767 | (replace 'build |
| 6768 | (lambda* (#:key source-dir jar-name #:allow-other-keys) |
| 6769 | (mkdir-p "build/classes") |
| 6770 | (apply invoke "javac" "-d" "build/classes" |
| 6771 | (find-files source-dir "\\.java$")) |
| 6772 | (invoke "jar" "-cf" jar-name "-C" "build/classes" "."))) |
| 6773 | (replace 'install (install-from-pom "pom.xml"))))) |
| 6774 | (propagated-inputs |
| 6775 | (list apache-commons-parent-pom-52)) |
| 6776 | (home-page "https://commons.apache.org/io/") |
| 6777 | (synopsis "Common useful IO related classes") |
| 6778 | (description "Commons-IO contains utility classes, stream implementations, |
| 6779 | file filters and endian classes.") |
| 6780 | (license license:asl2.0))) |
| 6781 | |
| 6782 | (define-public java-commons-exec-1.1 |
| 6783 | (package |
| 6784 | (name "java-commons-exec") |
| 6785 | (version "1.1") |
| 6786 | (source |
| 6787 | (origin |
| 6788 | (method url-fetch) |
| 6789 | (uri (string-append "mirror://apache/commons/exec/source/" |
| 6790 | "commons-exec-" version "-src.tar.gz")) |
| 6791 | (sha256 |
| 6792 | (base32 |
| 6793 | "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk")))) |
| 6794 | (build-system ant-build-system) |
| 6795 | (arguments |
| 6796 | `(#:test-target "test" |
| 6797 | #:make-flags |
| 6798 | ,#~(list (string-append "-Dmaven.junit.jar=" |
| 6799 | (car (find-files #$(this-package-native-input "java-junit") |
| 6800 | "jar$")))) |
| 6801 | #:phases |
| 6802 | (modify-phases %standard-phases |
| 6803 | (add-before 'build 'delete-network-tests |
| 6804 | (lambda _ |
| 6805 | (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java") |
| 6806 | (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java" |
| 6807 | (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") "")) |
| 6808 | #t)) |
| 6809 | ;; The "build" phase automatically tests. |
| 6810 | (delete 'check) |
| 6811 | (replace 'install (install-jars "target"))))) |
| 6812 | (native-inputs |
| 6813 | (list java-junit)) |
| 6814 | (home-page "https://commons.apache.org/proper/commons-exec/") |
| 6815 | (synopsis "Common program execution related classes") |
| 6816 | (description "Commons-Exec simplifies executing external processes.") |
| 6817 | (license license:asl2.0))) |
| 6818 | |
| 6819 | (define-public java-commons-exec |
| 6820 | (package |
| 6821 | (inherit java-commons-exec-1.1) |
| 6822 | (version "1.3") |
| 6823 | (source |
| 6824 | (origin |
| 6825 | (method url-fetch) |
| 6826 | (uri (string-append "mirror://apache/commons/exec/source/" |
| 6827 | "commons-exec-" version "-src.tar.gz")) |
| 6828 | (sha256 |
| 6829 | (base32 |
| 6830 | "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv")))) |
| 6831 | (arguments |
| 6832 | `(#:test-target "test" |
| 6833 | #:make-flags |
| 6834 | ,#~(list (string-append "-Dmaven.junit.jar=" |
| 6835 | (car (find-files #$(this-package-native-input "java-junit") |
| 6836 | "jar$"))) |
| 6837 | "-Dmaven.compiler.source=1.7" |
| 6838 | "-Dmaven.compiler.target=1.7") |
| 6839 | #:phases |
| 6840 | (modify-phases %standard-phases |
| 6841 | (add-before 'build 'delete-network-tests |
| 6842 | (lambda* (#:key inputs #:allow-other-keys) |
| 6843 | ;; This test hangs indefinitely. |
| 6844 | (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java") |
| 6845 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java" |
| 6846 | (("ping -c 10 127.0.0.1") "sleep 10")) |
| 6847 | (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java" |
| 6848 | (("/bin/ls") "ls")) |
| 6849 | (call-with-output-file "src/test/scripts/ping.sh" |
| 6850 | (lambda (port) |
| 6851 | (format port "#!~a/bin/sh\nsleep $1\n" |
| 6852 | (assoc-ref inputs "bash")))) |
| 6853 | #t)) |
| 6854 | ;; The "build" phase automatically tests. |
| 6855 | (delete 'check) |
| 6856 | (replace 'install (install-jars "target"))))) |
| 6857 | (native-inputs |
| 6858 | (list java-junit java-hamcrest-core)))) |
| 6859 | |
| 6860 | (define-public java-commons-lang |
| 6861 | (package |
| 6862 | (name "java-commons-lang") |
| 6863 | (version "2.6") |
| 6864 | (source |
| 6865 | (origin |
| 6866 | (method url-fetch) |
| 6867 | (uri (string-append "mirror://apache/commons/lang/source/" |
| 6868 | "commons-lang-" version "-src.tar.gz")) |
| 6869 | (sha256 |
| 6870 | (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5")))) |
| 6871 | (build-system ant-build-system) |
| 6872 | (outputs '("out" "doc")) |
| 6873 | (arguments |
| 6874 | `(#:test-target "test" |
| 6875 | #:test-exclude (list "**/Abstract*.java" "**/Random*.java") |
| 6876 | #:phases |
| 6877 | (modify-phases %standard-phases |
| 6878 | (add-after 'build 'build-javadoc ant-build-javadoc) |
| 6879 | (add-before 'check 'disable-failing-test |
| 6880 | (lambda _ |
| 6881 | ;; Disable a failing test |
| 6882 | (substitute* "src/test/java/org/apache/commons/lang/\ |
| 6883 | time/FastDateFormatTest.java" |
| 6884 | (("public void testFormat\\(\\)") |
| 6885 | "public void disabled_testFormat()")) |
| 6886 | #t)) |
| 6887 | (replace 'install (install-jars "target")) |
| 6888 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) |
| 6889 | (native-inputs |
| 6890 | (list java-junit)) |
| 6891 | (home-page "https://commons.apache.org/lang/") |
| 6892 | (synopsis "Extension of the java.lang package") |
| 6893 | (description "The Commons Lang components contains a set of Java classes |
| 6894 | that provide helper methods for standard Java classes, especially those found |
| 6895 | in the @code{java.lang} package in the Sun JDK. The following classes are |
| 6896 | included: |
| 6897 | |
| 6898 | @itemize |
| 6899 | @item StringUtils - Helper for @code{java.lang.String}. |
| 6900 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets |
| 6901 | of characters such as @code{[a-z]} and @code{[abcdez]}. |
| 6902 | @item RandomStringUtils - Helper for creating randomised strings. |
| 6903 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. |
| 6904 | @item NumberRange - A range of numbers with an upper and lower bound. |
| 6905 | @item ObjectUtils - Helper for @code{java.lang.Object}. |
| 6906 | @item SerializationUtils - Helper for serializing objects. |
| 6907 | @item SystemUtils - Utility class defining the Java system properties. |
| 6908 | @item NestedException package - A sub-package for the creation of nested |
| 6909 | exceptions. |
| 6910 | @item Enum package - A sub-package for the creation of enumerated types. |
| 6911 | @item Builder package - A sub-package for the creation of @code{equals}, |
| 6912 | @code{hashCode}, @code{compareTo} and @code{toString} methods. |
| 6913 | @end itemize\n") |
| 6914 | (license license:asl2.0))) |
| 6915 | |
| 6916 | (define-public java-commons-lang3 |
| 6917 | (package |
| 6918 | (name "java-commons-lang3") |
| 6919 | (version "3.17.0") |
| 6920 | (source |
| 6921 | (origin |
| 6922 | (method url-fetch) |
| 6923 | (uri (string-append "mirror://apache/commons/lang/source/" |
| 6924 | "commons-lang3-" version "-src.tar.gz")) |
| 6925 | (sha256 |
| 6926 | (base32 "0h9s5abbs41swfzdfg4dsk0gqr926avj9773j0did1az8ppn90v5")))) |
| 6927 | (build-system ant-build-system) |
| 6928 | (arguments |
| 6929 | `(#:jar-name "commons-lang3.jar" |
| 6930 | #:source-dir "src/main/java" |
| 6931 | #:tests? #f ; require junit5 |
| 6932 | #:phases |
| 6933 | (modify-phases %standard-phases |
| 6934 | (add-before 'install 'make-commons-text-optional |
| 6935 | ;; commons-text is scope=provided (only for javadoc), but install-from-pom |
| 6936 | ;; still requires it. Mark it optional to avoid cycle: lang3 -> text -> lang3. |
| 6937 | (lambda _ |
| 6938 | (substitute* "pom.xml" |
| 6939 | (("<artifactId>commons-text</artifactId>") |
| 6940 | "<artifactId>commons-text</artifactId>\n <optional>true</optional>")))) |
| 6941 | (replace 'install (install-from-pom "pom.xml"))))) |
| 6942 | (propagated-inputs |
| 6943 | (list apache-commons-parent-pom-73)) |
| 6944 | (home-page "https://commons.apache.org/lang/") |
| 6945 | (synopsis "Extension of the java.lang package") |
| 6946 | (description "The Commons Lang components contains a set of Java classes |
| 6947 | that provide helper methods for standard Java classes, especially those found |
| 6948 | in the @code{java.lang} package. The following classes are included: |
| 6949 | |
| 6950 | @itemize |
| 6951 | @item StringUtils - Helper for @code{java.lang.String}. |
| 6952 | @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of |
| 6953 | characters such as @code{[a-z]} and @code{[abcdez]}. |
| 6954 | @item RandomStringUtils - Helper for creating randomised strings. |
| 6955 | @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses. |
| 6956 | @item NumberRange - A range of numbers with an upper and lower bound. |
| 6957 | @item ObjectUtils - Helper for @code{java.lang.Object}. |
| 6958 | @item SerializationUtils - Helper for serializing objects. |
| 6959 | @item SystemUtils - Utility class defining the Java system properties. |
| 6960 | @item NestedException package - A sub-package for the creation of nested |
| 6961 | exceptions. |
| 6962 | @item Enum package - A sub-package for the creation of enumerated types. |
| 6963 | @item Builder package - A sub-package for the creation of @code{equals}, |
| 6964 | @code{hashCode}, @code{compareTo} and @code{toString} methods. |
| 6965 | @end itemize\n") |
| 6966 | (license license:asl2.0))) |
| 6967 | |
| 6968 | (define-public java-commons-bsf |
| 6969 | (package |
| 6970 | (name "java-commons-bsf") |
| 6971 | (version "2.4.0") |
| 6972 | (source (origin |
| 6973 | (method url-fetch) |
| 6974 | (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-" |
| 6975 | version ".tar.gz")) |
| 6976 | (sha256 |
| 6977 | (base32 |
| 6978 | "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas")) |
| 6979 | (modules '((guix build utils))) |
| 6980 | (snippet |
| 6981 | '(begin |
| 6982 | (for-each delete-file |
| 6983 | (find-files "." "\\.jar$")) |
| 6984 | #t)))) |
| 6985 | (build-system ant-build-system) |
| 6986 | (arguments |
| 6987 | `(#:build-target "jar" |
| 6988 | #:tests? #f; No test file |
| 6989 | #:modules ((guix build ant-build-system) |
| 6990 | (guix build utils) |
| 6991 | (guix build java-utils) |
| 6992 | (sxml simple)) |
| 6993 | #:phases |
| 6994 | (modify-phases %standard-phases |
| 6995 | (add-before 'build 'create-properties |
| 6996 | (lambda _ |
| 6997 | ;; This file is missing from the distribution |
| 6998 | (call-with-output-file "build-properties.xml" |
| 6999 | (lambda (port) |
| 7000 | (sxml->xml |
| 7001 | `(project (@ (basedir ".") (name "build-properties") (default "")) |
| 7002 | (property (@ (name "project.name") (value "bsf"))) |
| 7003 | (property (@ (name "source.level") (value "1.5"))) |
| 7004 | (property (@ (name "build.lib") (value "build/jar"))) |
| 7005 | (property (@ (name "src.dir") (value "src"))) |
| 7006 | (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) |
| 7007 | (property (@ (name "build.tests") (value "build/test-classes"))) |
| 7008 | (property (@ (name "build.dest") (value "build/classes")))) |
| 7009 | port))) |
| 7010 | #t)) |
| 7011 | (replace 'install (install-jars "build"))))) |
| 7012 | (native-inputs |
| 7013 | (list java-junit)) |
| 7014 | (inputs |
| 7015 | (list java-commons-logging-minimal)) |
| 7016 | (home-page "https://commons.apache.org/proper/commons-bsf") |
| 7017 | (synopsis "Bean Scripting Framework") |
| 7018 | (description "The Bean Scripting Framework (BSF) is a set of Java classes |
| 7019 | which provides scripting language support within Java applications, and access |
| 7020 | to Java objects and methods from scripting languages. BSF allows one to write |
| 7021 | JSPs in languages other than Java while providing access to the Java class |
| 7022 | library. In addition, BSF permits any Java application to be implemented in |
| 7023 | part (or dynamically extended) by a language that is embedded within it. This |
| 7024 | is achieved by providing an API that permits calling scripting language engines |
| 7025 | from within Java, as well as an object registry that exposes Java objects to |
| 7026 | these scripting language engines.") |
| 7027 | (license license:asl2.0))) |
| 7028 | |
| 7029 | (define-public java-commons-jxpath |
| 7030 | (package |
| 7031 | (name "java-commons-jxpath") |
| 7032 | (version "1.3") |
| 7033 | (source (origin |
| 7034 | (method url-fetch) |
| 7035 | (uri (string-append "mirror://apache/commons/jxpath/source/" |
| 7036 | "commons-jxpath-" version "-src.tar.gz")) |
| 7037 | (sha256 |
| 7038 | (base32 |
| 7039 | "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs")))) |
| 7040 | (build-system ant-build-system) |
| 7041 | (arguments |
| 7042 | `(#:jar-name "commons-jxpath.jar" |
| 7043 | ;; tests require more dependencies, including mockrunner which depends on old software |
| 7044 | #:tests? #f |
| 7045 | #:source-dir "src/java")) |
| 7046 | (inputs |
| 7047 | `(("servlet" ,java-classpathx-servletapi) |
| 7048 | ("java-jdom" ,java-jdom) |
| 7049 | ("java-commons-beanutils" ,java-commons-beanutils))) |
| 7050 | (native-inputs |
| 7051 | (list java-junit)) |
| 7052 | (home-page "https://commons.apache.org/jxpath/") |
| 7053 | (synopsis "Simple interpreter of an expression language called XPath") |
| 7054 | (description "The org.apache.commons.jxpath package defines a simple |
| 7055 | interpreter of an expression language called XPath. JXPath applies XPath |
| 7056 | expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet |
| 7057 | contexts, DOM etc, including mixtures thereof.") |
| 7058 | (license license:asl2.0))) |
| 7059 | |
| 7060 | (define-public java-commons-pool |
| 7061 | (package |
| 7062 | (name "java-commons-pool") |
| 7063 | (version "2.6.2") |
| 7064 | (source (origin |
| 7065 | (method url-fetch) |
| 7066 | (uri (string-append "mirror://apache/commons/pool/source/" |
| 7067 | "commons-pool2-" version "-src.tar.gz")) |
| 7068 | (sha256 |
| 7069 | (base32 |
| 7070 | "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6")))) |
| 7071 | (arguments |
| 7072 | `(#:jar-name "common-pool.jar" |
| 7073 | #:source-dir "src/main/java" |
| 7074 | #:test-exclude |
| 7075 | (list "**/PerformanceTest.java"))) |
| 7076 | (build-system ant-build-system) |
| 7077 | (inputs |
| 7078 | (list java-cglib)) |
| 7079 | (native-inputs |
| 7080 | (list java-junit java-hamcrest-core java-asm java-objenesis)) |
| 7081 | (home-page "https://commons.apache.org/proper/commons-pool/") |
| 7082 | (synopsis "Object-pooling API in Java") |
| 7083 | (description "The commons-pool package provides an object-pooling API |
| 7084 | and a number of object pool implementations. This package defines a |
| 7085 | handful of pooling interfaces and some base classes that may be useful when |
| 7086 | creating new pool implementations.") |
| 7087 | (license license:asl2.0))) |
| 7088 | |
| 7089 | (define-public java-commons-dbcp |
| 7090 | (package |
| 7091 | (name "java-commons-dbcp") |
| 7092 | (version "2.6.0") |
| 7093 | (source (origin |
| 7094 | (method url-fetch) |
| 7095 | (uri (string-append "mirror://apache/commons/dbcp/source/" |
| 7096 | "commons-dbcp2-" version "-src.tar.gz")) |
| 7097 | (sha256 |
| 7098 | (base32 |
| 7099 | "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc")))) |
| 7100 | (arguments |
| 7101 | `(#:source-dir "src/main/java" |
| 7102 | #:jar-name "java-commons-dbcp.jar" |
| 7103 | #:tests? #f)); requires apache-geronimo |
| 7104 | (inputs |
| 7105 | `(("java-commons-pool" ,java-commons-pool) |
| 7106 | ("java-commons-logging" ,java-commons-logging-minimal) |
| 7107 | ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec))) |
| 7108 | (native-inputs |
| 7109 | (list java-junit)) |
| 7110 | (build-system ant-build-system) |
| 7111 | (home-page "https://commons.apache.org/proper/commons-dbcp/") |
| 7112 | (synopsis "Database Connection Pool for Java") |
| 7113 | (description "Commons-dbcp allows you to share a pool of database |
| 7114 | connections between users. Creating a new connection for each user can be |
| 7115 | time consuming and even unfeasible when the number of simultaneous users is |
| 7116 | very large. This package provides a way to share a poole of connections to |
| 7117 | reduce that load.") |
| 7118 | (license license:asl2.0))) |
| 7119 | |
| 7120 | (define-public java-commons-jcs |
| 7121 | (package |
| 7122 | (name "java-commons-jcs") |
| 7123 | (version "3.1") |
| 7124 | (source (origin |
| 7125 | (method url-fetch) |
| 7126 | (uri (string-append "mirror://apache/commons/jcs/source/" |
| 7127 | "commons-jcs3-dist-" version "-src.tar.gz")) |
| 7128 | (sha256 |
| 7129 | (base32 |
| 7130 | "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac")))) |
| 7131 | (build-system ant-build-system) |
| 7132 | (arguments |
| 7133 | `(#:jar-name "commons-jcs.jar" |
| 7134 | #:source-dir "commons-jcs-core/src/main/java" |
| 7135 | #:test-dir "commons-jcs-core/src/test" |
| 7136 | #:tests? #f; requires hsqldb |
| 7137 | #:phases |
| 7138 | (modify-phases %standard-phases |
| 7139 | (add-before 'build 'copy-resources |
| 7140 | (lambda _ |
| 7141 | (copy-recursively "commons-jcs-core/src/main/resources" |
| 7142 | "build/classes")))))) |
| 7143 | (propagated-inputs |
| 7144 | (list java-classpathx-servletapi |
| 7145 | java-commons-dbcp |
| 7146 | java-httpcomponents-httpclient |
| 7147 | java-httpcomponents-httpcore |
| 7148 | java-log4j-api)) |
| 7149 | (native-inputs |
| 7150 | (list java-junit)) |
| 7151 | (home-page "https://commons.apache.org/proper/commons-jcs/") |
| 7152 | (synopsis "Distributed caching system in Java") |
| 7153 | (description "JCS is a distributed caching system written in Java. It |
| 7154 | is intended to speed up applications by providing a means to manage cached |
| 7155 | data of various dynamic natures. Like any caching system, JCS is most useful |
| 7156 | for high read, low put applications. Latency times drop sharply and |
| 7157 | bottlenecks move away from the database in an effectively cached system.") |
| 7158 | (license license:asl2.0))) |
| 7159 | |
| 7160 | (define-public java-jsr250 |
| 7161 | (package |
| 7162 | (name "java-jsr250") |
| 7163 | (version "1.3") |
| 7164 | (source (origin |
| 7165 | (method git-fetch) |
| 7166 | (uri (git-reference |
| 7167 | (url "https://github.com/javaee/javax.annotation") |
| 7168 | (commit version))) |
| 7169 | (file-name (git-file-name name version)) |
| 7170 | (sha256 |
| 7171 | (base32 |
| 7172 | "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0")))) |
| 7173 | (build-system ant-build-system) |
| 7174 | (arguments |
| 7175 | `(#:tests? #f ; no tests included |
| 7176 | #:jdk ,icedtea-8 |
| 7177 | #:jar-name "jsr250.jar" |
| 7178 | #:phases |
| 7179 | (modify-phases %standard-phases |
| 7180 | (replace 'install |
| 7181 | (install-from-pom "pom.xml"))))) |
| 7182 | (propagated-inputs (list java-jvnet-parent-pom-3)) |
| 7183 | (home-page "https://jcp.org/en/jsr/detail?id=250") |
| 7184 | (synopsis "Security-related annotations") |
| 7185 | (description "This package provides annotations for security. It provides |
| 7186 | packages in the @code{javax.annotation} and @code{javax.annotation.security} |
| 7187 | namespaces.") |
| 7188 | ;; either cddl or gpl2 only, with classpath exception |
| 7189 | (license (list license:cddl1.0 |
| 7190 | license:gpl2)))) |
| 7191 | |
| 7192 | (define-public java-jsr305 |
| 7193 | (package |
| 7194 | (name "java-jsr305") |
| 7195 | (version "3.0.1") |
| 7196 | (source (origin |
| 7197 | (method url-fetch) |
| 7198 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7199 | "com/google/code/findbugs/" |
| 7200 | "jsr305/" version "/jsr305-" |
| 7201 | version "-sources.jar")) |
| 7202 | (sha256 |
| 7203 | (base32 |
| 7204 | "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n")))) |
| 7205 | (build-system ant-build-system) |
| 7206 | (arguments |
| 7207 | `(#:tests? #f ; no tests included |
| 7208 | #:jar-name "jsr305.jar" |
| 7209 | #:phases |
| 7210 | (modify-phases %standard-phases |
| 7211 | (add-before 'install 'create-pom |
| 7212 | (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version)) |
| 7213 | (replace 'install |
| 7214 | (install-from-pom "pom.xml"))))) |
| 7215 | (home-page "https://findbugs.sourceforge.net/") |
| 7216 | (synopsis "Annotations for the static analyzer called findbugs") |
| 7217 | (description "This package provides annotations for the findbugs package. |
| 7218 | It provides packages in the @code{javax.annotations} namespace.") |
| 7219 | (license license:asl2.0))) |
| 7220 | |
| 7221 | (define-public java-error-prone-annotations |
| 7222 | (package |
| 7223 | (name "java-error-prone-annotations") |
| 7224 | (version "2.18.0") |
| 7225 | (source (origin |
| 7226 | (method git-fetch) |
| 7227 | (uri (git-reference |
| 7228 | (url "https://github.com/google/error-prone") |
| 7229 | (commit (string-append "v" version)))) |
| 7230 | (file-name (git-file-name "java-error-prone" version)) |
| 7231 | (sha256 |
| 7232 | (base32 |
| 7233 | "19sqsz0b308rhadr3ff10azdbqjq37nvrn9c06224dwpxap0931f")))) |
| 7234 | (build-system ant-build-system) |
| 7235 | (arguments |
| 7236 | `(#:tests? #f; no tests |
| 7237 | #:jar-name (string-append ,name "-" ,version ".jar") |
| 7238 | #:source-dir "annotations/src/main/java" |
| 7239 | #:test-dir "annotations/src/altest" |
| 7240 | #:phases |
| 7241 | (modify-phases %standard-phases |
| 7242 | (replace 'install (install-from-pom "annotations/pom.xml"))))) |
| 7243 | (propagated-inputs (list java-error-prone-parent-pom java-jsr305)) |
| 7244 | (home-page "https://errorprone.info") |
| 7245 | (synopsis "Java static analyzer at compile-time") |
| 7246 | (description "Error Prone is a static analysis tool for Java that catches |
| 7247 | common programming mistakes at compile-time. This package contains annotations |
| 7248 | used by programmers to guide the static analysis.") |
| 7249 | (license license:asl2.0))) |
| 7250 | |
| 7251 | (define java-error-prone-parent-pom |
| 7252 | (package |
| 7253 | (inherit java-error-prone-annotations) |
| 7254 | (name "java-error-prone-parent-pom") |
| 7255 | (arguments |
| 7256 | `(#:tests? #f |
| 7257 | #:phases |
| 7258 | (modify-phases %standard-phases |
| 7259 | (delete 'configure) |
| 7260 | (delete 'build) |
| 7261 | (replace 'install |
| 7262 | (install-pom-file "pom.xml"))))) |
| 7263 | (propagated-inputs '()))) |
| 7264 | |
| 7265 | (define-public java-guava |
| 7266 | (package |
| 7267 | (name "java-guava") |
| 7268 | (version "31.1") |
| 7269 | (source (origin |
| 7270 | (method git-fetch) |
| 7271 | (uri (git-reference |
| 7272 | (url "https://github.com/google/guava/") |
| 7273 | (commit (string-append "v" version)))) |
| 7274 | (file-name (git-file-name name version)) |
| 7275 | (sha256 |
| 7276 | (base32 |
| 7277 | "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp")) |
| 7278 | (patches |
| 7279 | (search-patches "java-guava-remove-annotation-deps.patch")))) |
| 7280 | (build-system ant-build-system) |
| 7281 | (arguments |
| 7282 | `(#:tests? #f ; no tests included |
| 7283 | #:jar-name "guava.jar" |
| 7284 | #:source-dir "guava/src" |
| 7285 | #:phases |
| 7286 | (modify-phases %standard-phases |
| 7287 | (add-after 'unpack 'trim-sources |
| 7288 | (lambda _ |
| 7289 | (with-directory-excursion "guava/src/com/google/common" |
| 7290 | ;; Remove annotations to avoid extra dependencies: |
| 7291 | ;; * "j2objc" annotations are used when converting Java to |
| 7292 | ;; Objective C; |
| 7293 | ;; * "IgnoreJRERequirement" is used for Android. |
| 7294 | ;; * "Nullable" is used to catch NPE at build time. |
| 7295 | (substitute* (find-files "." "\\.java$") |
| 7296 | (("import com.google.j2objc.*") "") |
| 7297 | (("import org.checkerframework.checker.*") "") |
| 7298 | (("@ReflectionSupport.*") "") |
| 7299 | (("@WeakOuter") "") |
| 7300 | (("@RetainedWith") "") |
| 7301 | (("@Weak") "") |
| 7302 | (("@J2ObjCIncompatible") "") |
| 7303 | (("@IgnoreJRERequirement") "") |
| 7304 | (("@Nullable") ""))))) |
| 7305 | ;; The listenablefuture:9999.0-empty-to-avoid-conflict-with-guava artifact |
| 7306 | ;; is intentionally empty. It exists to solve a dependency conflict: |
| 7307 | ;; ListenableFuture class lives in guava, but was also published separately |
| 7308 | ;; as listenablefuture:1.0 for Android. When both are on classpath, there's |
| 7309 | ;; a duplicate class conflict. By publishing an empty stub at version 9999.0, |
| 7310 | ;; Maven's "highest version wins" resolution picks this empty jar over 1.0, |
| 7311 | ;; and the actual class comes only from guava itself. |
| 7312 | ;; |
| 7313 | ;; The upstream source only contains pom.xml (no code to compile), but Maven |
| 7314 | ;; requires a jar file to exist in the repository. We create a minimal valid |
| 7315 | ;; jar containing only a manifest. |
| 7316 | ;; |
| 7317 | ;; The upstream pom references guava-parent:26.0-android, but we only have |
| 7318 | ;; guava-parent:31.1. Since the stub doesn't need anything from the parent, |
| 7319 | ;; we install a self-contained pom without the parent reference. |
| 7320 | (add-before 'install 'install-listenablefuture-stub |
| 7321 | (lambda* (#:key outputs #:allow-other-keys) |
| 7322 | (let* ((out (assoc-ref outputs "out")) |
| 7323 | (version "9999.0-empty-to-avoid-conflict-with-guava") |
| 7324 | (artifact "listenablefuture") |
| 7325 | (group "com/google/guava") |
| 7326 | (repository (string-append out "/lib/m2/" group "/" |
| 7327 | artifact "/" version "/")) |
| 7328 | (pom-name (string-append repository artifact "-" version ".pom")) |
| 7329 | (jar-name (string-append repository artifact "-" version ".jar")) |
| 7330 | (tmp-dir (mkdtemp "empty-jar.XXXXXX"))) |
| 7331 | (mkdir-p repository) |
| 7332 | ;; Install a self-contained pom without the parent reference |
| 7333 | (with-output-to-file pom-name |
| 7334 | (lambda () |
| 7335 | (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") |
| 7336 | (display "<project xmlns=\"http://maven.apache.org/POM/4.0.0\">\n") |
| 7337 | (display " <modelVersion>4.0.0</modelVersion>\n") |
| 7338 | (display " <groupId>com.google.guava</groupId>\n") |
| 7339 | (display " <artifactId>listenablefuture</artifactId>\n") |
| 7340 | (display " <version>") |
| 7341 | (display version) |
| 7342 | (display "</version>\n") |
| 7343 | (display " <name>Guava ListenableFuture only</name>\n") |
| 7344 | (display "</project>\n"))) |
| 7345 | ;; Create a minimal valid jar with just a manifest |
| 7346 | (mkdir-p (string-append tmp-dir "/META-INF")) |
| 7347 | (with-output-to-file (string-append tmp-dir "/META-INF/MANIFEST.MF") |
| 7348 | (lambda () |
| 7349 | (display "Manifest-Version: 1.0\n"))) |
| 7350 | (invoke "jar" "cf" jar-name "-C" tmp-dir ".")))) |
| 7351 | (replace 'install (install-from-pom "guava/pom.xml"))))) |
| 7352 | (inputs |
| 7353 | (list java-error-prone-annotations java-jsr305)) |
| 7354 | (propagated-inputs |
| 7355 | (list java-guava-futures-failureaccess java-guava-parent-pom)) |
| 7356 | (home-page "https://github.com/google/guava") |
| 7357 | (synopsis "Google core libraries for Java") |
| 7358 | (description "Guava is a set of core libraries that includes new |
| 7359 | collection types (such as multimap and multiset), immutable collections, a |
| 7360 | graph library, functional types, an in-memory cache, and APIs/utilities for |
| 7361 | concurrency, I/O, hashing, primitives, reflection, string processing, and much |
| 7362 | more!") |
| 7363 | (license license:asl2.0))) |
| 7364 | |
| 7365 | (define java-guava-parent-pom |
| 7366 | (package |
| 7367 | (inherit java-guava) |
| 7368 | (name "java-guava-parent-pom") |
| 7369 | (arguments |
| 7370 | `(#:tests? #f |
| 7371 | #:phases |
| 7372 | (modify-phases %standard-phases |
| 7373 | (delete 'configure) |
| 7374 | (delete 'build) |
| 7375 | (replace 'install |
| 7376 | (install-pom-file "pom.xml"))))) |
| 7377 | (propagated-inputs |
| 7378 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) |
| 7379 | |
| 7380 | (define-public java-guava-futures-failureaccess |
| 7381 | (package |
| 7382 | (inherit java-guava) |
| 7383 | (name "java-guava-futures-failureaccess") |
| 7384 | (arguments |
| 7385 | `(#:tests? #f; no tests |
| 7386 | #:jar-name "guava-futures-failureaccess.jar" |
| 7387 | #:source-dir "futures/failureaccess/src" |
| 7388 | #:phases |
| 7389 | (modify-phases %standard-phases |
| 7390 | (replace 'install |
| 7391 | (install-from-pom "futures/failureaccess/pom.xml"))))) |
| 7392 | (propagated-inputs |
| 7393 | (list java-guava-parent-pom |
| 7394 | java-sonatype-oss-parent-pom-7)))) |
| 7395 | |
| 7396 | ;; The java-commons-logging package provides adapters to many different |
| 7397 | ;; logging frameworks. To avoid an excessive dependency graph we try to build |
| 7398 | ;; it with only a minimal set of adapters. |
| 7399 | (define-public java-commons-logging-minimal |
| 7400 | (package |
| 7401 | (name "java-commons-logging-minimal") |
| 7402 | (version "1.2") |
| 7403 | (source (origin |
| 7404 | (method url-fetch) |
| 7405 | (uri (string-append "mirror://apache/commons/logging/source/" |
| 7406 | "commons-logging-" version "-src.tar.gz")) |
| 7407 | (sha256 |
| 7408 | (base32 |
| 7409 | "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9")))) |
| 7410 | (build-system ant-build-system) |
| 7411 | (arguments |
| 7412 | `(#:tests? #f ; avoid dependency on logging frameworks |
| 7413 | #:jar-name "commons-logging.jar" |
| 7414 | #:phases |
| 7415 | (modify-phases %standard-phases |
| 7416 | (add-after 'unpack 'delete-adapters-and-tests |
| 7417 | (lambda _ |
| 7418 | ;; Delete all adapters except for NoOpLog, SimpleLog, and |
| 7419 | ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl |
| 7420 | ;; is used by applications; SimpleLog is the only actually usable |
| 7421 | ;; implementation that does not depend on another logging |
| 7422 | ;; framework. |
| 7423 | (for-each |
| 7424 | (lambda (file) |
| 7425 | (delete-file (string-append |
| 7426 | "src/main/java/org/apache/commons/logging/impl/" file))) |
| 7427 | (list "Jdk13LumberjackLogger.java" |
| 7428 | "WeakHashtable.java" |
| 7429 | "Log4JLogger.java" |
| 7430 | "ServletContextCleaner.java" |
| 7431 | "Jdk14Logger.java" |
| 7432 | "AvalonLogger.java" |
| 7433 | "LogKitLogger.java")) |
| 7434 | (delete-file-recursively "src/test") |
| 7435 | #t)) |
| 7436 | (replace 'install |
| 7437 | (install-from-pom "pom.xml"))))) |
| 7438 | (propagated-inputs |
| 7439 | (list apache-commons-parent-pom-34)) |
| 7440 | (home-page "https://commons.apache.org/logging/") |
| 7441 | (synopsis "Common API for logging implementations") |
| 7442 | (description "The Logging package is a thin bridge between different |
| 7443 | logging implementations. A library that uses the commons-logging API can be |
| 7444 | used with any logging implementation at runtime.") |
| 7445 | (license license:asl2.0))) |
| 7446 | |
| 7447 | ;; This is the last release of the 1.x series. |
| 7448 | (define-public java-mockito-1 |
| 7449 | (package |
| 7450 | (name "java-mockito") |
| 7451 | (version "1.10.19") |
| 7452 | (source (origin |
| 7453 | (method url-fetch) |
| 7454 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7455 | "org/mockito/mockito-core/" version |
| 7456 | "/mockito-core-" version "-sources.jar")) |
| 7457 | (sha256 |
| 7458 | (base32 |
| 7459 | "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc")))) |
| 7460 | (build-system ant-build-system) |
| 7461 | (arguments |
| 7462 | `(#:jar-name "mockito.jar" |
| 7463 | #:tests? #f ; no tests included |
| 7464 | ;; FIXME: patch-and-repack does not support jars, so we have to apply |
| 7465 | ;; patches in build phases. |
| 7466 | #:phases |
| 7467 | (modify-phases %standard-phases |
| 7468 | ;; Mockito was developed against a different version of hamcrest, |
| 7469 | ;; which does not require matcher implementations to provide an |
| 7470 | ;; implementation of the "describeMismatch" method. We add this |
| 7471 | ;; simple definition to pass the build with our version of hamcrest. |
| 7472 | (add-after 'unpack 'fix-hamcrest-build-error |
| 7473 | (lambda _ |
| 7474 | (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java" |
| 7475 | (("public Matcher getActualMatcher\\(\\) .*" line) |
| 7476 | (string-append " |
| 7477 | public void describeMismatch(Object item, Description description) { |
| 7478 | actualMatcher.describeMismatch(item, description); |
| 7479 | }" |
| 7480 | line))) |
| 7481 | #t)) |
| 7482 | ;; Mockito bundles cglib. We have a cglib package, so let's use |
| 7483 | ;; that instead. |
| 7484 | (add-after 'unpack 'use-system-libraries |
| 7485 | (lambda _ |
| 7486 | (with-directory-excursion "src/org/mockito/internal/creation/cglib" |
| 7487 | (substitute* '("CGLIBHacker.java" |
| 7488 | "CglibMockMaker.java" |
| 7489 | "ClassImposterizer.java" |
| 7490 | "DelegatingMockitoMethodProxy.java" |
| 7491 | "MethodInterceptorFilter.java" |
| 7492 | "MockitoNamingPolicy.java" |
| 7493 | "SerializableMockitoMethodProxy.java" |
| 7494 | "SerializableNoOp.java") |
| 7495 | (("import org.mockito.cglib") "import net.sf.cglib"))) |
| 7496 | #t))))) |
| 7497 | (inputs |
| 7498 | (list java-junit java-objenesis java-cglib java-hamcrest-core)) |
| 7499 | (home-page "http://mockito.org") |
| 7500 | (synopsis "Mockito is a mock library for Java") |
| 7501 | (description "Mockito is a mocking library for Java which lets you write |
| 7502 | tests with a clean and simple API. It generates mocks using reflection, and |
| 7503 | it records all mock invocations, including methods arguments.") |
| 7504 | (license license:asl2.0))) |
| 7505 | |
| 7506 | (define-public java-httpcomponents-parent-pom |
| 7507 | (package |
| 7508 | (name "java-httpcomponents-parent-pom") |
| 7509 | (version "11") |
| 7510 | (source (origin |
| 7511 | (method url-fetch) |
| 7512 | (uri (string-append "https://repo.maven.apache.org/maven2/" |
| 7513 | "org/apache/httpcomponents/httpcomponents-parent/" |
| 7514 | version "/httpcomponents-parent-" version ".pom")) |
| 7515 | (sha256 |
| 7516 | (base32 |
| 7517 | "1ank6bjz9w9b56p4695g60nv1rr07vvgygp4gq60fmaw25xzh0d9")))) |
| 7518 | (build-system ant-build-system) |
| 7519 | (arguments |
| 7520 | `(#:tests? #f |
| 7521 | #:phases |
| 7522 | (modify-phases %standard-phases |
| 7523 | (delete 'configure) |
| 7524 | (delete 'build) |
| 7525 | (replace 'install |
| 7526 | (install-pom-file "httpcomponents-parent-11.pom"))))) |
| 7527 | (propagated-inputs |
| 7528 | (list apache-parent-pom-21)) |
| 7529 | (home-page "https://hc.apache.org/") |
| 7530 | (synopsis "Parent POM for Apache HttpComponents") |
| 7531 | (description "This package contains the parent POM for Apache HttpComponents |
| 7532 | projects.") |
| 7533 | (license license:asl2.0))) |
| 7534 | |
| 7535 | (define-public java-httpcomponents-project-pom |
| 7536 | (package |
| 7537 | (name "java-httpcomponents-project-pom") |
| 7538 | (version "7") |
| 7539 | (source (origin |
| 7540 | (method url-fetch) |
| 7541 | (uri (string-append "https://repo.maven.apache.org/maven2/" |
| 7542 | "org/apache/httpcomponents/project/" |
| 7543 | version "/project-" version ".pom")) |
| 7544 | (sha256 |
| 7545 | (base32 |
| 7546 | "1hs8m8cgyypd6vb882zjyns58nhzrkm7cpbb0kg5i9amhm1blvix")))) |
| 7547 | (build-system ant-build-system) |
| 7548 | (arguments |
| 7549 | `(#:tests? #f |
| 7550 | #:phases |
| 7551 | (modify-phases %standard-phases |
| 7552 | (delete 'configure) |
| 7553 | (delete 'build) |
| 7554 | (replace 'install |
| 7555 | (install-pom-file (string-append "project-" ,version ".pom")))))) |
| 7556 | (propagated-inputs |
| 7557 | (list apache-parent-pom-13)) |
| 7558 | (home-page "https://hc.apache.org/") |
| 7559 | (synopsis "Parent POM for Apache HttpComponents (legacy)") |
| 7560 | (description "This package contains the legacy parent POM for Apache |
| 7561 | HttpComponents projects.") |
| 7562 | (license license:asl2.0))) |
| 7563 | |
| 7564 | (define-public java-httpcomponents-core-parent-pom |
| 7565 | (package |
| 7566 | (name "java-httpcomponents-core-parent-pom") |
| 7567 | (version "4.4.6") |
| 7568 | (source (origin |
| 7569 | (method url-fetch) |
| 7570 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" |
| 7571 | "source/httpcomponents-core-" |
| 7572 | version "-src.tar.gz")) |
| 7573 | (sha256 |
| 7574 | (base32 |
| 7575 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) |
| 7576 | (build-system ant-build-system) |
| 7577 | (arguments |
| 7578 | `(#:tests? #f |
| 7579 | #:phases |
| 7580 | (modify-phases %standard-phases |
| 7581 | (delete 'configure) |
| 7582 | (delete 'build) |
| 7583 | (replace 'install |
| 7584 | (install-pom-file "pom.xml"))))) |
| 7585 | (propagated-inputs |
| 7586 | (list java-httpcomponents-project-pom)) |
| 7587 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") |
| 7588 | (synopsis "Parent POM for Apache HttpComponents Core") |
| 7589 | (description "This package contains the parent POM for Apache HttpComponents |
| 7590 | Core modules.") |
| 7591 | (license license:asl2.0))) |
| 7592 | |
| 7593 | (define-public java-httpcomponents-httpcore |
| 7594 | (package |
| 7595 | (name "java-httpcomponents-httpcore") |
| 7596 | (version "4.4.6") |
| 7597 | (source (origin |
| 7598 | (method url-fetch) |
| 7599 | (uri (string-append "mirror://apache//httpcomponents/httpcore/" |
| 7600 | "source/httpcomponents-core-" |
| 7601 | version "-src.tar.gz")) |
| 7602 | (sha256 |
| 7603 | (base32 |
| 7604 | "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy")))) |
| 7605 | (build-system ant-build-system) |
| 7606 | (arguments |
| 7607 | `(#:jar-name "httpcomponents-httpcore.jar" |
| 7608 | #:phases |
| 7609 | (modify-phases %standard-phases |
| 7610 | (add-after 'unpack 'chdir |
| 7611 | (lambda _ (chdir "httpcore") #t)) |
| 7612 | (replace 'install |
| 7613 | (install-from-pom "pom.xml"))))) |
| 7614 | (propagated-inputs |
| 7615 | (list java-httpcomponents-core-parent-pom |
| 7616 | java-commons-logging-minimal |
| 7617 | java-commons-lang3)) |
| 7618 | (native-inputs |
| 7619 | (list java-junit java-mockito-1)) |
| 7620 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") |
| 7621 | (synopsis "Low level HTTP transport components") |
| 7622 | (description "HttpCore is a set of low level HTTP transport components |
| 7623 | that can be used to build custom client and server side HTTP services with a |
| 7624 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based |
| 7625 | on the classic Java I/O and non-blocking, event driven I/O model based on Java |
| 7626 | NIO. |
| 7627 | |
| 7628 | This package provides the blocking I/O model library.") |
| 7629 | (license license:asl2.0))) |
| 7630 | |
| 7631 | (define-public java-httpcomponents-httpcore-nio |
| 7632 | (package (inherit java-httpcomponents-httpcore) |
| 7633 | (name "java-httpcomponents-httpcore-nio") |
| 7634 | (arguments |
| 7635 | `(#:jar-name "httpcomponents-httpcore-nio.jar" |
| 7636 | #:phases |
| 7637 | (modify-phases %standard-phases |
| 7638 | (add-after 'unpack 'chdir |
| 7639 | (lambda _ (chdir "httpcore-nio") #t))))) |
| 7640 | (inputs |
| 7641 | (modify-inputs (package-inputs java-httpcomponents-httpcore) |
| 7642 | (prepend java-httpcomponents-httpcore java-hamcrest-core))) |
| 7643 | (description "HttpCore is a set of low level HTTP transport components |
| 7644 | that can be used to build custom client and server side HTTP services with a |
| 7645 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based |
| 7646 | on the classic Java I/O and non-blocking, event driven I/O model based on Java |
| 7647 | NIO. |
| 7648 | |
| 7649 | This package provides the non-blocking I/O model library based on Java |
| 7650 | NIO."))) |
| 7651 | |
| 7652 | (define-public java-httpcomponents-httpcore-ab |
| 7653 | (package (inherit java-httpcomponents-httpcore) |
| 7654 | (name "java-httpcomponents-httpcore-ab") |
| 7655 | (arguments |
| 7656 | `(#:jar-name "httpcomponents-httpcore-ab.jar" |
| 7657 | #:phases |
| 7658 | (modify-phases %standard-phases |
| 7659 | (add-after 'unpack 'chdir |
| 7660 | (lambda _ (chdir "httpcore-ab") #t))))) |
| 7661 | (inputs |
| 7662 | (modify-inputs (package-inputs java-httpcomponents-httpcore) |
| 7663 | (prepend java-httpcomponents-httpcore java-commons-cli |
| 7664 | java-hamcrest-core))) |
| 7665 | (synopsis "Apache HttpCore benchmarking tool") |
| 7666 | (description "This package provides the HttpCore benchmarking tool. It is |
| 7667 | an Apache AB clone based on HttpCore."))) |
| 7668 | |
| 7669 | (define-public java-httpcomponents-httpcore-osgi |
| 7670 | (package (inherit java-httpcomponents-httpcore) |
| 7671 | (name "java-httpcomponents-httpcore-osgi") |
| 7672 | (arguments |
| 7673 | `(#:jar-name "httpcomponents-httpcore-osgi.jar" |
| 7674 | #:phases |
| 7675 | (modify-phases %standard-phases |
| 7676 | (add-after 'unpack 'chdir |
| 7677 | (lambda _ (chdir "httpcore-osgi")))))) |
| 7678 | (inputs |
| 7679 | (modify-inputs (package-inputs java-httpcomponents-httpcore) |
| 7680 | (prepend java-httpcomponents-httpcore |
| 7681 | java-httpcomponents-httpcore-nio |
| 7682 | java-hamcrest-core))) |
| 7683 | (native-inputs (list java-ops4j-pax-exam-core |
| 7684 | java-ops4j-pax-exam-core-junit |
| 7685 | java-ops4j-pax-exam-core-spi |
| 7686 | java-junit)) |
| 7687 | (description "HttpCore is a set of low level HTTP transport components |
| 7688 | that can be used to build custom client and server side HTTP services with a |
| 7689 | minimal footprint. HttpCore supports two I/O models: blocking I/O model based |
| 7690 | on the classic Java I/O and non-blocking, event driven I/O model based on Java |
| 7691 | NIO. |
| 7692 | |
| 7693 | This package provides... some tests."))) |
| 7694 | |
| 7695 | (define-public java-httpcomponents-client-parent-pom |
| 7696 | (package |
| 7697 | (name "java-httpcomponents-client-parent-pom") |
| 7698 | (version "4.5.12") |
| 7699 | (source (origin |
| 7700 | (method url-fetch) |
| 7701 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" |
| 7702 | "source/httpcomponents-client-" |
| 7703 | version "-src.tar.gz")) |
| 7704 | (sha256 |
| 7705 | (base32 |
| 7706 | "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb")))) |
| 7707 | (build-system ant-build-system) |
| 7708 | (arguments |
| 7709 | `(#:tests? #f |
| 7710 | #:phases |
| 7711 | (modify-phases %standard-phases |
| 7712 | (delete 'configure) |
| 7713 | (delete 'build) |
| 7714 | (replace 'install |
| 7715 | (install-pom-file "pom.xml"))))) |
| 7716 | (propagated-inputs |
| 7717 | (list java-httpcomponents-parent-pom)) |
| 7718 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") |
| 7719 | (synopsis "Parent POM for Apache HttpComponents Client") |
| 7720 | (description "This package contains the parent POM for Apache HttpComponents |
| 7721 | Client modules.") |
| 7722 | (license license:asl2.0))) |
| 7723 | |
| 7724 | (define-public java-httpcomponents-httpclient |
| 7725 | (package |
| 7726 | (name "java-httpcomponents-httpclient") |
| 7727 | (version "4.5.12") |
| 7728 | (source (origin |
| 7729 | (method url-fetch) |
| 7730 | (uri (string-append "mirror://apache/httpcomponents/httpclient/" |
| 7731 | "source/httpcomponents-client-" |
| 7732 | version "-src.tar.gz")) |
| 7733 | (sha256 |
| 7734 | (base32 |
| 7735 | "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb")))) |
| 7736 | (build-system ant-build-system) |
| 7737 | (arguments |
| 7738 | `(#:jar-name "httpcomponents-httpclient.jar" |
| 7739 | #:phases |
| 7740 | (modify-phases %standard-phases |
| 7741 | (add-after 'unpack 'chdir |
| 7742 | (lambda _ (chdir "httpclient") #t)) |
| 7743 | (replace 'install |
| 7744 | (install-from-pom "pom.xml"))))) |
| 7745 | (propagated-inputs |
| 7746 | (list java-httpcomponents-client-parent-pom |
| 7747 | java-commons-logging-minimal |
| 7748 | java-commons-codec |
| 7749 | java-httpcomponents-httpcore)) |
| 7750 | (native-inputs |
| 7751 | (list java-hamcrest-core |
| 7752 | java-mockito-1 |
| 7753 | java-junit)) |
| 7754 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") |
| 7755 | (synopsis "HTTP client library for Java") |
| 7756 | (description "Although the @code{java.net} package provides basic |
| 7757 | functionality for accessing resources via HTTP, it doesn't provide the full |
| 7758 | flexibility or functionality needed by many applications. @code{HttpClient} |
| 7759 | seeks to fill this void by providing an efficient, up-to-date, and |
| 7760 | feature-rich package implementing the client side of the most recent HTTP |
| 7761 | standards and recommendations.") |
| 7762 | (license license:asl2.0))) |
| 7763 | |
| 7764 | (define-public java-httpcomponents-httpclient-cache |
| 7765 | (package (inherit java-httpcomponents-httpclient) |
| 7766 | (name "java-httpcomponents-httpclient-cache") |
| 7767 | (arguments |
| 7768 | `(#:jar-name "httpcomponents-httpclient-cache.jar" |
| 7769 | #:source-dir "src/main/java" |
| 7770 | #:test-dir "src/test" |
| 7771 | #:tests? #f; tests are broken with current cglib. |
| 7772 | #:phases |
| 7773 | (modify-phases %standard-phases |
| 7774 | (add-after 'unpack 'delete-unused-impls |
| 7775 | (lambda _ |
| 7776 | (for-each |
| 7777 | delete-file-recursively |
| 7778 | '("src/main/java/org/apache/http/impl/client/cache/ehcache/" |
| 7779 | "src/main/java/org/apache/http/impl/client/cache/memcached/" |
| 7780 | "src/test/java/org/apache/http/impl/client/cache/ehcache/" |
| 7781 | "src/test/java/org/apache/http/impl/client/cache/memcached/")))) |
| 7782 | (add-after 'unpack 'chdir |
| 7783 | (lambda _ (chdir "httpclient-cache")))))) |
| 7784 | (inputs |
| 7785 | (modify-inputs (package-inputs java-httpcomponents-httpclient) |
| 7786 | (prepend java-httpcomponents-httpclient |
| 7787 | java-httpcomponents-httpmime |
| 7788 | java-hamcrest-core))) |
| 7789 | (description "This package provides an API for caching accessed HTTP |
| 7790 | resources."))) |
| 7791 | |
| 7792 | (define-public java-httpcomponents-httpclient-osgi |
| 7793 | (package (inherit java-httpcomponents-httpclient) |
| 7794 | (name "java-httpcomponents-httpclient-osgi") |
| 7795 | (arguments |
| 7796 | `(#:jar-name "httpcomponents-httpclient-osgi.jar" |
| 7797 | #:tests? #f; tests are broken with current cglib. |
| 7798 | #:phases |
| 7799 | (modify-phases %standard-phases |
| 7800 | (add-after 'unpack 'chdir |
| 7801 | (lambda _ (chdir "httpclient-osgi") #t))))) |
| 7802 | (inputs |
| 7803 | (modify-inputs (package-inputs java-httpcomponents-httpclient) |
| 7804 | (prepend java-httpcomponents-httpclient |
| 7805 | java-httpcomponents-httpclient-cache |
| 7806 | java-osgi-framework |
| 7807 | java-osgi-service-cm |
| 7808 | java-hamcrest-core))))) |
| 7809 | |
| 7810 | (define-public java-httpcomponents-httpmime |
| 7811 | (package (inherit java-httpcomponents-httpclient) |
| 7812 | (name "java-httpcomponents-httpmime") |
| 7813 | (arguments |
| 7814 | `(#:jar-name "httpcomponents-httpmime.jar" |
| 7815 | #:phases |
| 7816 | (modify-phases %standard-phases |
| 7817 | (add-after 'unpack 'chdir |
| 7818 | (lambda _ (chdir "httpmime") #t))))) |
| 7819 | (inputs |
| 7820 | (list java-httpcomponents-httpclient java-httpcomponents-httpcore |
| 7821 | java-junit java-hamcrest-core)))) |
| 7822 | |
| 7823 | (define-public java-commons-net |
| 7824 | (package |
| 7825 | (name "java-commons-net") |
| 7826 | (version "3.6") |
| 7827 | (source (origin |
| 7828 | (method url-fetch) |
| 7829 | (uri (string-append "mirror://apache/commons/net/source/" |
| 7830 | "commons-net-" version "-src.tar.gz")) |
| 7831 | (sha256 |
| 7832 | (base32 |
| 7833 | "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr")))) |
| 7834 | (build-system ant-build-system) |
| 7835 | (arguments |
| 7836 | `(;; FIXME: MainTest.java tries to read "examples.properties" (which |
| 7837 | ;; should be "resources/examples/examples.properties"), but gets "null" |
| 7838 | ;; instead. |
| 7839 | #:tests? #f |
| 7840 | #:jar-name "commons-net.jar")) |
| 7841 | (native-inputs |
| 7842 | (list java-junit java-hamcrest-core)) |
| 7843 | (home-page "https://commons.apache.org/net/") |
| 7844 | (synopsis "Client library for many basic Internet protocols") |
| 7845 | (description "The Apache Commons Net library implements the client side of |
| 7846 | many basic Internet protocols. The purpose of the library is to provide |
| 7847 | fundamental protocol access, not higher-level abstractions.") |
| 7848 | (license license:asl2.0))) |
| 7849 | |
| 7850 | (define-public java-jsch |
| 7851 | (package |
| 7852 | (name "java-jsch") |
| 7853 | (version "0.1.55") |
| 7854 | (source (origin |
| 7855 | (method url-fetch) |
| 7856 | (uri (string-append "mirror://sourceforge/jsch/jsch/" |
| 7857 | version "/jsch-" version ".zip")) |
| 7858 | (sha256 |
| 7859 | (base32 |
| 7860 | "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6")))) |
| 7861 | (build-system ant-build-system) |
| 7862 | (arguments |
| 7863 | `(#:build-target "dist" |
| 7864 | #:tests? #f ; no tests included |
| 7865 | #:phases |
| 7866 | (modify-phases %standard-phases |
| 7867 | (replace 'install (install-jars "dist"))))) |
| 7868 | (native-inputs |
| 7869 | (list unzip)) |
| 7870 | (home-page "http://www.jcraft.com/jsch/") |
| 7871 | (synopsis "Pure Java implementation of SSH2") |
| 7872 | (description "JSch is a pure Java implementation of SSH2. JSch allows you |
| 7873 | to connect to an SSH server and use port forwarding, X11 forwarding, file |
| 7874 | transfer, etc., and you can integrate its functionality into your own Java |
| 7875 | programs.") |
| 7876 | (license license:bsd-3))) |
| 7877 | |
| 7878 | (define-public java-commons-compress |
| 7879 | (package |
| 7880 | (name "java-commons-compress") |
| 7881 | (version "1.28.0") |
| 7882 | (source (origin |
| 7883 | (method url-fetch) |
| 7884 | (uri (string-append "mirror://apache/commons/compress/source/" |
| 7885 | "commons-compress-" version "-src.tar.gz")) |
| 7886 | (sha256 |
| 7887 | (base32 |
| 7888 | "0qkn70dfb1f9xihc34mbpbr5ag8qm4qq18hh3p4286r2ajj0z1sw")))) |
| 7889 | (build-system ant-build-system) |
| 7890 | (arguments |
| 7891 | `(#:jar-name "commons-compress.jar" |
| 7892 | #:source-dir "src/main/java" |
| 7893 | #:tests? #f; requires java-mockito-3 |
| 7894 | #:phases |
| 7895 | (modify-phases %standard-phases |
| 7896 | (add-after 'unpack 'fix-encoding |
| 7897 | (lambda _ |
| 7898 | ;; Fix non-UTF8 character in comment (ö -> o) |
| 7899 | (use-modules (ice-9 textual-ports)) |
| 7900 | (let ((file "src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java")) |
| 7901 | (with-fluids ((%default-port-encoding #f)) |
| 7902 | (let ((content (call-with-input-file file get-string-all))) |
| 7903 | (call-with-output-file file |
| 7904 | (lambda (port) |
| 7905 | (display (string-map (lambda (c) |
| 7906 | (if (char>? c #\~) #\o c)) |
| 7907 | content) |
| 7908 | port)))))))) |
| 7909 | (replace 'install (install-from-pom "pom.xml"))))) |
| 7910 | (propagated-inputs |
| 7911 | (list java-asm |
| 7912 | java-brotli |
| 7913 | java-osgi-core |
| 7914 | java-xz |
| 7915 | java-zstd-1.5.7 |
| 7916 | java-commons-io |
| 7917 | java-commons-lang3 |
| 7918 | java-commons-codec |
| 7919 | apache-commons-parent-pom-52)) |
| 7920 | (home-page "https://commons.apache.org/proper/commons-compress/") |
| 7921 | (synopsis "Java library for working with compressed files") |
| 7922 | (description "The Apache Commons Compress library defines an API for |
| 7923 | working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, |
| 7924 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") |
| 7925 | (license license:asl2.0))) |
| 7926 | |
| 7927 | |
| 7928 | (define-public java-commons-csv |
| 7929 | (package |
| 7930 | (name "java-commons-csv") |
| 7931 | (version "1.4") |
| 7932 | (source (origin |
| 7933 | (method url-fetch) |
| 7934 | (uri (string-append "mirror://apache/commons/csv/source/" |
| 7935 | "commons-csv-" version "-src.tar.gz")) |
| 7936 | (sha256 |
| 7937 | (base32 |
| 7938 | "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij")))) |
| 7939 | (build-system ant-build-system) |
| 7940 | (arguments |
| 7941 | `(#:jar-name "commons-csv.jar" |
| 7942 | #:source-dir "src/main/java" |
| 7943 | #:tests? #f)); FIXME: requires java-h2 |
| 7944 | (inputs |
| 7945 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 7946 | ("java-commons-io" ,java-commons-io) |
| 7947 | ("java-commons-lang3" ,java-commons-lang3) |
| 7948 | ("junit" ,java-junit))) |
| 7949 | (home-page "https://commons.apache.org/proper/commons-csv/") |
| 7950 | (synopsis "Read and write CSV documents") |
| 7951 | (description "Commons CSV reads and writes files in variations of the Comma |
| 7952 | Separated Value (CSV) format. The most common CSV formats are predefined in the |
| 7953 | CSVFormat class: |
| 7954 | |
| 7955 | @itemize |
| 7956 | @item Microsoft Excel |
| 7957 | @item Informix UNLOAD |
| 7958 | @item Informix UNLOAD CSV |
| 7959 | @item MySQL |
| 7960 | @item RFC 4180 |
| 7961 | @item TDF |
| 7962 | @end itemize |
| 7963 | |
| 7964 | Custom formats can be created using a fluent style API.") |
| 7965 | (license license:asl2.0))) |
| 7966 | |
| 7967 | (define-public java-osgi-annotation |
| 7968 | (package |
| 7969 | (name "java-osgi-annotation") |
| 7970 | (version "6.0.0") |
| 7971 | (source (origin |
| 7972 | (method url-fetch) |
| 7973 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 7974 | "org/osgi/org.osgi.annotation/" version "/" |
| 7975 | "org.osgi.annotation-" version "-sources.jar")) |
| 7976 | (sha256 |
| 7977 | (base32 |
| 7978 | "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w")))) |
| 7979 | (build-system ant-build-system) |
| 7980 | (arguments |
| 7981 | `(#:tests? #f ; no tests |
| 7982 | #:jar-name "osgi-annotation.jar" |
| 7983 | #:phases |
| 7984 | (modify-phases %standard-phases |
| 7985 | (add-before 'install 'create-pom |
| 7986 | (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version)) |
| 7987 | (replace 'install (install-from-pom "pom.xml"))))) |
| 7988 | (home-page "https://www.osgi.org") |
| 7989 | (synopsis "Annotation module of OSGi framework") |
| 7990 | (description |
| 7991 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 7992 | and service platform for the Java programming language. This package contains |
| 7993 | the OSGi annotation module, providing additional services to help dynamic |
| 7994 | components.") |
| 7995 | (license license:asl2.0))) |
| 7996 | |
| 7997 | (define-public java-osgi-core |
| 7998 | (package |
| 7999 | (name "java-osgi-core") |
| 8000 | (version "6.0.0") |
| 8001 | (source (origin |
| 8002 | (method url-fetch) |
| 8003 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8004 | "org/osgi/org.osgi.core/" version "/" |
| 8005 | "org.osgi.core-" version "-sources.jar")) |
| 8006 | (sha256 |
| 8007 | (base32 |
| 8008 | "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv")))) |
| 8009 | (build-system ant-build-system) |
| 8010 | (arguments |
| 8011 | `(#:tests? #f ; no tests |
| 8012 | #:jar-name "osgi-core.jar" |
| 8013 | #:phases |
| 8014 | (modify-phases %standard-phases |
| 8015 | (add-before 'install 'create-pom |
| 8016 | (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version)) |
| 8017 | (replace 'install (install-from-pom "pom.xml"))))) |
| 8018 | (inputs |
| 8019 | (list java-osgi-annotation)) |
| 8020 | (home-page "https://www.osgi.org") |
| 8021 | (synopsis "Core module of OSGi framework") |
| 8022 | (description |
| 8023 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8024 | and service platform for the Java programming language. This package contains |
| 8025 | the OSGi Core module.") |
| 8026 | (license license:asl2.0))) |
| 8027 | |
| 8028 | (define-public java-osgi-service-event |
| 8029 | (package |
| 8030 | (name "java-osgi-service-event") |
| 8031 | (version "1.3.1") |
| 8032 | (source (origin |
| 8033 | (method url-fetch) |
| 8034 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8035 | "org/osgi/org.osgi.service.event/" |
| 8036 | version "/org.osgi.service.event-" |
| 8037 | version "-sources.jar")) |
| 8038 | (sha256 |
| 8039 | (base32 |
| 8040 | "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm")))) |
| 8041 | (build-system ant-build-system) |
| 8042 | (arguments |
| 8043 | `(#:tests? #f ; no tests |
| 8044 | #:jar-name "osgi-service-event.jar")) |
| 8045 | (inputs |
| 8046 | (list java-osgi-annotation java-osgi-core)) |
| 8047 | (home-page "https://www.osgi.org") |
| 8048 | (synopsis "OSGi service event module") |
| 8049 | (description |
| 8050 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 8051 | and service platform for the Java programming language. This package contains |
| 8052 | the OSGi @code{org.osgi.service.event} module.") |
| 8053 | (license license:asl2.0))) |
| 8054 | |
| 8055 | (define-public java-eclipse-osgi |
| 8056 | (package |
| 8057 | (name "java-eclipse-osgi") |
| 8058 | (version "3.11.3") |
| 8059 | (source (origin |
| 8060 | (method url-fetch) |
| 8061 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8062 | "org/eclipse/platform/org.eclipse.osgi/" |
| 8063 | version "/org.eclipse.osgi-" |
| 8064 | version "-sources.jar")) |
| 8065 | (sha256 |
| 8066 | (base32 |
| 8067 | "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b")))) |
| 8068 | (build-system ant-build-system) |
| 8069 | (arguments |
| 8070 | `(#:tests? #f ; no tests included |
| 8071 | #:jar-name "eclipse-equinox-osgi.jar")) |
| 8072 | (inputs |
| 8073 | (list java-osgi-annotation)) |
| 8074 | (home-page "https://www.eclipse.org/equinox/") |
| 8075 | (synopsis "Eclipse Equinox OSGi framework") |
| 8076 | (description "This package provides an implementation of the OSGi Core |
| 8077 | specification.") |
| 8078 | (license license:epl1.0))) |
| 8079 | |
| 8080 | (define-public java-eclipse-equinox-common |
| 8081 | (package |
| 8082 | (name "java-eclipse-equinox-common") |
| 8083 | (version "3.10.200") |
| 8084 | (source (origin |
| 8085 | (method url-fetch) |
| 8086 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8087 | "org/eclipse/platform/org.eclipse.equinox.common/" |
| 8088 | version "/org.eclipse.equinox.common-" |
| 8089 | version "-sources.jar")) |
| 8090 | (sha256 |
| 8091 | (base32 |
| 8092 | "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj")))) |
| 8093 | (build-system ant-build-system) |
| 8094 | (arguments |
| 8095 | `(#:tests? #f ; no tests included |
| 8096 | #:jar-name "eclipse-equinox-common.jar")) |
| 8097 | (inputs |
| 8098 | (list java-eclipse-osgi)) |
| 8099 | (home-page "https://www.eclipse.org/equinox/") |
| 8100 | (synopsis "Common Eclipse runtime") |
| 8101 | (description "This package provides the common Eclipse runtime.") |
| 8102 | (license license:epl1.0))) |
| 8103 | |
| 8104 | (define-public java-eclipse-core-jobs |
| 8105 | (package |
| 8106 | (name "java-eclipse-core-jobs") |
| 8107 | (version "3.8.0") |
| 8108 | (source (origin |
| 8109 | (method url-fetch) |
| 8110 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8111 | "org/eclipse/platform/org.eclipse.core.jobs/" |
| 8112 | version "/org.eclipse.core.jobs-" |
| 8113 | version "-sources.jar")) |
| 8114 | (sha256 |
| 8115 | (base32 |
| 8116 | "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b")))) |
| 8117 | (build-system ant-build-system) |
| 8118 | (arguments |
| 8119 | `(#:tests? #f ; no tests included |
| 8120 | #:jar-name "eclipse-core-jobs.jar")) |
| 8121 | (inputs |
| 8122 | (list java-eclipse-equinox-common java-eclipse-osgi)) |
| 8123 | (home-page "https://www.eclipse.org/equinox/") |
| 8124 | (synopsis "Eclipse jobs mechanism") |
| 8125 | (description "This package provides the Eclipse jobs mechanism.") |
| 8126 | (license license:epl1.0))) |
| 8127 | |
| 8128 | (define-public java-eclipse-equinox-registry |
| 8129 | (package |
| 8130 | (name "java-eclipse-equinox-registry") |
| 8131 | (version "3.6.100") |
| 8132 | (source (origin |
| 8133 | (method url-fetch) |
| 8134 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8135 | "org/eclipse/platform/org.eclipse.equinox.registry/" |
| 8136 | version "/org.eclipse.equinox.registry-" |
| 8137 | version "-sources.jar")) |
| 8138 | (sha256 |
| 8139 | (base32 |
| 8140 | "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k")))) |
| 8141 | (build-system ant-build-system) |
| 8142 | (arguments |
| 8143 | `(#:tests? #f ; no tests included |
| 8144 | #:jar-name "eclipse-equinox-registry.jar")) |
| 8145 | (inputs |
| 8146 | (list java-eclipse-core-jobs java-eclipse-equinox-common |
| 8147 | java-eclipse-osgi)) |
| 8148 | (home-page "https://www.eclipse.org/equinox/") |
| 8149 | (synopsis "Eclipse extension registry support") |
| 8150 | (description "This package provides support for the Eclipse extension |
| 8151 | registry.") |
| 8152 | (license license:epl1.0))) |
| 8153 | |
| 8154 | (define-public java-eclipse-equinox-app |
| 8155 | (package |
| 8156 | (name "java-eclipse-equinox-app") |
| 8157 | (version "1.3.400") |
| 8158 | (source (origin |
| 8159 | (method url-fetch) |
| 8160 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8161 | "org/eclipse/platform/org.eclipse.equinox.app/" |
| 8162 | version "/org.eclipse.equinox.app-" |
| 8163 | version "-sources.jar")) |
| 8164 | (sha256 |
| 8165 | (base32 |
| 8166 | "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab")))) |
| 8167 | (build-system ant-build-system) |
| 8168 | (arguments |
| 8169 | `(#:tests? #f ; no tests included |
| 8170 | #:jar-name "eclipse-equinox-app.jar")) |
| 8171 | (inputs |
| 8172 | (list java-eclipse-equinox-common java-eclipse-equinox-registry |
| 8173 | java-eclipse-osgi java-osgi-service-event)) |
| 8174 | (home-page "https://www.eclipse.org/equinox/") |
| 8175 | (synopsis "Equinox application container") |
| 8176 | (description "This package provides the Equinox application container for |
| 8177 | Eclipse.") |
| 8178 | (license license:epl1.0))) |
| 8179 | |
| 8180 | (define-public java-eclipse-equinox-preferences |
| 8181 | (package |
| 8182 | (name "java-eclipse-equinox-preferences") |
| 8183 | (version "3.6.1") |
| 8184 | (source (origin |
| 8185 | (method url-fetch) |
| 8186 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8187 | "org/eclipse/platform/org.eclipse.equinox.preferences/" |
| 8188 | version "/org.eclipse.equinox.preferences-" |
| 8189 | version "-sources.jar")) |
| 8190 | (sha256 |
| 8191 | (base32 |
| 8192 | "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2")))) |
| 8193 | (build-system ant-build-system) |
| 8194 | (arguments |
| 8195 | `(#:tests? #f ; no tests included |
| 8196 | #:jar-name "eclipse-equinox-preferences.jar")) |
| 8197 | (inputs |
| 8198 | (list java-eclipse-equinox-common java-eclipse-equinox-registry |
| 8199 | java-eclipse-osgi)) |
| 8200 | (home-page "https://www.eclipse.org/equinox/") |
| 8201 | (synopsis "Eclipse preferences mechanism") |
| 8202 | (description "This package provides the Eclipse preferences mechanism with |
| 8203 | the module @code{org.eclipse.equinox.preferences}.") |
| 8204 | (license license:epl1.0))) |
| 8205 | |
| 8206 | (define-public java-eclipse-core-contenttype |
| 8207 | (package |
| 8208 | (name "java-eclipse-core-contenttype") |
| 8209 | (version "3.5.100") |
| 8210 | (source (origin |
| 8211 | (method url-fetch) |
| 8212 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8213 | "org/eclipse/platform/org.eclipse.core.contenttype/" |
| 8214 | version "/org.eclipse.core.contenttype-" |
| 8215 | version "-sources.jar")) |
| 8216 | (sha256 |
| 8217 | (base32 |
| 8218 | "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi")))) |
| 8219 | (build-system ant-build-system) |
| 8220 | (arguments |
| 8221 | `(#:tests? #f ; no tests included |
| 8222 | #:jar-name "eclipse-core-contenttype.jar")) |
| 8223 | (inputs |
| 8224 | (list java-eclipse-equinox-common java-eclipse-equinox-preferences |
| 8225 | java-eclipse-equinox-registry java-eclipse-osgi)) |
| 8226 | (home-page "https://www.eclipse.org/") |
| 8227 | (synopsis "Eclipse content mechanism") |
| 8228 | (description "This package provides the Eclipse content mechanism in the |
| 8229 | @code{org.eclipse.core.contenttype} module.") |
| 8230 | (license license:epl1.0))) |
| 8231 | |
| 8232 | (define-public java-eclipse-core-runtime |
| 8233 | (package |
| 8234 | (name "java-eclipse-core-runtime") |
| 8235 | (version "3.15.100") |
| 8236 | (source (origin |
| 8237 | (method url-fetch) |
| 8238 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8239 | "org/eclipse/platform/org.eclipse.core.runtime/" |
| 8240 | version "/org.eclipse.core.runtime-" |
| 8241 | version "-sources.jar")) |
| 8242 | (sha256 |
| 8243 | (base32 |
| 8244 | "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r")))) |
| 8245 | (build-system ant-build-system) |
| 8246 | (arguments |
| 8247 | `(#:tests? #f ; no tests included |
| 8248 | #:jar-name "eclipse-core-runtime.jar")) |
| 8249 | (inputs |
| 8250 | (list java-eclipse-core-contenttype |
| 8251 | java-eclipse-core-jobs |
| 8252 | java-eclipse-equinox-app |
| 8253 | java-eclipse-equinox-common |
| 8254 | java-eclipse-equinox-registry |
| 8255 | java-eclipse-equinox-preferences |
| 8256 | java-eclipse-osgi)) |
| 8257 | (home-page "https://www.eclipse.org/") |
| 8258 | (synopsis "Eclipse core runtime") |
| 8259 | (description "This package provides the Eclipse core runtime with the |
| 8260 | module @code{org.eclipse.core.runtime}.") |
| 8261 | (license license:epl1.0))) |
| 8262 | |
| 8263 | (define-public java-eclipse-core-filesystem |
| 8264 | (package |
| 8265 | (name "java-eclipse-core-filesystem") |
| 8266 | (version "1.6.1") |
| 8267 | (source (origin |
| 8268 | (method url-fetch) |
| 8269 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8270 | "org/eclipse/platform/org.eclipse.core.filesystem/" |
| 8271 | version "/org.eclipse.core.filesystem-" |
| 8272 | version "-sources.jar")) |
| 8273 | (sha256 |
| 8274 | (base32 |
| 8275 | "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj")))) |
| 8276 | (build-system ant-build-system) |
| 8277 | (arguments |
| 8278 | `(#:tests? #f ; no tests included |
| 8279 | #:jar-name "eclipse-core-filesystem.jar")) |
| 8280 | (inputs |
| 8281 | (list java-eclipse-equinox-common java-eclipse-equinox-registry |
| 8282 | java-eclipse-osgi)) |
| 8283 | (home-page "https://www.eclipse.org/") |
| 8284 | (synopsis "Eclipse core file system") |
| 8285 | (description "This package provides the Eclipse core file system with the |
| 8286 | module @code{org.eclipse.core.filesystem}.") |
| 8287 | (license license:epl1.0))) |
| 8288 | |
| 8289 | (define-public java-eclipse-core-expressions |
| 8290 | (package |
| 8291 | (name "java-eclipse-core-expressions") |
| 8292 | (version "3.5.100") |
| 8293 | (source (origin |
| 8294 | (method url-fetch) |
| 8295 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8296 | "org/eclipse/platform/org.eclipse.core.expressions/" |
| 8297 | version "/org.eclipse.core.expressions-" |
| 8298 | version "-sources.jar")) |
| 8299 | (sha256 |
| 8300 | (base32 |
| 8301 | "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f")))) |
| 8302 | (build-system ant-build-system) |
| 8303 | (arguments |
| 8304 | `(#:tests? #f ; no tests included |
| 8305 | #:jar-name "eclipse-core-expressions.jar")) |
| 8306 | (inputs |
| 8307 | (list java-eclipse-equinox-common java-eclipse-equinox-registry |
| 8308 | java-eclipse-equinox-preferences java-eclipse-core-runtime |
| 8309 | java-eclipse-osgi)) |
| 8310 | (home-page "https://www.eclipse.org/") |
| 8311 | (synopsis "Eclipse core expression language") |
| 8312 | (description "This package provides the Eclipse core expression language |
| 8313 | with the @code{org.eclipse.core.expressions} module.") |
| 8314 | (license license:epl1.0))) |
| 8315 | |
| 8316 | (define-public java-eclipse-core-variables |
| 8317 | (package |
| 8318 | (name "java-eclipse-core-variables") |
| 8319 | (version "3.3.0") |
| 8320 | (source (origin |
| 8321 | (method url-fetch) |
| 8322 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8323 | "org/eclipse/platform/org.eclipse.core.variables/" |
| 8324 | version "/org.eclipse.core.variables-" |
| 8325 | version "-sources.jar")) |
| 8326 | (sha256 |
| 8327 | (base32 |
| 8328 | "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy")))) |
| 8329 | (build-system ant-build-system) |
| 8330 | (arguments |
| 8331 | `(#:tests? #f ; no tests included |
| 8332 | #:jar-name "eclipse-core-variables.jar")) |
| 8333 | (inputs |
| 8334 | (list java-eclipse-equinox-common java-eclipse-equinox-registry |
| 8335 | java-eclipse-equinox-preferences java-eclipse-core-runtime |
| 8336 | java-eclipse-osgi)) |
| 8337 | (home-page "https://projects.eclipse.org/projects/eclipse.platform") |
| 8338 | (synopsis "Eclipse core variables") |
| 8339 | (description "This package provides the Eclipse core variables module |
| 8340 | @code{org.eclipse.core.variables}.") |
| 8341 | (license license:epl1.0))) |
| 8342 | |
| 8343 | (define-public java-eclipse-ant-core |
| 8344 | (package |
| 8345 | (name "java-eclipse-ant-core") |
| 8346 | (version "3.4.100") |
| 8347 | (source (origin |
| 8348 | (method url-fetch) |
| 8349 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8350 | "org/eclipse/platform/org.eclipse.ant.core/" |
| 8351 | version "/org.eclipse.ant.core-" |
| 8352 | version "-sources.jar")) |
| 8353 | (sha256 |
| 8354 | (base32 |
| 8355 | "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7")))) |
| 8356 | (build-system ant-build-system) |
| 8357 | (arguments |
| 8358 | `(#:tests? #f ; no tests included |
| 8359 | #:jar-name "eclipse-ant-core.jar")) |
| 8360 | (inputs |
| 8361 | (list java-eclipse-equinox-app |
| 8362 | java-eclipse-equinox-common |
| 8363 | java-eclipse-equinox-registry |
| 8364 | java-eclipse-equinox-preferences |
| 8365 | java-eclipse-core-contenttype |
| 8366 | java-eclipse-core-runtime |
| 8367 | java-eclipse-core-variables |
| 8368 | java-eclipse-osgi)) |
| 8369 | (home-page "https://projects.eclipse.org/projects/eclipse.platform") |
| 8370 | (synopsis "Ant build tool core libraries") |
| 8371 | (description "This package provides the ant build tool core libraries with |
| 8372 | the module @code{org.eclipse.ant.core}.") |
| 8373 | (license license:epl1.0))) |
| 8374 | |
| 8375 | (define-public java-eclipse-core-resources |
| 8376 | (package |
| 8377 | (name "java-eclipse-core-resources") |
| 8378 | (version "3.13.200") |
| 8379 | (source (origin |
| 8380 | (method url-fetch) |
| 8381 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8382 | "org/eclipse/platform/org.eclipse.core.resources/" |
| 8383 | version "/org.eclipse.core.resources-" |
| 8384 | version "-sources.jar")) |
| 8385 | (sha256 |
| 8386 | (base32 |
| 8387 | "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs")))) |
| 8388 | (build-system ant-build-system) |
| 8389 | (arguments |
| 8390 | `(#:tests? #f ; no tests included |
| 8391 | #:jar-name "eclipse-core-resources.jar")) |
| 8392 | (inputs |
| 8393 | (list java-eclipse-equinox-common |
| 8394 | java-eclipse-equinox-preferences |
| 8395 | java-eclipse-equinox-registry |
| 8396 | java-eclipse-core-contenttype |
| 8397 | java-eclipse-core-expressions |
| 8398 | java-eclipse-core-filesystem |
| 8399 | java-eclipse-core-jobs |
| 8400 | java-eclipse-core-runtime |
| 8401 | java-eclipse-ant-core |
| 8402 | java-eclipse-osgi)) |
| 8403 | (home-page "https://www.eclipse.org/") |
| 8404 | (synopsis "Eclipse core resource management") |
| 8405 | (description "This package provides the Eclipse core resource management |
| 8406 | module @code{org.eclipse.core.resources}.") |
| 8407 | (license license:epl1.0))) |
| 8408 | |
| 8409 | (define-public java-eclipse-compare-core |
| 8410 | (package |
| 8411 | (name "java-eclipse-compare-core") |
| 8412 | (version "3.6.0") |
| 8413 | (source (origin |
| 8414 | (method url-fetch) |
| 8415 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8416 | "org/eclipse/platform/org.eclipse.compare.core/" |
| 8417 | version "/org.eclipse.compare.core-" |
| 8418 | version "-sources.jar")) |
| 8419 | (sha256 |
| 8420 | (base32 |
| 8421 | "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg")))) |
| 8422 | (build-system ant-build-system) |
| 8423 | (arguments |
| 8424 | `(#:tests? #f ; no tests included |
| 8425 | #:jar-name "eclipse-compare-core.jar")) |
| 8426 | (inputs |
| 8427 | (list java-eclipse-core-runtime java-eclipse-equinox-common |
| 8428 | java-eclipse-osgi java-icu4j)) |
| 8429 | (home-page "https://www.eclipse.org/") |
| 8430 | (synopsis "Eclipse core compare support") |
| 8431 | (description "This package provides the Eclipse core compare support |
| 8432 | module @code{org.eclipse.compare.core}.") |
| 8433 | (license license:epl1.0))) |
| 8434 | |
| 8435 | (define-public java-eclipse-team-core |
| 8436 | (package |
| 8437 | (name "java-eclipse-team-core") |
| 8438 | (version "3.8.0") |
| 8439 | (source (origin |
| 8440 | (method url-fetch) |
| 8441 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8442 | "org/eclipse/platform/org.eclipse.team.core/" |
| 8443 | version "/org.eclipse.team.core-" |
| 8444 | version "-sources.jar")) |
| 8445 | (sha256 |
| 8446 | (base32 |
| 8447 | "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7")))) |
| 8448 | (build-system ant-build-system) |
| 8449 | (arguments |
| 8450 | `(#:tests? #f ; no tests included |
| 8451 | #:jar-name "eclipse-team-core.jar")) |
| 8452 | (inputs |
| 8453 | (list java-eclipse-compare-core |
| 8454 | java-eclipse-core-contenttype |
| 8455 | java-eclipse-core-filesystem |
| 8456 | java-eclipse-core-jobs |
| 8457 | java-eclipse-core-resources |
| 8458 | java-eclipse-core-runtime |
| 8459 | java-eclipse-equinox-common |
| 8460 | java-eclipse-equinox-registry |
| 8461 | java-eclipse-equinox-preferences |
| 8462 | java-eclipse-osgi)) |
| 8463 | (home-page "https://projects.eclipse.org/projects/eclipse.platform") |
| 8464 | (synopsis "Eclipse team support core") |
| 8465 | (description "This package provides the Eclipse team support core module |
| 8466 | @code{org.eclipse.team.core}.") |
| 8467 | (license license:epl1.0))) |
| 8468 | |
| 8469 | (define-public java-eclipse-core-commands |
| 8470 | (package |
| 8471 | (name "java-eclipse-core-commands") |
| 8472 | (version "3.8.1") |
| 8473 | (source (origin |
| 8474 | (method url-fetch) |
| 8475 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8476 | "org/eclipse/platform/org.eclipse.core.commands/" |
| 8477 | version "/org.eclipse.core.commands-" |
| 8478 | version "-sources.jar")) |
| 8479 | (sha256 |
| 8480 | (base32 |
| 8481 | "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9")))) |
| 8482 | (build-system ant-build-system) |
| 8483 | (arguments |
| 8484 | `(#:tests? #f ; no tests included |
| 8485 | #:jar-name "eclipse-core-commands.jar")) |
| 8486 | (inputs |
| 8487 | (list java-eclipse-equinox-common)) |
| 8488 | (home-page "https://projects.eclipse.org/projects/eclipse.platform") |
| 8489 | (synopsis "Eclipse core commands") |
| 8490 | (description "This package provides Eclipse core commands in the module |
| 8491 | @code{org.eclipse.core.commands}.") |
| 8492 | (license license:epl1.0))) |
| 8493 | |
| 8494 | (define-public java-eclipse-text |
| 8495 | (package |
| 8496 | (name "java-eclipse-text") |
| 8497 | (version "3.6.0") |
| 8498 | (source (origin |
| 8499 | (method url-fetch) |
| 8500 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8501 | "org/eclipse/platform/org.eclipse.text/" |
| 8502 | version "/org.eclipse.text-" |
| 8503 | version "-sources.jar")) |
| 8504 | (sha256 |
| 8505 | (base32 |
| 8506 | "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1")))) |
| 8507 | (build-system ant-build-system) |
| 8508 | (arguments |
| 8509 | `(#:tests? #f ; no tests included |
| 8510 | #:jar-name "eclipse-text.jar" |
| 8511 | #:phases |
| 8512 | (modify-phases %standard-phases |
| 8513 | ;; When creating a new category we must make sure that the new list |
| 8514 | ;; matches List<Position>. By default it seems to be too generic |
| 8515 | ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>. |
| 8516 | ;; Without this we get this error: |
| 8517 | ;; |
| 8518 | ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376: |
| 8519 | ;; error: method put in interface Map<K,V> cannot be applied to given types; |
| 8520 | ;; [javac] fPositions.put(category, new ArrayList<>()); |
| 8521 | ;; [javac] ^ |
| 8522 | ;; [javac] required: String,List<Position> |
| 8523 | ;; [javac] found: String,ArrayList<Object> |
| 8524 | ;; [javac] reason: actual argument ArrayList<Object> cannot be converted |
| 8525 | ;; to List<Position> by method invocation conversion |
| 8526 | ;; [javac] where K,V are type-variables: |
| 8527 | ;; [javac] K extends Object declared in interface Map |
| 8528 | ;; [javac] V extends Object declared in interface Map |
| 8529 | ;; |
| 8530 | ;; I don't know if this is a good fix. I suspect it is not, but it |
| 8531 | ;; seems to work. |
| 8532 | (add-after 'unpack 'fix-compilation-error |
| 8533 | (lambda _ |
| 8534 | (substitute* "src/org/eclipse/jface/text/AbstractDocument.java" |
| 8535 | (("Positions.put\\(category, new ArrayList<>\\(\\)\\);") |
| 8536 | "Positions.put(category, new ArrayList<Position>());")) |
| 8537 | #t))))) |
| 8538 | (inputs |
| 8539 | (list java-eclipse-equinox-common java-eclipse-core-commands |
| 8540 | java-icu4j)) |
| 8541 | (home-page "https://projects.eclipse.org/projects/eclipse.platform") |
| 8542 | (synopsis "Eclipse text library") |
| 8543 | (description "Platform Text is part of the Platform UI project and |
| 8544 | provides the basic building blocks for text and text editors within Eclipse |
| 8545 | and contributes the Eclipse default text editor.") |
| 8546 | (license license:epl1.0))) |
| 8547 | |
| 8548 | (define-public java-eclipse-jdt-core |
| 8549 | (package |
| 8550 | (name "java-eclipse-jdt-core") |
| 8551 | (version "3.16.0") |
| 8552 | (source (origin |
| 8553 | (method url-fetch) |
| 8554 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8555 | "org/eclipse/jdt/org.eclipse.jdt.core/" |
| 8556 | version "/org.eclipse.jdt.core-" |
| 8557 | version "-sources.jar")) |
| 8558 | (sha256 |
| 8559 | (base32 |
| 8560 | "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k")))) |
| 8561 | (build-system ant-build-system) |
| 8562 | (arguments |
| 8563 | `(#:tests? #f ; no tests included |
| 8564 | #:jar-name "eclipse-jdt-core.jar" |
| 8565 | #:phases |
| 8566 | (modify-phases %standard-phases |
| 8567 | (add-after 'unpack 'move-sources |
| 8568 | (lambda _ |
| 8569 | (with-directory-excursion "src/jdtCompilerAdaptersrc/" |
| 8570 | (for-each (lambda (file) |
| 8571 | (install-file file (string-append "../" (dirname file)))) |
| 8572 | (find-files "." ".*"))) |
| 8573 | (delete-file-recursively "src/jdtCompilerAdaptersrc/") |
| 8574 | #t)) |
| 8575 | (add-before 'build 'copy-resources |
| 8576 | (lambda _ |
| 8577 | (with-directory-excursion "src" |
| 8578 | (for-each (lambda (file) |
| 8579 | (install-file file (string-append "../build/classes/" (dirname file)))) |
| 8580 | (find-files "." ".*.(props|properties|rsc)"))) |
| 8581 | #t))))) |
| 8582 | (inputs |
| 8583 | (list java-eclipse-core-contenttype |
| 8584 | java-eclipse-core-filesystem |
| 8585 | java-eclipse-core-jobs |
| 8586 | java-eclipse-core-resources |
| 8587 | java-eclipse-core-runtime |
| 8588 | java-eclipse-equinox-app |
| 8589 | java-eclipse-equinox-common |
| 8590 | java-eclipse-equinox-preferences |
| 8591 | java-eclipse-equinox-registry |
| 8592 | java-eclipse-osgi |
| 8593 | java-eclipse-text)) |
| 8594 | (home-page "https://www.eclipse.org/jdt") |
| 8595 | (synopsis "Java development tools core libraries") |
| 8596 | (description "This package provides the core libraries of the Eclipse Java |
| 8597 | development tools.") |
| 8598 | (license license:epl1.0))) |
| 8599 | |
| 8600 | (define-public java-eclipse-jdt-compiler-apt |
| 8601 | (package |
| 8602 | (name "java-eclipse-jdt-compiler-apt") |
| 8603 | (version "1.3.400") |
| 8604 | (source (origin |
| 8605 | (method url-fetch) |
| 8606 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8607 | "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/" |
| 8608 | version "/org.eclipse.jdt.compiler.apt-" |
| 8609 | version "-sources.jar")) |
| 8610 | (sha256 |
| 8611 | (base32 |
| 8612 | "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8")))) |
| 8613 | (build-system ant-build-system) |
| 8614 | (arguments |
| 8615 | `(#:tests? #f ; no tests included |
| 8616 | #:jar-name "eclipse-jdt-compiler-apt.jar" |
| 8617 | #:jdk ,openjdk11)) |
| 8618 | (inputs |
| 8619 | (list java-eclipse-jdt-core)) |
| 8620 | (home-page "https://www.eclipse.org/jdt/apt/") |
| 8621 | (synopsis "Annotation processing tool") |
| 8622 | (description "APT stands for Annotation Processing Tool. APT provides a |
| 8623 | means for generating files and compiling new Java classes based on annotations |
| 8624 | found in your source code.") |
| 8625 | (license license:epl2.0))) |
| 8626 | |
| 8627 | (define-public java-eclipse-lsp4j-common |
| 8628 | (package |
| 8629 | (name "java-eclipse-lsp4j-common") |
| 8630 | (version "0.10.0") |
| 8631 | (source (origin |
| 8632 | (method git-fetch) |
| 8633 | (uri (git-reference |
| 8634 | (url "https://github.com/eclipse/lsp4j") |
| 8635 | (commit (string-append "v" version)))) |
| 8636 | (file-name (git-file-name name version)) |
| 8637 | (sha256 |
| 8638 | (base32 |
| 8639 | "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98")))) |
| 8640 | (build-system ant-build-system) |
| 8641 | (home-page "https://eclipse.org/lsp4j/") |
| 8642 | (synopsis "LSP4J common package") |
| 8643 | (description "Eclipse LSP4J provides Java bindings for the Language |
| 8644 | Server Protocol and the Debug Adapter Protocol. This package is a common |
| 8645 | definition intended to be inherited by other packages.") |
| 8646 | (license license:epl2.0))) |
| 8647 | |
| 8648 | (define-public java-eclipse-lsp4j-debug |
| 8649 | (package |
| 8650 | (inherit java-eclipse-lsp4j-common) |
| 8651 | (name "java-eclipse-lsp4j-debug") |
| 8652 | (arguments |
| 8653 | `(#:jar-name "eclipse-lsp4j-debug.jar" |
| 8654 | #:jdk ,openjdk11 |
| 8655 | #:tests? #f; tests fail with reflection errors |
| 8656 | #:source-dir "org.eclipse.lsp4j.debug/src/main/java" |
| 8657 | #:test-dir "org.eclipse.lsp4j.debug/src/test" |
| 8658 | #:phases |
| 8659 | (modify-phases %standard-phases |
| 8660 | (add-before 'build 'copy-xtend |
| 8661 | (lambda _ |
| 8662 | (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen" |
| 8663 | "org.eclipse.lsp4j.debug/src/main/java")))))) |
| 8664 | (native-inputs |
| 8665 | (list java-junit)) |
| 8666 | (inputs |
| 8667 | `(("java-gson" ,java-gson-2.8.6) |
| 8668 | ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator) |
| 8669 | ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc) |
| 8670 | ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug) |
| 8671 | ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib))) |
| 8672 | (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol") |
| 8673 | (description "Eclipse LSP4J provides Java bindings for the Language |
| 8674 | Server Protocol and the Debug Adapter Protocol. This package contains its |
| 8675 | LSP4J Java bindings for the Debug Server Protocol."))) |
| 8676 | |
| 8677 | (define-public java-eclipse-lsp4j-generator |
| 8678 | (package |
| 8679 | (inherit java-eclipse-lsp4j-common) |
| 8680 | (name "java-eclipse-lsp4j-generator") |
| 8681 | (arguments |
| 8682 | `(#:jar-name "eclipse-lsp4j-generator.jar" |
| 8683 | #:jdk ,openjdk11 |
| 8684 | #:tests? #f; no tests |
| 8685 | #:source-dir "org.eclipse.lsp4j.generator/src/main/java")) |
| 8686 | (inputs |
| 8687 | (list java-eclipse-lsp4j-jsonrpc)) |
| 8688 | (synopsis "Eclipse LSP4J Generator") |
| 8689 | (description "Eclipse LSP4J provides Java bindings for the Language |
| 8690 | Server Protocol and the Debug Adapter Protocol. This package contains its |
| 8691 | LSP4J code generator for Language Server Protocol classes."))) |
| 8692 | |
| 8693 | (define-public java-eclipse-lsp4j-jsonrpc |
| 8694 | (package |
| 8695 | (inherit java-eclipse-lsp4j-common) |
| 8696 | (name "java-eclipse-lsp4j-jsonrpc") |
| 8697 | (arguments |
| 8698 | `(#:jar-name "eclipse-lsp4j-jsonrpc.jar" |
| 8699 | #:jdk ,openjdk11 |
| 8700 | #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java" |
| 8701 | #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test")) |
| 8702 | (native-inputs |
| 8703 | (list java-junit)) |
| 8704 | (inputs |
| 8705 | (list java-gson-2.8.6)) |
| 8706 | (synopsis "Java JSON-RPC implementation") |
| 8707 | (description "Eclipse LSP4J provides Java bindings for the Language |
| 8708 | Server Protocol and the Debug Adapter Protocol. This package contains its |
| 8709 | JSON-RPC implementation."))) |
| 8710 | |
| 8711 | (define-public java-eclipse-lsp4j-jsonrpc-debug |
| 8712 | (package |
| 8713 | (inherit java-eclipse-lsp4j-common) |
| 8714 | (name "java-eclipse-lsp4j-jsonrpc-debug") |
| 8715 | (arguments |
| 8716 | `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar" |
| 8717 | #:jdk ,openjdk11 |
| 8718 | #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java" |
| 8719 | #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test")) |
| 8720 | (native-inputs |
| 8721 | (list java-junit)) |
| 8722 | (inputs |
| 8723 | (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6)) |
| 8724 | (synopsis "Java JSON-RPC implementation (debug protocol)") |
| 8725 | (description "Eclipse LSP4J provides Java bindings for the Language |
| 8726 | Server Protocol and the Debug Adapter Protocol. This package contains its |
| 8727 | JSON-RPC implementation's debug protocol."))) |
| 8728 | |
| 8729 | (define-public java-eclipse-xtext-xbase-lib |
| 8730 | (package |
| 8731 | (name "java-eclipse-xtext-xbase-lib") |
| 8732 | (version "2.25.0") |
| 8733 | (source (origin |
| 8734 | (method git-fetch) |
| 8735 | (uri (git-reference |
| 8736 | (url "https://github.com/eclipse/xtext-lib") |
| 8737 | (commit (string-append "v" version)))) |
| 8738 | (file-name (git-file-name name version)) |
| 8739 | (sha256 |
| 8740 | (base32 |
| 8741 | "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71")))) |
| 8742 | (build-system ant-build-system) |
| 8743 | (arguments |
| 8744 | `(#:jar-name "eclipse-xtext-xbase-lib.jar" |
| 8745 | #:jdk ,openjdk11 |
| 8746 | #:tests? #f; TODO (maybe needs newer guava version?) |
| 8747 | #:source-dir "org.eclipse.xtext.xbase.lib/src" |
| 8748 | #:test-dir "org.eclipse.xtext.xbase.lib.tests/src")) |
| 8749 | (native-inputs |
| 8750 | (list java-junit)) |
| 8751 | (inputs |
| 8752 | (list java-guava)) |
| 8753 | (home-page "https://www.eclipse.org/Xtext/") |
| 8754 | (synopsis "Eclipse Xbase Runtime Library") |
| 8755 | (description "This package contains runtime libraries for Xbase languages |
| 8756 | such as Xtend.") |
| 8757 | (license license:epl2.0))) |
| 8758 | |
| 8759 | (define-public java-javax-mail |
| 8760 | (package |
| 8761 | (name "java-javax-mail") |
| 8762 | (version "1.5.6") |
| 8763 | (source (origin |
| 8764 | (method url-fetch) |
| 8765 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 8766 | "com/sun/mail/javax.mail/" |
| 8767 | version "/javax.mail-" |
| 8768 | version "-sources.jar")) |
| 8769 | (sha256 |
| 8770 | (base32 |
| 8771 | "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9")))) |
| 8772 | (build-system ant-build-system) |
| 8773 | (arguments |
| 8774 | `(#:tests? #f ; no tests |
| 8775 | #:jar-name "javax-mail.jar")) |
| 8776 | (home-page "https://javamail.java.net") |
| 8777 | (synopsis "Reference implementation of the JavaMail API") |
| 8778 | (description |
| 8779 | "This package provides versions of the JavaMail API implementation, IMAP, |
| 8780 | SMTP, and POP3 service providers, some examples, and documentation for the |
| 8781 | JavaMail API.") |
| 8782 | ;; GPLv2 only with "classpath exception". |
| 8783 | (license license:gpl2))) |
| 8784 | |
| 8785 | (define-public java-log4j-api |
| 8786 | (package |
| 8787 | (name "java-log4j-api") |
| 8788 | (version "2.17.1") |
| 8789 | (source (origin |
| 8790 | (method url-fetch) |
| 8791 | (uri (string-append "mirror://apache/logging/log4j/" version |
| 8792 | "/apache-log4j-" version "-src.tar.gz")) |
| 8793 | (sha256 |
| 8794 | (base32 |
| 8795 | "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6")))) |
| 8796 | (build-system ant-build-system) |
| 8797 | (arguments |
| 8798 | `(#:tests? #f ; tests require unpackaged software |
| 8799 | #:jar-name "log4j-api.jar" |
| 8800 | #:make-flags |
| 8801 | ,#~(list (string-append "-Ddist.dir=" #$output "/share/java")) |
| 8802 | #:phases |
| 8803 | (modify-phases %standard-phases |
| 8804 | (add-after 'unpack 'enter-dir |
| 8805 | (lambda _ (chdir "log4j-api") #t)) |
| 8806 | ;; FIXME: The tests require additional software that has not been |
| 8807 | ;; packaged yet, such as |
| 8808 | ;; * org.apache.maven |
| 8809 | ;; * org.apache.felix |
| 8810 | (add-after 'enter-dir 'delete-tests |
| 8811 | (lambda _ (delete-file-recursively "src/test") #t))))) |
| 8812 | (inputs |
| 8813 | (list java-osgi-core java-hamcrest-core java-junit)) |
| 8814 | (properties '((cpe-name . "log4j"))) |
| 8815 | (home-page "https://logging.apache.org/log4j/2.x/") |
| 8816 | (synopsis "API module of the Log4j logging framework for Java") |
| 8817 | (description |
| 8818 | "This package provides the API module of the Log4j logging framework for |
| 8819 | Java.") |
| 8820 | (license license:asl2.0))) |
| 8821 | |
| 8822 | (define-public java-log4j-core |
| 8823 | (package |
| 8824 | (inherit java-log4j-api) |
| 8825 | (name "java-log4j-core") |
| 8826 | (inputs |
| 8827 | `(("java-osgi-core" ,java-osgi-core) |
| 8828 | ("java-hamcrest-core" ,java-hamcrest-core) |
| 8829 | ("java-log4j-api" ,java-log4j-api) |
| 8830 | ("java-mail" ,java-mail) |
| 8831 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) |
| 8832 | ("java-conversant-disruptor" ,java-conversant-disruptor) |
| 8833 | ("java-lmax-disruptor" ,java-lmax-disruptor) |
| 8834 | ("java-jctools-core" ,java-jctools-core-1) |
| 8835 | ("java-stax2-api" ,java-stax2-api) |
| 8836 | ("java-jansi" ,java-jansi) |
| 8837 | ("java-kafka" ,java-kafka-clients) |
| 8838 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) |
| 8839 | ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 8840 | ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core) |
| 8841 | ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind) |
| 8842 | ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml) |
| 8843 | ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml) |
| 8844 | ("java-commons-compress" ,java-commons-compress) |
| 8845 | ("java-commons-csv" ,java-commons-csv) |
| 8846 | ("java-jeromq" ,java-jeromq) |
| 8847 | ("java-junit" ,java-junit))) |
| 8848 | (native-inputs |
| 8849 | `(("hamcrest" ,java-hamcrest-all) |
| 8850 | ("java-commons-io" ,java-commons-io) |
| 8851 | ("java-commons-lang3" ,java-commons-lang3) |
| 8852 | ("slf4j" ,java-slf4j-api))) |
| 8853 | (arguments |
| 8854 | `(#:tests? #f ; tests require more dependencies |
| 8855 | #:test-dir "src/test" |
| 8856 | #:source-dir "src/main/java" |
| 8857 | #:jar-name "log4j-core.jar" |
| 8858 | #:jdk ,icedtea-8 |
| 8859 | #:make-flags |
| 8860 | ,#~(list (string-append "-Ddist.dir=" #$output "/share/java")) |
| 8861 | #:phases |
| 8862 | (modify-phases %standard-phases |
| 8863 | (add-after 'unpack 'enter-dir |
| 8864 | (lambda _ (chdir "log4j-core") #t))))) |
| 8865 | (synopsis "Core component of the Log4j framework") |
| 8866 | (description "This package provides the core component of the Log4j |
| 8867 | logging framework for Java."))) |
| 8868 | |
| 8869 | (define-public java-log4j-1.2-api |
| 8870 | (package |
| 8871 | (inherit java-log4j-api) |
| 8872 | (name "java-log4j-1.2-api") |
| 8873 | (arguments |
| 8874 | `(#:jar-name "java-log4j-1.2-api.jar" |
| 8875 | #:source-dir "log4j-1.2-api/src/main/java" |
| 8876 | #:jdk ,icedtea-8 |
| 8877 | ;; Tests require maven-model (and other maven subprojects), which is a |
| 8878 | ;; cyclic dependency. |
| 8879 | #:tests? #f)) |
| 8880 | (inputs |
| 8881 | `(("log4j-api" ,java-log4j-api) |
| 8882 | ("log4j-core" ,java-log4j-core) |
| 8883 | ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec) |
| 8884 | ("osgi-core" ,java-osgi-core) |
| 8885 | ("eclipse-osgi" ,java-eclipse-osgi) |
| 8886 | ("java-lmax-disruptor" ,java-lmax-disruptor))))) |
| 8887 | |
| 8888 | (define-public java-commons-cli |
| 8889 | (package |
| 8890 | (name "java-commons-cli") |
| 8891 | (version "1.4") |
| 8892 | (source (origin |
| 8893 | (method url-fetch) |
| 8894 | (uri (string-append "mirror://apache/commons/cli/source/" |
| 8895 | "commons-cli-" version "-src.tar.gz")) |
| 8896 | (sha256 |
| 8897 | (base32 |
| 8898 | "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1")))) |
| 8899 | (build-system ant-build-system) |
| 8900 | ;; TODO: javadoc |
| 8901 | (arguments |
| 8902 | `(#:jar-name "commons-cli.jar" |
| 8903 | #:phases |
| 8904 | (modify-phases %standard-phases |
| 8905 | (replace 'install |
| 8906 | (install-from-pom "pom.xml"))))) |
| 8907 | (native-inputs |
| 8908 | (list java-junit java-hamcrest-core)) |
| 8909 | (home-page "https://commons.apache.org/cli/") |
| 8910 | (synopsis "Command line arguments and options parsing library") |
| 8911 | (description "The Apache Commons CLI library provides an API for parsing |
| 8912 | command line options passed to programs. It is also able to print help |
| 8913 | messages detailing the options available for a command line tool. |
| 8914 | |
| 8915 | Commons CLI supports different types of options: |
| 8916 | |
| 8917 | @itemize |
| 8918 | @item POSIX like options (ie. tar -zxvf foo.tar.gz) |
| 8919 | @item GNU like long options (ie. du --human-readable --max-depth=1) |
| 8920 | @item Java like properties (ie. java -Djava.awt.headless=true Foo) |
| 8921 | @item Short options with value attached (ie. gcc -O2 foo.c) |
| 8922 | @item long options with single hyphen (ie. ant -projecthelp) |
| 8923 | @end itemize |
| 8924 | |
| 8925 | This is a part of the Apache Commons Project.") |
| 8926 | (license license:asl2.0))) |
| 8927 | |
| 8928 | (define-public java-commons-text |
| 8929 | (package |
| 8930 | (name "java-commons-text") |
| 8931 | (version "1.9") |
| 8932 | (source (origin |
| 8933 | (method url-fetch) |
| 8934 | (uri (string-append "mirror://apache/commons/text/source/" |
| 8935 | "commons-text-" version "-src.tar.gz")) |
| 8936 | (sha256 |
| 8937 | (base32 |
| 8938 | "1k99ib2dxlqxb5y94kpzf4ix8xgxz1j3n9kq3ddssqqcccsp5ik2")))) |
| 8939 | (build-system ant-build-system) |
| 8940 | (arguments |
| 8941 | (list #:jar-name "java-commons-text.jar" |
| 8942 | #:source-dir "src/main/java" |
| 8943 | #:test-dir "src/test" |
| 8944 | #:tests? #f ; Tests require JUnit5. |
| 8945 | #:phases |
| 8946 | #~(modify-phases %standard-phases |
| 8947 | (replace 'install |
| 8948 | (install-from-pom "pom.xml"))))) |
| 8949 | (inputs |
| 8950 | (list java-commons-io)) |
| 8951 | (propagated-inputs |
| 8952 | (list java-commons-lang3 |
| 8953 | apache-commons-parent-pom-51)) |
| 8954 | (home-page "https://commons.apache.org/text/") |
| 8955 | (synopsis "Library focused on algorithms working on strings") |
| 8956 | (description "Apache Commons Text is a library focused on algorithms |
| 8957 | working on strings. |
| 8958 | |
| 8959 | This is a part of the Apache Commons Project.") |
| 8960 | (license license:asl2.0))) |
| 8961 | |
| 8962 | (define-public java-commons-codec |
| 8963 | (package |
| 8964 | (name "java-commons-codec") |
| 8965 | (version "1.15") |
| 8966 | (source (origin |
| 8967 | (method url-fetch) |
| 8968 | (uri (string-append "mirror://apache/commons/codec/source/" |
| 8969 | "commons-codec-" version "-src.tar.gz")) |
| 8970 | (sha256 |
| 8971 | (base32 |
| 8972 | "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj")))) |
| 8973 | (build-system ant-build-system) |
| 8974 | (arguments |
| 8975 | `(#:jar-name "java-commons-codec.jar" |
| 8976 | #:source-dir "src/main/java" |
| 8977 | #:test-dir "src/test" |
| 8978 | #:test-exclude (list "**/*AbstractTest.java") |
| 8979 | #:phases |
| 8980 | (modify-phases %standard-phases |
| 8981 | (add-before 'build 'copy-resources |
| 8982 | (lambda _ |
| 8983 | (copy-recursively "src/main/resources" |
| 8984 | "build/classes"))) |
| 8985 | (add-before 'check 'copy-test-resources |
| 8986 | (lambda _ |
| 8987 | (copy-recursively "src/test/resources" |
| 8988 | "build/test-classes"))) |
| 8989 | (add-before 'check 'skip-ravenous-test |
| 8990 | (lambda _ |
| 8991 | ;; This test admits to being "memory hungry", but reliably fails |
| 8992 | ;; even on a machine that should have plenty (12 GiB). Skip it. |
| 8993 | (substitute* |
| 8994 | "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java" |
| 8995 | (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;") |
| 8996 | "return;")))) |
| 8997 | (replace 'install (install-from-pom "pom.xml"))))) |
| 8998 | (native-inputs |
| 8999 | (list java-commons-lang3 java-junit)) |
| 9000 | (propagated-inputs |
| 9001 | (list apache-commons-parent-pom-52)) |
| 9002 | (home-page "https://commons.apache.org/codec/") |
| 9003 | (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs") |
| 9004 | (description "The codec package contains simple encoder and decoders for |
| 9005 | various formats such as Base64 and Hexadecimal. In addition to these widely |
| 9006 | used encoders and decoders, the codec package also maintains a collection of |
| 9007 | phonetic encoding utilities. |
| 9008 | |
| 9009 | This is a part of the Apache Commons Project.") |
| 9010 | (license license:asl2.0))) |
| 9011 | |
| 9012 | (define-public java-commons-daemon |
| 9013 | (package |
| 9014 | (name "java-commons-daemon") |
| 9015 | (version "1.1.0") |
| 9016 | (source (origin |
| 9017 | (method url-fetch) |
| 9018 | (uri (string-append "mirror://apache/commons/daemon/source/" |
| 9019 | "commons-daemon-" version "-src.tar.gz")) |
| 9020 | (sha256 |
| 9021 | (base32 |
| 9022 | "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n")))) |
| 9023 | (build-system ant-build-system) |
| 9024 | (arguments |
| 9025 | `(#:test-target "test" |
| 9026 | #:phases |
| 9027 | (modify-phases %standard-phases |
| 9028 | (add-after 'build 'build-javadoc ant-build-javadoc) |
| 9029 | (replace 'install (install-jars "dist")) |
| 9030 | (add-after 'install 'install-doc (install-javadoc "dist/docs/api"))))) |
| 9031 | (native-inputs |
| 9032 | (list java-junit)) |
| 9033 | (home-page "https://commons.apache.org/daemon/") |
| 9034 | (synopsis "Library to launch Java applications as daemons") |
| 9035 | (description "The Daemon package from Apache Commons can be used to |
| 9036 | implement Java applications which can be launched as daemons. For example the |
| 9037 | program will be notified about a shutdown so that it can perform cleanup tasks |
| 9038 | before its process of execution is destroyed by the operation system. |
| 9039 | |
| 9040 | This package contains the Java library. You will also need the actual binary |
| 9041 | for your architecture which is provided by the jsvc package. |
| 9042 | |
| 9043 | This is a part of the Apache Commons Project.") |
| 9044 | (license license:asl2.0))) |
| 9045 | |
| 9046 | (define-public java-javaewah |
| 9047 | (package |
| 9048 | (name "java-javaewah") |
| 9049 | (version "1.1.6") |
| 9050 | (source (origin |
| 9051 | (method git-fetch) |
| 9052 | (uri (git-reference |
| 9053 | (url "https://github.com/lemire/javaewah/") |
| 9054 | (commit (string-append "JavaEWAH-" version)))) |
| 9055 | (file-name (git-file-name name version)) |
| 9056 | (sha256 |
| 9057 | (base32 |
| 9058 | "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw")))) |
| 9059 | (build-system ant-build-system) |
| 9060 | (arguments `(#:jar-name "javaewah.jar")) |
| 9061 | (inputs |
| 9062 | (list java-junit java-hamcrest-core)) |
| 9063 | (home-page "https://github.com/lemire/javaewah") |
| 9064 | (synopsis "Compressed alternative to the Java @code{BitSet} class") |
| 9065 | (description "This is a word-aligned compressed variant of the Java |
| 9066 | @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like |
| 9067 | compression scheme. It can be used to implement bitmap indexes. |
| 9068 | |
| 9069 | The goal of word-aligned compression is not to achieve the best compression, |
| 9070 | but rather to improve query processing time. Hence, JavaEWAH tries to save CPU |
| 9071 | cycles, maybe at the expense of storage. However, the EWAH scheme is always |
| 9072 | more efficient storage-wise than an uncompressed bitmap (as implemented in the |
| 9073 | @code{BitSet} class by Sun).") |
| 9074 | ;; GPL2.0 derivates are explicitly allowed. |
| 9075 | (license license:asl2.0))) |
| 9076 | |
| 9077 | (define-public java-slf4j-api |
| 9078 | (package |
| 9079 | (name "java-slf4j-api") |
| 9080 | (version "1.7.36") |
| 9081 | (source (origin |
| 9082 | (method git-fetch) |
| 9083 | (uri (git-reference |
| 9084 | (url "https://github.com/qos-ch/slf4j") |
| 9085 | (commit (string-append "v_" version)))) |
| 9086 | (file-name (git-file-name name version)) |
| 9087 | (sha256 |
| 9088 | (base32 |
| 9089 | "05kdsrvacvgdsqj812jhar813asgl2i2xlvh4i4p4i5cxg17bkq3")) |
| 9090 | (modules '((guix build utils))) |
| 9091 | ;; Delete bundled jars. |
| 9092 | (snippet |
| 9093 | '(begin |
| 9094 | (for-each delete-file (find-files "." "\\.jar$")) |
| 9095 | #t)))) |
| 9096 | (build-system ant-build-system) |
| 9097 | (arguments |
| 9098 | `(#:jar-name "slf4j-api.jar" |
| 9099 | #:source-dir "slf4j-api/src/main" |
| 9100 | #:test-dir "slf4j-api/src/test" |
| 9101 | #:phases |
| 9102 | (modify-phases %standard-phases |
| 9103 | (add-after 'build 'regenerate-jar |
| 9104 | (lambda _ |
| 9105 | ;; pom.xml ignores these files in the jar creation process. If we don't, |
| 9106 | ;; we get the error "This code should have never made it into slf4j-api.jar" |
| 9107 | (delete-file-recursively "build/classes/org/slf4j/impl") |
| 9108 | (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C" |
| 9109 | "build/classes" "."))) |
| 9110 | (add-before 'check 'dont-test-abstract-classes |
| 9111 | (lambda _ |
| 9112 | ;; abstract classes are not meant to be run with junit |
| 9113 | (substitute* "build.xml" |
| 9114 | (("<include name=\"\\*\\*/\\*Test.java\" />") |
| 9115 | (string-append "<include name=\"**/*Test.java\" />" |
| 9116 | "<exclude name=\"**/MultithreadedInitializationTest" |
| 9117 | ".java\" />"))) |
| 9118 | #t)) |
| 9119 | (replace 'install |
| 9120 | (install-from-pom "slf4j-api/pom.xml"))))) |
| 9121 | (propagated-inputs |
| 9122 | (list java-slf4j-parent)) |
| 9123 | (native-inputs |
| 9124 | (list java-junit java-hamcrest-core)) |
| 9125 | (home-page "https://www.slf4j.org/") |
| 9126 | (synopsis "Simple logging facade for Java") |
| 9127 | (description "The Simple Logging Facade for Java (SLF4J) serves as a |
| 9128 | simple facade or abstraction for various logging |
| 9129 | frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j}) |
| 9130 | allowing the end user to plug in the desired logging framework at deployment |
| 9131 | time.") |
| 9132 | (license license:expat))) |
| 9133 | |
| 9134 | (define java-slf4j-parent |
| 9135 | (package |
| 9136 | (inherit java-slf4j-api) |
| 9137 | (name "java-slf4j-parent") |
| 9138 | (native-inputs `()) |
| 9139 | (propagated-inputs '()) |
| 9140 | (arguments |
| 9141 | `(#:tests? #f |
| 9142 | #:phases |
| 9143 | (modify-phases %standard-phases |
| 9144 | (delete 'build) |
| 9145 | (delete 'configure) |
| 9146 | (replace 'install |
| 9147 | (install-pom-file "pom.xml"))))))) |
| 9148 | |
| 9149 | (define-public java-slf4j-simple |
| 9150 | (package |
| 9151 | (name "java-slf4j-simple") |
| 9152 | (version (package-version java-slf4j-api)) |
| 9153 | (source (package-source java-slf4j-api)) |
| 9154 | (build-system ant-build-system) |
| 9155 | (arguments |
| 9156 | `(#:jar-name "slf4j-simple.jar" |
| 9157 | #:source-dir "slf4j-simple/src/main" |
| 9158 | #:test-dir "slf4j-simple/src/test" |
| 9159 | #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java") |
| 9160 | #:phases |
| 9161 | (modify-phases %standard-phases |
| 9162 | ;; The tests need some test classes from slf4j-api |
| 9163 | (add-before 'check 'build-slf4j-api-test-helpers |
| 9164 | (lambda _ |
| 9165 | ;; Add current dir to CLASSPATH ... |
| 9166 | (setenv "CLASSPATH" |
| 9167 | (string-append (getcwd) ":" (getenv "CLASSPATH"))) |
| 9168 | ;; ... and build test helper classes here: |
| 9169 | (apply invoke |
| 9170 | `("javac" "-d" "." |
| 9171 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))) |
| 9172 | (replace 'install |
| 9173 | (install-from-pom "slf4j-simple/pom.xml"))))) |
| 9174 | (propagated-inputs |
| 9175 | (list java-slf4j-api)) |
| 9176 | (native-inputs |
| 9177 | (list java-junit java-hamcrest-core)) |
| 9178 | (home-page "https://www.slf4j.org/") |
| 9179 | (synopsis "Simple implementation of simple logging facade for Java") |
| 9180 | (description "SLF4J binding for the Simple implementation, which outputs |
| 9181 | all events to System.err. Only messages of level INFO and higher are |
| 9182 | printed.") |
| 9183 | (license license:expat))) |
| 9184 | |
| 9185 | (define-public java-slf4j-nop |
| 9186 | (package |
| 9187 | (name "java-slf4j-nop") |
| 9188 | (version (package-version java-slf4j-api)) |
| 9189 | (source (package-source java-slf4j-api)) |
| 9190 | (build-system ant-build-system) |
| 9191 | (arguments |
| 9192 | `(#:jar-name "slf4j-nop.jar" |
| 9193 | #:source-dir "slf4j-nop/src/main" |
| 9194 | #:test-dir "slf4j-nop/src/test" |
| 9195 | #:phases (modify-phases %standard-phases |
| 9196 | ;; The tests need some test classes from slf4j-api |
| 9197 | (add-before 'check 'build-slf4j-api-test-helpers |
| 9198 | (lambda _ |
| 9199 | ;; Add current dir to CLASSPATH ... |
| 9200 | (setenv "CLASSPATH" |
| 9201 | (string-append (getcwd) ":" |
| 9202 | (getenv "CLASSPATH"))) |
| 9203 | ;; ... and build test helper classes here: |
| 9204 | (apply invoke |
| 9205 | `("javac" "-d" "." |
| 9206 | ,@(find-files "slf4j-api/src/test" ".*\\.java"))))) |
| 9207 | (replace 'install |
| 9208 | (install-from-pom "slf4j-nop/pom.xml"))))) |
| 9209 | (propagated-inputs (list java-slf4j-api)) |
| 9210 | (native-inputs (list java-junit java-hamcrest-core)) |
| 9211 | (home-page "https://www.slf4j.org/") |
| 9212 | (synopsis "SLF4J binding that silently discards all logging messages") |
| 9213 | (description "Binding/provider for NOP, an implementation that silently |
| 9214 | discards all logging messages.") |
| 9215 | (license license:expat))) |
| 9216 | |
| 9217 | (define-public antlr2 |
| 9218 | (package |
| 9219 | (name "antlr2") |
| 9220 | (version "2.7.7") |
| 9221 | (source (origin |
| 9222 | (method url-fetch) |
| 9223 | (uri (string-append "https://www.antlr2.org/download/antlr-" |
| 9224 | version ".tar.gz")) |
| 9225 | (sha256 |
| 9226 | (base32 |
| 9227 | "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) |
| 9228 | (modules '((guix build utils))) |
| 9229 | (snippet |
| 9230 | '(begin |
| 9231 | (delete-file "antlr.jar") |
| 9232 | (substitute* "lib/cpp/antlr/CharScanner.hpp" |
| 9233 | (("#include <map>") |
| 9234 | (string-append |
| 9235 | "#include <map>\n" |
| 9236 | "#define EOF (-1)\n" |
| 9237 | "#include <strings.h>"))) |
| 9238 | (substitute* "configure" |
| 9239 | (("/bin/sh") "sh")) |
| 9240 | #t)))) |
| 9241 | (build-system gnu-build-system) |
| 9242 | (arguments |
| 9243 | `(#:tests? #f ; no test target |
| 9244 | #:imported-modules ((guix build ant-build-system) |
| 9245 | ,@%default-gnu-imported-modules) |
| 9246 | #:modules (((guix build ant-build-system) #:prefix ant:) |
| 9247 | (guix build gnu-build-system) |
| 9248 | (guix build utils)) |
| 9249 | #:phases |
| 9250 | (modify-phases %standard-phases |
| 9251 | (add-after 'install 'strip-jar-timestamps |
| 9252 | (assoc-ref ant:%standard-phases 'strip-jar-timestamps)) |
| 9253 | (add-before 'configure 'fix-timestamp |
| 9254 | (lambda _ |
| 9255 | (substitute* "configure" |
| 9256 | (("^TIMESTAMP.*") "TIMESTAMP=19700101\n")) |
| 9257 | #t)) |
| 9258 | (add-after 'configure 'fix-bin-ls |
| 9259 | (lambda _ |
| 9260 | (substitute* (find-files "." "Makefile") |
| 9261 | (("/bin/ls") "ls")) |
| 9262 | #t))))) |
| 9263 | (native-inputs |
| 9264 | `(("which" ,which) |
| 9265 | ("zip" ,zip) |
| 9266 | ("java" ,icedtea "jdk"))) |
| 9267 | (inputs |
| 9268 | `(("java" ,icedtea))) |
| 9269 | (home-page "https://www.antlr2.org") |
| 9270 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
| 9271 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) |
| 9272 | is a language tool that provides a framework for constructing recognizers, |
| 9273 | compilers, and translators from grammatical descriptions containing Java, C#, |
| 9274 | C++, or Python actions. ANTLR provides excellent support for tree construction, |
| 9275 | tree walking, and translation.") |
| 9276 | (license license:public-domain))) |
| 9277 | |
| 9278 | (define-public java-stringtemplate-3 |
| 9279 | (package |
| 9280 | (name "java-stringtemplate") |
| 9281 | (version "3.2.1") |
| 9282 | (source (origin |
| 9283 | (method url-fetch) |
| 9284 | (uri (string-append "https://github.com/antlr/website-st4/raw/" |
| 9285 | "gh-pages/download/stringtemplate-" |
| 9286 | version ".tar.gz")) |
| 9287 | (sha256 |
| 9288 | (base32 |
| 9289 | "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is")))) |
| 9290 | (build-system ant-build-system) |
| 9291 | (arguments |
| 9292 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 9293 | #:test-dir "test" |
| 9294 | #:modules ((guix build ant-build-system) |
| 9295 | (guix build utils) |
| 9296 | (srfi srfi-1)) |
| 9297 | #:phases |
| 9298 | (modify-phases %standard-phases |
| 9299 | (add-before 'check 'fix-tests |
| 9300 | (lambda _ |
| 9301 | (substitute* "build.xml" |
| 9302 | (("\\$\\{test.home\\}/java") |
| 9303 | "${test.home}/org")) |
| 9304 | #t)) |
| 9305 | (add-before 'build 'generate-grammar |
| 9306 | (lambda _ |
| 9307 | (with-directory-excursion "src/org/antlr/stringtemplate/language/" |
| 9308 | (for-each (lambda (file) |
| 9309 | (format #t "~a\n" file) |
| 9310 | (invoke "antlr" file)) |
| 9311 | '("template.g" "angle.bracket.template.g" "action.g" |
| 9312 | "eval.g" "group.g" "interface.g"))) |
| 9313 | #t))))) |
| 9314 | (native-inputs |
| 9315 | `(("antlr" ,antlr2) |
| 9316 | ("java-junit" ,java-junit))) |
| 9317 | (home-page "https://www.stringtemplate.org") |
| 9318 | (synopsis "Template engine to generate formatted text output") |
| 9319 | (description "StringTemplate is a java template engine (with ports for C#, |
| 9320 | Objective-C, JavaScript, Scala) for generating source code, web pages, emails, |
| 9321 | or any other formatted text output. StringTemplate is particularly good at |
| 9322 | code generators, multiple site skins, and internationalization / localization. |
| 9323 | StringTemplate also powers ANTLR.") |
| 9324 | (license license:bsd-3))) |
| 9325 | |
| 9326 | ;; antlr3 is partially written using antlr3 grammar files. It also depends on |
| 9327 | ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar |
| 9328 | ;; files and uses antlr3 at runtime. The latest version requires a recent version |
| 9329 | ;; of antlr3 at runtime. |
| 9330 | ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3. |
| 9331 | ;; This version of ST4 is sufficient for the latest antlr3. |
| 9332 | ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build |
| 9333 | ;; the latest ST4 with it. Then we build our final antlr3 that will be linked |
| 9334 | ;; against the latest ST4. |
| 9335 | ;; antlr3.3 still depends on antlr3 to generate some files, so we use an |
| 9336 | ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses |
| 9337 | ;; only grammar files with the antlr2 syntax. |
| 9338 | ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3. |
| 9339 | |
| 9340 | (define-public java-stringtemplate |
| 9341 | (package (inherit java-stringtemplate-3) |
| 9342 | (name "java-stringtemplate") |
| 9343 | (version "4.0.8") |
| 9344 | (source (origin |
| 9345 | (method url-fetch) |
| 9346 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/" |
| 9347 | version ".tar.gz")) |
| 9348 | (file-name (string-append name "-" version ".tar.gz")) |
| 9349 | (sha256 |
| 9350 | (base32 |
| 9351 | "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087")))) |
| 9352 | (build-system ant-build-system) |
| 9353 | (arguments |
| 9354 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 9355 | #:tests? #f ; FIXME: tests fail for unknown reasons |
| 9356 | #:test-dir "test" |
| 9357 | #:modules ((guix build ant-build-system) |
| 9358 | (guix build utils) |
| 9359 | (srfi srfi-1)) |
| 9360 | #:phases |
| 9361 | (modify-phases %standard-phases |
| 9362 | (add-before 'check 'fix-test-target |
| 9363 | (lambda _ |
| 9364 | (substitute* "build.xml" |
| 9365 | (("\\$\\{test.home\\}/java") "${test.home}/") |
| 9366 | (("\\*Test.java") "Test*.java")) |
| 9367 | #t)) |
| 9368 | (add-before 'build 'generate-grammar |
| 9369 | (lambda _ |
| 9370 | (with-directory-excursion "src/org/stringtemplate/v4/compiler/" |
| 9371 | (for-each (lambda (file) |
| 9372 | (format #t "~a\n" file) |
| 9373 | (invoke "antlr3" file)) |
| 9374 | '("STParser.g" "Group.g" "CodeGenerator.g"))) |
| 9375 | #t))))) |
| 9376 | (inputs |
| 9377 | `(("antlr3" ,antlr3-bootstrap) |
| 9378 | ("antlr2" ,antlr2) |
| 9379 | ("java-stringtemplate" ,java-stringtemplate-3) |
| 9380 | ("java-junit" ,java-junit))))) |
| 9381 | |
| 9382 | (define java-stringtemplate-4.0.6 |
| 9383 | (package (inherit java-stringtemplate) |
| 9384 | (name "java-stringtemplate") |
| 9385 | (version "4.0.6") |
| 9386 | (source (origin |
| 9387 | (method url-fetch) |
| 9388 | (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-" |
| 9389 | version ".tar.gz")) |
| 9390 | (file-name (string-append name "-" version ".tar.gz")) |
| 9391 | (sha256 |
| 9392 | (base32 |
| 9393 | "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp")))) |
| 9394 | (inputs |
| 9395 | `(("antlr3" ,antlr3-3.3) |
| 9396 | ("antlr2" ,antlr2) |
| 9397 | ("java-stringtemplate" ,java-stringtemplate-3))))) |
| 9398 | |
| 9399 | (define-public antlr3 |
| 9400 | (package |
| 9401 | (name "antlr3") |
| 9402 | (version "3.5.2") |
| 9403 | (source (origin |
| 9404 | (method git-fetch) |
| 9405 | (uri (git-reference |
| 9406 | (url "https://github.com/antlr/antlr3") |
| 9407 | (commit version))) |
| 9408 | (file-name (git-file-name name version)) |
| 9409 | (sha256 |
| 9410 | (base32 |
| 9411 | "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf")))) |
| 9412 | (build-system ant-build-system) |
| 9413 | (arguments |
| 9414 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 9415 | #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3" |
| 9416 | #:tests? #f |
| 9417 | #:phases |
| 9418 | (modify-phases %standard-phases |
| 9419 | (add-after 'install 'bin-install |
| 9420 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 9421 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
| 9422 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 9423 | (mkdir-p bin) |
| 9424 | (with-output-to-file (string-append bin "/antlr3") |
| 9425 | (lambda _ |
| 9426 | (display |
| 9427 | (string-append "#!" (which "sh") "\n" |
| 9428 | "java -cp " jar "/" ,name "-" ,version ".jar:" |
| 9429 | (string-concatenate |
| 9430 | (find-files (assoc-ref inputs "stringtemplate") |
| 9431 | ".*\\.jar")) |
| 9432 | ":" |
| 9433 | (string-concatenate |
| 9434 | (find-files (assoc-ref inputs "stringtemplate4") |
| 9435 | ".*\\.jar")) |
| 9436 | ":" |
| 9437 | (string-concatenate |
| 9438 | (find-files (string-append |
| 9439 | (assoc-ref inputs "antlr") |
| 9440 | "/lib") |
| 9441 | ".*\\.jar")) |
| 9442 | " org.antlr.Tool $*")))) |
| 9443 | (chmod (string-append bin "/antlr3") #o755)) |
| 9444 | #t)) |
| 9445 | (add-before 'build 'generate-grammar |
| 9446 | (lambda _ |
| 9447 | (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") |
| 9448 | (for-each (lambda (file) |
| 9449 | (display file) |
| 9450 | (newline) |
| 9451 | (invoke "antlr3" file)) |
| 9452 | '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" |
| 9453 | "AssignTokenTypesWalker.g" |
| 9454 | "ActionTranslator.g" "TreeToNFAConverter.g" |
| 9455 | "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g" |
| 9456 | "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g")) |
| 9457 | (substitute* "ANTLRParser.java" |
| 9458 | (("public Object getTree") "public GrammarAST getTree")) |
| 9459 | (substitute* "ANTLRv3Parser.java" |
| 9460 | (("public Object getTree") "public CommonTree getTree")) |
| 9461 | (chdir "../../../../../java") |
| 9462 | (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" |
| 9463 | (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; |
| 9464 | import org.antlr.grammar.v3.ANTLRTreePrinter;")) |
| 9465 | (substitute* "org/antlr/tool/ErrorManager.java" |
| 9466 | (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) |
| 9467 | (chdir "../../../..") |
| 9468 | #t)) |
| 9469 | (add-before 'build 'fix-build-xml |
| 9470 | (lambda _ |
| 9471 | (substitute* "build.xml" |
| 9472 | (("target name=\"compile\">") |
| 9473 | "target name=\"compile\"> |
| 9474 | <copy todir=\"${classes.dir}\"> |
| 9475 | <fileset dir=\"tool/src/main/resources\"> |
| 9476 | <include name=\"**/*.stg\"/> |
| 9477 | <include name=\"**/*.st\"/> |
| 9478 | <include name=\"**/*.sti\"/> |
| 9479 | <include name=\"**/STLexer.tokens\"/> |
| 9480 | </fileset> |
| 9481 | </copy>")) |
| 9482 | #t))))) |
| 9483 | (native-inputs |
| 9484 | `(("antlr" ,antlr2) |
| 9485 | ("antlr3" ,antlr3-bootstrap))) |
| 9486 | (inputs |
| 9487 | `(("junit" ,java-junit) |
| 9488 | ("stringtemplate" ,java-stringtemplate-3) |
| 9489 | ("stringtemplate4" ,java-stringtemplate))) |
| 9490 | (propagated-inputs |
| 9491 | `(("stringtemplate" ,java-stringtemplate-3) |
| 9492 | ("antlr" ,antlr2) |
| 9493 | ("stringtemplate4" ,java-stringtemplate-4.0.6))) |
| 9494 | (home-page "https://www.antlr3.org") |
| 9495 | (synopsis "Framework for constructing recognizers, compilers, and translators") |
| 9496 | (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) |
| 9497 | is a language tool that provides a framework for constructing recognizers, |
| 9498 | compilers, and translators from grammatical descriptions containing Java, C#, |
| 9499 | C++, or Python actions. ANTLR provides excellent support for tree construction, |
| 9500 | tree walking, and translation.") |
| 9501 | (license license:bsd-3))) |
| 9502 | |
| 9503 | (define antlr3-bootstrap |
| 9504 | (package |
| 9505 | (inherit antlr3) |
| 9506 | (name "antlr3-bootstrap") |
| 9507 | (native-inputs |
| 9508 | `(("antlr" ,antlr2) |
| 9509 | ("antlr3" ,antlr3-3.3))) |
| 9510 | (inputs |
| 9511 | `(("junit" ,java-junit))))) |
| 9512 | |
| 9513 | (define-public antlr3-3.3 |
| 9514 | (package |
| 9515 | (inherit antlr3) |
| 9516 | (name "antlr3") |
| 9517 | (version "3.3") |
| 9518 | (source (origin |
| 9519 | (method url-fetch) |
| 9520 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
| 9521 | "gh-pages/download/antlr-" |
| 9522 | version ".tar.gz")) |
| 9523 | (sha256 |
| 9524 | (base32 |
| 9525 | "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m")) |
| 9526 | (patches |
| 9527 | (search-patches "antlr3-3_3-fix-java8-compilation.patch")))) |
| 9528 | (arguments |
| 9529 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 9530 | #:source-dir (string-join '("tool/src/main/java" |
| 9531 | "runtime/Java/src/main/java" |
| 9532 | "tool/src/main/antlr2" |
| 9533 | "tool/src/main/antlr3") |
| 9534 | ":") |
| 9535 | #:tests? #f ; FIXME: tests seem to require maven plugin |
| 9536 | #:modules ((guix build ant-build-system) |
| 9537 | (guix build utils) |
| 9538 | (srfi srfi-1)) |
| 9539 | #:phases |
| 9540 | (modify-phases %standard-phases |
| 9541 | (add-after 'install 'bin-install |
| 9542 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 9543 | (let* ((out (assoc-ref outputs "out")) |
| 9544 | (jar (string-append out "/share/java")) |
| 9545 | (bin (string-append out "/bin"))) |
| 9546 | (mkdir-p bin) |
| 9547 | (with-output-to-file (string-append bin "/antlr3") |
| 9548 | (lambda _ |
| 9549 | (display |
| 9550 | (string-append |
| 9551 | "#!" (which "sh") "\n" |
| 9552 | "java -cp " jar "/antlr3-3.3.jar:" |
| 9553 | (string-join |
| 9554 | (append (find-files (assoc-ref inputs "java-stringtemplate") |
| 9555 | ".*\\.jar$") |
| 9556 | (find-files (string-append (assoc-ref inputs "antlr") |
| 9557 | "/lib") |
| 9558 | ".*\\.jar$")) |
| 9559 | ":") |
| 9560 | " org.antlr.Tool $*")))) |
| 9561 | (chmod (string-append bin "/antlr3") #o755) |
| 9562 | #t))) |
| 9563 | (add-before 'build 'generate-grammar |
| 9564 | (lambda _ |
| 9565 | (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java" |
| 9566 | (("import org.antlr.grammar.v2.\\*;") |
| 9567 | "import org.antlr.grammar.v2.*;\n |
| 9568 | import org.antlr.grammar.v2.TreeToNFAConverter;\n |
| 9569 | import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n |
| 9570 | import org.antlr.grammar.v2.ANTLRTreePrinter;")) |
| 9571 | (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/" |
| 9572 | (for-each (lambda (file) |
| 9573 | (format #t "~a\n" file) |
| 9574 | (invoke "antlr" file)) |
| 9575 | '("antlr.g" "antlr.print.g" "assign.types.g" |
| 9576 | "buildnfa.g" "codegen.g" "define.g"))) |
| 9577 | (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/" |
| 9578 | (for-each (lambda (file) |
| 9579 | (format #t "~a\n" file) |
| 9580 | (invoke "antlr3" file)) |
| 9581 | '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g" |
| 9582 | "ANTLRv3Tree.g"))) |
| 9583 | #t)) |
| 9584 | (add-before 'build 'fix-build-xml |
| 9585 | (lambda _ |
| 9586 | (substitute* "build.xml" |
| 9587 | (("target name=\"compile\">") |
| 9588 | "target name=\"compile\"> |
| 9589 | <copy todir=\"${classes.dir}\"> |
| 9590 | <fileset dir=\"tool/src/main/resources\"> |
| 9591 | <include name=\"**/*.stg\"/> |
| 9592 | <include name=\"**/*.st\"/> |
| 9593 | <include name=\"**/*.sti\"/> |
| 9594 | <include name=\"**/STLexer.tokens\"/> |
| 9595 | </fileset> |
| 9596 | </copy>")) |
| 9597 | #t))))) |
| 9598 | (native-inputs |
| 9599 | `(("antlr" ,antlr2) |
| 9600 | ("antlr3" ,antlr3-3.1))) |
| 9601 | (inputs |
| 9602 | `(("junit" ,java-junit))) |
| 9603 | (propagated-inputs |
| 9604 | `(("java-stringtemplate" ,java-stringtemplate-3) |
| 9605 | ("antlr" ,antlr2))))) |
| 9606 | |
| 9607 | (define-public antlr3-3.1 |
| 9608 | (package |
| 9609 | (inherit antlr3) |
| 9610 | (version "3.1") |
| 9611 | (source (origin |
| 9612 | (method url-fetch) |
| 9613 | (uri (string-append "https://github.com/antlr/website-antlr3/raw/" |
| 9614 | "gh-pages/download/antlr-" |
| 9615 | version ".tar.gz")) |
| 9616 | (sha256 |
| 9617 | (base32 |
| 9618 | "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z")) |
| 9619 | (patches |
| 9620 | (search-patches "antlr3-3_1-fix-java8-compilation.patch")))) |
| 9621 | (arguments |
| 9622 | `(#:jar-name (string-append "antlr3-" ,version ".jar") |
| 9623 | #:source-dir "src:runtime/Java/src" |
| 9624 | #:tests? #f |
| 9625 | #:phases |
| 9626 | (modify-phases %standard-phases |
| 9627 | (add-after 'install 'bin-install |
| 9628 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 9629 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
| 9630 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 9631 | (mkdir-p bin) |
| 9632 | (with-output-to-file (string-append bin "/antlr3") |
| 9633 | (lambda _ |
| 9634 | (display |
| 9635 | (string-append "#!" (which "sh") "\n" |
| 9636 | "java -cp " jar "/antlr3-3.1.jar:" |
| 9637 | (string-concatenate |
| 9638 | (find-files (assoc-ref inputs "stringtemplate") |
| 9639 | ".*\\.jar")) |
| 9640 | ":" |
| 9641 | (string-concatenate |
| 9642 | (find-files (string-append |
| 9643 | (assoc-ref inputs "antlr") |
| 9644 | "/lib") |
| 9645 | ".*\\.jar")) |
| 9646 | " org.antlr.Tool $*")))) |
| 9647 | (chmod (string-append bin "/antlr3") #o755)) |
| 9648 | #t)) |
| 9649 | (add-before 'build 'generate-grammar |
| 9650 | (lambda _ |
| 9651 | (let ((dir "src/org/antlr/tool/")) |
| 9652 | (for-each (lambda (file) |
| 9653 | (display file) |
| 9654 | (newline) |
| 9655 | (invoke "antlr" "-o" dir (string-append dir file))) |
| 9656 | '("antlr.g" "antlr.print.g" "assign.types.g" |
| 9657 | "buildnfa.g" "define.g"))) |
| 9658 | (format #t "codegen.g\n") |
| 9659 | (invoke "antlr" "-o" "src/org/antlr/codegen" |
| 9660 | "src/org/antlr/codegen/codegen.g") |
| 9661 | #t)) |
| 9662 | (add-before 'build 'fix-build-xml |
| 9663 | (lambda _ |
| 9664 | (substitute* "build.xml" |
| 9665 | (("target name=\"compile\">") |
| 9666 | "target name=\"compile\"> |
| 9667 | <copy todir=\"${classes.dir}\"> |
| 9668 | <fileset dir=\"src\"> |
| 9669 | <include name=\"**/*.stg\"/> |
| 9670 | <include name=\"**/*.st\"/> |
| 9671 | <include name=\"**/*.sti\"/> |
| 9672 | <include name=\"**/STLexer.tokens\"/> |
| 9673 | </fileset> |
| 9674 | </copy>")) |
| 9675 | #t))))) |
| 9676 | (native-inputs |
| 9677 | `(("antlr" ,antlr2))) |
| 9678 | (inputs |
| 9679 | `(("junit" ,java-junit))) |
| 9680 | (propagated-inputs |
| 9681 | `(("stringtemplate" ,java-stringtemplate-3))))) |
| 9682 | |
| 9683 | (define-public java-treelayout |
| 9684 | (package |
| 9685 | (name "java-treelayout") |
| 9686 | (version "1.0.3") |
| 9687 | (source (origin |
| 9688 | (method git-fetch) |
| 9689 | (uri (git-reference |
| 9690 | (url "https://github.com/abego/treelayout") |
| 9691 | (commit (string-append "v" version)))) |
| 9692 | (file-name (git-file-name name version)) |
| 9693 | (sha256 |
| 9694 | (base32 |
| 9695 | "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak")))) |
| 9696 | (build-system ant-build-system) |
| 9697 | (arguments |
| 9698 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 9699 | #:source-dir "org.abego.treelayout/src/main/java" |
| 9700 | #:test-dir "org.abego.treelayout/src/test")) |
| 9701 | (inputs |
| 9702 | (list java-junit)) |
| 9703 | (native-inputs |
| 9704 | (list java-hamcrest-core)) |
| 9705 | (home-page "https://treelayout.sourceforge.net") |
| 9706 | (synopsis "Tree Layout Algorithm in Java") |
| 9707 | (description "TreeLayout creates tree layouts for arbitrary trees. It is |
| 9708 | not restricted to a specific output or format, but can be used for any kind of |
| 9709 | two dimensional diagram. Examples are Swing based components, SVG files, etc. |
| 9710 | This is possible because TreeLayout separates the layout of a tree from the |
| 9711 | actual rendering.") |
| 9712 | (license license:bsd-3))) |
| 9713 | |
| 9714 | (define-public java-antlr4-runtime |
| 9715 | (package |
| 9716 | (name "java-antlr4-runtime") |
| 9717 | (version "4.10.1") |
| 9718 | (source (origin |
| 9719 | (method git-fetch) |
| 9720 | (uri (git-reference |
| 9721 | (url "https://github.com/antlr/antlr4") |
| 9722 | (commit version))) |
| 9723 | (file-name (git-file-name name version)) |
| 9724 | (sha256 |
| 9725 | (base32 |
| 9726 | "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7")) |
| 9727 | (patches |
| 9728 | (search-patches "java-antlr4-Add-standalone-generator.patch")))) |
| 9729 | (build-system ant-build-system) |
| 9730 | (arguments |
| 9731 | `(#:jar-name "java-antlr4-runtime.jar" |
| 9732 | #:source-dir "runtime/Java/src/org" |
| 9733 | #:tests? #f; tests depend on java-antlr4 itself |
| 9734 | #:phases |
| 9735 | (modify-phases %standard-phases |
| 9736 | (add-before 'build 'copy-resources |
| 9737 | (lambda _ |
| 9738 | (copy-recursively "runtime/Java/src/main/dot" |
| 9739 | "build/classes") |
| 9740 | #t))))) |
| 9741 | (home-page "https://www.antlr.org") |
| 9742 | (synopsis "ANTLR runtime library") |
| 9743 | (description "This package contains the runtime library used with generated |
| 9744 | sources by ANTLR.") |
| 9745 | (license license:bsd-3))) |
| 9746 | |
| 9747 | (define-public java-antlr4-runtime-for-graal-truffle |
| 9748 | (package |
| 9749 | (inherit java-antlr4-runtime) |
| 9750 | (name "java-antlr4-runtime-for-graal-truffle") |
| 9751 | (version "4.13.2") |
| 9752 | (source (origin |
| 9753 | (method git-fetch) |
| 9754 | (uri (git-reference |
| 9755 | (url "https://github.com/antlr/antlr4") |
| 9756 | (commit version))) |
| 9757 | (file-name (git-file-name name version)) |
| 9758 | (sha256 |
| 9759 | (base32 |
| 9760 | "1dpmqjq5z0r0543jfsbl9rwjrv459dxj378vs6qhy52hw4pm270g")))))) |
| 9761 | |
| 9762 | (define-public java-antlr4-runtime-cpp |
| 9763 | (package |
| 9764 | (inherit java-antlr4-runtime) |
| 9765 | (name "java-antlr4-runtime-cpp") |
| 9766 | (outputs '("out" "static")) |
| 9767 | (build-system cmake-build-system) |
| 9768 | (arguments |
| 9769 | (list |
| 9770 | ;; TODO: try to run the tests under |
| 9771 | ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4. |
| 9772 | #:tests? #f ;no CMake test target |
| 9773 | ;; TODO: Building the tests wants to download googletest. |
| 9774 | #:configure-flags #~'("-DANTLR_BUILD_CPP_TESTS=OFF") |
| 9775 | #:phases |
| 9776 | #~(modify-phases %standard-phases |
| 9777 | (add-after 'unpack 'chdir |
| 9778 | (lambda _ |
| 9779 | (chdir "runtime/Cpp"))) |
| 9780 | (add-after 'install 'move-static-library |
| 9781 | (lambda* (#:key outputs #:allow-other-keys) |
| 9782 | (let ((static (assoc-ref outputs "static")) |
| 9783 | (libantlr4-runtime.a (search-input-file |
| 9784 | outputs "lib/libantlr4-runtime.a"))) |
| 9785 | (mkdir-p (string-append static "/lib")) |
| 9786 | (rename-file |
| 9787 | libantlr4-runtime.a |
| 9788 | (string-append static "/lib/" |
| 9789 | (basename libantlr4-runtime.a))))))))) |
| 9790 | (native-inputs (list pkg-config)) |
| 9791 | (inputs (list `(,util-linux "lib"))) ;libuuid |
| 9792 | (synopsis "ANTL C++ runtime library") |
| 9793 | (description "This package contains the C++ runtime library used with C++ |
| 9794 | generated sources by ANTLR."))) |
| 9795 | |
| 9796 | (define-public java-antlr4-runtime-python |
| 9797 | (package |
| 9798 | (inherit java-antlr4-runtime) |
| 9799 | (name "java-antlr4-runtime-python") |
| 9800 | (outputs '("out")) |
| 9801 | (build-system pyproject-build-system) |
| 9802 | (arguments |
| 9803 | (list |
| 9804 | #:tests? #f ; tests require antlr |
| 9805 | #:phases |
| 9806 | #~(modify-phases %standard-phases |
| 9807 | (add-after 'unpack 'chdir |
| 9808 | (lambda _ |
| 9809 | (chdir "runtime/Python3")))))) |
| 9810 | (native-inputs (list pkg-config python-setuptools)) |
| 9811 | (inputs (list `(,util-linux "lib"))) ; libuuid |
| 9812 | (synopsis "ANTLR Python runtime library") |
| 9813 | (description "This package contains the Python runtime library used with |
| 9814 | Python generated sources by ANTLR."))) |
| 9815 | |
| 9816 | (define-public antlr4 |
| 9817 | (package |
| 9818 | (inherit java-antlr4-runtime) |
| 9819 | (name "antlr4") |
| 9820 | (arguments |
| 9821 | `(#:jar-name "antlr4.jar" |
| 9822 | #:source-dir "tool/src" |
| 9823 | #:test-dir "tool-testsuite/test:runtime-testsuite/test" |
| 9824 | #:test-include (list "**/Test*.java") |
| 9825 | #:test-exclude (list |
| 9826 | ;; These have no runnable methods and fail because |
| 9827 | ;; test-include above is too broad. |
| 9828 | "**/TestContext.java" |
| 9829 | "**/TestOutputReading.java" |
| 9830 | ;; no @Test methods |
| 9831 | "**/TestParserErrors.java" |
| 9832 | "**/TestSemPredEvalParser.java" |
| 9833 | "**/TestSets.java" |
| 9834 | "**/TestListeners.java" |
| 9835 | "**/TestParseTrees.java" |
| 9836 | "**/TestParserExec.java" |
| 9837 | "**/TestLexerErrors.java" |
| 9838 | "**/TestPerformance.java" |
| 9839 | "**/TestCompositeParsers.java" |
| 9840 | "**/TestLexerExec.java" |
| 9841 | "**/TestSemPredEvalLexer.java" |
| 9842 | "**/TestLeftRecursion.java" |
| 9843 | "**/TestFullContextParsing.java" |
| 9844 | "**/TestCompositeLexers.java" |
| 9845 | ;; Null pointer exception |
| 9846 | "**/TestCompositeGrammars.java") |
| 9847 | #:phases |
| 9848 | (modify-phases %standard-phases |
| 9849 | (add-before 'build 'fix-build.xml |
| 9850 | (lambda _ |
| 9851 | ;; tests are not in a java subdirectory |
| 9852 | (substitute* "build.xml" |
| 9853 | (("\\$\\{test.home\\}/java") "${test.home}")) |
| 9854 | #t)) |
| 9855 | ;; tests require to have a working antlr4 binary |
| 9856 | (delete 'check) |
| 9857 | (add-after 'install 'check |
| 9858 | (lambda _ |
| 9859 | (invoke "ant" "compile-tests") |
| 9860 | (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test") |
| 9861 | (invoke "ant" "check" "-Dtest.home=tool-testsuite/test") |
| 9862 | #t)) |
| 9863 | (add-before 'check 'remove-unrelated-languages |
| 9864 | (lambda _ |
| 9865 | ;; There are tests for other languages that ANTLR can generate, but |
| 9866 | ;; we don't have the infrastructure for that yet. Let's test Java |
| 9867 | ;; generation only. |
| 9868 | (for-each |
| 9869 | (lambda (language) |
| 9870 | (delete-file-recursively |
| 9871 | (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/" |
| 9872 | language))) |
| 9873 | '("cpp" "csharp" "go" "javascript" "php" "python" "python2" |
| 9874 | "python3" "swift")) |
| 9875 | #t)) |
| 9876 | (add-before 'check 'generate-test-parsers |
| 9877 | (lambda* (#:key outputs #:allow-other-keys) |
| 9878 | (define (run-antlr dir filename package) |
| 9879 | (invoke "antlr4" "-lib" dir "-visitor" "-no-listener" |
| 9880 | "-package" package (string-append dir "/" filename) |
| 9881 | "-Xlog")) |
| 9882 | (setenv "PATH" (string-append (getenv "PATH") ":" |
| 9883 | (assoc-ref outputs "out") "/bin")) |
| 9884 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" |
| 9885 | "Java.g4" "org.antlr.v4.test.runtime.java.api") |
| 9886 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" |
| 9887 | "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api") |
| 9888 | (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api" |
| 9889 | "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api") |
| 9890 | #t)) |
| 9891 | (add-before 'check 'remove-graphemes |
| 9892 | (lambda _ |
| 9893 | ;; When running antlr on grahemes.g4, we get a runtime exception: |
| 9894 | ;; set is empty. So delete the file that depends on it. |
| 9895 | (delete-file |
| 9896 | "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java") |
| 9897 | #t)) |
| 9898 | (add-after 'install 'bin-install |
| 9899 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 9900 | (let ((jar (string-append (assoc-ref outputs "out") "/share/java")) |
| 9901 | (bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 9902 | (mkdir-p bin) |
| 9903 | (with-output-to-file (string-append bin "/antlr4") |
| 9904 | (lambda _ |
| 9905 | (display |
| 9906 | (string-append "#!" (which "sh") "\n" |
| 9907 | "java -cp " jar "/antlr4.jar:" |
| 9908 | (string-join |
| 9909 | (apply |
| 9910 | append |
| 9911 | (map |
| 9912 | (lambda (input) |
| 9913 | (find-files (assoc-ref inputs input) |
| 9914 | ".*\\.jar")) |
| 9915 | '("antlr3" "java-stringtemplate" |
| 9916 | "java-antlr4-runtime" "java-treelayout" |
| 9917 | "java-jsonp-api" "java-icu4j"))) |
| 9918 | ":") |
| 9919 | " org.antlr.v4.Tool $*")))) |
| 9920 | (chmod (string-append bin "/antlr4") #o755) |
| 9921 | #t))) |
| 9922 | (add-before 'build 'copy-resources |
| 9923 | (lambda _ |
| 9924 | (copy-recursively "tool/resources/" "build/classes") |
| 9925 | #t)) |
| 9926 | (add-before 'build 'generate-unicode |
| 9927 | (lambda _ |
| 9928 | ;; First: build the generator |
| 9929 | (invoke "javac" "-cp" (getenv "CLASSPATH") |
| 9930 | "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java" |
| 9931 | "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java") |
| 9932 | ;; Then use it |
| 9933 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 9934 | ":tool/src:runtime/Java") |
| 9935 | "org.antlr.v4.unicode.UnicodeRenderer" |
| 9936 | "tool/resources/org/antlr/v4/tool/templates" |
| 9937 | "unicodedata" |
| 9938 | "tool/src/org/antlr/v4/unicode/UnicodeData.java") |
| 9939 | ;; It seems there is a bug with our ST4 |
| 9940 | (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java" |
| 9941 | (("\\\\>") ">")) |
| 9942 | ;; Remove the additional file |
| 9943 | (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java") |
| 9944 | #t)) |
| 9945 | (add-before 'build 'generate-grammar |
| 9946 | (lambda* (#:key inputs #:allow-other-keys) |
| 9947 | (with-directory-excursion "tool/src/org/antlr/v4/parse" |
| 9948 | (for-each (lambda (file) |
| 9949 | (display file) |
| 9950 | (newline) |
| 9951 | (invoke "antlr3" file)) |
| 9952 | '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g" |
| 9953 | "GrammarTreeVisitor.g" "ATNBuilder.g" |
| 9954 | "ActionSplitter.g" "LeftRecursiveRuleWalker.g"))) |
| 9955 | (with-directory-excursion "tool/src/org/antlr/v4/codegen" |
| 9956 | (install-file "../parse/ANTLRParser.tokens" ".") |
| 9957 | (display "SourceGenTriggers.g\n") |
| 9958 | (invoke "antlr3" "SourceGenTriggers.g")) |
| 9959 | #t))))) |
| 9960 | (inputs |
| 9961 | (list antlr3 |
| 9962 | java-antlr4-runtime |
| 9963 | java-icu4j |
| 9964 | java-jsonp-api |
| 9965 | java-stringtemplate |
| 9966 | java-treelayout)) |
| 9967 | (native-inputs |
| 9968 | (list java-junit)) |
| 9969 | (synopsis "Parser and lexer generator in Java") |
| 9970 | (description "ANTLR (ANother Tool for Language Recognition) is a powerful |
| 9971 | parser generator for reading, processing, executing, or translating structured |
| 9972 | text or binary files. It's widely used to build languages, tools, and |
| 9973 | frameworks. From a grammar, ANTLR generates a parser that can build and walk |
| 9974 | parse trees."))) |
| 9975 | |
| 9976 | (define-public java-antlr4-runtime-4.1 |
| 9977 | (package |
| 9978 | (inherit java-antlr4-runtime) |
| 9979 | (version "4.1") |
| 9980 | (source (origin |
| 9981 | (method git-fetch) |
| 9982 | (uri (git-reference |
| 9983 | (url "https://github.com/antlr/antlr4") |
| 9984 | (commit version))) |
| 9985 | (file-name (git-file-name "antlr4" version)) |
| 9986 | (sha256 |
| 9987 | (base32 |
| 9988 | "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1")))) |
| 9989 | (arguments |
| 9990 | (substitute-keyword-arguments (package-arguments java-antlr4-runtime) |
| 9991 | ((#:phases phases) |
| 9992 | `(modify-phases ,phases |
| 9993 | (add-before 'configure 'chmod |
| 9994 | (lambda _ |
| 9995 | (chmod "build.xml" #o644) |
| 9996 | #t)))))) |
| 9997 | (inputs |
| 9998 | (list java-treelayout)))) |
| 9999 | |
| 10000 | (define-public antlr4-4.1 |
| 10001 | (package |
| 10002 | (inherit antlr4) |
| 10003 | (version (package-version java-antlr4-runtime-4.1)) |
| 10004 | (source (package-source java-antlr4-runtime-4.1)) |
| 10005 | (arguments |
| 10006 | (substitute-keyword-arguments (package-arguments antlr4) |
| 10007 | ((#:test-dir _) |
| 10008 | "tool/test") |
| 10009 | ((#:test-exclude excludes) |
| 10010 | `(list "**/TestParseErrors.java" |
| 10011 | "**/TestTopologicalSort.java" |
| 10012 | ,@excludes)) |
| 10013 | ((#:phases phases) |
| 10014 | `(modify-phases ,phases |
| 10015 | (delete 'generate-unicode) |
| 10016 | (replace 'check |
| 10017 | (lambda _ |
| 10018 | (invoke "ant" "check") |
| 10019 | #t)) |
| 10020 | (add-before 'configure 'chmod |
| 10021 | (lambda _ |
| 10022 | (chmod "build.xml" #o644) |
| 10023 | #t)) |
| 10024 | (delete 'remove-graphemes) |
| 10025 | (delete 'remove-unrelated-languages) |
| 10026 | (delete 'generate-test-parsers))))) |
| 10027 | (inputs |
| 10028 | (alist-replace |
| 10029 | "java-antlr4-runtime" (list java-antlr4-runtime-4.1) |
| 10030 | (package-inputs antlr4))))) |
| 10031 | |
| 10032 | (define-public java-tunnelvisionlabs-antlr4-runtime-annotations |
| 10033 | (package |
| 10034 | (inherit java-antlr4-runtime) |
| 10035 | (name "java-tunnelvisionlabs-antlr4-runtime-annotations") |
| 10036 | (version "4.7.4") |
| 10037 | (source (origin |
| 10038 | (method git-fetch) |
| 10039 | (uri (git-reference |
| 10040 | (url "https://github.com/tunnelvisionlabs/antlr4") |
| 10041 | (commit (string-append version "-opt")))) |
| 10042 | (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version)) |
| 10043 | (sha256 |
| 10044 | (base32 |
| 10045 | "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8")) |
| 10046 | (patches |
| 10047 | (search-patches "java-antlr4-Add-standalone-generator.patch" |
| 10048 | "java-tunnelvisionlabs-antlr-code-too-large.patch")))) |
| 10049 | (arguments |
| 10050 | `(#:jar-name "java-antlr4-runtime-annotations.jar" |
| 10051 | #:source-dir "runtime/JavaAnnotations/src" |
| 10052 | #:tests? #f; no tests |
| 10053 | #:phases |
| 10054 | (modify-phases %standard-phases |
| 10055 | (add-after 'build 'copy-resources |
| 10056 | (lambda _ |
| 10057 | (copy-recursively "runtime/JavaAnnotations/resources" |
| 10058 | "build/classes") |
| 10059 | #t)) |
| 10060 | (add-after 'copy-resources 'rebuild-jar |
| 10061 | (lambda _ |
| 10062 | (invoke "ant" "jar") |
| 10063 | #t))))) |
| 10064 | (inputs '()) |
| 10065 | (native-inputs '()) |
| 10066 | (synopsis "Annotations for ANTLR's runtime library") |
| 10067 | (description "This package contains annotations used during the build of |
| 10068 | the runtime library of ANTLR."))) |
| 10069 | |
| 10070 | ;; the runtime of this library requires a lexer that is generated by antlr4. |
| 10071 | ;; However, antlr4 itself requires this library at build and run-time. We |
| 10072 | ;; use [email protected], the closest version of antlr that doesn't need this |
| 10073 | ;; bootstrap process, to generate the lexer. The generated lexer is built |
| 10074 | ;; for the 4.1 runtime, which is slightly different from this runtime. |
| 10075 | ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we |
| 10076 | ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and |
| 10077 | ;; the proper, working, runtime to build antlr4 again. |
| 10078 | (define java-tunnelvisionlabs-antlr4-runtime-bootstrap |
| 10079 | (package |
| 10080 | (inherit java-antlr4-runtime) |
| 10081 | (name "java-tunnelvisionlabs-antlr4-runtime") |
| 10082 | (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations)) |
| 10083 | (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations)) |
| 10084 | (arguments |
| 10085 | `(#:jar-name "java-antlr4-runtime.jar" |
| 10086 | #:source-dir "runtime/Java/src" |
| 10087 | #:tests? #f; tests require antlr4, but antlr4 depends on this package |
| 10088 | #:phases |
| 10089 | (modify-phases %standard-phases |
| 10090 | (add-before 'build 'generate-xpath-lexer |
| 10091 | (lambda _ |
| 10092 | (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath" |
| 10093 | "-visitor" "-no-listener" |
| 10094 | "-package" "org.antlr.v4.runtime.tree.xpath" |
| 10095 | "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4") |
| 10096 | ;; Generated code is for an incompatible version of the runtime |
| 10097 | (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java" |
| 10098 | (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)") |
| 10099 | "LexerATNSimulator(this,_ATN)")) |
| 10100 | #t)) |
| 10101 | (add-before 'build 'copy-resources |
| 10102 | (lambda _ |
| 10103 | (copy-recursively "runtime/Java/src/main/dot" |
| 10104 | "build/classes") |
| 10105 | #t))))) |
| 10106 | (native-inputs |
| 10107 | `(("antlr4" ,antlr4-4.1) |
| 10108 | ("java-tunnelvisionlabs-antlr4-runtime-annotations" |
| 10109 | ,java-tunnelvisionlabs-antlr4-runtime-annotations))))) |
| 10110 | |
| 10111 | (define java-tunnelvisionlabs-antlr4-bootstrap |
| 10112 | (package |
| 10113 | (inherit antlr4) |
| 10114 | (name "java-tunnelvisionlabs-antlr4") |
| 10115 | (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations)) |
| 10116 | (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations)) |
| 10117 | (arguments |
| 10118 | (substitute-keyword-arguments (package-arguments antlr4) |
| 10119 | ((#:test-dir _) |
| 10120 | "tool/test:runtime-testsuite/src") |
| 10121 | ((#:phases phases) |
| 10122 | `(modify-phases ,phases |
| 10123 | (delete 'remove-unrelated-languages) |
| 10124 | (delete 'remove-graphemes) |
| 10125 | (delete 'generate-test-parsers) |
| 10126 | (delete 'check))))) |
| 10127 | (native-inputs '()) |
| 10128 | (inputs |
| 10129 | `(("antlr3" ,antlr3) |
| 10130 | ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap) |
| 10131 | ("java-tunnelvisionlabs-antlr4-runtime-annotations" |
| 10132 | ,java-tunnelvisionlabs-antlr4-runtime-annotations) |
| 10133 | ("java-icu4j" ,java-icu4j) |
| 10134 | ("java-jsonp-api" ,java-jsonp-api) |
| 10135 | ("java-stringtemplate" ,java-stringtemplate) |
| 10136 | ("java-treelayout" ,java-treelayout))))) |
| 10137 | |
| 10138 | (define-public java-tunnelvisionlabs-antlr4-runtime |
| 10139 | (package |
| 10140 | (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap) |
| 10141 | (native-inputs |
| 10142 | (alist-replace |
| 10143 | "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap) |
| 10144 | (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap))))) |
| 10145 | |
| 10146 | (define-public java-tunnelvisionlabs-antlr4 |
| 10147 | (package |
| 10148 | (inherit java-tunnelvisionlabs-antlr4-bootstrap) |
| 10149 | (inputs |
| 10150 | (alist-replace |
| 10151 | "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime) |
| 10152 | (package-inputs java-tunnelvisionlabs-antlr4-bootstrap))))) |
| 10153 | |
| 10154 | (define-public java-commons-cli-1.2 |
| 10155 | ;; This is a bootstrap dependency for Maven2. |
| 10156 | (package |
| 10157 | (inherit java-commons-cli) |
| 10158 | (version "1.2") |
| 10159 | (source (origin |
| 10160 | (method url-fetch) |
| 10161 | (uri (string-append "mirror://apache/commons/cli/source/" |
| 10162 | "commons-cli-" version "-src.tar.gz")) |
| 10163 | (sha256 |
| 10164 | (base32 |
| 10165 | "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm")))) |
| 10166 | (arguments |
| 10167 | `(#:jar-name "commons-cli.jar" |
| 10168 | #:phases |
| 10169 | (modify-phases %standard-phases |
| 10170 | (add-before 'check 'fix-build-xml |
| 10171 | (lambda* (#:key inputs #:allow-other-keys) |
| 10172 | (substitute* "build.xml" |
| 10173 | (("dir=\"\\$\\{test.home\\}/java\"") |
| 10174 | "dir=\"${test.home}\"")) |
| 10175 | #t))))) |
| 10176 | (native-inputs |
| 10177 | (list java-junit)))) |
| 10178 | |
| 10179 | (define-public java-microemulator-cldc |
| 10180 | (package |
| 10181 | (name "java-microemulator-cldc") |
| 10182 | (version "2.0.4") |
| 10183 | (source (origin |
| 10184 | (method url-fetch) |
| 10185 | (uri (string-append "https://github.com/barteo/microemu/archive/" |
| 10186 | "microemulator_" |
| 10187 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) |
| 10188 | version) |
| 10189 | ".tar.gz")) |
| 10190 | (file-name (string-append name "-" version ".tar.gz")) |
| 10191 | (sha256 |
| 10192 | (base32 |
| 10193 | "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll")))) |
| 10194 | (build-system ant-build-system) |
| 10195 | (arguments |
| 10196 | `(#:jar-name "microemulator-cldc.jar" |
| 10197 | #:source-dir "microemu-cldc/src/main/java" |
| 10198 | #:tests? #f)); Requires even older software |
| 10199 | (home-page "https://github.com/barteo/microemu") |
| 10200 | (synopsis "J2ME CLDC emulator") |
| 10201 | (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP |
| 10202 | Emulator. It demonstrates MIDlet based applications in web browser |
| 10203 | applet and can be run as a standalone java application.") |
| 10204 | (license (list license:asl2.0 |
| 10205 | ;; or altenatively: |
| 10206 | license:lgpl2.1+)))) |
| 10207 | |
| 10208 | (define-public java-datanucleus-javax-persistence |
| 10209 | (package |
| 10210 | (name "java-datanucleus-javax-persistence") |
| 10211 | (version "2.2.0") |
| 10212 | (source (origin |
| 10213 | (method url-fetch) |
| 10214 | (uri (string-append "https://github.com/datanucleus/" |
| 10215 | "javax.persistence/archive/javax.persistence-" |
| 10216 | version "-release.tar.gz")) |
| 10217 | (sha256 |
| 10218 | (base32 |
| 10219 | "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx")))) |
| 10220 | (build-system ant-build-system) |
| 10221 | (arguments |
| 10222 | `(#:jar-name "java-datanucleus-javax-persistence.jar" |
| 10223 | #:jdk ,icedtea-8 |
| 10224 | #:source-dir "src/main/java" |
| 10225 | #:tests? #f)); no tests |
| 10226 | (home-page "https://github.com/datanucleus/javax.persistence") |
| 10227 | (synopsis "JPA API") |
| 10228 | (description "This package contains a clean definition of JPA API intended |
| 10229 | for use with DataNucleus JPA since the JCP haven't provided an official JPA API |
| 10230 | jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification |
| 10231 | used to generate this API.") |
| 10232 | (license (list license:edl1.0 license:epl1.0)))) |
| 10233 | |
| 10234 | (define-public java-osgi-cmpn |
| 10235 | (package |
| 10236 | (name "java-osgi-cmpn") |
| 10237 | (version "6.0.0") |
| 10238 | (source (origin |
| 10239 | (method url-fetch) |
| 10240 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 10241 | "org/osgi/osgi.cmpn/" version "/osgi.cmpn-" |
| 10242 | version "-sources.jar")) |
| 10243 | (sha256 |
| 10244 | (base32 |
| 10245 | "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys")))) |
| 10246 | (build-system ant-build-system) |
| 10247 | (arguments |
| 10248 | `(#:jar-name "osgi-cmpn.jar" |
| 10249 | #:tests? #f)); no tests |
| 10250 | (inputs |
| 10251 | `(("annotation" ,java-osgi-annotation) |
| 10252 | ("core" ,java-osgi-core) |
| 10253 | ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence) |
| 10254 | ("microemulator" ,java-microemulator-cldc) |
| 10255 | ("servlet" ,java-classpathx-servletapi))) |
| 10256 | (home-page "https://www.osgi.org") |
| 10257 | (synopsis "Compendium specification module of OSGi framework") |
| 10258 | (description |
| 10259 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10260 | and service platform for the Java programming language. This package contains |
| 10261 | the compendium specification module, providing interfaces and classes for use |
| 10262 | in compiling bundles.") |
| 10263 | (license license:asl2.0))) |
| 10264 | |
| 10265 | (define-public java-osgi-service-component-annotations |
| 10266 | (package |
| 10267 | (name "java-osgi-service-component-annotations") |
| 10268 | (version "1.3.0") |
| 10269 | (source (origin |
| 10270 | (method url-fetch) |
| 10271 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10272 | "org.osgi.service.component.annotations/" |
| 10273 | version "/org.osgi.service.component.annotations-" |
| 10274 | version "-sources.jar")) |
| 10275 | (sha256 |
| 10276 | (base32 |
| 10277 | "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0")))) |
| 10278 | (build-system ant-build-system) |
| 10279 | (arguments |
| 10280 | `(#:jar-name "osgi-service-component-annotations.jar" |
| 10281 | #:tests? #f)); no tests |
| 10282 | (inputs |
| 10283 | `(("annotation" ,java-osgi-annotation))) |
| 10284 | (home-page "https://www.osgi.org") |
| 10285 | (synopsis "Support annotations for osgi-service-component") |
| 10286 | (description |
| 10287 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10288 | and service platform for the Java programming language. This package contains |
| 10289 | the support annotations for osgi-service-component.") |
| 10290 | (license license:asl2.0))) |
| 10291 | |
| 10292 | (define-public java-osgi-dto |
| 10293 | (package |
| 10294 | (name "java-osgi-dto") |
| 10295 | (version "1.0.0") |
| 10296 | (source (origin |
| 10297 | (method url-fetch) |
| 10298 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10299 | "org.osgi.dto/" version "/org.osgi.dto-" |
| 10300 | version "-sources.jar")) |
| 10301 | (sha256 |
| 10302 | (base32 |
| 10303 | "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr")))) |
| 10304 | (build-system ant-build-system) |
| 10305 | (arguments |
| 10306 | `(#:jar-name "osgi-dto.jar" |
| 10307 | #:tests? #f)); no tests |
| 10308 | (inputs |
| 10309 | `(("annotation" ,java-osgi-annotation))) |
| 10310 | (home-page "https://www.osgi.org") |
| 10311 | (synopsis "Data Transfer Objects") |
| 10312 | (description |
| 10313 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10314 | and service platform for the Java programming language. This package contains |
| 10315 | the Data Transfer Objects. It is easily serializable having only public fields |
| 10316 | of primitive types and their wrapper classes, Strings, and DTOs. List, Set, |
| 10317 | Map and array aggregates may also be used. The aggregates must only hold |
| 10318 | objects of the listed types or aggregates.") |
| 10319 | (license license:asl2.0))) |
| 10320 | |
| 10321 | (define-public java-osgi-resource |
| 10322 | (package |
| 10323 | (name "java-osgi-resource") |
| 10324 | (version "1.0.0") |
| 10325 | (source (origin |
| 10326 | (method url-fetch) |
| 10327 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10328 | "org.osgi.resource/" |
| 10329 | version "/org.osgi.resource-" |
| 10330 | version "-sources.jar")) |
| 10331 | (sha256 |
| 10332 | (base32 |
| 10333 | "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d")))) |
| 10334 | (build-system ant-build-system) |
| 10335 | (arguments |
| 10336 | `(#:jar-name "osgi-resource.jar" |
| 10337 | #:tests? #f)); no tests |
| 10338 | (inputs |
| 10339 | `(("annotation" ,java-osgi-annotation) |
| 10340 | ("dto" ,java-osgi-dto))) |
| 10341 | (home-page "https://www.osgi.org") |
| 10342 | (synopsis "OSGI Resource") |
| 10343 | (description |
| 10344 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10345 | and service platform for the Java programming language. This package contains |
| 10346 | the definition of common types in osgi packages.") |
| 10347 | (license license:asl2.0))) |
| 10348 | |
| 10349 | (define-public java-osgi-namespace-contract |
| 10350 | (package |
| 10351 | (name "java-osgi-namespace-contract") |
| 10352 | (version "1.0.0") |
| 10353 | (source (origin |
| 10354 | (method url-fetch) |
| 10355 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10356 | "org.osgi.namespace.contract/" |
| 10357 | version "/org.osgi.namespace.contract-" |
| 10358 | version "-sources.jar")) |
| 10359 | (sha256 |
| 10360 | (base32 |
| 10361 | "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36")))) |
| 10362 | (build-system ant-build-system) |
| 10363 | (inputs |
| 10364 | `(("resource" ,java-osgi-resource) |
| 10365 | ("annotation" ,java-osgi-annotation))) |
| 10366 | (arguments |
| 10367 | `(#:jar-name "osgi-namespace-contract.jar" |
| 10368 | #:tests? #f)); no tests |
| 10369 | (home-page "https://www.osgi.org") |
| 10370 | (synopsis "Contract Capability and Requirement Namespace") |
| 10371 | (description |
| 10372 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10373 | and service platform for the Java programming language. This package contains |
| 10374 | the names for the attributes and directives for a namespace with contracts.") |
| 10375 | (license license:asl2.0))) |
| 10376 | |
| 10377 | (define-public java-osgi-namespace-extender |
| 10378 | (package |
| 10379 | (name "java-osgi-namespace-extender") |
| 10380 | (version "1.0.1") |
| 10381 | (source (origin |
| 10382 | (method url-fetch) |
| 10383 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10384 | "org.osgi.namespace.extender/" |
| 10385 | version "/org.osgi.namespace.extender-" |
| 10386 | version "-sources.jar")) |
| 10387 | (sha256 |
| 10388 | (base32 |
| 10389 | "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz")))) |
| 10390 | (build-system ant-build-system) |
| 10391 | (inputs |
| 10392 | `(("resource" ,java-osgi-resource) |
| 10393 | ("annotation" ,java-osgi-annotation))) |
| 10394 | (arguments |
| 10395 | `(#:jar-name "osgi-namespace-extendent.jar" |
| 10396 | #:tests? #f)); no tests |
| 10397 | (home-page "https://www.osgi.org") |
| 10398 | (synopsis "Extender Capability and Requirement Namespace") |
| 10399 | (description |
| 10400 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10401 | and service platform for the Java programming language. This package contains |
| 10402 | the names for the attributes and directives for an extender namespace.") |
| 10403 | (license license:asl2.0))) |
| 10404 | |
| 10405 | (define-public java-osgi-namespace-service |
| 10406 | (package |
| 10407 | (name "java-osgi-namespace-service") |
| 10408 | (version "1.0.0") |
| 10409 | (source (origin |
| 10410 | (method url-fetch) |
| 10411 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10412 | "org.osgi.namespace.service/" |
| 10413 | version "/org.osgi.namespace.service-" |
| 10414 | version "-sources.jar")) |
| 10415 | (sha256 |
| 10416 | (base32 |
| 10417 | "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8")))) |
| 10418 | (build-system ant-build-system) |
| 10419 | (inputs |
| 10420 | `(("resource" ,java-osgi-resource) |
| 10421 | ("annotation" ,java-osgi-annotation))) |
| 10422 | (arguments |
| 10423 | `(#:jar-name "osgi-namespace-service.jar" |
| 10424 | #:tests? #f)); no tests |
| 10425 | (home-page "https://www.osgi.org") |
| 10426 | (synopsis "Service Capability and Requirement Namespace") |
| 10427 | (description |
| 10428 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10429 | and service platform for the Java programming language. This package contains |
| 10430 | the names for the attributes and directives for a service namespace.") |
| 10431 | (license license:asl2.0))) |
| 10432 | |
| 10433 | (define-public java-osgi-util-function |
| 10434 | (package |
| 10435 | (name "java-osgi-util-function") |
| 10436 | (version "1.0.0") |
| 10437 | (source (origin |
| 10438 | (method url-fetch) |
| 10439 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10440 | "org.osgi.util.function/" |
| 10441 | version "/org.osgi.util.function-" |
| 10442 | version "-sources.jar")) |
| 10443 | (sha256 |
| 10444 | (base32 |
| 10445 | "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x")))) |
| 10446 | (build-system ant-build-system) |
| 10447 | (arguments |
| 10448 | `(#:jar-name "osgi-util-function.jar" |
| 10449 | #:tests? #f)); no tests |
| 10450 | (inputs |
| 10451 | `(("annotation" ,java-osgi-annotation))) |
| 10452 | (home-page "https://www.osgi.org") |
| 10453 | (synopsis "OSGI Util Function") |
| 10454 | (description |
| 10455 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10456 | and service platform for the Java programming language. This package contains |
| 10457 | an interface for a function that accepts a single argument and produces a result.") |
| 10458 | (license license:asl2.0))) |
| 10459 | |
| 10460 | (define-public java-osgi-util-promise |
| 10461 | (package |
| 10462 | (name "java-osgi-util-promise") |
| 10463 | (version "1.0.0") |
| 10464 | (source (origin |
| 10465 | (method url-fetch) |
| 10466 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10467 | "org.osgi.util.promise/" |
| 10468 | version "/org.osgi.util.promise-" |
| 10469 | version "-sources.jar")) |
| 10470 | (sha256 |
| 10471 | (base32 |
| 10472 | "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c")))) |
| 10473 | (build-system ant-build-system) |
| 10474 | (arguments |
| 10475 | `(#:jar-name "osgi-util-promise.jar" |
| 10476 | #:tests? #f)); no tests |
| 10477 | (inputs |
| 10478 | `(("annotation" ,java-osgi-annotation) |
| 10479 | ("function" ,java-osgi-util-function))) |
| 10480 | (home-page "https://www.osgi.org") |
| 10481 | (synopsis "Promise of a value") |
| 10482 | (description |
| 10483 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10484 | and service platform for the Java programming language. This package contains |
| 10485 | an interface and utilitary classes for promises. A Promise represents a future |
| 10486 | value. It handles the interactions for asynchronous processing.") |
| 10487 | (license license:asl2.0))) |
| 10488 | |
| 10489 | (define-public java-osgi-service-metatype-annotations |
| 10490 | (package |
| 10491 | (name "java-osgi-service-metatype-annotations") |
| 10492 | (version "1.3.0") |
| 10493 | (source (origin |
| 10494 | (method url-fetch) |
| 10495 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10496 | "org.osgi.service.metatype.annotations/" |
| 10497 | version "/org.osgi.service.metatype.annotations-" |
| 10498 | version "-sources.jar")) |
| 10499 | (sha256 |
| 10500 | (base32 |
| 10501 | "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6")))) |
| 10502 | (build-system ant-build-system) |
| 10503 | (arguments |
| 10504 | `(#:jar-name "osgi-service-metatype-annotations.jar" |
| 10505 | #:tests? #f)); no tests |
| 10506 | (inputs |
| 10507 | `(("annotation" ,java-osgi-annotation))) |
| 10508 | (home-page "https://www.osgi.org") |
| 10509 | (synopsis "Support annotations for metatype") |
| 10510 | (description |
| 10511 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10512 | and service platform for the Java programming language. This package contains |
| 10513 | the support annotations for metatype.") |
| 10514 | (license license:asl2.0))) |
| 10515 | |
| 10516 | (define-public java-osgi-service-repository |
| 10517 | (package |
| 10518 | (name "java-osgi-service-repository") |
| 10519 | (version "1.1.0") |
| 10520 | (source (origin |
| 10521 | (method url-fetch) |
| 10522 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10523 | "org.osgi.service.repository/" |
| 10524 | version "/org.osgi.service.repository-" |
| 10525 | version "-sources.jar")) |
| 10526 | (sha256 |
| 10527 | (base32 |
| 10528 | "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n")))) |
| 10529 | (build-system ant-build-system) |
| 10530 | (arguments |
| 10531 | `(#:jar-name "osgi-service-repository.jar" |
| 10532 | #:tests? #f)); no tests |
| 10533 | (inputs |
| 10534 | `(("annotation" ,java-osgi-annotation) |
| 10535 | ("promise" ,java-osgi-util-promise) |
| 10536 | ("resource" ,java-osgi-resource))) |
| 10537 | (home-page "https://www.osgi.org") |
| 10538 | (synopsis "OSGI service repository") |
| 10539 | (description |
| 10540 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10541 | and service platform for the Java programming language. This package contains |
| 10542 | a repository service that contains resources.") |
| 10543 | (license license:asl2.0))) |
| 10544 | |
| 10545 | (define-public java-osgi-framework |
| 10546 | (package |
| 10547 | (name "java-osgi-framework") |
| 10548 | (version "1.8.0") |
| 10549 | (source (origin |
| 10550 | (method url-fetch) |
| 10551 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10552 | "org.osgi.framework/" version "/org.osgi.framework-" |
| 10553 | version "-sources.jar")) |
| 10554 | (sha256 |
| 10555 | (base32 |
| 10556 | "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s")))) |
| 10557 | (build-system ant-build-system) |
| 10558 | (arguments |
| 10559 | `(#:jar-name "osgi-framework.jar" |
| 10560 | #:tests? #f)); no tests |
| 10561 | (inputs |
| 10562 | `(("annotation" ,java-osgi-annotation) |
| 10563 | ("resource" ,java-osgi-resource) |
| 10564 | ("dto" ,java-osgi-dto))) |
| 10565 | (home-page "https://www.osgi.org") |
| 10566 | (synopsis "OSGi framework") |
| 10567 | (description |
| 10568 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10569 | and service platform for the Java programming language.") |
| 10570 | (license license:asl2.0))) |
| 10571 | |
| 10572 | (define-public java-osgi-service-log |
| 10573 | (package |
| 10574 | (name "java-osgi-service-log") |
| 10575 | (version "1.3.0") |
| 10576 | (source (origin |
| 10577 | (method url-fetch) |
| 10578 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10579 | "org.osgi.service.log/" |
| 10580 | version "/org.osgi.service.log-" |
| 10581 | version "-sources.jar")) |
| 10582 | (sha256 |
| 10583 | (base32 |
| 10584 | "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0")))) |
| 10585 | (build-system ant-build-system) |
| 10586 | (arguments |
| 10587 | `(#:jar-name "osgi-service-log.jar" |
| 10588 | #:tests? #f)); no tests |
| 10589 | (inputs |
| 10590 | (list java-osgi-framework)) |
| 10591 | (home-page "https://www.osgi.org") |
| 10592 | (synopsis "Provides methods for bundles to write messages to the log") |
| 10593 | (description |
| 10594 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10595 | and service platform for the Java programming language. This package contains |
| 10596 | the log service.") |
| 10597 | (license license:asl2.0))) |
| 10598 | |
| 10599 | (define-public java-osgi-service-jdbc |
| 10600 | (package |
| 10601 | (name "java-osgi-service-jdbc") |
| 10602 | (version "1.0.0") |
| 10603 | (source (origin |
| 10604 | (method url-fetch) |
| 10605 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10606 | "org.osgi.service.jdbc/" |
| 10607 | version "/org.osgi.service.jdbc-" |
| 10608 | version "-sources.jar")) |
| 10609 | (sha256 |
| 10610 | (base32 |
| 10611 | "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz")))) |
| 10612 | (build-system ant-build-system) |
| 10613 | (arguments |
| 10614 | `(#:jar-name "osgi-service-jdbc.jar" |
| 10615 | #:tests? #f)); no tests |
| 10616 | (home-page "https://www.osgi.org") |
| 10617 | (synopsis "Factory for JDBC connection factories") |
| 10618 | (description |
| 10619 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10620 | and service platform for the Java programming language. This package contains |
| 10621 | a factory for JDBC connection factories. There are 3 preferred connection |
| 10622 | factories for getting JDBC connections: |
| 10623 | |
| 10624 | @itemize |
| 10625 | @item @code{javax.sql.DataSource}; |
| 10626 | @item @code{javax.sql.ConnectionPoolDataSource}; |
| 10627 | @item @code{javax.sql.XADataSource}. |
| 10628 | @end itemize") |
| 10629 | (license license:asl2.0))) |
| 10630 | |
| 10631 | (define-public java-osgi-service-resolver |
| 10632 | (package |
| 10633 | (name "java-osgi-service-resolver") |
| 10634 | (version "1.0.1") |
| 10635 | (source (origin |
| 10636 | (method url-fetch) |
| 10637 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10638 | "org.osgi.service.resolver/" |
| 10639 | version "/org.osgi.service.resolver-" |
| 10640 | version "-sources.jar")) |
| 10641 | (sha256 |
| 10642 | (base32 |
| 10643 | "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd")))) |
| 10644 | (build-system ant-build-system) |
| 10645 | (arguments |
| 10646 | `(#:jar-name "osgi-service-resolver.jar" |
| 10647 | #:tests? #f)); no tests |
| 10648 | (inputs |
| 10649 | `(("annotation" ,java-osgi-annotation) |
| 10650 | ("resource" ,java-osgi-resource))) |
| 10651 | (home-page "https://www.osgi.org") |
| 10652 | (synopsis "OSGI Resolver service") |
| 10653 | (description |
| 10654 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10655 | and service platform for the Java programming language. This package contains |
| 10656 | a resolver service that resolves the specified resources in the context supplied |
| 10657 | by the caller.") |
| 10658 | (license license:asl2.0))) |
| 10659 | |
| 10660 | (define-public java-osgi-util-tracker |
| 10661 | (package |
| 10662 | (name "java-osgi-util-tracker") |
| 10663 | (version "1.5.1") |
| 10664 | (source (origin |
| 10665 | (method url-fetch) |
| 10666 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10667 | "org.osgi.util.tracker/" |
| 10668 | version "/org.osgi.util.tracker-" |
| 10669 | version "-sources.jar")) |
| 10670 | (sha256 |
| 10671 | (base32 |
| 10672 | "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz")))) |
| 10673 | (build-system ant-build-system) |
| 10674 | (arguments |
| 10675 | `(#:jar-name "osgi-util-tracker.jar" |
| 10676 | #:tests? #f)); no tests |
| 10677 | (inputs |
| 10678 | `(("framework" ,java-osgi-framework) |
| 10679 | ("annotation" ,java-osgi-annotation))) |
| 10680 | (home-page "https://www.osgi.org") |
| 10681 | (synopsis "Bundle tracking") |
| 10682 | (description |
| 10683 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10684 | and service platform for the Java programming language. This package contains |
| 10685 | bundle tracking utility classes.") |
| 10686 | (license license:asl2.0))) |
| 10687 | |
| 10688 | (define-public java-osgi-service-cm |
| 10689 | (package |
| 10690 | (name "java-osgi-service-cm") |
| 10691 | (version "1.5.0") |
| 10692 | (source (origin |
| 10693 | (method url-fetch) |
| 10694 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10695 | "org.osgi.service.cm/" |
| 10696 | version "/org.osgi.service.cm-" |
| 10697 | version "-sources.jar")) |
| 10698 | (sha256 |
| 10699 | (base32 |
| 10700 | "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6")))) |
| 10701 | (build-system ant-build-system) |
| 10702 | (arguments |
| 10703 | `(#:jar-name "osgi-service-cm.jar" |
| 10704 | #:tests? #f)); no tests |
| 10705 | (inputs |
| 10706 | `(("framework" ,java-osgi-framework) |
| 10707 | ("annotation" ,java-osgi-annotation))) |
| 10708 | (home-page "https://www.osgi.org") |
| 10709 | (synopsis "OSGI Configuration Management") |
| 10710 | (description |
| 10711 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10712 | and service platform for the Java programming language. This package contains |
| 10713 | utility classes for the configuration of services.") |
| 10714 | (license license:asl2.0))) |
| 10715 | |
| 10716 | (define-public java-osgi-service-packageadmin |
| 10717 | (package |
| 10718 | (name "java-osgi-service-packageadmin") |
| 10719 | (version "1.2.0") |
| 10720 | (source (origin |
| 10721 | (method url-fetch) |
| 10722 | (uri (string-append "https://repo1.maven.org/maven2/org/osgi/" |
| 10723 | "org.osgi.service.packageadmin/" |
| 10724 | version "/org.osgi.service.packageadmin-" |
| 10725 | version "-sources.jar")) |
| 10726 | (sha256 |
| 10727 | (base32 |
| 10728 | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) |
| 10729 | (build-system ant-build-system) |
| 10730 | (arguments |
| 10731 | `(#:jar-name "osgi-service-packageadmin.jar" |
| 10732 | #:tests? #f)); no tests |
| 10733 | (inputs |
| 10734 | `(("framework" ,java-osgi-framework))) |
| 10735 | (home-page "https://www.osgi.org") |
| 10736 | (synopsis "OSGI Package Administration") |
| 10737 | (description |
| 10738 | "OSGi, for Open Services Gateway initiative framework, is a module system |
| 10739 | and service platform for the Java programming language. This package contains |
| 10740 | the packageadmin service.") |
| 10741 | (license license:asl2.0))) |
| 10742 | |
| 10743 | (define-public java-ops4j-base-lang |
| 10744 | (package |
| 10745 | (name "java-ops4j-base-lang") |
| 10746 | (version "1.5.0") |
| 10747 | (source (origin |
| 10748 | (method url-fetch) |
| 10749 | (uri (string-append "https://github.com/ops4j/org.ops4j.base/" |
| 10750 | "archive/base-" version ".tar.gz")) |
| 10751 | (sha256 |
| 10752 | (base32 |
| 10753 | "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw")))) |
| 10754 | (build-system ant-build-system) |
| 10755 | (arguments |
| 10756 | `(#:jar-name "java-ops4j-base-lang.jar" |
| 10757 | #:source-dir "ops4j-base-lang/src/main/java" |
| 10758 | #:tests? #f; no tests |
| 10759 | #:phases |
| 10760 | (modify-phases %standard-phases |
| 10761 | (add-before 'build 'add-test-file |
| 10762 | (lambda _ |
| 10763 | ;; That file is required by a test in ops4j-pax-exam-core-spi |
| 10764 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang") |
| 10765 | (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties" |
| 10766 | (lambda _ |
| 10767 | (display |
| 10768 | (string-append |
| 10769 | "version=" ,version "\n" |
| 10770 | "groupId=org.ops4j.base" |
| 10771 | "artifactId=ops4j-base-lang\n")))) |
| 10772 | #t))))) |
| 10773 | (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview") |
| 10774 | (synopsis "Utility classes and extensions to be used in OPS4J projects") |
| 10775 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10776 | package contains utilities and extensions related to @code{java.lang}.") |
| 10777 | (license license:asl2.0))) |
| 10778 | |
| 10779 | (define-public java-ops4j-base-monitors |
| 10780 | (package |
| 10781 | (inherit java-ops4j-base-lang) |
| 10782 | (name "java-ops4j-base-monitors") |
| 10783 | (arguments |
| 10784 | `(#:jar-name "java-ops4j-base-monitors.jar" |
| 10785 | #:source-dir "ops4j-base-monitors/src/main/java" |
| 10786 | #:tests? #f)); no tests |
| 10787 | (inputs |
| 10788 | `(("lang" ,java-ops4j-base-lang))) |
| 10789 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10790 | package contains utilities and extensions related to monitoring."))) |
| 10791 | |
| 10792 | (define-public java-ops4j-base-io |
| 10793 | (package |
| 10794 | (inherit java-ops4j-base-lang) |
| 10795 | (name "java-ops4j-base-io") |
| 10796 | (arguments |
| 10797 | `(#:jar-name "java-ops4j-base-io.jar" |
| 10798 | #:source-dir "ops4j-base-io/src/main/java" |
| 10799 | #:test-dir "ops4j-base-io/src/test" |
| 10800 | #:test-exclude |
| 10801 | (list "**/ListerTest.java"))) |
| 10802 | (inputs |
| 10803 | `(("lang" ,java-ops4j-base-monitors) |
| 10804 | ("lang" ,java-ops4j-base-lang))) |
| 10805 | (native-inputs |
| 10806 | `(("junit" ,java-junit) |
| 10807 | ("hamcrest" ,java-hamcrest-core))) |
| 10808 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10809 | package contains utilities and extensions related to handling streams and files."))) |
| 10810 | |
| 10811 | (define-public java-ops4j-base-util |
| 10812 | (package |
| 10813 | (inherit java-ops4j-base-lang) |
| 10814 | (name "java-ops4j-base-util") |
| 10815 | (arguments |
| 10816 | `(#:jar-name "java-ops4j-base-util.jar" |
| 10817 | #:source-dir "ops4j-base-util/src/main/java" |
| 10818 | #:test-dir "ops4j-base-util/src/test")) |
| 10819 | (inputs |
| 10820 | `(("lang" ,java-ops4j-base-lang))) |
| 10821 | (native-inputs |
| 10822 | `(("junit" ,java-junit))) |
| 10823 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10824 | package contains utilities and extensions related to environment, i18n and |
| 10825 | mime types."))) |
| 10826 | |
| 10827 | (define-public java-ops4j-base-util-property |
| 10828 | (package |
| 10829 | (inherit java-ops4j-base-lang) |
| 10830 | (name "java-ops4j-base-util-property") |
| 10831 | (arguments |
| 10832 | `(#:jar-name "java-ops4j-base-util-property.jar" |
| 10833 | #:source-dir "ops4j-base-util-property/src/main/java" |
| 10834 | #:tests? #f)); no tests |
| 10835 | (inputs |
| 10836 | `(("lang" ,java-ops4j-base-lang) |
| 10837 | ("util" ,java-ops4j-base-util))) |
| 10838 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10839 | package contains utilities and extensions related to resolving properties from |
| 10840 | different sources."))) |
| 10841 | |
| 10842 | (define-public java-ops4j-base-store |
| 10843 | (package |
| 10844 | (inherit java-ops4j-base-lang) |
| 10845 | (name "java-ops4j-base-store") |
| 10846 | (arguments |
| 10847 | `(#:jar-name "java-ops4j-base-store.jar" |
| 10848 | #:source-dir "ops4j-base-store/src/main/java" |
| 10849 | #:tests? #f)); no tests |
| 10850 | (inputs |
| 10851 | `(("lang" ,java-ops4j-base-lang) |
| 10852 | ("slf4j" ,java-slf4j-api) |
| 10853 | ("io" ,java-ops4j-base-io))) |
| 10854 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10855 | package contains utilities for storing and retrieving data from an |
| 10856 | @code{InputStream}."))) |
| 10857 | |
| 10858 | (define-public java-ops4j-base-spi |
| 10859 | (package |
| 10860 | (inherit java-ops4j-base-lang) |
| 10861 | (name "java-ops4j-base-spi") |
| 10862 | (arguments |
| 10863 | `(#:jar-name "java-ops4j-base-spi.jar" |
| 10864 | #:source-dir "ops4j-base-spi/src/main/java" |
| 10865 | #:test-dir "ops4j-base-spi/src/test")) |
| 10866 | (native-inputs |
| 10867 | `(("junit" ,java-junit) |
| 10868 | ("hamcrest" ,java-hamcrest-core))) |
| 10869 | (description "OPS4J stands for Open Participation Software for Java. This |
| 10870 | package contains utilities for obtaining services via the Java SE 6 |
| 10871 | @code{ServiceLoader}."))) |
| 10872 | |
| 10873 | (define-public java-aqute-bnd-annotation |
| 10874 | (package |
| 10875 | (name "java-aqute-bnd-annotation") |
| 10876 | (version "3.5.0") |
| 10877 | (source (origin |
| 10878 | (method url-fetch) |
| 10879 | (uri (string-append "https://github.com/bndtools/bnd/archive/" |
| 10880 | version ".REL.tar.gz")) |
| 10881 | (file-name (string-append name "-" version ".tar.gz")) |
| 10882 | (sha256 |
| 10883 | (base32 |
| 10884 | "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl")))) |
| 10885 | (build-system ant-build-system) |
| 10886 | (arguments |
| 10887 | `(#:jar-name "java-aqute-bnd-annotation.jar" |
| 10888 | #:source-dir "biz.aQute.bnd.annotation/src" |
| 10889 | #:tests? #f)); empty test dir |
| 10890 | (home-page "https://bnd.bndtools.org/") |
| 10891 | (synopsis "Tools for OSGi") |
| 10892 | (description "Bnd is a swiss army knife for OSGi, it creates manifest |
| 10893 | headers based on analyzing the class code, it verifies the project settings, |
| 10894 | it manages project dependencies, gives diffs jars, and much more.") |
| 10895 | (license license:asl2.0))) |
| 10896 | |
| 10897 | (define-public java-aqute-libg |
| 10898 | (package |
| 10899 | (inherit java-aqute-bnd-annotation) |
| 10900 | (name "java-aqute-libg") |
| 10901 | (arguments |
| 10902 | `(#:jar-name "java-aqute-libg.jar" |
| 10903 | ;; The build fails when source/target more recent than 1.7. This |
| 10904 | ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327 |
| 10905 | ;; |
| 10906 | ;; It is closed as won't fix. There is no way to change the source |
| 10907 | ;; so that it works on 1.8, and still works on 1.6, the upstream |
| 10908 | ;; target. It work fine on 1.7, so we use 1.7. |
| 10909 | #:make-flags (list "-Dant.build.javac.source=1.7" |
| 10910 | "-Dant.build.javac.target=1.7") |
| 10911 | #:phases |
| 10912 | (modify-phases %standard-phases |
| 10913 | (add-before 'configure 'chdir |
| 10914 | ;; Change to aQute.libg directory, so that the relative |
| 10915 | ;; paths in the tests aren't broken. |
| 10916 | (lambda _ |
| 10917 | (chdir "aQute.libg") |
| 10918 | #t)) |
| 10919 | (add-before 'check 'create-test-directory |
| 10920 | ;; Copy the test directory to test/java, since that's where |
| 10921 | ;; ant-build-system's default project in build.xml expects to find |
| 10922 | ;; the test classes. Leave a copy in the original place to not |
| 10923 | ;; break paths in tests. |
| 10924 | (lambda _ |
| 10925 | (mkdir "src/test") |
| 10926 | (copy-recursively "test" "src/test/java") |
| 10927 | #t))))) |
| 10928 | (inputs |
| 10929 | `(("slf4j" ,java-slf4j-api) |
| 10930 | ("osgi-annot" ,java-osgi-annotation) |
| 10931 | ("java-osgi-cmpn" ,java-osgi-cmpn) |
| 10932 | ("osgi" ,java-osgi-core))) |
| 10933 | (native-inputs |
| 10934 | `(("hamcrest" ,java-hamcrest-core) |
| 10935 | ("java-junit" ,java-junit))))) |
| 10936 | |
| 10937 | (define-public java-aqute-bndlib |
| 10938 | (package |
| 10939 | (inherit java-aqute-bnd-annotation) |
| 10940 | (name "java-aqute-bndlib") |
| 10941 | (arguments |
| 10942 | `(#:jar-name "java-bndlib.jar" |
| 10943 | #:source-dir "biz.aQute.bndlib/src" |
| 10944 | #:tests? #f)); no tests |
| 10945 | (inputs |
| 10946 | `(("slf4j" ,java-slf4j-api) |
| 10947 | ("osgi-annot" ,java-osgi-annotation) |
| 10948 | ("java-aqute-libg" ,java-aqute-libg) |
| 10949 | ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation) |
| 10950 | ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations) |
| 10951 | ("java-osgi-service-repository" ,java-osgi-service-repository) |
| 10952 | ("java-osgi-service-log" ,java-osgi-service-log) |
| 10953 | ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations) |
| 10954 | ("java-osgi-namespace-contract" ,java-osgi-namespace-contract) |
| 10955 | ("java-osgi-namespace-extender" ,java-osgi-namespace-extender) |
| 10956 | ("java-osgi-namespace-service" ,java-osgi-namespace-service) |
| 10957 | ("promise" ,java-osgi-util-promise) |
| 10958 | ("osgi" ,java-osgi-core))))) |
| 10959 | |
| 10960 | (define-public java-ops4j-pax-tinybundles |
| 10961 | (package |
| 10962 | (name "java-ops4j-pax-tinybundles") |
| 10963 | (version "2.1.1") |
| 10964 | (source (origin |
| 10965 | (method url-fetch) |
| 10966 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/" |
| 10967 | "archive/tinybundles-" version ".tar.gz")) |
| 10968 | (sha256 |
| 10969 | (base32 |
| 10970 | "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871")))) |
| 10971 | (arguments |
| 10972 | `(#:jar-name "java-ops4j-pax-tinybundles.jar" |
| 10973 | #:source-dir "src/main/java" |
| 10974 | #:test-exclude |
| 10975 | ;; Abstract base classes for other tests |
| 10976 | (list "**/BndTest.java" "**/CoreTest.java") |
| 10977 | #:phases |
| 10978 | (modify-phases %standard-phases |
| 10979 | (add-before 'check 'fix-version |
| 10980 | (lambda _ |
| 10981 | ;; This test has a reference to an old version of bndlib we are not |
| 10982 | ;; packaging. It uses the version referenced in pom.xml. We replace |
| 10983 | ;; it with our own version. |
| 10984 | (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java" |
| 10985 | (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*") |
| 10986 | ,(package-version java-aqute-bndlib))) |
| 10987 | #t))))) |
| 10988 | (inputs |
| 10989 | `(("lang" ,java-ops4j-base-lang) |
| 10990 | ("io" ,java-ops4j-base-io) |
| 10991 | ("store" ,java-ops4j-base-store) |
| 10992 | ("slf4j" ,java-slf4j-api) |
| 10993 | ("libg" ,java-aqute-libg) |
| 10994 | ("bndlib" ,java-aqute-bndlib))) |
| 10995 | (native-inputs |
| 10996 | `(("junit" ,java-junit) |
| 10997 | ("hamcrest" ,java-hamcrest-core) |
| 10998 | ("log4j" ,java-log4j-api) |
| 10999 | ("bndannotation" ,java-aqute-bnd-annotation) |
| 11000 | ("framework" ,java-osgi-framework))) |
| 11001 | (build-system ant-build-system) |
| 11002 | (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles") |
| 11003 | (synopsis "Java APIs to create OSGi related artifacts") |
| 11004 | (description "Tinybundles is all about creating OSGi related artifacts like |
| 11005 | Bundles, Fragments and Deployment Packages with Java Api. It is very convenient |
| 11006 | to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the |
| 11007 | other hand, this library can be a foundation of real end user tools that need |
| 11008 | to create those artifacts.") |
| 11009 | (license license:asl2.0))) |
| 11010 | |
| 11011 | (define-public java-ops4j-pax-exam-core |
| 11012 | (package |
| 11013 | (name "java-ops4j-pax-exam-core") |
| 11014 | (version "4.11.0") |
| 11015 | (source (origin |
| 11016 | (method url-fetch) |
| 11017 | (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/" |
| 11018 | "archive/exam-reactor-" version ".tar.gz")) |
| 11019 | (sha256 |
| 11020 | (base32 |
| 11021 | "1b0f89gawxyl0pkqx9sicp6n58pirkzhjw41y749bwrkb6h99i26")))) |
| 11022 | (arguments |
| 11023 | (list #:jar-name "java-ops4j-pax-exam-core.jar" |
| 11024 | #:source-dir "core/pax-exam/src/main/java" |
| 11025 | #:test-dir "core/pax-exam/src/test")) |
| 11026 | (inputs |
| 11027 | (list java-slf4j-api |
| 11028 | java-ops4j-base-lang |
| 11029 | java-ops4j-base-io |
| 11030 | java-ops4j-base-util-property |
| 11031 | java-ops4j-base-store |
| 11032 | java-osgi-core)) |
| 11033 | (native-inputs |
| 11034 | (list java-junit |
| 11035 | java-hamcrest-core)) |
| 11036 | (build-system ant-build-system) |
| 11037 | (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview") |
| 11038 | (synopsis "In-Container Testing for OSGi, Java EE and CDI") |
| 11039 | (description "Pax Exam creates OSGi bundles for testing purposes. It lets |
| 11040 | the user take control of the OSGi framework, the test framework (e.g. JUnit) and |
| 11041 | the system under test at the same time.") |
| 11042 | (license license:asl2.0))) |
| 11043 | |
| 11044 | (define-public java-ops4j-pax-exam-core-spi |
| 11045 | (package |
| 11046 | (inherit java-ops4j-pax-exam-core) |
| 11047 | (name "java-ops4j-pax-exam-core-spi") |
| 11048 | (arguments |
| 11049 | `(#:jar-name "java-ops4j-pax-exam-spi.jar" |
| 11050 | #:source-dir "src/main/java" |
| 11051 | #:test-exclude |
| 11052 | (list |
| 11053 | ;; Abstract base class, not a test |
| 11054 | "**/BaseStagedReactorTest.java" |
| 11055 | ;; Depends on org.mortbay.jetty.testwars:test-war-dump |
| 11056 | "**/WarBuilderTest.java") |
| 11057 | #:phases |
| 11058 | (modify-phases %standard-phases |
| 11059 | (add-before 'configure 'chdir |
| 11060 | (lambda _ |
| 11061 | ;; Tests assume we are in this directory |
| 11062 | (chdir "core/pax-exam-spi") |
| 11063 | #t)) |
| 11064 | (add-before 'check 'fix-tests |
| 11065 | (lambda _ |
| 11066 | ;; One test checks that this file is present. |
| 11067 | (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi") |
| 11068 | (with-output-to-file |
| 11069 | "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties" |
| 11070 | (lambda _ |
| 11071 | (display |
| 11072 | (string-append "artifactId = pax-exam-spi\n" |
| 11073 | "version = " ,(package-version java-ops4j-pax-exam-core-spi))))) |
| 11074 | ;; Maven puts compilation results in the target directory, while we |
| 11075 | ;; put them in the build directory. |
| 11076 | (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java" |
| 11077 | "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java" |
| 11078 | "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java") |
| 11079 | (("target") "build")) |
| 11080 | ;; One test is expected to fail, but it doesn't throw the expected exception |
| 11081 | (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java" |
| 11082 | (("AssertionError") "IllegalArgumentException")) |
| 11083 | #t))))) |
| 11084 | (inputs |
| 11085 | `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core) |
| 11086 | ("lang" ,java-ops4j-base-lang) |
| 11087 | ("monitors" ,java-ops4j-base-monitors) |
| 11088 | ("store" ,java-ops4j-base-store) |
| 11089 | ("io" ,java-ops4j-base-io) |
| 11090 | ("spi" ,java-ops4j-base-spi) |
| 11091 | ("osgi" ,java-osgi-core) |
| 11092 | ("slf4j" ,java-slf4j-api) |
| 11093 | ("tinybundles" ,java-ops4j-pax-tinybundles))) |
| 11094 | (native-inputs |
| 11095 | `(("mockito" ,java-mockito-1) |
| 11096 | ("junit" ,java-junit) |
| 11097 | ("hamcrest" ,java-hamcrest-core) |
| 11098 | ("cglib" ,java-cglib) |
| 11099 | ("objenesis" ,java-objenesis))))) |
| 11100 | |
| 11101 | (define-public java-ops4j-pax-exam-core-junit |
| 11102 | (package |
| 11103 | (inherit java-ops4j-pax-exam-core) |
| 11104 | (name "java-ops4j-pax-exam-core-junit") |
| 11105 | (arguments |
| 11106 | `(#:jar-name "ops4j-pax-exam-core-junit.jar" |
| 11107 | #:source-dir "drivers/pax-exam-junit4/src/main/java" |
| 11108 | #:tests? #f)); no tests |
| 11109 | (inputs |
| 11110 | `(("junit" ,java-junit) |
| 11111 | ("slf4j" ,java-slf4j-api) |
| 11112 | ("core" ,java-ops4j-pax-exam-core) |
| 11113 | ("spi" ,java-ops4j-pax-exam-core-spi))) |
| 11114 | (native-inputs '()))) |
| 11115 | |
| 11116 | (define-public java-fasterxml-jackson-annotations |
| 11117 | (package |
| 11118 | (name "java-fasterxml-jackson-annotations") |
| 11119 | (version "2.9.4") |
| 11120 | (source (origin |
| 11121 | (method url-fetch) |
| 11122 | (uri (string-append "https://github.com/FasterXML/" |
| 11123 | "jackson-annotations/archive/" |
| 11124 | "jackson-annotations-" version ".tar.gz")) |
| 11125 | (sha256 |
| 11126 | (base32 |
| 11127 | "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4")))) |
| 11128 | (build-system ant-build-system) |
| 11129 | (arguments |
| 11130 | `(#:jar-name "jackson-annotations.jar" |
| 11131 | #:source-dir "src/main/java" |
| 11132 | #:test-dir "src/test")) |
| 11133 | (native-inputs |
| 11134 | `(("junit" ,java-junit))) |
| 11135 | (home-page "https://github.com/FasterXML/jackson-annotations") |
| 11136 | (synopsis "General purpose annotations for the Jackson Data Processor") |
| 11137 | (description "This package contains general purpose annotations for the |
| 11138 | Jackson Data Processor, used on value and handler types. The only annotations |
| 11139 | not included are ones that require dependency to the Databind package.") |
| 11140 | (license license:asl2.0))) |
| 11141 | |
| 11142 | (define-public java-fasterxml-jackson-core |
| 11143 | (package |
| 11144 | (name "java-fasterxml-jackson-core") |
| 11145 | (version "2.9.4") |
| 11146 | (source (origin |
| 11147 | (method url-fetch) |
| 11148 | (uri (string-append "https://github.com/FasterXML/" |
| 11149 | "jackson-core/archive/" |
| 11150 | "jackson-core-" version ".tar.gz")) |
| 11151 | (sha256 |
| 11152 | (base32 |
| 11153 | "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd")))) |
| 11154 | (build-system ant-build-system) |
| 11155 | (arguments |
| 11156 | `(#:jar-name "jackson-core.jar" |
| 11157 | #:source-dir "src/main/java" |
| 11158 | #:test-dir "src/test" |
| 11159 | #:test-exclude |
| 11160 | (list |
| 11161 | ;; Expected failure. pom.xml excludes these |
| 11162 | "**/failing/**" |
| 11163 | ;; Base classes that have no constructor for junit |
| 11164 | "**/BaseTest.java" |
| 11165 | "**/ConcurrencyReadTest.java" |
| 11166 | "**/ManualCharAccessTest.java" |
| 11167 | "**/ManualCharAccessTest.java" |
| 11168 | "**/TrailingCommasTest.java" |
| 11169 | "**/AsyncMissingValuesInObjectTest.java" |
| 11170 | "**/AsyncMissingValuesInArrayTest.java") |
| 11171 | #:phases |
| 11172 | (modify-phases %standard-phases |
| 11173 | (add-before 'configure 'generate-PackageVersion.java |
| 11174 | (lambda _ |
| 11175 | (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java") |
| 11176 | (in (string-append out ".in"))) |
| 11177 | (copy-file in out) |
| 11178 | (substitute* out |
| 11179 | (("@package@") "com.fasterxml.jackson.core.json") |
| 11180 | (("@projectversion@") ,version) |
| 11181 | (("@projectgroupid@") "com.fasterxml.jackson.core") |
| 11182 | (("@projectartifactid@") "jackson-core"))) |
| 11183 | #t)) |
| 11184 | (add-before 'build 'copy-resources |
| 11185 | (lambda _ |
| 11186 | (copy-recursively "src/main/resources" |
| 11187 | "build/classes") |
| 11188 | #t)) |
| 11189 | (add-before 'check 'copy-test-resources |
| 11190 | (lambda _ |
| 11191 | (copy-recursively "src/test/resources" |
| 11192 | "build/test-classes") |
| 11193 | #t))))) |
| 11194 | (native-inputs |
| 11195 | `(("junit" ,java-junit) |
| 11196 | ("hamcrest" ,java-hamcrest-core))) |
| 11197 | (home-page "https://github.com/FasterXML/jackson-core") |
| 11198 | (synopsis "Low-level streaming parser and generator abstractions") |
| 11199 | (description "This package contains core low-level incremental |
| 11200 | (streaming) parser and generator abstractions used by the Jackson Data |
| 11201 | Processor. It also includes the default implementation of handler types |
| 11202 | (parser, generator) that handle JSON format.") |
| 11203 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 11204 | |
| 11205 | (define-public java-fasterxml-jackson-databind |
| 11206 | (package |
| 11207 | (name "java-fasterxml-jackson-databind") |
| 11208 | (version "2.9.4") |
| 11209 | (source (origin |
| 11210 | (method url-fetch) |
| 11211 | (uri (string-append "https://github.com/FasterXML/" |
| 11212 | "jackson-databind/archive/" |
| 11213 | "jackson-databind-" version ".tar.gz")) |
| 11214 | (sha256 |
| 11215 | (base32 |
| 11216 | "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08")))) |
| 11217 | (build-system ant-build-system) |
| 11218 | (arguments |
| 11219 | `(#:jar-name "jackson-databind.jar" |
| 11220 | #:source-dir "src/main/java" |
| 11221 | #:tests? #f; requires javax.measures for which I can't find a free implementation |
| 11222 | #:phases |
| 11223 | (modify-phases %standard-phases |
| 11224 | (add-before 'configure 'generate-PackageVersion.java |
| 11225 | (lambda _ |
| 11226 | (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java") |
| 11227 | (in (string-append out ".in"))) |
| 11228 | (copy-file in out) |
| 11229 | (substitute* out |
| 11230 | (("@package@") "com.fasterxml.jackson.databind.cfg") |
| 11231 | (("@projectversion@") ,version) |
| 11232 | (("@projectgroupid@") "com.fasterxml.jackson.databind") |
| 11233 | (("@projectartifactid@") "jackson-databind"))) |
| 11234 | #t)) |
| 11235 | (add-before 'build 'copy-resources |
| 11236 | (lambda _ |
| 11237 | (copy-recursively "src/main/resources" "build/classes") |
| 11238 | #t))))) |
| 11239 | (inputs |
| 11240 | (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core)) |
| 11241 | (home-page "https://github.com/FasterXML/jackson-databind") |
| 11242 | (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor") |
| 11243 | (description "This package contains the general-purpose data-binding |
| 11244 | functionality and tree-model for Jackson Data Processor. It builds on core |
| 11245 | streaming parser/generator package, and uses Jackson Annotations for |
| 11246 | configuration.") |
| 11247 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 11248 | |
| 11249 | (define-public java-fasterxml-jackson-modules-base-jaxb |
| 11250 | (package |
| 11251 | (name "java-fasterxml-jackson-modules-base-jaxb") |
| 11252 | (version "2.9.4") |
| 11253 | (source (origin |
| 11254 | (method url-fetch) |
| 11255 | (uri (string-append "https://github.com/FasterXML/" |
| 11256 | "jackson-modules-base/archive/" |
| 11257 | "jackson-modules-base-" version ".tar.gz")) |
| 11258 | (sha256 |
| 11259 | (base32 |
| 11260 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
| 11261 | (build-system ant-build-system) |
| 11262 | (arguments |
| 11263 | `(#:jar-name "jackson-modules-base-jaxb.jar" |
| 11264 | #:source-dir "jaxb/src/main/java" |
| 11265 | #:test-dir "jaxb/src/test" |
| 11266 | #:test-exclude |
| 11267 | ;; Base class for tests |
| 11268 | (list "**/BaseJaxbTest.java") |
| 11269 | #:phases |
| 11270 | (modify-phases %standard-phases |
| 11271 | (add-before 'configure 'generate-PackageVersion.java |
| 11272 | (lambda _ |
| 11273 | (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/" |
| 11274 | "jackson/module/jaxb/PackageVersion.java")) |
| 11275 | (in (string-append out ".in"))) |
| 11276 | (copy-file in out) |
| 11277 | (substitute* out |
| 11278 | (("@package@") "com.fasterxml.jackson.module.jaxb") |
| 11279 | (("@projectversion@") ,version) |
| 11280 | (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb") |
| 11281 | (("@projectartifactid@") "jackson-module-jaxb"))) |
| 11282 | #t)) |
| 11283 | (add-before 'build 'copy-resources |
| 11284 | (lambda _ |
| 11285 | (copy-recursively "jaxb/src/main/resources" "build/classes") |
| 11286 | #t))))) |
| 11287 | (inputs |
| 11288 | (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core |
| 11289 | java-fasterxml-jackson-databind)) |
| 11290 | (native-inputs |
| 11291 | (list java-junit)) |
| 11292 | (home-page "https://github.com/FasterXML/jackson-modules-base") |
| 11293 | (synopsis "Jaxb annotations jackson module") |
| 11294 | (description "This package is the jaxb annotations module for jackson.") |
| 11295 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 11296 | |
| 11297 | (define-public java-fasterxml-jackson-modules-base-mrbean |
| 11298 | (package |
| 11299 | (name "java-fasterxml-jackson-modules-base-mrbean") |
| 11300 | (version "2.9.4") |
| 11301 | (source (origin |
| 11302 | (method url-fetch) |
| 11303 | (uri (string-append "https://github.com/FasterXML/" |
| 11304 | "jackson-modules-base/archive/" |
| 11305 | "jackson-modules-base-" version ".tar.gz")) |
| 11306 | (sha256 |
| 11307 | (base32 |
| 11308 | "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5")))) |
| 11309 | (build-system ant-build-system) |
| 11310 | (arguments |
| 11311 | `(#:jar-name "jackson-modules-base-mrbean.jar" |
| 11312 | #:source-dir "mrbean/src/main/java" |
| 11313 | #:test-dir "mrbean/src/test" |
| 11314 | #:test-exclude |
| 11315 | ;; Base class for tests |
| 11316 | (list "**/BaseTest.java") |
| 11317 | #:phases |
| 11318 | (modify-phases %standard-phases |
| 11319 | (add-before 'configure 'generate-PackageVersion.java |
| 11320 | (lambda _ |
| 11321 | (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/" |
| 11322 | "jackson/module/mrbean/PackageVersion.java")) |
| 11323 | (in (string-append out ".in"))) |
| 11324 | (copy-file in out) |
| 11325 | (substitute* out |
| 11326 | (("@package@") "com.fasterxml.jackson.module.mrbean") |
| 11327 | (("@projectversion@") ,version) |
| 11328 | (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean") |
| 11329 | (("@projectartifactid@") "jackson-module-mrbean"))) |
| 11330 | #t))))) |
| 11331 | (inputs |
| 11332 | (list java-asm java-fasterxml-jackson-annotations |
| 11333 | java-fasterxml-jackson-core java-fasterxml-jackson-databind)) |
| 11334 | (native-inputs |
| 11335 | (list java-junit)) |
| 11336 | (home-page "https://github.com/FasterXML/jackson-modules-base") |
| 11337 | (synopsis "POJO type materialization for Java") |
| 11338 | (description "This package implements POJO type materialization. |
| 11339 | Databinders can construct implementation classes for Java interfaces as part |
| 11340 | of deserialization.") |
| 11341 | (license license:asl2.0))) |
| 11342 | |
| 11343 | (define-public java-snakeyaml |
| 11344 | (package |
| 11345 | (name "java-snakeyaml") |
| 11346 | (version "1.18") |
| 11347 | (source (origin |
| 11348 | (method url-fetch) |
| 11349 | (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v" |
| 11350 | version ".tar.gz")) |
| 11351 | (file-name (string-append name "-" version ".tar.gz")) |
| 11352 | (sha256 |
| 11353 | (base32 |
| 11354 | "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh")))) |
| 11355 | (build-system ant-build-system) |
| 11356 | (arguments |
| 11357 | `(#:jar-name "java-snakeyaml.jar" |
| 11358 | #:source-dir "src/main/java" |
| 11359 | ;; Tests require velocity, a cyclic dependency, and |
| 11360 | ;; java-spring-framework-context which is not packaged. |
| 11361 | #:tests? #f)) |
| 11362 | (home-page "https://bitbucket.org/asomov/snakeyaml") |
| 11363 | (synopsis "YAML processor") |
| 11364 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") |
| 11365 | (license license:asl2.0))) |
| 11366 | |
| 11367 | (define-public java-snakeyaml-2 |
| 11368 | (package |
| 11369 | (inherit java-snakeyaml) |
| 11370 | (version "2.3") |
| 11371 | (source (origin |
| 11372 | (method url-fetch) |
| 11373 | (uri (string-append |
| 11374 | "https://bitbucket.org/snakeyaml/snakeyaml/get/snakeyaml-" |
| 11375 | version ".tar.gz")) |
| 11376 | (file-name (string-append "java-snakeyaml-" version ".tar.gz")) |
| 11377 | (sha256 |
| 11378 | (base32 |
| 11379 | "1mszlr8yczf6m2cijcp8g35pbb7pggi2b2yr4avqmk4crzws947l")))) |
| 11380 | (arguments |
| 11381 | `(#:jar-name "snakeyaml.jar" |
| 11382 | #:source-dir "src/main/java" |
| 11383 | #:tests? #f |
| 11384 | #:phases |
| 11385 | (modify-phases %standard-phases |
| 11386 | (add-before 'install 'create-pom |
| 11387 | (generate-pom.xml "pom.xml" "org.yaml" "snakeyaml" ,version)) |
| 11388 | (replace 'install |
| 11389 | (install-from-pom "pom.xml"))))) |
| 11390 | (home-page "https://bitbucket.org/snakeyaml/snakeyaml"))) |
| 11391 | |
| 11392 | (define-public java-fasterxml-jackson-dataformat-yaml |
| 11393 | (package |
| 11394 | (name "java-fasterxml-jackson-dataformat-yaml") |
| 11395 | (version "2.9.4") |
| 11396 | (source (origin |
| 11397 | (method url-fetch) |
| 11398 | (uri (string-append "https://github.com/FasterXML/" |
| 11399 | "jackson-dataformats-text/archive/" |
| 11400 | "jackson-dataformats-text-" version ".tar.gz")) |
| 11401 | (sha256 |
| 11402 | (base32 |
| 11403 | "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7")))) |
| 11404 | (build-system ant-build-system) |
| 11405 | (arguments |
| 11406 | `(#:jar-name "jackson-dataformat-yaml.jar" |
| 11407 | #:source-dir "yaml/src/main/java" |
| 11408 | #:test-dir "yaml/src/test" |
| 11409 | #:test-exclude (list "**/failing/**.java") |
| 11410 | #:phases |
| 11411 | (modify-phases %standard-phases |
| 11412 | (add-before 'configure 'generate-PackageVersion.java |
| 11413 | (lambda _ |
| 11414 | (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java") |
| 11415 | (in (string-append out ".in"))) |
| 11416 | (copy-file in out) |
| 11417 | (substitute* out |
| 11418 | (("@package@") "com.fasterxml.jackson.dataformat.yaml") |
| 11419 | (("@projectversion@") ,version) |
| 11420 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml") |
| 11421 | (("@projectartifactid@") "jackson-dataformat-yaml"))) |
| 11422 | #t))))) |
| 11423 | (inputs |
| 11424 | (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core |
| 11425 | java-fasterxml-jackson-databind java-snakeyaml)) |
| 11426 | (native-inputs |
| 11427 | `(("junit" ,java-junit) |
| 11428 | ("hamcrest" ,java-hamcrest-core) |
| 11429 | ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi) |
| 11430 | ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit) |
| 11431 | ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core))) |
| 11432 | (home-page "https://github.com/FasterXML/jackson-dataformats-text") |
| 11433 | (synopsis "Yaml backend for Jackson") |
| 11434 | (description "Dataformat backends are used to support format alternatives |
| 11435 | to JSON, supported by default. This is done by sub-classing Jackson core |
| 11436 | abstractions.") |
| 11437 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 11438 | |
| 11439 | (define-public java-stax2-api |
| 11440 | (package |
| 11441 | (name "java-stax2-api") |
| 11442 | (version "4.0.0") |
| 11443 | (source (origin |
| 11444 | (method url-fetch) |
| 11445 | (uri (string-append "https://github.com/FasterXML/stax2-api/archive/" |
| 11446 | "stax2-api-" version ".tar.gz")) |
| 11447 | (sha256 |
| 11448 | (base32 |
| 11449 | "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq")))) |
| 11450 | (build-system ant-build-system) |
| 11451 | (arguments |
| 11452 | `(#:jar-name "java-stax2-api.jar" |
| 11453 | #:source-dir "src/main/java" |
| 11454 | #:tests? #f)); no tests |
| 11455 | (home-page "https://github.com/FasterXML/stax2-api") |
| 11456 | (synopsis "Stax2 API") |
| 11457 | (description "Stax2 API is an extension to basic Stax 1.0 API that adds |
| 11458 | significant new functionalities, such as full-featured bi-direction validation |
| 11459 | interface and high-performance Typed Access API.") |
| 11460 | (license license:bsd-2))) |
| 11461 | |
| 11462 | (define-public java-woodstox-core |
| 11463 | (package |
| 11464 | (name "java-woodstox-core") |
| 11465 | (version "5.0.3") |
| 11466 | (source (origin |
| 11467 | (method git-fetch) |
| 11468 | (uri (git-reference |
| 11469 | (url "https://github.com/FasterXML/woodstox") |
| 11470 | (commit (string-append "woodstox-core-" version)))) |
| 11471 | (file-name (git-file-name name version)) |
| 11472 | (sha256 |
| 11473 | (base32 |
| 11474 | "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp")))) |
| 11475 | (build-system ant-build-system) |
| 11476 | (arguments |
| 11477 | `(#:jar-name "woodstox.jar" |
| 11478 | #:test-exclude |
| 11479 | (list "**/Base*.java" "failing/**") |
| 11480 | #:phases |
| 11481 | (modify-phases %standard-phases |
| 11482 | (add-before 'build 'remove-msv-dep |
| 11483 | (lambda _ |
| 11484 | ;; we don't need osgi, and it depends on msv |
| 11485 | (delete-file-recursively "src/main/java/com/ctc/wstx/osgi") |
| 11486 | ;; msv's latest release is from 2011 and we don't need it |
| 11487 | (delete-file-recursively "src/main/java/com/ctc/wstx/msv") |
| 11488 | (delete-file-recursively "src/test/java/wstxtest/osgi") |
| 11489 | (delete-file-recursively "src/test/java/wstxtest/msv") |
| 11490 | #t)) |
| 11491 | (add-before 'build 'copy-resources |
| 11492 | (lambda _ |
| 11493 | (copy-recursively "src/main/resources" "build/classes") |
| 11494 | #t))))) |
| 11495 | (inputs |
| 11496 | `(("stax2" ,java-stax2-api))) |
| 11497 | (native-inputs |
| 11498 | `(("junit" ,java-junit))) |
| 11499 | (home-page "https://github.com/FasterXML/woodstox") |
| 11500 | (synopsis "Stax XML API implementation") |
| 11501 | (description "Woodstox is a stax XML API implementation.") |
| 11502 | (license license:asl2.0))) |
| 11503 | |
| 11504 | (define-public java-fasterxml-jackson-dataformat-xml |
| 11505 | (package |
| 11506 | (name "java-fasterxml-jackson-dataformat-xml") |
| 11507 | (version "2.9.4") |
| 11508 | (source (origin |
| 11509 | (method git-fetch) |
| 11510 | (uri (git-reference |
| 11511 | (url "https://github.com/FasterXML/jackson-dataformat-xml") |
| 11512 | (commit (string-append "jackson-dataformat-xml-" version)))) |
| 11513 | (file-name (git-file-name name version)) |
| 11514 | (sha256 |
| 11515 | (base32 |
| 11516 | "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx")))) |
| 11517 | (build-system ant-build-system) |
| 11518 | (arguments |
| 11519 | `(#:jar-name "jackson-dataformat-xml.jar" |
| 11520 | #:source-dir "src/main/java" |
| 11521 | #:test-exclude |
| 11522 | (list "**/failing/**") |
| 11523 | #:phases |
| 11524 | (modify-phases %standard-phases |
| 11525 | (add-before 'configure 'generate-PackageVersion.java |
| 11526 | (lambda _ |
| 11527 | (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java") |
| 11528 | (in (string-append out ".in"))) |
| 11529 | (copy-file in out) |
| 11530 | (newline) |
| 11531 | (substitute* out |
| 11532 | (("@package@") "com.fasterxml.jackson.dataformat.xml") |
| 11533 | (("@projectversion@") ,version) |
| 11534 | (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml") |
| 11535 | (("@projectartifactid@") "jackson-dataformat-xml"))) |
| 11536 | #t)) |
| 11537 | (add-before 'build 'copy-resources |
| 11538 | (lambda _ |
| 11539 | (copy-recursively "src/main/resources" "build/classes") |
| 11540 | #t))))) |
| 11541 | (inputs |
| 11542 | `(("jackson-annotations" ,java-fasterxml-jackson-annotations) |
| 11543 | ("jackson-core" ,java-fasterxml-jackson-core) |
| 11544 | ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb) |
| 11545 | ("jackson-databind" ,java-fasterxml-jackson-databind) |
| 11546 | ("stax2-api" ,java-stax2-api) |
| 11547 | ("woodstox" ,java-woodstox-core))) |
| 11548 | (native-inputs |
| 11549 | `(("junit" ,java-junit) |
| 11550 | ("hamcrest" ,java-hamcrest-core))) |
| 11551 | (home-page "https://github.com/FasterXML/jackson-dataformat-xml") |
| 11552 | (synopsis "Read and write XML") |
| 11553 | (description "This package contains Jackson extension component for reading |
| 11554 | and writing XML encoded data. |
| 11555 | |
| 11556 | Further, the goal is to emulate how JAXB data-binding works with \"Code-first\" |
| 11557 | approach (that is, no support is added for \"Schema-first\" approach). Support |
| 11558 | for JAXB annotations is provided by JAXB annotation module; this module |
| 11559 | provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator}, |
| 11560 | @code{JsonFactory}) as well as small number of higher level overrides needed to |
| 11561 | make data-binding work.") |
| 11562 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing |
| 11563 | |
| 11564 | (define-public java-hdrhistogram |
| 11565 | (package |
| 11566 | (name "java-hdrhistogram") |
| 11567 | (version "2.1.9") |
| 11568 | (source (origin |
| 11569 | (method git-fetch) |
| 11570 | (uri (git-reference |
| 11571 | (url "https://github.com/HdrHistogram/HdrHistogram") |
| 11572 | (commit (string-append "HdrHistogram-" version)))) |
| 11573 | (file-name (git-file-name name version)) |
| 11574 | (sha256 |
| 11575 | (base32 |
| 11576 | "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d")))) |
| 11577 | (build-system ant-build-system) |
| 11578 | (arguments |
| 11579 | `(#:jar-name "java-hdrhistogram.jar" |
| 11580 | #:source-dir "src/main/java" |
| 11581 | #:phases |
| 11582 | (modify-phases %standard-phases |
| 11583 | (add-after 'unpack 'make-files-writable |
| 11584 | (lambda _ |
| 11585 | (for-each make-file-writable (find-files ".")) |
| 11586 | #t)) |
| 11587 | (add-before 'configure 'set-version |
| 11588 | (lambda _ |
| 11589 | (let* ((version-java "src/main/java/org/HdrHistogram/Version.java") |
| 11590 | (template (string-append version-java ".template"))) |
| 11591 | (copy-file template version-java) |
| 11592 | (substitute* version-java |
| 11593 | (("\\$VERSION\\$") ,version) |
| 11594 | (("\\$BUILD_TIME\\$") "0")) |
| 11595 | #t)))))) |
| 11596 | (native-inputs |
| 11597 | `(("junit" ,java-junit) |
| 11598 | ("hamcrest" ,java-hamcrest-core))) |
| 11599 | (home-page "https://hdrhistogram.github.io/HdrHistogram") |
| 11600 | (synopsis "High dynamic range histogram") |
| 11601 | (description "Hdrhistogram creates histograms that support |
| 11602 | recording and analyzing sampled data value counts across a configurable integer |
| 11603 | value range with configurable value precision within the range. Value precision |
| 11604 | is expressed as the number of significant digits in the value recording, and |
| 11605 | provides control over value quantization behavior across the value range and |
| 11606 | the subsequent value resolution at any given level.") |
| 11607 | (license license:public-domain))) |
| 11608 | |
| 11609 | (define-public java-cofoja |
| 11610 | (package |
| 11611 | (name "java-cofoja") |
| 11612 | (version "1.3") |
| 11613 | (source (origin |
| 11614 | (method git-fetch) |
| 11615 | (uri (git-reference |
| 11616 | (url "https://github.com/nhatminhle/cofoja") |
| 11617 | (commit (string-append "v" version)))) |
| 11618 | (file-name (string-append "java-cofoja-" version "-checkout")) |
| 11619 | (sha256 |
| 11620 | (base32 |
| 11621 | "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w")))) |
| 11622 | (build-system ant-build-system) |
| 11623 | (arguments |
| 11624 | `(#:build-target "dist" |
| 11625 | #:test-target "test" |
| 11626 | #:jdk ,icedtea-8 |
| 11627 | #:make-flags |
| 11628 | (list "-Ddist.dir=dist") |
| 11629 | #:modules ((guix build ant-build-system) |
| 11630 | (guix build java-utils) |
| 11631 | (guix build utils) |
| 11632 | (srfi srfi-1) |
| 11633 | (ice-9 match)) |
| 11634 | #:phases |
| 11635 | (modify-phases %standard-phases |
| 11636 | ;; The bulid system ignores the class path the ant-build-system sets |
| 11637 | ;; up and instead expects to find all dependencies in the "lib" |
| 11638 | ;; directory. |
| 11639 | (add-after 'unpack 'create-libdir |
| 11640 | (lambda* (#:key inputs #:allow-other-keys) |
| 11641 | (mkdir-p "lib") |
| 11642 | (for-each |
| 11643 | (lambda (file) |
| 11644 | (let ((target (string-append "lib/" (basename file)))) |
| 11645 | (unless (file-exists? target) |
| 11646 | (symlink file target)))) |
| 11647 | (append-map (match-lambda |
| 11648 | ((label . dir) |
| 11649 | (find-files dir "\\.jar$"))) |
| 11650 | inputs)) |
| 11651 | #t)) |
| 11652 | (replace 'install (install-jars "dist"))))) |
| 11653 | (inputs |
| 11654 | (list java-asm)) |
| 11655 | (native-inputs |
| 11656 | (list java-junit)) |
| 11657 | (home-page "https://github.com/nhatminhle/cofoja") |
| 11658 | (synopsis "Contracts for Java") |
| 11659 | (description "Contracts for Java, or Cofoja for short, is a contract |
| 11660 | programming framework and test tool for Java, which uses annotation processing |
| 11661 | and bytecode instrumentation to provide run-time checking. (In particular, |
| 11662 | this is not a static analysis tool.)") |
| 11663 | (license license:lgpl3+))) |
| 11664 | |
| 11665 | (define-public java-aopalliance |
| 11666 | (package |
| 11667 | (name "java-aopalliance") |
| 11668 | (version "1.0") |
| 11669 | (source (origin |
| 11670 | (method git-fetch) |
| 11671 | ;; Note: this git repository is not official, but contains the |
| 11672 | ;; source code that is in the CVS repository. Downloading the |
| 11673 | ;; tarball from sourceforge is undeterministic, and the cvs download |
| 11674 | ;; fails. |
| 11675 | (uri (git-reference |
| 11676 | (url "https://github.com/hoverruan/aopalliance") |
| 11677 | (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0"))) |
| 11678 | (file-name (string-append name "-" version)) |
| 11679 | (sha256 |
| 11680 | (base32 |
| 11681 | "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr")))) |
| 11682 | (build-system ant-build-system) |
| 11683 | (arguments |
| 11684 | `(#:jar-name "java-aopalliance.jar" |
| 11685 | #:jdk ,icedtea-8 |
| 11686 | #:tests? #f; no tests |
| 11687 | #:source-dir "aopalliance/src/main" |
| 11688 | #:phases |
| 11689 | (modify-phases %standard-phases |
| 11690 | (add-before 'install 'create-pom |
| 11691 | (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version)) |
| 11692 | (replace 'install |
| 11693 | (install-from-pom "pom.xml"))))) |
| 11694 | (home-page "https://aopalliance.sourceforge.net") |
| 11695 | (synopsis "Aspect-Oriented Programming") |
| 11696 | (description "The AOP Alliance project is a joint project between several |
| 11697 | software engineering people who are interested in Aspect-Oriented Programming |
| 11698 | (AOP) and Java.") |
| 11699 | (license license:public-domain))) |
| 11700 | |
| 11701 | (define-public java-javax-inject |
| 11702 | (package |
| 11703 | (name "java-javax-inject") |
| 11704 | (version "1") |
| 11705 | (source (origin |
| 11706 | (method git-fetch) |
| 11707 | (uri (git-reference |
| 11708 | (url "https://github.com/javax-inject/javax-inject") |
| 11709 | (commit version))) |
| 11710 | (file-name (git-file-name name version)) |
| 11711 | (sha256 |
| 11712 | (base32 |
| 11713 | "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x")))) |
| 11714 | (build-system ant-build-system) |
| 11715 | (arguments |
| 11716 | `(#:jar-name "java-javax-inject.jar" |
| 11717 | #:tests? #f; no tests |
| 11718 | #:phases |
| 11719 | (modify-phases %standard-phases |
| 11720 | (replace 'install |
| 11721 | (install-from-pom "pom.xml"))))) |
| 11722 | (home-page "https://github.com/javax-inject/javax-inject") |
| 11723 | (synopsis "JSR-330: Dependency Injection for Java") |
| 11724 | (description "This package specifies a means for obtaining objects in such |
| 11725 | a way as to maximize reusability, testability and maintainability compared to |
| 11726 | traditional approaches such as constructors, factories, and service locators |
| 11727 | (e.g., JNDI). This process, known as dependency injection, is beneficial to |
| 11728 | most nontrivial applications. |
| 11729 | |
| 11730 | Many types depend on other types. For example, a @var{Stopwatch} might depend |
| 11731 | on a @var{TimeSource}. The types on which a type depends are known as its |
| 11732 | dependencies. The process of finding an instance of a dependency to use at run |
| 11733 | time is known as resolving the dependency. If no such instance can be found, |
| 11734 | the dependency is said to be unsatisfied, and the application is broken.") |
| 11735 | (license license:asl2.0))) |
| 11736 | |
| 11737 | (define-public java-guice |
| 11738 | (package |
| 11739 | (name "java-guice") |
| 11740 | (version "4.1") |
| 11741 | (source (origin |
| 11742 | (method git-fetch) |
| 11743 | (uri (git-reference |
| 11744 | (url "https://github.com/google/guice") |
| 11745 | (commit version))) |
| 11746 | (file-name (git-file-name name version)) |
| 11747 | (modules '((guix build utils))) |
| 11748 | (snippet |
| 11749 | `(begin |
| 11750 | (for-each delete-file (find-files "." ".*.jar")) #t)) |
| 11751 | (sha256 |
| 11752 | (base32 |
| 11753 | "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq")))) |
| 11754 | (build-system ant-build-system) |
| 11755 | (arguments |
| 11756 | `(#:jar-name "java-guice.jar" |
| 11757 | #:jdk ,icedtea-8 |
| 11758 | #:tests? #f; FIXME: tests are not in a java sub directory |
| 11759 | #:source-dir "core/src" |
| 11760 | #:phases |
| 11761 | (modify-phases %standard-phases |
| 11762 | (add-after 'unpack 'make-files-writable |
| 11763 | (lambda _ |
| 11764 | (for-each make-file-writable (find-files ".")) |
| 11765 | #t)) |
| 11766 | (replace 'install |
| 11767 | (install-from-pom "core/pom.xml"))))) |
| 11768 | (propagated-inputs |
| 11769 | (list java-aopalliance |
| 11770 | java-cglib |
| 11771 | java-guava |
| 11772 | java-javax-inject |
| 11773 | java-guice-parent-pom)) |
| 11774 | (home-page "https://github.com/google/guice") |
| 11775 | (synopsis "Lightweight dependency injection framework") |
| 11776 | (description "Guice is a lightweight dependency injection framework for |
| 11777 | Java 6 and above.") |
| 11778 | (license license:asl2.0))) |
| 11779 | |
| 11780 | (define-public java-guice-servlet |
| 11781 | (package |
| 11782 | (inherit java-guice) |
| 11783 | (name "java-guice-servlet") |
| 11784 | (arguments |
| 11785 | `(#:jar-name "guice-servlet.jar" |
| 11786 | #:source-dir "extensions/servlet/src/" |
| 11787 | #:jdk ,icedtea-8 |
| 11788 | #:tests? #f ; FIXME: not in a java subdir |
| 11789 | #:phases |
| 11790 | (modify-phases %standard-phases |
| 11791 | (add-after 'unpack 'make-files-writable |
| 11792 | (lambda _ |
| 11793 | (for-each make-file-writable (find-files ".")) |
| 11794 | #t))))) |
| 11795 | (inputs |
| 11796 | `(("guice" ,java-guice) |
| 11797 | ("servlet" ,java-classpathx-servletapi) |
| 11798 | ,@(package-inputs java-guice))))) |
| 11799 | |
| 11800 | (define java-guice-parent-pom |
| 11801 | (package |
| 11802 | (inherit java-guice) |
| 11803 | (name "java-guice-parent-pom") |
| 11804 | (arguments |
| 11805 | `(#:tests? #f |
| 11806 | #:phases |
| 11807 | (modify-phases %standard-phases |
| 11808 | (delete 'configure) |
| 11809 | (delete 'build) |
| 11810 | (add-after 'install 'install-extensions |
| 11811 | (install-pom-file "extensions/pom.xml")) |
| 11812 | (replace 'install |
| 11813 | (install-pom-file "pom.xml"))))) |
| 11814 | (propagated-inputs |
| 11815 | `(("java-google-parent-pom" ,java-google-parent-pom-5))))) |
| 11816 | |
| 11817 | (define java-google-parent-pom-5 |
| 11818 | (package |
| 11819 | (name "java-google-parent-pom") |
| 11820 | (version "5") |
| 11821 | (source (origin |
| 11822 | (method git-fetch) |
| 11823 | (uri (git-reference |
| 11824 | (url "https://github.com/google/google-maven-parents") |
| 11825 | (commit (string-append "google-" version)))) |
| 11826 | (file-name (git-file-name name version)) |
| 11827 | (sha256 |
| 11828 | (base32 |
| 11829 | "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv")))) |
| 11830 | (build-system ant-build-system) |
| 11831 | (arguments |
| 11832 | `(#:tests? #f |
| 11833 | #:phases |
| 11834 | (modify-phases %standard-phases |
| 11835 | (delete 'configure) |
| 11836 | (delete 'build) |
| 11837 | (replace 'install |
| 11838 | (install-pom-file "pom.xml"))))) |
| 11839 | (home-page "https://github.com/google/google-maven-parents") |
| 11840 | (synopsis "Google parent pom") |
| 11841 | (description "This package contains the Maven parent POM for other Google |
| 11842 | Java projects.") |
| 11843 | (license license:asl2.0))) |
| 11844 | |
| 11845 | (define-public java-guice-5 |
| 11846 | (package |
| 11847 | (name "java-guice") |
| 11848 | (version "5.1.0") |
| 11849 | (source (origin |
| 11850 | (method git-fetch) |
| 11851 | (uri (git-reference |
| 11852 | (url "https://github.com/google/guice") |
| 11853 | (commit version))) |
| 11854 | (file-name (git-file-name name version)) |
| 11855 | (modules '((guix build utils))) |
| 11856 | (snippet |
| 11857 | `(begin |
| 11858 | (for-each delete-file (find-files "." ".*.jar")) #t)) |
| 11859 | (sha256 |
| 11860 | (base32 |
| 11861 | "05w8g9lmj8623b6f6c2xyriyhf44vwvqg0i1dszhrsnhk5f1jv71")))) |
| 11862 | (build-system ant-build-system) |
| 11863 | (arguments |
| 11864 | `(#:jar-name "java-guice.jar" |
| 11865 | #:jdk ,openjdk11 |
| 11866 | #:tests? #f ; FIXME: tests are not in a java sub directory |
| 11867 | #:source-dir "core/src" |
| 11868 | #:phases |
| 11869 | (modify-phases %standard-phases |
| 11870 | (add-after 'unpack 'make-files-writable |
| 11871 | (lambda _ |
| 11872 | (for-each make-file-writable (find-files ".")) |
| 11873 | #t)) |
| 11874 | (replace 'install |
| 11875 | (install-from-pom "core/pom.xml"))))) |
| 11876 | (propagated-inputs |
| 11877 | (list java-aopalliance |
| 11878 | java-guava |
| 11879 | java-javax-inject |
| 11880 | java-asm-9 |
| 11881 | java-jsr305 |
| 11882 | java-error-prone-annotations |
| 11883 | java-guice-5-parent-pom)) |
| 11884 | (home-page "https://github.com/google/guice") |
| 11885 | (synopsis "Lightweight dependency injection framework") |
| 11886 | (description "Guice is a lightweight dependency injection framework for |
| 11887 | Java 6 and above. This is version 5, with ASM 9 support for Java 11+.") |
| 11888 | (license license:asl2.0))) |
| 11889 | |
| 11890 | (define java-guice-5-parent-pom |
| 11891 | (package |
| 11892 | (inherit java-guice-5) |
| 11893 | (name "java-guice-parent-pom") |
| 11894 | (arguments |
| 11895 | `(#:tests? #f |
| 11896 | #:phases |
| 11897 | (modify-phases %standard-phases |
| 11898 | (delete 'configure) |
| 11899 | (delete 'build) |
| 11900 | (add-after 'install 'install-extensions |
| 11901 | (install-pom-file "extensions/pom.xml")) |
| 11902 | (replace 'install |
| 11903 | (install-pom-file "pom.xml"))))) |
| 11904 | (propagated-inputs |
| 11905 | `(("java-google-parent-pom" ,java-google-parent-pom-5))))) |
| 11906 | |
| 11907 | (define-public java-guice-5-servlet |
| 11908 | (package |
| 11909 | (inherit java-guice-5) |
| 11910 | (name "java-guice-servlet") |
| 11911 | (arguments |
| 11912 | `(#:jar-name "guice-servlet.jar" |
| 11913 | #:jdk ,openjdk11 |
| 11914 | #:source-dir "extensions/servlet/src/" |
| 11915 | #:tests? #f ; FIXME: not in a java subdir |
| 11916 | #:phases |
| 11917 | (modify-phases %standard-phases |
| 11918 | (add-after 'unpack 'make-files-writable |
| 11919 | (lambda _ |
| 11920 | (for-each make-file-writable (find-files ".")) |
| 11921 | #t)) |
| 11922 | (add-before 'install 'remove-provided-dependencies |
| 11923 | ;; Remove provided/test scope dependencies from POM since |
| 11924 | ;; install-from-pom can't find javax.servlet:servlet-api Maven coords. |
| 11925 | (lambda _ |
| 11926 | (invoke "sed" "-i" "/<dependencies>/,/<\\/dependencies>/d" |
| 11927 | "extensions/servlet/pom.xml") |
| 11928 | #t)) |
| 11929 | (replace 'install |
| 11930 | (install-from-pom "extensions/servlet/pom.xml"))))) |
| 11931 | (propagated-inputs |
| 11932 | (list java-guice-5 java-guice-5-parent-pom)) |
| 11933 | (inputs |
| 11934 | (list java-classpathx-servletapi)))) |
| 11935 | |
| 11936 | (define-public java-assertj |
| 11937 | (package |
| 11938 | (name "java-assertj") |
| 11939 | (version "3.8.0") |
| 11940 | (source (origin |
| 11941 | (method git-fetch) |
| 11942 | (uri (git-reference |
| 11943 | (url "https://github.com/joel-costigliola/assertj-core") |
| 11944 | (commit (string-append "assertj-core-" version)))) |
| 11945 | (file-name (git-file-name name version)) |
| 11946 | (sha256 |
| 11947 | (base32 |
| 11948 | "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1")))) |
| 11949 | (build-system ant-build-system) |
| 11950 | (arguments |
| 11951 | `(#:jar-name "java-assertj.jar" |
| 11952 | #:jdk ,icedtea-8 |
| 11953 | #:source-dir "src/main/java" |
| 11954 | #:tests? #f)); depends on tng-junit which depends on assertj |
| 11955 | (inputs |
| 11956 | `(("cglib" ,java-cglib) |
| 11957 | ("junit" ,java-junit) |
| 11958 | ("hamcrest" ,java-hamcrest-core))) |
| 11959 | (native-inputs |
| 11960 | `(("mockito" ,java-mockito-1))) |
| 11961 | (home-page "https://joel-costigliola.github.io/assertj/index.html") |
| 11962 | (synopsis "Fluent assertions for java") |
| 11963 | (description "AssertJ core is a Java library that provides a fluent |
| 11964 | interface for writing assertions. Its main goal is to improve test code |
| 11965 | readability and make maintenance of tests easier.") |
| 11966 | (license license:asl2.0))) |
| 11967 | |
| 11968 | (define-public java-jboss-javassist |
| 11969 | (package |
| 11970 | (name "java-jboss-javassist") |
| 11971 | (version "3.21.0") |
| 11972 | (source (origin |
| 11973 | (method git-fetch) |
| 11974 | (uri (git-reference |
| 11975 | (url "https://github.com/jboss-javassist/javassist") |
| 11976 | (commit |
| 11977 | (string-append "rel_" |
| 11978 | (string-map |
| 11979 | (lambda (x) (if (eq? x #\.) #\_ x)) version) |
| 11980 | "_ga")))) |
| 11981 | (file-name (git-file-name name version)) |
| 11982 | (sha256 |
| 11983 | (base32 |
| 11984 | "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm")) |
| 11985 | (modules '((guix build utils))) |
| 11986 | (snippet |
| 11987 | '(begin |
| 11988 | (delete-file "javassist.jar"))))) |
| 11989 | (build-system ant-build-system) |
| 11990 | (arguments |
| 11991 | `(#:jar-name "java-jboss-javassist.jar" |
| 11992 | #:jdk ,icedtea-8 |
| 11993 | #:source-dir "src/main" |
| 11994 | #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3 |
| 11995 | #:phases |
| 11996 | (modify-phases %standard-phases |
| 11997 | (add-after 'unpack 'make-files-writable |
| 11998 | (lambda _ |
| 11999 | (for-each make-file-writable (find-files ".")) |
| 12000 | #t))))) |
| 12001 | (native-inputs |
| 12002 | `(("junit" ,java-junit))) |
| 12003 | (home-page "https://github.com/jboss-javassist/javassist") |
| 12004 | (synopsis "Java bytecode engineering toolkit") |
| 12005 | (description "Javassist (JAVA programming ASSISTant) makes Java bytecode |
| 12006 | manipulation simple. It is a class library for editing bytecodes in Java; it |
| 12007 | enables Java programs to define a new class at runtime and to modify a class |
| 12008 | file when the JVM loads it.") |
| 12009 | (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl. |
| 12010 | |
| 12011 | (define-public java-jcommander |
| 12012 | (package |
| 12013 | (name "java-jcommander") |
| 12014 | (version "1.71") |
| 12015 | (source (origin |
| 12016 | (method git-fetch) |
| 12017 | (uri (git-reference |
| 12018 | (url "https://github.com/cbeust/jcommander") |
| 12019 | (commit version))) |
| 12020 | (file-name (git-file-name name version)) |
| 12021 | (sha256 |
| 12022 | (base32 |
| 12023 | "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57")))) |
| 12024 | (build-system ant-build-system) |
| 12025 | (arguments |
| 12026 | `(#:jar-name "java-jcommander.jar" |
| 12027 | #:jdk ,icedtea-8 |
| 12028 | #:tests? #f; requires testng which depends on jcommander |
| 12029 | #:source-dir "src/main/java")) |
| 12030 | (home-page "https://jcommander.org") |
| 12031 | (synopsis "Command line parameters parser") |
| 12032 | (description "JCommander is a very small Java framework that makes it |
| 12033 | trivial to parse command line parameters. Parameters are declared with |
| 12034 | annotations.") |
| 12035 | (license license:asl2.0))) |
| 12036 | |
| 12037 | (define-public java-bsh |
| 12038 | (package |
| 12039 | (name "java-bsh") |
| 12040 | (version "2.1.1") |
| 12041 | (source (origin |
| 12042 | (method git-fetch) |
| 12043 | (uri (git-reference |
| 12044 | (url "https://github.com/beanshell/beanshell") |
| 12045 | (commit version))) |
| 12046 | (file-name (git-file-name name version)) |
| 12047 | (sha256 |
| 12048 | (base32 |
| 12049 | "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg")) |
| 12050 | (modules '((guix build utils))) |
| 12051 | (snippet |
| 12052 | '(begin |
| 12053 | ;; Delete bundled third-party jar archives. |
| 12054 | (for-each delete-file (find-files "." ".*.jar$")) |
| 12055 | (for-each (lambda (file) (chmod file #o644)) |
| 12056 | (find-files "." ".")) |
| 12057 | #t)))) |
| 12058 | (build-system ant-build-system) |
| 12059 | (arguments |
| 12060 | `(#:build-target "jarall" |
| 12061 | #:test-target "junit-tests-all" |
| 12062 | #:make-flags (list "-DDATE" "(no date for reproducibility)") |
| 12063 | #:phases |
| 12064 | (modify-phases %standard-phases |
| 12065 | (add-before 'check 'fix-test |
| 12066 | (lambda _ |
| 12067 | (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java" |
| 12068 | ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory")))) |
| 12069 | (replace 'install |
| 12070 | (install-from-pom "pom.xml"))))) |
| 12071 | (inputs |
| 12072 | (list java-classpathx-servletapi java-commons-bsf)) |
| 12073 | (native-inputs |
| 12074 | (list java-junit javacc-3)) |
| 12075 | (home-page "http://beanshell.org/") |
| 12076 | (synopsis "Lightweight Scripting for Java") |
| 12077 | (description "BeanShell is a small, free, embeddable Java source |
| 12078 | interpreter with object scripting language features, written in Java. |
| 12079 | BeanShell dynamically executes standard Java syntax and extends it with common |
| 12080 | scripting conveniences such as loose types, commands, and method closures like |
| 12081 | those in Perl and JavaScript.") |
| 12082 | (license license:asl2.0))) |
| 12083 | |
| 12084 | (define-public java-fest-util |
| 12085 | (package |
| 12086 | (name "java-fest-util") |
| 12087 | (version "1.2.5") |
| 12088 | (source (origin |
| 12089 | (method git-fetch) |
| 12090 | (uri (git-reference |
| 12091 | (url "https://github.com/alexruiz/fest-util/") |
| 12092 | (commit (string-append "fest-util-" version)))) |
| 12093 | (file-name (git-file-name name version)) |
| 12094 | (sha256 |
| 12095 | (base32 |
| 12096 | "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz")))) |
| 12097 | (build-system ant-build-system) |
| 12098 | (arguments |
| 12099 | `(#:jar-name "java-fest-util.jar" |
| 12100 | #:source-dir "src/main/java")) |
| 12101 | (native-inputs |
| 12102 | `(("junit" ,java-junit) |
| 12103 | ("hamcrest" ,java-hamcrest-core))) |
| 12104 | (home-page "https://github.com/alexruiz/fest-util") |
| 12105 | (synopsis "FEST common utilities") |
| 12106 | (description "Common utilities used in all FEST module.") |
| 12107 | (license license:asl2.0))) |
| 12108 | |
| 12109 | (define-public java-fest-test |
| 12110 | (package |
| 12111 | (name "java-fest-test") |
| 12112 | (version "2.1.0") |
| 12113 | (source (origin |
| 12114 | (method git-fetch) |
| 12115 | (uri (git-reference |
| 12116 | (url "https://github.com/alexruiz/fest-test/") |
| 12117 | (commit (string-append "fest-test-" version)))) |
| 12118 | (file-name (git-file-name name version)) |
| 12119 | (sha256 |
| 12120 | (base32 |
| 12121 | "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn")))) |
| 12122 | (build-system ant-build-system) |
| 12123 | (arguments |
| 12124 | `(#:jar-name "java-fest-test.jar" |
| 12125 | #:source-dir "src/main/java" |
| 12126 | #:tests? #f)); no tests |
| 12127 | (inputs |
| 12128 | `(("junit" ,java-junit))) |
| 12129 | (home-page "https://github.com/alexruiz/fest-test") |
| 12130 | (synopsis "Common FEST testing infrastructure") |
| 12131 | (description "Fest-test contains the common FEST testing infrastructure.") |
| 12132 | (license license:asl2.0))) |
| 12133 | |
| 12134 | (define-public java-fest-assert |
| 12135 | (package |
| 12136 | (name "java-fest-assert") |
| 12137 | (version "2.0M10") |
| 12138 | (source (origin |
| 12139 | (method git-fetch) |
| 12140 | (uri (git-reference |
| 12141 | (url "https://github.com/alexruiz/fest-assert-2.x/") |
| 12142 | (commit (string-append "fest-assert-core-" version)))) |
| 12143 | (file-name (git-file-name name version)) |
| 12144 | (sha256 |
| 12145 | (base32 |
| 12146 | "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by")))) |
| 12147 | (build-system ant-build-system) |
| 12148 | (arguments |
| 12149 | `(#:jar-name "java-fest-assert.jar" |
| 12150 | #:source-dir "src/main/java" |
| 12151 | #:test-exclude |
| 12152 | (list |
| 12153 | "**/Abstract*.java" |
| 12154 | "**/*BaseTest.java" |
| 12155 | ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses |
| 12156 | "**/MessageFormatter_format_Test.java" |
| 12157 | "**/internal/*/*_assert*_Test.java"))) |
| 12158 | (inputs |
| 12159 | (list java-fest-util)) |
| 12160 | (native-inputs |
| 12161 | (list java-junit |
| 12162 | java-fest-test |
| 12163 | java-hamcrest-core |
| 12164 | java-mockito-1 |
| 12165 | java-cglib |
| 12166 | java-objenesis)) |
| 12167 | (home-page "https://github.com/alexruiz/fest-assert-2.x") |
| 12168 | (synopsis "FEST fluent assertions") |
| 12169 | (description "FEST-Assert provides a fluent interface for assertions.") |
| 12170 | (license license:asl2.0))) |
| 12171 | |
| 12172 | (define-public java-testng |
| 12173 | (package |
| 12174 | (name "java-testng") |
| 12175 | (version "6.14.3") |
| 12176 | (source (origin |
| 12177 | (method git-fetch) |
| 12178 | (uri (git-reference |
| 12179 | (url "https://github.com/cbeust/testng") |
| 12180 | (commit version))) |
| 12181 | (file-name (string-append name "-" version "-checkout")) |
| 12182 | (sha256 |
| 12183 | (base32 |
| 12184 | "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv")))) |
| 12185 | (build-system ant-build-system) |
| 12186 | (arguments |
| 12187 | (list |
| 12188 | #:jdk icedtea-8; java.util.function |
| 12189 | #:jar-name "java-testng.jar" |
| 12190 | #:source-dir "src/main/java" |
| 12191 | #:phases |
| 12192 | '(modify-phases %standard-phases |
| 12193 | (add-after 'unpack 'delete-failing-tests |
| 12194 | (lambda _ |
| 12195 | ;; FIXME: I don't know why these tests fail |
| 12196 | (substitute* "src/test/resources/testng.xml" |
| 12197 | ;; expected:<[0]> but was:<[3]> |
| 12198 | (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "") |
| 12199 | ;; expected [3] but found [2] |
| 12200 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "") |
| 12201 | ;; This is a parallel test and we've observed that it fails |
| 12202 | ;; sometimes. |
| 12203 | (("<class name=\"test.dataprovider.DataProviderTest\"/>") "") |
| 12204 | ;; Flaky multi-threaded test |
| 12205 | (("<class name=\"test.thread.MultiThreadedDependentTest\" />") "")))) |
| 12206 | ;; We don't have groovy |
| 12207 | (add-after 'unpack 'delete-groovy-tests |
| 12208 | (lambda _ |
| 12209 | (delete-file-recursively "src/test/java/test/dependent/issue1648/") |
| 12210 | (substitute* "src/test/resources/testng.xml" |
| 12211 | (("<class name=\"test.dependent.issue1648.TestRunner\"/>") "")))) |
| 12212 | (add-before 'build 'copy-resources |
| 12213 | (lambda _ |
| 12214 | (copy-recursively "src/main/resources" "build/classes"))) |
| 12215 | (add-before 'check 'copy-test-resources |
| 12216 | (lambda _ |
| 12217 | (copy-recursively "src/test/resources" "build/test-classes"))) |
| 12218 | (replace 'check |
| 12219 | (lambda _ |
| 12220 | (invoke "ant" "compile-tests") |
| 12221 | ;; we don't have groovy |
| 12222 | (substitute* "src/test/resources/testng.xml" |
| 12223 | (("<class name=\"test.groovy.GroovyTest\" />") "")) |
| 12224 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 12225 | ":build/classes" |
| 12226 | ":build/test-classes") |
| 12227 | "-Dtest.resources.dir=src/test/resources" |
| 12228 | "org.testng.TestNG" "src/test/resources/testng.xml")))))) |
| 12229 | (propagated-inputs |
| 12230 | (list java-junit |
| 12231 | java-jsr305 |
| 12232 | java-bsh |
| 12233 | java-jcommander |
| 12234 | java-guice |
| 12235 | java-snakeyaml)) |
| 12236 | (native-inputs |
| 12237 | (list java-guava |
| 12238 | java-javax-inject |
| 12239 | java-hamcrest-all |
| 12240 | java-assertj |
| 12241 | java-mockito-1 |
| 12242 | java-cglib |
| 12243 | java-aopalliance)) |
| 12244 | (home-page "https://testng.org") |
| 12245 | (synopsis "Testing framework") |
| 12246 | (description "TestNG is a testing framework inspired from JUnit and NUnit |
| 12247 | but introducing some new functionalities that make it more powerful and easier |
| 12248 | to use.") |
| 12249 | (license license:asl2.0))) |
| 12250 | |
| 12251 | (define-public java-jnacl |
| 12252 | (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9") |
| 12253 | (revision "2")) |
| 12254 | (package |
| 12255 | (name "java-jnacl") |
| 12256 | (version (string-append "0.1.0-" revision "." (string-take commit 7))) |
| 12257 | (source (origin |
| 12258 | (method git-fetch) |
| 12259 | (uri (git-reference |
| 12260 | (url "https://github.com/neilalexander/jnacl") |
| 12261 | (commit commit))) |
| 12262 | (file-name (git-file-name name version)) |
| 12263 | (sha256 |
| 12264 | (base32 |
| 12265 | "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb")))) |
| 12266 | (build-system ant-build-system) |
| 12267 | (arguments |
| 12268 | `(#:jar-name "jnacl.jar" |
| 12269 | #:source-dir "src/main/java" |
| 12270 | #:jdk ,icedtea-8 |
| 12271 | #:phases |
| 12272 | (modify-phases %standard-phases |
| 12273 | (add-before 'build 'fix-tests |
| 12274 | (lambda _ |
| 12275 | (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java" |
| 12276 | "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java") |
| 12277 | (("assertions.Assertions") "assertions.api.Assertions")) |
| 12278 | #t)) |
| 12279 | (replace 'check |
| 12280 | (lambda _ |
| 12281 | (invoke "ant" "compile-tests") |
| 12282 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 12283 | ":build/classes" |
| 12284 | ":build/test-classes") |
| 12285 | "org.testng.TestNG" "-testclass" |
| 12286 | "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class") |
| 12287 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") |
| 12288 | ":build/classes" |
| 12289 | ":build/test-classes") |
| 12290 | "org.testng.TestNG" "-testclass" |
| 12291 | "build/test-classes/com/neilalexander/jnacl/NaClTest.class")))))) |
| 12292 | (native-inputs |
| 12293 | (list java-testng java-fest-util java-fest-assert)) |
| 12294 | (home-page "https://github.com/neilalexander/jnacl") |
| 12295 | (synopsis "Java implementation of NaCl") |
| 12296 | (description "Pure Java implementation of the NaCl: Networking and |
| 12297 | Cryptography library.") |
| 12298 | (license license:bsd-2)))) |
| 12299 | |
| 12300 | (define-public java-mvel2 |
| 12301 | (package |
| 12302 | (name "java-mvel2") |
| 12303 | (version "2.3.1") |
| 12304 | (source (origin |
| 12305 | (method url-fetch) |
| 12306 | (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-" |
| 12307 | version ".Final.tar.gz")) |
| 12308 | (sha256 |
| 12309 | (base32 |
| 12310 | "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z")))) |
| 12311 | (build-system ant-build-system) |
| 12312 | (arguments |
| 12313 | `(#:jar-name "mvel2.jar" |
| 12314 | #:source-dir "src/main/java" |
| 12315 | #:test-exclude |
| 12316 | (list "**/Abstract*.java" |
| 12317 | ;; Base class with no tests |
| 12318 | "**/MVELThreadTest.java") |
| 12319 | #:phases |
| 12320 | (modify-phases %standard-phases |
| 12321 | (add-after 'install 'install-bin |
| 12322 | (lambda* (#:key outputs #:allow-other-keys) |
| 12323 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) |
| 12324 | (mkdir-p bin) |
| 12325 | (with-output-to-file (string-append bin "/mvel2") |
| 12326 | (lambda _ |
| 12327 | (display |
| 12328 | (string-append |
| 12329 | "#!" (which "bash") "\n" |
| 12330 | "if [ \"$#\" -ne \"2\" ]; then\n" |
| 12331 | "echo 'Usage: mvel2 <script> <out.dir>'\n" |
| 12332 | "exit\n" |
| 12333 | "fi\n" |
| 12334 | "java -Dout.dir=$2 -cp " (getenv "CLASSPATH") |
| 12335 | ":" (assoc-ref outputs "out") "/share/java/mvel2.jar" |
| 12336 | " org.mvel2.sh.Main $1")))) |
| 12337 | (chmod (string-append bin "/mvel2") #o755)) |
| 12338 | #t))))) |
| 12339 | (native-inputs |
| 12340 | `(("junit" ,java-junit) |
| 12341 | ("hamcrest" ,java-hamcrest-core))) |
| 12342 | (home-page "https://github.com/mvel/mvel") |
| 12343 | (synopsis "MVFLEX Expression Language") |
| 12344 | (description "MVEL has largely been inspired by Java syntax, but has some |
| 12345 | fundamental differences aimed at making it more efficient as an expression |
| 12346 | language, such as operators that directly support collection, array and string |
| 12347 | matching, as well as regular expressions. MVEL is used to evaluate expressions |
| 12348 | written using Java syntax. |
| 12349 | |
| 12350 | In addition to the expression language, MVEL serves as a templating language for |
| 12351 | configuration and string construction.") |
| 12352 | (license license:asl2.0))) |
| 12353 | |
| 12354 | (define-public java-commons-jexl-2 |
| 12355 | (package |
| 12356 | (name "java-commons-jexl") |
| 12357 | (version "2.1.1") |
| 12358 | (source (origin |
| 12359 | (method url-fetch) |
| 12360 | (uri (string-append "mirror://apache/commons/jexl/source/" |
| 12361 | "commons-jexl-" version "-src.tar.gz")) |
| 12362 | (sha256 |
| 12363 | (base32 |
| 12364 | "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz")))) |
| 12365 | (build-system ant-build-system) |
| 12366 | (arguments |
| 12367 | `(#:jar-name "commons-jexl-2.jar" |
| 12368 | #:jdk ,icedtea-8 |
| 12369 | #:source-dir "src/main/java" |
| 12370 | #:phases |
| 12371 | (modify-phases %standard-phases |
| 12372 | (add-before 'check 'disable-broken-tests |
| 12373 | (lambda* (#:key inputs #:allow-other-keys) |
| 12374 | (with-directory-excursion "src/test/java/org/apache/commons/jexl2/" |
| 12375 | (substitute* "ArithmeticTest.java" |
| 12376 | (("asserter.assertExpression\\(\"3 / 0\"") "//") |
| 12377 | (("asserter.assertExpression\\(\"imanull") "//")) |
| 12378 | ;; This test fails with "ambiguous method invocation" |
| 12379 | (delete-file "CacheTest.java") |
| 12380 | ;; This test doesn't have access to the temp directory |
| 12381 | (substitute* "ClassCreatorTest.java" |
| 12382 | (("java.io.tmpdir") "user.dir")) |
| 12383 | ;; This test fails in trying to detect whether it can run. |
| 12384 | (substitute* "ClassCreator.java" |
| 12385 | (("boolean canRun =.*") "boolean canRun = false;\n")) |
| 12386 | ;; ...and these tests depend on it. |
| 12387 | (delete-file "scripting/JexlScriptEngineOptionalTest.java") |
| 12388 | (delete-file "scripting/JexlScriptEngineTest.java")) |
| 12389 | #t)) |
| 12390 | (add-before 'build 'run-javacc |
| 12391 | (lambda _ |
| 12392 | (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/" |
| 12393 | (invoke "java" "jjtree" "Parser.jjt") |
| 12394 | (invoke "java" "javacc" "Parser.jj")) |
| 12395 | #t))))) |
| 12396 | (inputs |
| 12397 | (list java-commons-logging-minimal)) |
| 12398 | (native-inputs |
| 12399 | (list java-junit java-hamcrest-core javacc-4)) |
| 12400 | (home-page "https://commons.apache.org/proper/commons-jexl/") |
| 12401 | (synopsis "Java Expression Language") |
| 12402 | (description "JEXL is a library intended to facilitate the implementation |
| 12403 | of dynamic and scripting features in applications and frameworks written in |
| 12404 | Java. JEXL implements an Expression Language based on some extensions to the |
| 12405 | JSTL Expression Language supporting most of the constructs seen in |
| 12406 | shell-script or ECMAScript. Its goal is to expose scripting features usable |
| 12407 | by technical operatives or consultants working with enterprise platforms.") |
| 12408 | (license license:asl2.0))) |
| 12409 | |
| 12410 | (define-public java-lz4 |
| 12411 | (package |
| 12412 | (name "java-lz4") |
| 12413 | (version "1.4.0") |
| 12414 | (source (origin |
| 12415 | (method git-fetch) |
| 12416 | (uri (git-reference |
| 12417 | (url "https://github.com/lz4/lz4-java") |
| 12418 | (commit version))) |
| 12419 | (file-name (git-file-name name version)) |
| 12420 | (sha256 |
| 12421 | (base32 |
| 12422 | "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y")))) |
| 12423 | (build-system ant-build-system) |
| 12424 | (arguments |
| 12425 | `(#:jar-name "lz4.jar" |
| 12426 | #:jdk ,icedtea-8 |
| 12427 | #:source-dir "src/java:src/java-unsafe" |
| 12428 | #:tests? #f; FIXME: requires more dependencies |
| 12429 | #:phases |
| 12430 | (modify-phases %standard-phases |
| 12431 | (add-after 'unpack 'make-files-writable |
| 12432 | (lambda _ |
| 12433 | (for-each make-file-writable (find-files ".")) |
| 12434 | #t)) |
| 12435 | (add-before 'configure 'generate-source |
| 12436 | (lambda _ |
| 12437 | (with-directory-excursion "src/build/source_templates" |
| 12438 | (invoke "mvel2" "../gen_sources.mvel" "../../java")) |
| 12439 | #t))))) |
| 12440 | (native-inputs |
| 12441 | `(("mvel" ,java-mvel2))) |
| 12442 | (home-page "https://jpountz.github.io/lz4-java") |
| 12443 | (synopsis "Compression algorithm") |
| 12444 | (description "LZ4 - Java is a Java port of the popular lz4 compression |
| 12445 | algorithms and xxHash hashing algorithm.") |
| 12446 | (license license:asl2.0))) |
| 12447 | |
| 12448 | (define-public java-bouncycastle |
| 12449 | (package |
| 12450 | (name "java-bouncycastle") |
| 12451 | (version "1.67") |
| 12452 | (source (origin |
| 12453 | (method git-fetch) |
| 12454 | (uri (git-reference |
| 12455 | (url "http://git.bouncycastle.org/repositories/bc-java") |
| 12456 | ;(url "https://github.com/bcgit/bc-java") |
| 12457 | (commit (string-append "r1rv" (substring version 2 4))))) |
| 12458 | (file-name (git-file-name name version)) |
| 12459 | (sha256 |
| 12460 | (base32 |
| 12461 | "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz")) |
| 12462 | (modules '((guix build utils))) |
| 12463 | (snippet |
| 12464 | '(begin |
| 12465 | (for-each delete-file |
| 12466 | (find-files "." "\\.jar$")) |
| 12467 | #t)))) |
| 12468 | (build-system ant-build-system) |
| 12469 | (arguments |
| 12470 | `(#:jdk ,icedtea-8 |
| 12471 | #:tests? #f |
| 12472 | #:phases |
| 12473 | (modify-phases %standard-phases |
| 12474 | (replace 'build |
| 12475 | (lambda _ |
| 12476 | (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") |
| 12477 | (invoke "ant" "-f" "ant/jdk15+.xml" "build"))) |
| 12478 | ;; FIXME: the tests freeze. |
| 12479 | ;; (replace 'check |
| 12480 | ;; (lambda _ |
| 12481 | ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test"))) |
| 12482 | (replace 'install |
| 12483 | (install-jars "build/artifacts/jdk1.5/jars"))))) |
| 12484 | (inputs |
| 12485 | (list java-javax-mail)) |
| 12486 | (native-inputs |
| 12487 | `(("unzip" ,unzip) |
| 12488 | ("junit" ,java-junit) |
| 12489 | ("java-native-access" ,java-native-access) |
| 12490 | ("java-native-access-platform" ,java-native-access-platform))) |
| 12491 | (home-page "https://www.bouncycastle.org") |
| 12492 | (synopsis "Cryptographic library") |
| 12493 | (description "Bouncy Castle is a cryptographic library for the Java |
| 12494 | programming language.") |
| 12495 | (license license:expat))) |
| 12496 | |
| 12497 | ;;; Bouncy Castle 1.78.1 components for GraalPy (needs jdk18on jars) |
| 12498 | |
| 12499 | (define bc-java-1.78.1-source |
| 12500 | (origin |
| 12501 | (method url-fetch) |
| 12502 | (uri "https://codeload.github.com/bcgit/bc-java/tar.gz/refs/tags/r1rv78v1") |
| 12503 | (file-name "bc-java-1.78.1.tar.gz") |
| 12504 | (sha256 |
| 12505 | (base32 "09i973ypv1dhvp2m50jnr71wwqsxs64qdpinm62phib3hw4nhwvb")))) |
| 12506 | |
| 12507 | (define (bc-java-1.78.1-package name jar-name build-target synopsis description) |
| 12508 | (package |
| 12509 | (name name) |
| 12510 | (version "1.78.1") |
| 12511 | (source bc-java-1.78.1-source) |
| 12512 | (build-system ant-build-system) |
| 12513 | (arguments |
| 12514 | (list |
| 12515 | #:jar-name (string-append jar-name ".jar") |
| 12516 | #:tests? #f |
| 12517 | #:phases |
| 12518 | #~(modify-phases %standard-phases |
| 12519 | (replace 'build |
| 12520 | (lambda _ |
| 12521 | (invoke "ant" "-f" "ant/jdk18+.xml" #$build-target))) |
| 12522 | (replace 'install |
| 12523 | (lambda* (#:key outputs #:allow-other-keys) |
| 12524 | (let* ((out (assoc-ref outputs "out")) |
| 12525 | (share (string-append out "/share/java")) |
| 12526 | ;; bc-java appends version as 17801 (no dots) |
| 12527 | (src-jar (string-append "build/artifacts/jdk1.8/jars/" |
| 12528 | #$jar-name "-17801.jar")) |
| 12529 | (src-dir (string-append "build/artifacts/jdk1.8/" |
| 12530 | #$jar-name "-17801/src")) |
| 12531 | ;; MX_URLREWRITES expects bcprov-jdk18on.jar (no version) |
| 12532 | (dst-jar (string-append share "/" #$jar-name ".jar")) |
| 12533 | (dst-sources-jar (string-append share "/" #$jar-name "-sources.jar"))) |
| 12534 | (mkdir-p share) |
| 12535 | (copy-file src-jar dst-jar) |
| 12536 | ;; Create sources JAR from the source directory |
| 12537 | (invoke "jar" "cf" dst-sources-jar "-C" src-dir "."))))))) |
| 12538 | (native-inputs (list unzip java-junit java-native-access java-native-access-platform)) |
| 12539 | (home-page "https://www.bouncycastle.org") |
| 12540 | (synopsis synopsis) |
| 12541 | (description description) |
| 12542 | (license license:expat))) |
| 12543 | |
| 12544 | ;;; These are separate packages because GraalPy's MX_URLREWRITES mechanism |
| 12545 | ;;; rewrites Maven artifact URLs to local paths. Maven artifacts are per-JAR, |
| 12546 | ;;; so each JAR needs its own Guix package to map to the expected path: |
| 12547 | ;;; org/bouncycastle/bcprov-jdk18on/1.78.1/bcprov-jdk18on-1.78.1.jar |
| 12548 | ;;; org/bouncycastle/bcutil-jdk18on/1.78.1/bcutil-jdk18on-1.78.1.jar |
| 12549 | ;;; org/bouncycastle/bcpkix-jdk18on/1.78.1/bcpkix-jdk18on-1.78.1.jar |
| 12550 | ;;; A single combined package would not satisfy these individual URL rewrites. |
| 12551 | |
| 12552 | (define-public java-bcprov-for-graalpy |
| 12553 | (bc-java-1.78.1-package |
| 12554 | "java-bcprov-for-graalpy" |
| 12555 | "bcprov-jdk18on" |
| 12556 | "build-provider" |
| 12557 | "Bouncy Castle provider for GraalPy" |
| 12558 | "Crypto provider from Bouncy Castle built for GraalPy.")) |
| 12559 | |
| 12560 | (define-public java-bcutil-for-graalpy |
| 12561 | (bc-java-1.78.1-package |
| 12562 | "java-bcutil-for-graalpy" |
| 12563 | "bcutil-jdk18on" |
| 12564 | "build-util" |
| 12565 | "Bouncy Castle utility classes for GraalPy" |
| 12566 | "Utility support classes from Bouncy Castle for GraalPy.")) |
| 12567 | |
| 12568 | (define-public java-bcpkix-for-graalpy |
| 12569 | (bc-java-1.78.1-package |
| 12570 | "java-bcpkix-for-graalpy" |
| 12571 | "bcpkix-jdk18on" |
| 12572 | "build-pkix" |
| 12573 | "Bouncy Castle PKIX/CMS for GraalPy" |
| 12574 | "PKIX and CMS support from Bouncy Castle for GraalPy.")) |
| 12575 | |
| 12576 | (define-public java-lmax-disruptor |
| 12577 | (package |
| 12578 | (name "java-lmax-disruptor") |
| 12579 | (version "3.4.4") |
| 12580 | (source (origin |
| 12581 | (method git-fetch) |
| 12582 | (uri (git-reference |
| 12583 | (url "https://github.com/LMAX-Exchange/disruptor") |
| 12584 | (commit version))) |
| 12585 | (file-name (git-file-name name version)) |
| 12586 | (sha256 |
| 12587 | (base32 |
| 12588 | "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn")))) |
| 12589 | (build-system ant-build-system) |
| 12590 | (arguments |
| 12591 | `(#:jar-name "java-lmax-disruptor.jar" |
| 12592 | #:jdk ,icedtea-8 |
| 12593 | #:tests? #f)); tests hang |
| 12594 | (inputs |
| 12595 | `(("junit" ,java-junit) |
| 12596 | ("java-hdrhistogram" ,java-hdrhistogram) |
| 12597 | ("java-jmock" ,java-jmock) |
| 12598 | ("java-jmock-legacy" ,java-jmock-legacy) |
| 12599 | ("java-jmock-junit4" ,java-jmock-junit4) |
| 12600 | ("java-hamcrest-all" ,java-hamcrest-all))) |
| 12601 | (native-inputs |
| 12602 | `(("cglib" ,java-cglib) |
| 12603 | ("objenesis" ,java-objenesis))) |
| 12604 | (home-page "https://www.lmax.com/disruptor") |
| 12605 | (synopsis "High performance inter-thread communication") |
| 12606 | (description "LMAX Disruptor is a software pattern and software component |
| 12607 | for high performance inter-thread communication that avoids the need for |
| 12608 | message queues or resource locking.") |
| 12609 | (license license:asl2.0))) |
| 12610 | |
| 12611 | (define-public java-conversant-disruptor |
| 12612 | (package |
| 12613 | (name "java-conversant-disruptor") |
| 12614 | (version "1.2.19") |
| 12615 | (source (origin |
| 12616 | (method git-fetch) |
| 12617 | (uri (git-reference |
| 12618 | (url "https://github.com/conversant/disruptor") |
| 12619 | (commit version))) |
| 12620 | (file-name (git-file-name name version)) |
| 12621 | (sha256 |
| 12622 | (base32 |
| 12623 | "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g")))) |
| 12624 | (build-system ant-build-system) |
| 12625 | (arguments |
| 12626 | `(#:jar-name "java-conversant-disruptor.jar" |
| 12627 | #:source-dir "src/main/java" |
| 12628 | #:phases |
| 12629 | (modify-phases %standard-phases |
| 12630 | (add-before 'build 'copy-resources |
| 12631 | (lambda _ |
| 12632 | (copy-recursively "src/main/resources" "build/classes"))) |
| 12633 | (add-before 'build 'remove-module |
| 12634 | (lambda _ |
| 12635 | (delete-file "src/main/java/module-info.java")))))) |
| 12636 | (native-inputs |
| 12637 | (list java-junit)) |
| 12638 | (home-page "https://github.com/conversant/disruptor") |
| 12639 | (synopsis "High performance intra-thread communication") |
| 12640 | (description "Conversant Disruptor is the highest performing intra-thread |
| 12641 | transfer mechanism available in Java. Conversant Disruptor is an implementation |
| 12642 | of this type of ring buffer that has almost no overhead and that exploits a |
| 12643 | particularly simple design.") |
| 12644 | (license license:asl2.0))) |
| 12645 | |
| 12646 | (define-public java-jctools-core-1 |
| 12647 | (package |
| 12648 | (name "java-jctools-core") |
| 12649 | (version "1.2.1") |
| 12650 | (source (origin |
| 12651 | (method git-fetch) |
| 12652 | (uri (git-reference |
| 12653 | (url "https://github.com/JCTools/JCTools") |
| 12654 | (commit (string-append "v" version)))) |
| 12655 | (file-name (git-file-name name version)) |
| 12656 | (sha256 |
| 12657 | (base32 |
| 12658 | "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb")))) |
| 12659 | (build-system ant-build-system) |
| 12660 | (arguments |
| 12661 | `(#:jar-name "java-jctools-core.jar" |
| 12662 | #:source-dir "jctools-core/src/main/java" |
| 12663 | #:test-dir "jctools-core/src/test" |
| 12664 | ;; The tests timeout on some architectures. |
| 12665 | #:tests? ,(not (or (target-aarch64?) |
| 12666 | (%current-target-system))))) |
| 12667 | (native-inputs |
| 12668 | (list java-junit java-hamcrest-all)) |
| 12669 | (home-page "https://github.com/JCTools/JCTools") |
| 12670 | (synopsis "Concurrency tools for Java") |
| 12671 | (description "This library implements concurrent data structures that are |
| 12672 | not natively available in Java.") |
| 12673 | (license license:asl2.0))) |
| 12674 | |
| 12675 | (define-public java-commons-bcel |
| 12676 | (package |
| 12677 | (name "java-commons-bcel") |
| 12678 | (version "6.1") |
| 12679 | (source (origin |
| 12680 | (method url-fetch) |
| 12681 | (uri (string-append "mirror://apache/commons/bcel/source/bcel-" |
| 12682 | version "-src.tar.gz")) |
| 12683 | (sha256 |
| 12684 | (base32 |
| 12685 | "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy")))) |
| 12686 | (build-system ant-build-system) |
| 12687 | (arguments |
| 12688 | `(#:jar-name "bcel.jar" |
| 12689 | #:jdk ,icedtea-8 |
| 12690 | #:source-dir "src/main/java" |
| 12691 | #:test-dir "src/test/java" |
| 12692 | ;; FIXME: Tests require the unpackaged jna. |
| 12693 | #:tests? #f)) |
| 12694 | (home-page "https://commons.apache.org/proper/commons-bcel/") |
| 12695 | (synopsis "Byte code engineering library") |
| 12696 | (description "The Byte Code Engineering Library (Apache Commons BCEL) is |
| 12697 | intended to give users a convenient way to analyze, create, and |
| 12698 | manipulate (binary) Java class files. Classes are represented by objects |
| 12699 | which contain all the symbolic information of the given class: methods, fields |
| 12700 | and byte code instructions, in particular. |
| 12701 | |
| 12702 | Such objects can be read from an existing file, be transformed by a |
| 12703 | program (e.g. a class loader at run-time) and written to a file again. An |
| 12704 | even more interesting application is the creation of classes from scratch at |
| 12705 | run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful |
| 12706 | if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format |
| 12707 | of Java @code{.class} files.") |
| 12708 | (license license:asl2.0))) |
| 12709 | |
| 12710 | (define-public java-xerial-core |
| 12711 | (package |
| 12712 | (name "java-xerial-core") |
| 12713 | (version "2.1") |
| 12714 | (source (origin |
| 12715 | (method url-fetch) |
| 12716 | (uri (string-append "https://github.com/xerial/xerial-java/archive/" |
| 12717 | version ".tar.gz")) |
| 12718 | (file-name (string-append name "-" version ".tar.gz")) |
| 12719 | (sha256 |
| 12720 | (base32 |
| 12721 | "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d")))) |
| 12722 | (build-system ant-build-system) |
| 12723 | (arguments |
| 12724 | `(#:jar-name "xerial-core.jar" |
| 12725 | #:source-dir "xerial-core/src/main/java" |
| 12726 | #:test-dir "xerial-core/src/test" |
| 12727 | #:phases |
| 12728 | (modify-phases %standard-phases |
| 12729 | (add-before 'build 'copy-resources |
| 12730 | (lambda _ |
| 12731 | (copy-recursively "xerial-core/src/main/resources" |
| 12732 | "build/classes") |
| 12733 | #t))))) |
| 12734 | (native-inputs |
| 12735 | `(("junit" ,java-junit) |
| 12736 | ("hamcrest" ,java-hamcrest-core))) |
| 12737 | (home-page "https://github.com/xerial/xerial-java") |
| 12738 | (synopsis "Data management libraries for Java") |
| 12739 | (description "Xerial is a set of data management libraries for the Java |
| 12740 | programming language. The ultimate goal of the Xerial project is to manage |
| 12741 | everything as database, including class objects, text format data, data |
| 12742 | streams, etc.") |
| 12743 | (license license:asl2.0))) |
| 12744 | |
| 12745 | (define-public java-byte-buddy-dep |
| 12746 | (package |
| 12747 | (name "java-byte-buddy-dep") |
| 12748 | (version "1.14.0") |
| 12749 | (source (origin |
| 12750 | (method git-fetch) |
| 12751 | (uri (git-reference |
| 12752 | (url "https://github.com/raphw/byte-buddy") |
| 12753 | (commit (string-append "byte-buddy-" version)))) |
| 12754 | (file-name (git-file-name name version)) |
| 12755 | (sha256 |
| 12756 | (base32 |
| 12757 | "03jmsnkjb9d3z9brqs8fc512hhs5b5iab3a5wbax9zi03dskgvh2")))) |
| 12758 | (build-system ant-build-system) |
| 12759 | (arguments |
| 12760 | `(#:jar-name "byte-buddy-dep.jar" |
| 12761 | #:source-dir "byte-buddy-dep/src/main/java" |
| 12762 | #:test-dir "byte-buddy-dep/src/test" |
| 12763 | #:jdk ,openjdk11 |
| 12764 | #:tests? #f; would build java files that are incompatible with current jdk |
| 12765 | #:phases |
| 12766 | (modify-phases %standard-phases |
| 12767 | (add-before 'build 'remove-annotations |
| 12768 | (lambda _ |
| 12769 | (with-directory-excursion "byte-buddy-dep/src/main/java/net/bytebuddy" |
| 12770 | (substitute* (find-files "." ".*.java") |
| 12771 | (("@EqualsAndHashCode.*") "") |
| 12772 | (("import lombok.EqualsAndHashCode;") "") |
| 12773 | (("@SuppressFBWarnings.*") "") |
| 12774 | (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") "")) |
| 12775 | (substitute* '("description/type/TypeDescription.java" |
| 12776 | "dynamic/loading/ClassInjector.java") |
| 12777 | (("^ *value = .*") "") |
| 12778 | (("^ *justification = .*") "")))))))) |
| 12779 | (inputs |
| 12780 | (list java-asm-9 java-asm-commons-9 java-jsr305 java-native-access)) |
| 12781 | (home-page "http://bytebuddy.net/") |
| 12782 | (synopsis "Runtime code generation for the Java virtual machine") |
| 12783 | (description "Byte Buddy is a code generation and manipulation library for |
| 12784 | creating and modifying Java classes during the runtime of a Java application |
| 12785 | and without the help of a compiler.") |
| 12786 | (license license:asl2.0))) |
| 12787 | |
| 12788 | (define-public java-powermock-reflect |
| 12789 | (package |
| 12790 | (name "java-powermock-reflect") |
| 12791 | (version "2.0.9") |
| 12792 | (source (origin |
| 12793 | (method git-fetch) |
| 12794 | (uri (git-reference |
| 12795 | (url "https://github.com/powermock/powermock") |
| 12796 | (commit (string-append "powermock-" version)))) |
| 12797 | (file-name (git-file-name name version)) |
| 12798 | (sha256 |
| 12799 | (base32 |
| 12800 | "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v")) |
| 12801 | (patches |
| 12802 | (search-patches "java-powermock-fix-java-files.patch")))) |
| 12803 | (build-system ant-build-system) |
| 12804 | (arguments |
| 12805 | `(#:jar-name "java-powermock-reflect.jar" |
| 12806 | #:source-dir "powermock-reflect/src/main/java" |
| 12807 | #:test-dir "powermock-reflect/src/test" |
| 12808 | #:jdk ,openjdk11)) |
| 12809 | (inputs |
| 12810 | (list java-asm-9 java-objenesis)) |
| 12811 | (native-inputs |
| 12812 | (list java-assertj java-cglib java-hamcrest-core java-junit)) |
| 12813 | (home-page "https://github.com/powermock/powermock") |
| 12814 | (synopsis "Mock library extension framework") |
| 12815 | (description "PowerMock is a framework that extends other mock libraries |
| 12816 | such as EasyMock with more powerful capabilities. PowerMock uses a custom |
| 12817 | classloader and bytecode manipulation to enable mocking of static methods, |
| 12818 | constructors, final classes and methods, private methods, removal of static |
| 12819 | initializers and more. By using a custom classloader no changes need to be |
| 12820 | done to the IDE or continuous integration servers which simplifies adoption.") |
| 12821 | (license license:asl2.0))) |
| 12822 | |
| 12823 | (define-public java-powermock-core |
| 12824 | (package |
| 12825 | (inherit java-powermock-reflect) |
| 12826 | (name "java-powermock-core") |
| 12827 | (arguments |
| 12828 | `(#:jar-name "java-powermock-core.jar" |
| 12829 | #:source-dir "powermock-core/src/main/java" |
| 12830 | #:test-dir "powermock-core/src/test" |
| 12831 | #:tests? #f; requires powermock-api |
| 12832 | #:jdk ,openjdk11 |
| 12833 | #:phases |
| 12834 | (modify-phases %standard-phases |
| 12835 | (add-before 'build 'copy-resources |
| 12836 | (lambda _ |
| 12837 | (copy-recursively "powermock-core/src/main/resources" |
| 12838 | "build/classes") |
| 12839 | #t))))) |
| 12840 | (inputs |
| 12841 | (list java-asm-9 |
| 12842 | java-byte-buddy-dep |
| 12843 | java-jboss-javassist |
| 12844 | java-powermock-reflect)) |
| 12845 | (native-inputs |
| 12846 | (list java-assertj java-mockito-1 java-junit)))) |
| 12847 | |
| 12848 | (define-public java-powermock-api-support |
| 12849 | (package |
| 12850 | (inherit java-powermock-reflect) |
| 12851 | (name "java-powermock-api-support") |
| 12852 | (build-system ant-build-system) |
| 12853 | (arguments |
| 12854 | `(#:jar-name "java-powermock-api-support.jar" |
| 12855 | #:jdk ,openjdk11 |
| 12856 | #:source-dir "powermock-api/powermock-api-support/src/main/java" |
| 12857 | #:tests? #f)); no tests |
| 12858 | (inputs |
| 12859 | (list java-powermock-core java-powermock-reflect)))) |
| 12860 | |
| 12861 | (define-public java-powermock-modules-junit4-common |
| 12862 | (package |
| 12863 | (inherit java-powermock-reflect) |
| 12864 | (name "java-powermock-modules-junit4-common") |
| 12865 | (build-system ant-build-system) |
| 12866 | (arguments |
| 12867 | `(#:jar-name "java-powermock-modules-junit4-common.jar" |
| 12868 | #:jdk ,openjdk11 |
| 12869 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" |
| 12870 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) |
| 12871 | (inputs |
| 12872 | (list java-cglib |
| 12873 | java-easymock |
| 12874 | java-hamcrest-core |
| 12875 | java-powermock-core |
| 12876 | java-powermock-reflect)))) |
| 12877 | |
| 12878 | (define-public java-powermock-modules-junit4 |
| 12879 | (package |
| 12880 | (inherit java-powermock-reflect) |
| 12881 | (name "java-powermock-modules-junit4") |
| 12882 | (build-system ant-build-system) |
| 12883 | (arguments |
| 12884 | `(#:jar-name "java-powermock-modules-junit4.jar" |
| 12885 | #:tests? #f; require easymock 4, which introduces a loop with testng |
| 12886 | #:jdk ,openjdk11 |
| 12887 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" |
| 12888 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
| 12889 | #:phases |
| 12890 | (modify-phases %standard-phases |
| 12891 | (add-before 'build 'fix-junit-detection |
| 12892 | (lambda _ |
| 12893 | ;; Our junit version is 4.12-SNAPSHOT |
| 12894 | (substitute* (find-files "powermock-modules/powermock-module-junit4" |
| 12895 | "PowerMockJUnit4MethodValidator.java") |
| 12896 | (("4.12") "4.12-SNAPSHOT")) |
| 12897 | #t))))) |
| 12898 | (inputs |
| 12899 | (list java-cglib |
| 12900 | java-powermock-core |
| 12901 | java-powermock-reflect |
| 12902 | java-powermock-modules-junit4-common)) |
| 12903 | (native-inputs |
| 12904 | (list java-easymock |
| 12905 | java-hamcrest-core |
| 12906 | java-junit |
| 12907 | java-objenesis)))) |
| 12908 | |
| 12909 | (define-public java-powermock-api-easymock |
| 12910 | (package |
| 12911 | (inherit java-powermock-reflect) |
| 12912 | (name "java-powermock-api-easymock") |
| 12913 | (build-system ant-build-system) |
| 12914 | (arguments |
| 12915 | `(#:jar-name "java-powermock-api-easymock.jar" |
| 12916 | #:jdk ,openjdk11 |
| 12917 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" |
| 12918 | #:tests? #f; no tests |
| 12919 | #:phases |
| 12920 | (modify-phases %standard-phases |
| 12921 | (add-before 'build 'fix-file |
| 12922 | (lambda _ |
| 12923 | ;; FIXME: This looks wrong, but it fixes a build error. |
| 12924 | (with-directory-excursion "powermock-api/powermock-api-easymock" |
| 12925 | (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java" |
| 12926 | (("classLoader instanceof MockClassLoader") "false") |
| 12927 | (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";"))) |
| 12928 | #t))))) |
| 12929 | (inputs |
| 12930 | (list java-cglib |
| 12931 | java-easymock |
| 12932 | java-powermock-api-support |
| 12933 | java-powermock-core |
| 12934 | java-powermock-reflect)))) |
| 12935 | |
| 12936 | (define-public java-jboss-jms-api-spec |
| 12937 | (package |
| 12938 | (name "java-jboss-jms-api-spec") |
| 12939 | (version "2.0") |
| 12940 | (source (origin |
| 12941 | (method url-fetch) |
| 12942 | (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/" |
| 12943 | "archive/jboss-jms-api_" version |
| 12944 | "_spec-1.0.1.Final.tar.gz")) |
| 12945 | (sha256 |
| 12946 | (base32 |
| 12947 | "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m")))) |
| 12948 | (build-system ant-build-system) |
| 12949 | (arguments |
| 12950 | `(#:jar-name "java-jboss-jms-api_spec.jar" |
| 12951 | #:jdk ,icedtea-8 |
| 12952 | #:source-dir "." |
| 12953 | #:tests? #f)); no tests |
| 12954 | (home-page "https://github.com/jboss/jboss-jms-api_spec") |
| 12955 | (synopsis "Java Message Service API specification") |
| 12956 | (description "Java Message Service (JMS) API is used to send messages |
| 12957 | messages between two or more clients. It is a messaging standard that allows |
| 12958 | application components to create, send, receive, and read messages.") |
| 12959 | ; either gpl2 only with GPL Classpath Exception, or cddl. |
| 12960 | (license (list license:gpl2 license:cddl1.0)))) |
| 12961 | |
| 12962 | (define-public java-mail |
| 12963 | (package |
| 12964 | (name "java-mail") |
| 12965 | (version "1.6.0") |
| 12966 | (source (origin |
| 12967 | (method url-fetch) |
| 12968 | (uri (string-append "https://github.com/javaee/javamail/archive/" |
| 12969 | "JAVAMAIL-1_6_0.tar.gz")) |
| 12970 | (sha256 |
| 12971 | (base32 |
| 12972 | "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92")))) |
| 12973 | (build-system ant-build-system) |
| 12974 | (arguments |
| 12975 | `(#:jar-name "java-mail.jar" |
| 12976 | #:jdk ,icedtea-8 |
| 12977 | #:source-dir "mail/src/main/java" |
| 12978 | #:test-dir "mail/src/test" |
| 12979 | #:test-exclude |
| 12980 | (list "**/CollectorFormatterTest.java" |
| 12981 | "**/CompactFormatterTest.java" |
| 12982 | "**/DurationFilterTest.java" |
| 12983 | "**/MailHandlerTest.java" |
| 12984 | "**/GetLocalAddressTest.java" |
| 12985 | ;; SSLHandshakeException: No appropriate protocol |
| 12986 | "**/WriteTimeoutSocketTest.java" |
| 12987 | ;; FIXME: both end with: |
| 12988 | ;; java.lang.ClassNotFoundException: |
| 12989 | ;; javax.mail.internet.MimeMultipartParseTest |
| 12990 | "**/MimeMultipartParseTest.java" |
| 12991 | "**/SearchTermSerializationTest.java") |
| 12992 | #:phases |
| 12993 | (modify-phases %standard-phases |
| 12994 | (add-before 'configure 'move-version.java |
| 12995 | (lambda _ |
| 12996 | (copy-file "mail/src/main/resources/javax/mail/Version.java" |
| 12997 | "mail/src/main/java/javax/mail/Version.java"))) |
| 12998 | (add-before 'build 'copy-resources |
| 12999 | (lambda _ |
| 13000 | (copy-recursively "mail/src/main/resources/META-INF" |
| 13001 | "build/classes/META-INF")))))) |
| 13002 | (native-inputs |
| 13003 | (list java-junit java-hamcrest-core)) |
| 13004 | (home-page "https://javaee.github.io/javamail/") |
| 13005 | (synopsis "Mail-related functionality in Java") |
| 13006 | (description "The JavaMail API provides a platform-independent and |
| 13007 | protocol-independent framework to build mail and messaging applications.") |
| 13008 | ;; General Public License Version 2 only ("GPL") or the Common Development |
| 13009 | ;; and Distribution License("CDDL") |
| 13010 | (license (list license:cddl1.1 |
| 13011 | license:gpl2)))); with classpath exception |
| 13012 | |
| 13013 | (define-public java-mapdb |
| 13014 | (package |
| 13015 | (name "java-mapdb") |
| 13016 | (version "1.0.9") |
| 13017 | (source (origin |
| 13018 | (method git-fetch) |
| 13019 | (uri (git-reference |
| 13020 | (url "https://github.com/jankotek/mapdb") |
| 13021 | (commit (string-append "mapdb-" version)))) |
| 13022 | (file-name (git-file-name name version)) |
| 13023 | (sha256 |
| 13024 | (base32 |
| 13025 | "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv")))) |
| 13026 | (build-system ant-build-system) |
| 13027 | (arguments |
| 13028 | (list #:jar-name "mapdb.jar" |
| 13029 | #:source-dir "src/main/java" |
| 13030 | #:test-dir "src/test" |
| 13031 | #:test-exclude (list "**/ClosedThrowsExceptionTest.java" |
| 13032 | "**/ConcurrentMapInterfaceTest.java" |
| 13033 | "**/EngineTest.java" |
| 13034 | "**/Issue664Test.java" |
| 13035 | "**/MapInterfaceTest.java") |
| 13036 | #:phases #~(modify-phases %standard-phases |
| 13037 | (replace 'install (install-from-pom "pom.xml"))))) |
| 13038 | (native-inputs (list java-junit)) |
| 13039 | (home-page "https://mapdb.org/") |
| 13040 | (synopsis "Concurrent data structures") |
| 13041 | (description "MapDB provides concurrent maps, sets and queues backed by |
| 13042 | disk storage or off-heap memory.") |
| 13043 | (license license:bsd-3))) |
| 13044 | |
| 13045 | (define-public java-jeromq |
| 13046 | (package |
| 13047 | (name "java-jeromq") |
| 13048 | (version "0.4.3") |
| 13049 | (source (origin |
| 13050 | (method git-fetch) |
| 13051 | (uri (git-reference |
| 13052 | (url "https://github.com/zeromq/jeromq") |
| 13053 | (commit (string-append "v" version)))) |
| 13054 | (file-name (string-append name "-" version "-checkout")) |
| 13055 | (sha256 |
| 13056 | (base32 |
| 13057 | "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj")) |
| 13058 | (patches (search-patches "java-jeromq-fix-tests.patch")))) |
| 13059 | (build-system ant-build-system) |
| 13060 | (arguments |
| 13061 | `(#:jar-name "java-jeromq.jar" |
| 13062 | #:source-dir "src/main/java" |
| 13063 | #:jdk ,icedtea-8 |
| 13064 | #:test-exclude |
| 13065 | (list |
| 13066 | "**/Abstract*.java" |
| 13067 | ;; Requires network |
| 13068 | "**/ZBeaconTest.java" |
| 13069 | ;; Failures |
| 13070 | "**/DealerSpecTest.java" |
| 13071 | "**/CustomDecoderTest.java" |
| 13072 | "**/CustomEncoderTest.java" |
| 13073 | "**/ConnectRidTest.java" |
| 13074 | "**/ReqSpecTest.java" |
| 13075 | "**/PushPullSpecTest.java" |
| 13076 | "**/PubSubHwmTest.java" |
| 13077 | "**/RouterSpecTest.java" |
| 13078 | "**/ProxyTest.java"))) |
| 13079 | (inputs |
| 13080 | (list java-jnacl)) |
| 13081 | (native-inputs |
| 13082 | `(("java-hamcrest-core" ,java-hamcrest-core) |
| 13083 | ("junit" ,java-junit))) |
| 13084 | (home-page "https://zeromq.org/bindings:java") |
| 13085 | (synopsis "Java binding for 0MQ") |
| 13086 | (description "Jeromq provides the java bindings for 0MQ.") |
| 13087 | (license license:mpl2.0))) |
| 13088 | |
| 13089 | (define-public java-kafka-clients |
| 13090 | (package |
| 13091 | (name "java-kafka-clients") |
| 13092 | (version "1.1.1") |
| 13093 | (source (origin |
| 13094 | (method url-fetch) |
| 13095 | (uri (string-append "mirror://apache/kafka/" version "/kafka-" |
| 13096 | version "-src.tgz")) |
| 13097 | (sha256 |
| 13098 | (base32 |
| 13099 | "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566")))) |
| 13100 | (build-system ant-build-system) |
| 13101 | (arguments |
| 13102 | `(#:jar-name "java-kafka-clients.jar" |
| 13103 | #:jdk ,icedtea-8 |
| 13104 | #:source-dir "clients/src/main/java" |
| 13105 | #:test-dir "clients/src/test" |
| 13106 | ;; Tests require powermock which uses ASM 9 compiled with Java 11, |
| 13107 | ;; creating class version incompatibility with icedtea-8. |
| 13108 | #:tests? #f)) |
| 13109 | (inputs |
| 13110 | (list java-slf4j-api java-lz4)) |
| 13111 | (native-inputs |
| 13112 | (list java-bouncycastle |
| 13113 | java-cglib |
| 13114 | java-easymock |
| 13115 | java-hamcrest-all |
| 13116 | java-jboss-javassist |
| 13117 | java-junit |
| 13118 | java-objenesis |
| 13119 | java-powermock-api-easymock |
| 13120 | java-powermock-api-support |
| 13121 | java-powermock-core |
| 13122 | java-powermock-modules-junit4 |
| 13123 | java-powermock-modules-junit4-common |
| 13124 | java-snappy)) |
| 13125 | (home-page "https://kafka.apache.org") |
| 13126 | (synopsis "Distributed streaming platform") |
| 13127 | (description "Kafka is a distributed streaming platform, which means: |
| 13128 | @itemize |
| 13129 | @item it can publish and subscribe to streams of records; |
| 13130 | @item it can store streams of records in a fault-tolerant way; |
| 13131 | @item it can process streams of records as they occur. |
| 13132 | @end itemize") |
| 13133 | ;; Either cddl or gpl2 only. |
| 13134 | (license (list license:cddl1.1; actually cddl1.1 |
| 13135 | license:gpl2)))); with classpath exception |
| 13136 | |
| 13137 | (define-public java-jdom |
| 13138 | (package |
| 13139 | (name "java-jdom") |
| 13140 | (version "1.1.3") |
| 13141 | (source (origin |
| 13142 | (method url-fetch) |
| 13143 | (uri (string-append "http://jdom.org/dist/binary/archive/jdom-" |
| 13144 | version ".tar.gz")) |
| 13145 | (sha256 |
| 13146 | (base32 |
| 13147 | "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl")))) |
| 13148 | (build-system ant-build-system) |
| 13149 | (arguments |
| 13150 | `(#:build-target "package" |
| 13151 | #:tests? #f; tests are run as part of the build process |
| 13152 | #:phases |
| 13153 | (modify-phases %standard-phases |
| 13154 | (replace 'install |
| 13155 | (install-jars "build"))))) |
| 13156 | (home-page "http://jdom.org/") |
| 13157 | (synopsis "Access, manipulate, and output XML data") |
| 13158 | (description "Java-based solution for accessing, manipulating, and |
| 13159 | outputting XML data from Java code.") |
| 13160 | (license license:bsd-4))) |
| 13161 | |
| 13162 | (define-public java-geronimo-xbean-reflect |
| 13163 | (package |
| 13164 | (name "java-geronimo-xbean-reflect") |
| 13165 | (version "4.5") |
| 13166 | (source (origin |
| 13167 | (method svn-fetch) |
| 13168 | (uri (svn-reference |
| 13169 | (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/") |
| 13170 | (revision 1807396))) |
| 13171 | (file-name (string-append name "-" version)) |
| 13172 | (sha256 |
| 13173 | (base32 |
| 13174 | "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k")))) |
| 13175 | (build-system ant-build-system) |
| 13176 | (arguments |
| 13177 | `(#:jar-name "geronimo-xbean-reflect.jar" |
| 13178 | #:source-dir "xbean-reflect/src/main/java" |
| 13179 | #:test-dir "xbean-reflect/src/test" |
| 13180 | #:jdk ,icedtea-8 |
| 13181 | #:test-exclude |
| 13182 | (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java" |
| 13183 | "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java" |
| 13184 | "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java") |
| 13185 | #:phases |
| 13186 | (modify-phases %standard-phases |
| 13187 | (add-before 'build 'fix-source |
| 13188 | (lambda _ |
| 13189 | (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/")) |
| 13190 | ;; org.apache.xbean.asm6 is actually repackaged java-asm |
| 13191 | (substitute* (string-append dir "XbeanAsmParameterNameLoader.java") |
| 13192 | (("org.apache.xbean.asm5") "org.objectweb.asm")) |
| 13193 | #t))) |
| 13194 | (replace 'install (install-from-pom "xbean-reflect/pom.xml"))))) |
| 13195 | (inputs |
| 13196 | `(("asm" ,java-asm) |
| 13197 | ("log4j" ,java-log4j-api) |
| 13198 | ("log4j-1.2" ,java-log4j-1.2-api) |
| 13199 | ("log4j-core" ,java-log4j-core) |
| 13200 | ("logging" ,java-commons-logging-minimal))) |
| 13201 | (propagated-inputs |
| 13202 | (list java-geronimo-parent-pom)) |
| 13203 | (native-inputs |
| 13204 | `(("junit" ,java-junit))) |
| 13205 | (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/") |
| 13206 | (synopsis "Dependency injection helper") |
| 13207 | (description "Xbean-reflect provides very flexible ways to create objects |
| 13208 | and graphs of objects for dependency injection frameworks") |
| 13209 | (license license:asl2.0))) |
| 13210 | |
| 13211 | (define java-geronimo-genesis-2.1 |
| 13212 | (package |
| 13213 | (name "java-geronimo-genesis") |
| 13214 | (version "2.1") |
| 13215 | (source (origin |
| 13216 | (method svn-fetch) |
| 13217 | (uri (svn-reference |
| 13218 | (url (string-append "https://svn.apache.org/repos/asf/" |
| 13219 | "geronimo/genesis/tags/genesis-" |
| 13220 | version)) |
| 13221 | (revision 1807396))) |
| 13222 | (file-name (string-append name "-" version "-source")) |
| 13223 | (sha256 |
| 13224 | (base32 |
| 13225 | "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf")))) |
| 13226 | (build-system ant-build-system) |
| 13227 | (arguments |
| 13228 | `(#:tests? #f |
| 13229 | #:phases |
| 13230 | (modify-phases %standard-phases |
| 13231 | (delete 'configure) |
| 13232 | (delete 'build) |
| 13233 | (replace 'install |
| 13234 | (install-pom-file "pom.xml")) |
| 13235 | (add-after 'install 'install-enforcer-rules |
| 13236 | (install-pom-file "genesis-enforcer-rules/pom.xml")) |
| 13237 | (add-after 'install 'install-flava |
| 13238 | (install-pom-file "genesis-default-flava/pom.xml")) |
| 13239 | (add-after 'install 'install-packaging |
| 13240 | (install-pom-file "genesis-packaging/pom.xml")) |
| 13241 | (add-after 'install-flava 'install-flava-java4 |
| 13242 | (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml")) |
| 13243 | (add-after 'install-flava 'install-flava-java5 |
| 13244 | (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml")) |
| 13245 | (add-after 'install-flava 'install-flava-java6 |
| 13246 | (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml"))))) |
| 13247 | (propagated-inputs |
| 13248 | `(("apache-parent-pom" ,apache-parent-pom-13))) |
| 13249 | (home-page "https://geronimo.apache.org") |
| 13250 | (synopsis "Collection of maven POM files for the Geronimo project") |
| 13251 | (description "Apache Geronimo is a server runtime. This package contains |
| 13252 | only pom files used by other components in the Geronimo project.") |
| 13253 | (license license:asl2.0))) |
| 13254 | |
| 13255 | (define java-geronimo-parent-pom |
| 13256 | (package |
| 13257 | (inherit java-geronimo-xbean-reflect) |
| 13258 | (name "java-geronimo-parent-pom") |
| 13259 | (arguments |
| 13260 | `(#:tests? #f |
| 13261 | #:phases |
| 13262 | (modify-phases %standard-phases |
| 13263 | (delete 'configure) |
| 13264 | (delete 'build) |
| 13265 | (replace 'install |
| 13266 | (install-pom-file "pom.xml"))))) |
| 13267 | (propagated-inputs |
| 13268 | `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1))))) |
| 13269 | |
| 13270 | (define-public java-geronimo-xbean-bundleutils |
| 13271 | (package |
| 13272 | (inherit java-geronimo-xbean-reflect) |
| 13273 | (name "java-geronimo-xbean-bundleutils") |
| 13274 | (arguments |
| 13275 | `(#:jar-name "geronimo-xbean-bundleutils.jar" |
| 13276 | #:source-dir "xbean-bundleutils/src/main/java" |
| 13277 | #:test-dir "xbean-bundleutils/src/test" |
| 13278 | #:phases |
| 13279 | (modify-phases %standard-phases |
| 13280 | (add-before 'build 'fix-java |
| 13281 | (lambda _ |
| 13282 | ;; We use a more recent version of osgi, so this file requires |
| 13283 | ;; more interface method implementations. |
| 13284 | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" |
| 13285 | (("import org.osgi.framework.ServiceRegistration;") |
| 13286 | "import org.osgi.framework.ServiceRegistration; |
| 13287 | import org.osgi.framework.ServiceFactory; |
| 13288 | import java.util.Collection; |
| 13289 | import org.osgi.framework.ServiceObjects;") |
| 13290 | (("public Bundle getBundle\\(\\)") |
| 13291 | "@Override |
| 13292 | public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) { |
| 13293 | throw new UnsupportedOperationException(); |
| 13294 | } |
| 13295 | @Override |
| 13296 | public <S> ServiceRegistration<S> registerService(Class<S> clazz, |
| 13297 | ServiceFactory<S> factory, Dictionary<String, ?> properties) { |
| 13298 | throw new UnsupportedOperationException(); |
| 13299 | } |
| 13300 | public Bundle getBundle()")) |
| 13301 | #t))))) |
| 13302 | (inputs |
| 13303 | `(("java-slf4j" ,java-slf4j-api) |
| 13304 | ("java-asm" ,java-asm) |
| 13305 | ("java-osgi-framework" ,java-osgi-framework) |
| 13306 | ("java-eclipse-osgi" ,java-eclipse-osgi) |
| 13307 | ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin))))) |
| 13308 | |
| 13309 | (define-public java-geronimo-xbean-asm-util |
| 13310 | (package |
| 13311 | (inherit java-geronimo-xbean-reflect) |
| 13312 | (name "java-geronimo-xbean-asm-util") |
| 13313 | (arguments |
| 13314 | `(#:jar-name "geronimo-xbean-asm-util.jar" |
| 13315 | #:source-dir "xbean-asm-util/src/main/java" |
| 13316 | #:tests? #f)); no tests |
| 13317 | (inputs |
| 13318 | (list java-asm)) |
| 13319 | (native-inputs '()))) |
| 13320 | |
| 13321 | (define-public java-geronimo-xbean-finder |
| 13322 | (package |
| 13323 | (inherit java-geronimo-xbean-reflect) |
| 13324 | (name "java-geronimo-xbean-finder") |
| 13325 | (arguments |
| 13326 | `(#:jar-name "geronimo-xbean-finder.jar" |
| 13327 | #:source-dir "xbean-finder/src/main/java" |
| 13328 | #:test-dir "xbean-finder/src/test")) |
| 13329 | (inputs |
| 13330 | (list java-slf4j-api |
| 13331 | java-asm |
| 13332 | java-geronimo-xbean-bundleutils |
| 13333 | java-geronimo-xbean-asm-util |
| 13334 | java-osgi-service-packageadmin |
| 13335 | java-osgi-framework)) |
| 13336 | (native-inputs |
| 13337 | (list java-junit java-hamcrest-core)))) |
| 13338 | |
| 13339 | (define-public java-gson |
| 13340 | (package |
| 13341 | (name "java-gson") |
| 13342 | (version "2.8.2") |
| 13343 | (source (origin |
| 13344 | (method url-fetch) |
| 13345 | (uri (string-append "https://github.com/google/gson/archive/" |
| 13346 | "gson-parent-" version ".tar.gz")) |
| 13347 | (sha256 |
| 13348 | (base32 |
| 13349 | "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9")))) |
| 13350 | (build-system ant-build-system) |
| 13351 | (arguments |
| 13352 | `(#:jar-name "gson.jar" |
| 13353 | #:source-dir "gson/src/main/java" |
| 13354 | #:test-dir "gson/src/test")) |
| 13355 | (native-inputs |
| 13356 | (list java-junit java-hamcrest-core)) |
| 13357 | (home-page "https://github.com/google/gson") |
| 13358 | (synopsis "Java serialization/deserialization library from/to JSON") |
| 13359 | (description "Gson is a Java library that can be used to convert Java |
| 13360 | Objects into their JSON representation. It can also be used to convert a JSON |
| 13361 | string to an equivalent Java object. Gson can work with arbitrary Java objects |
| 13362 | including pre-existing objects that you do not have source-code of.") |
| 13363 | (license license:asl2.0))) |
| 13364 | |
| 13365 | ;; This requires a different Java version than 2.8.2 above |
| 13366 | (define-public java-gson-2.8.6 |
| 13367 | (package |
| 13368 | (inherit java-gson) |
| 13369 | (name "java-gson") |
| 13370 | (version "2.8.6") |
| 13371 | (source (origin |
| 13372 | (method git-fetch) |
| 13373 | (uri (git-reference |
| 13374 | (url "https://github.com/google/gson") |
| 13375 | (commit (string-append "gson-parent-" version)))) |
| 13376 | (file-name (git-file-name name version)) |
| 13377 | (sha256 |
| 13378 | (base32 |
| 13379 | "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3")))) |
| 13380 | (arguments |
| 13381 | `(#:jar-name "gson.jar" |
| 13382 | #:jdk ,openjdk11 |
| 13383 | #:source-dir "gson/src/main/java" |
| 13384 | #:test-dir "gson/src/test" |
| 13385 | #:phases |
| 13386 | (modify-phases %standard-phases |
| 13387 | ;; avoid Maven dependency |
| 13388 | (add-before 'build 'fill-template |
| 13389 | (lambda _ |
| 13390 | (with-directory-excursion "gson/src/main" |
| 13391 | (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java" |
| 13392 | "java/com/google/gson/internal/GsonBuildConfig.java") |
| 13393 | (substitute* "java/com/google/gson/internal/GsonBuildConfig.java" |
| 13394 | (("\\$\\{project.version\\}") ,version)))))))))) |
| 13395 | |
| 13396 | (define-public java-hawtjni |
| 13397 | (package |
| 13398 | (name "java-hawtjni") |
| 13399 | (version "1.15") |
| 13400 | (source (origin |
| 13401 | (method url-fetch) |
| 13402 | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" |
| 13403 | "hawtjni-project-" version ".tar.gz")) |
| 13404 | (sha256 |
| 13405 | (base32 |
| 13406 | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) |
| 13407 | (build-system ant-build-system) |
| 13408 | (arguments |
| 13409 | `(#:jar-name "hawtjni.jar" |
| 13410 | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" |
| 13411 | #:tests? #f; no tests |
| 13412 | #:phases |
| 13413 | (modify-phases %standard-phases |
| 13414 | (add-before 'build 'build-native |
| 13415 | (lambda* (#:key inputs #:allow-other-keys) |
| 13416 | (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))) |
| 13417 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
| 13418 | (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" |
| 13419 | "-fPIC" "-O2" include) |
| 13420 | (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" |
| 13421 | "-fPIC" "-O2" include) |
| 13422 | (invoke "gcc" "-o" "libhawtjni.so" "-shared" |
| 13423 | "hawtjni.o" "hawtjni-callback.o"))) |
| 13424 | #t)) |
| 13425 | (add-after 'install 'install-native |
| 13426 | (lambda* (#:key outputs #:allow-other-keys) |
| 13427 | (let* ((out (assoc-ref outputs "out")) |
| 13428 | (lib (string-append out "/lib")) |
| 13429 | (inc (string-append out "/include"))) |
| 13430 | (with-directory-excursion "hawtjni-generator/src/main/resources/" |
| 13431 | (install-file "libhawtjni.so" lib) |
| 13432 | (install-file "hawtjni.h" inc))) |
| 13433 | #t)) |
| 13434 | (add-before 'install 'install-parent |
| 13435 | (install-pom-file "pom.xml")) |
| 13436 | (replace 'install |
| 13437 | (install-from-pom "hawtjni-runtime/pom.xml"))))) |
| 13438 | (inputs |
| 13439 | (list java-commons-cli java-asm java-geronimo-xbean-finder)) |
| 13440 | (home-page "https://fusesource.github.io/hawtjni/") |
| 13441 | (synopsis "JNI code generator") |
| 13442 | (description "HawtJNI is a code generator that produces the JNI code needed |
| 13443 | to implement Java native methods. It is based on the jnigen code generator |
| 13444 | that is part of the SWT Tools project.") |
| 13445 | (license license:asl2.0))) |
| 13446 | |
| 13447 | (define-public java-jansi-native |
| 13448 | (package |
| 13449 | (name "java-jansi-native") |
| 13450 | (version "1.7") |
| 13451 | (source (origin |
| 13452 | (method url-fetch) |
| 13453 | (uri (string-append "https://github.com/fusesource/jansi-native/" |
| 13454 | "archive/jansi-native-" version ".tar.gz")) |
| 13455 | (sha256 |
| 13456 | (base32 |
| 13457 | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) |
| 13458 | (build-system ant-build-system) |
| 13459 | (arguments |
| 13460 | `(#:jar-name "jansi-native.jar" |
| 13461 | #:source-dir "src/main/java" |
| 13462 | #:tests? #f; no tests |
| 13463 | #:phases |
| 13464 | (modify-phases %standard-phases |
| 13465 | (add-before 'build 'build-native |
| 13466 | (lambda* (#:key inputs #:allow-other-keys) |
| 13467 | ;; there are more required files for windows in windows/ |
| 13468 | (with-directory-excursion "src/main/native-package/src" |
| 13469 | (substitute* "jansi_ttyname.c" |
| 13470 | (("#include \"jansi_.*") "")) |
| 13471 | (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" |
| 13472 | (string-append "-I" (assoc-ref inputs "java-hawtjni") |
| 13473 | "/include") |
| 13474 | (string-append "-I" (assoc-ref inputs "jdk") |
| 13475 | "/include/linux") |
| 13476 | "-fPIC" "-O2") |
| 13477 | (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))) |
| 13478 | (add-before 'build 'install-native |
| 13479 | (lambda _ |
| 13480 | (let ((dir (string-append "build/classes/META-INF/native/" |
| 13481 | ,(match (%current-system) |
| 13482 | ((or "i686-linux" "armhf-linux") |
| 13483 | "linux32") |
| 13484 | ((or "x86_64-linux" "aarch64-linux" |
| 13485 | "mips64el-linux") |
| 13486 | "linux64") |
| 13487 | (_ "unknown-kernel"))))) |
| 13488 | (install-file "src/main/native-package/src/libjansi.so" dir)) |
| 13489 | #t)) |
| 13490 | (add-after 'install 'install-native |
| 13491 | (lambda* (#:key outputs #:allow-other-keys) |
| 13492 | (install-file "src/main/native-package/src/jansi.h" |
| 13493 | (string-append (assoc-ref outputs "out") "/include")) |
| 13494 | #t)) |
| 13495 | (add-before 'install 'fix-pom |
| 13496 | (lambda _ |
| 13497 | ;; pom contains variables to complete name, but we don't support that |
| 13498 | (substitute* "pom.xml" |
| 13499 | (("\\$\\{platform\\}") "native")) |
| 13500 | #t)) |
| 13501 | (replace 'install |
| 13502 | (install-from-pom "pom.xml"))))) |
| 13503 | (propagated-inputs |
| 13504 | (list java-hawtjni)) |
| 13505 | (home-page "https://fusesource.github.io/jansi/") |
| 13506 | (synopsis "Native library for jansi") |
| 13507 | (description "This package provides the native library for jansi, a small |
| 13508 | Java library that allows you to use ANSI escape sequences to format your |
| 13509 | console output.") |
| 13510 | (license license:asl2.0))) |
| 13511 | |
| 13512 | (define-public java-jansi |
| 13513 | (package |
| 13514 | (name "java-jansi") |
| 13515 | (version "2.4.0") |
| 13516 | (source (origin |
| 13517 | (method git-fetch) |
| 13518 | (uri (git-reference |
| 13519 | (url "https://github.com/fusesource/jansi") |
| 13520 | (commit (string-append "jansi-" version)))) |
| 13521 | (file-name (git-file-name name version)) |
| 13522 | (sha256 |
| 13523 | (base32 |
| 13524 | "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf")) |
| 13525 | (modules '((guix build utils))) |
| 13526 | (snippet |
| 13527 | ;; contains pre-compiled libraries |
| 13528 | '(delete-file-recursively |
| 13529 | "src/main/resources/org/fusesource/jansi/internal")))) |
| 13530 | (build-system ant-build-system) |
| 13531 | (arguments |
| 13532 | `(#:jar-name "jansi.jar" |
| 13533 | #:source-dir "src/main/java" |
| 13534 | #:test-dir "src/test" |
| 13535 | #:tests? #f; require junit 3 |
| 13536 | #:phases |
| 13537 | (modify-phases %standard-phases |
| 13538 | (add-before 'build 'build-native |
| 13539 | (lambda* (#:key inputs #:allow-other-keys) |
| 13540 | (with-directory-excursion "src/main/native" |
| 13541 | (for-each |
| 13542 | (lambda (cfile) |
| 13543 | (let ((cfile (basename cfile)) |
| 13544 | (ofile (string-append (basename cfile ".c") ".o"))) |
| 13545 | (invoke ,(cc-for-target) "-c" cfile "-o" ofile |
| 13546 | (string-append "-I" (assoc-ref inputs "jdk") |
| 13547 | "/include/linux") |
| 13548 | "-fPIC" "-O2"))) |
| 13549 | (find-files "." "\\.c$")) |
| 13550 | (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared" |
| 13551 | (find-files "." "\\.o$"))))) |
| 13552 | (add-before 'build 'install-native |
| 13553 | (lambda _ |
| 13554 | (let ((dir (string-append "build/classes/org/fusesource/" |
| 13555 | "jansi/internal/native/" |
| 13556 | ,(match (or (%current-target-system) (%current-system)) |
| 13557 | ("i686-linux" "Linux/x86") |
| 13558 | ("x86_64-linux" "Linux/x86_64") |
| 13559 | ("armhf-linux" "Linux/armv7") |
| 13560 | ("aarch64-linux" "Linux/arm64") |
| 13561 | ("mips64el-linux" "Linux/mips64") |
| 13562 | (_ "unknown-kernel"))))) |
| 13563 | (install-file "src/main/native/libjansi.so" dir)))) |
| 13564 | (add-before 'build 'copy-resources |
| 13565 | (lambda _ |
| 13566 | (copy-recursively "src/main/resources" "build/classes"))) |
| 13567 | (replace 'install |
| 13568 | (install-from-pom "pom.xml"))))) |
| 13569 | (home-page "https://fusesource.github.io/jansi/") |
| 13570 | (synopsis "Portable ANSI escape sequences") |
| 13571 | (description "Jansi is a Java library that allows you to use ANSI escape |
| 13572 | sequences to format your console output which works on every platform.") |
| 13573 | (license license:asl2.0))) |
| 13574 | |
| 13575 | (define-public java-jansi-1 |
| 13576 | (package |
| 13577 | (inherit java-jansi) |
| 13578 | (version "1.16") |
| 13579 | (source (origin |
| 13580 | (method git-fetch) |
| 13581 | (uri (git-reference |
| 13582 | (url "https://github.com/fusesource/jansi") |
| 13583 | (commit (string-append "jansi-project-" version)))) |
| 13584 | (file-name (git-file-name "jansi" version)) |
| 13585 | (sha256 |
| 13586 | (base32 |
| 13587 | "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx")))) |
| 13588 | (arguments |
| 13589 | `(#:jar-name "jansi.jar" |
| 13590 | #:source-dir "jansi/src/main/java" |
| 13591 | #:test-dir "jansi/src/test" |
| 13592 | #:phases |
| 13593 | (modify-phases %standard-phases |
| 13594 | (add-after 'check 'clear-term |
| 13595 | (lambda _ |
| 13596 | (invoke "echo" "-e" "\\e[0m"))) |
| 13597 | (add-before 'install 'install-parent |
| 13598 | (install-pom-file "pom.xml")) |
| 13599 | (add-before 'install 'fix-pom |
| 13600 | (lambda _ |
| 13601 | ;; pom adds jansi native versions for different platforms, but we |
| 13602 | ;; only need one, so use native instead |
| 13603 | (substitute* "jansi/pom.xml" |
| 13604 | (("windows32") "native") |
| 13605 | (("windows64") "native") |
| 13606 | (("osx") "native") |
| 13607 | (("linux32") "native") |
| 13608 | (("linux64") "native") |
| 13609 | (("freebsd32") "native") |
| 13610 | (("freebsd64") "native")) |
| 13611 | #t)) |
| 13612 | (replace 'install |
| 13613 | (install-from-pom "jansi/pom.xml"))))) |
| 13614 | (propagated-inputs |
| 13615 | (list java-jansi-native)) |
| 13616 | (native-inputs |
| 13617 | (list java-junit java-hamcrest-core)))) |
| 13618 | |
| 13619 | (define-public java-jboss-el-api-spec |
| 13620 | (package |
| 13621 | (name "java-jboss-el-api-spec") |
| 13622 | (version "3.0") |
| 13623 | (source (origin |
| 13624 | (method url-fetch) |
| 13625 | (uri (string-append "https://github.com/jboss/jboss-el-api_spec/" |
| 13626 | "archive/jboss-el-api_" version |
| 13627 | "_spec-1.0.7.Final.tar.gz")) |
| 13628 | (sha256 |
| 13629 | (base32 |
| 13630 | "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh")))) |
| 13631 | (build-system ant-build-system) |
| 13632 | (arguments |
| 13633 | `(#:jar-name "java-jboss-el-api_spec.jar" |
| 13634 | #:phases |
| 13635 | (modify-phases %standard-phases |
| 13636 | ;; the origin of javax.el:javax.el-api is unknown, so we use this package |
| 13637 | ;; instead, which implements the same thing. We override the pom file |
| 13638 | ;; to "rename" the package so it can be found by maven. |
| 13639 | (add-before 'install 'override-pom |
| 13640 | (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0" |
| 13641 | #:name "el-api")) |
| 13642 | (replace 'install |
| 13643 | (install-from-pom "pom.xml"))))) |
| 13644 | (inputs |
| 13645 | (list java-junit)) |
| 13646 | (home-page "https://github.com/jboss/jboss-el-api_spec") |
| 13647 | (synopsis "JSR-341 expression language 3.0 API") |
| 13648 | (description "This package contains an implementation of the JSR-341 |
| 13649 | specification for the expression language 3.0. It implements an expression |
| 13650 | language inspired by ECMAScript and XPath. This language is used with |
| 13651 | JavaServer Pages (JSP).") |
| 13652 | ;; Either GPL2 only or CDDL. |
| 13653 | (license (list license:gpl2 license:cddl1.1)))) |
| 13654 | |
| 13655 | (define-public java-jboss-interceptors-api-spec |
| 13656 | (package |
| 13657 | (name "java-jboss-interceptors-api-spec") |
| 13658 | (version "1.2") |
| 13659 | (source (origin |
| 13660 | (method url-fetch) |
| 13661 | (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/" |
| 13662 | "archive/jboss-interceptors-api_" version |
| 13663 | "_spec-1.0.0.Final.tar.gz")) |
| 13664 | (sha256 |
| 13665 | (base32 |
| 13666 | "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z")))) |
| 13667 | (build-system ant-build-system) |
| 13668 | (arguments |
| 13669 | `(#:jar-name "java-jboss-interceptors-api_spec.jar" |
| 13670 | #:jdk ,icedtea-8 |
| 13671 | #:source-dir "." |
| 13672 | #:tests? #f; no tests |
| 13673 | #:phases |
| 13674 | (modify-phases %standard-phases |
| 13675 | ;; the origin of javax.interceptor:javax.interceptor-api is unknown, |
| 13676 | ;; so we use this package instead, which implements the same thing. |
| 13677 | ;; We override the pom file to "rename" the package so it can be found |
| 13678 | ;; by maven. |
| 13679 | (add-before 'install 'override-pom |
| 13680 | (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api" |
| 13681 | "3.0" #:name "interceptor-api")) |
| 13682 | (replace 'install |
| 13683 | (install-from-pom "pom.xml"))))) |
| 13684 | (home-page "https://github.com/jboss/jboss-interceptors-api_spec") |
| 13685 | (synopsis "Interceptors 1.2 API classes from JSR 318") |
| 13686 | (description "Java-jboss-interceptors-api-spec implements the Interceptors |
| 13687 | API. Interceptors are used to interpose on business method invocations and |
| 13688 | specific events.") |
| 13689 | ;; Either GPL2 only or CDDL. |
| 13690 | (license (list license:gpl2 license:cddl1.1)))) |
| 13691 | |
| 13692 | (define-public java-cdi-api |
| 13693 | (package |
| 13694 | (name "java-cdi-api") |
| 13695 | (version "2.0") |
| 13696 | (source (origin |
| 13697 | (method url-fetch) |
| 13698 | (uri (string-append "https://github.com/cdi-spec/cdi/archive/" |
| 13699 | version ".tar.gz")) |
| 13700 | (file-name (string-append name "-" version ".tar.gz")) |
| 13701 | (sha256 |
| 13702 | (base32 |
| 13703 | "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y")))) |
| 13704 | (build-system ant-build-system) |
| 13705 | (arguments |
| 13706 | `(#:source-dir "api/src/main/java" |
| 13707 | #:jar-name "java-cdi-api.jar" |
| 13708 | #:test-dir "api/src/test" |
| 13709 | #:jdk ,icedtea-8 |
| 13710 | #:tests? #f; Tests fail because we don't have a CDI provider yet |
| 13711 | #:phases |
| 13712 | (modify-phases %standard-phases |
| 13713 | (replace 'install |
| 13714 | (install-from-pom "api/pom.xml"))))) |
| 13715 | (propagated-inputs |
| 13716 | (list java-javax-inject java-jboss-el-api-spec |
| 13717 | java-jboss-interceptors-api-spec java-weld-parent-pom)) |
| 13718 | (native-inputs |
| 13719 | (list java-testng java-hamcrest-core)) |
| 13720 | (home-page "https://cdi-spec.org/") |
| 13721 | (synopsis "Contexts and Dependency Injection APIs") |
| 13722 | (description "Java-cdi-api contains the required APIs for Contexts and |
| 13723 | Dependency Injection (CDI).") |
| 13724 | (license license:asl2.0))) |
| 13725 | |
| 13726 | (define-public java-joda-convert |
| 13727 | (package |
| 13728 | (name "java-joda-convert") |
| 13729 | (version "1.9.2") |
| 13730 | (source (origin |
| 13731 | (method url-fetch) |
| 13732 | (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v" |
| 13733 | version ".tar.gz")) |
| 13734 | (file-name (string-append name "-" version ".tar.gz")) |
| 13735 | (sha256 |
| 13736 | (base32 |
| 13737 | "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7")))) |
| 13738 | (build-system ant-build-system) |
| 13739 | (arguments |
| 13740 | `(#:jar-name (string-append ,name "-" ,version ".jar") |
| 13741 | #:source-dir "src/main/java" |
| 13742 | #:test-include (list "**/Test*.java") |
| 13743 | ;; Contains only interfaces and base classes (no test) |
| 13744 | #:test-exclude (list "**/test*/**.java"))) |
| 13745 | (inputs |
| 13746 | (list java-guava)) |
| 13747 | (native-inputs |
| 13748 | (list java-junit java-hamcrest-core)) |
| 13749 | (home-page "https://www.joda.org/joda-convert/") |
| 13750 | (synopsis "Conversion between Objects and Strings") |
| 13751 | (description "Joda-Convert provides a small set of classes to aid |
| 13752 | conversion between Objects and Strings. It is not intended to tackle the |
| 13753 | wider problem of Object to Object transformation.") |
| 13754 | (license license:asl2.0))) |
| 13755 | |
| 13756 | (define-public java-joda-time |
| 13757 | (package |
| 13758 | (name "java-joda-time") |
| 13759 | (version "2.9.9") |
| 13760 | (source (origin |
| 13761 | (method url-fetch) |
| 13762 | (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v" |
| 13763 | version ".tar.gz")) |
| 13764 | (file-name (string-append name "-" version ".tar.gz")) |
| 13765 | (sha256 |
| 13766 | (base32 |
| 13767 | "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1")))) |
| 13768 | (build-system ant-build-system) |
| 13769 | (arguments |
| 13770 | `(#:jar-name "java-joda-time.jar" |
| 13771 | #:source-dir "src/main/java" |
| 13772 | #:test-include (list "**/Test*.java") |
| 13773 | ;; There is no runnable test in these files |
| 13774 | #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java") |
| 13775 | #:phases |
| 13776 | (modify-phases %standard-phases |
| 13777 | (add-after 'build 'build-resources |
| 13778 | (lambda _ |
| 13779 | (mkdir-p "build/classes/org/joda/time/tz/data") |
| 13780 | (mkdir-p "build/classes/org/joda/time/format") |
| 13781 | ;; This will produce the following exception: |
| 13782 | ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap" |
| 13783 | ;; which is normal, because it doesn't exist yet. It still generates |
| 13784 | ;; the same file as in the binary one can find on maven. |
| 13785 | (invoke "java" "-cp" |
| 13786 | (string-append "build/classes:" (getenv "CLASSPATH")) |
| 13787 | "org.joda.time.tz.ZoneInfoCompiler" |
| 13788 | "-src" "src/main/java/org/joda/time/tz/src" |
| 13789 | "-dst" "build/classes/org/joda/time/tz/data" |
| 13790 | "africa" "antarctica" "asia" "australasia" |
| 13791 | "europe" "northamerica" "southamerica" |
| 13792 | "pacificnew" "etcetera" "backward" "systemv") |
| 13793 | (for-each (lambda (f) |
| 13794 | (copy-file f (string-append |
| 13795 | "build/classes/org/joda/time/format/" |
| 13796 | (basename f)))) |
| 13797 | (find-files "src/main/java/org/joda/time/format" ".*.properties")) |
| 13798 | #t)) |
| 13799 | (add-before 'install 'regenerate-jar |
| 13800 | (lambda _ |
| 13801 | ;; We need to regenerate the jar file to add generated data. |
| 13802 | (delete-file "build/jar/java-joda-time.jar") |
| 13803 | (invoke "ant" "jar"))) |
| 13804 | (add-before 'check 'copy-test-resources |
| 13805 | (lambda _ |
| 13806 | (mkdir-p "build/test-classes/org/joda/time/tz/data") |
| 13807 | (copy-file "src/test/resources/tzdata/ZoneInfoMap" |
| 13808 | "build/test-classes/org/joda/time/tz/data/ZoneInfoMap") |
| 13809 | (copy-recursively "src/test/resources" "build/test-classes") |
| 13810 | #t))))) |
| 13811 | (inputs |
| 13812 | (list java-joda-convert)) |
| 13813 | (native-inputs |
| 13814 | (list java-junit java-hamcrest-core tzdata)) |
| 13815 | (home-page "https://www.joda.org/joda-time/") |
| 13816 | (synopsis "Replacement for the Java date and time classes") |
| 13817 | (description "Joda-Time is a replacement for the Java date and time |
| 13818 | classes prior to Java SE 8.") |
| 13819 | (license license:asl2.0))) |
| 13820 | |
| 13821 | (define-public java-xerces |
| 13822 | (package |
| 13823 | (name "java-xerces") |
| 13824 | (version "2.12.2") |
| 13825 | (source |
| 13826 | (origin |
| 13827 | (method url-fetch) |
| 13828 | (uri (string-append "mirror://apache/xerces/j/source/" |
| 13829 | "Xerces-J-src." version ".tar.gz")) |
| 13830 | (sha256 |
| 13831 | (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd")) |
| 13832 | (patches (search-patches |
| 13833 | "java-xerces-xjavac_taskdef.patch" |
| 13834 | "java-xerces-build_dont_unzip.patch" |
| 13835 | "java-xerces-bootclasspath.patch")))) |
| 13836 | (build-system ant-build-system) |
| 13837 | (arguments |
| 13838 | `(#:tests? #f;; Test files are not present |
| 13839 | #:test-target "test" |
| 13840 | #:jdk ,icedtea-8 |
| 13841 | #:phases |
| 13842 | (modify-phases %standard-phases |
| 13843 | (add-after 'unpack 'create-build.properties |
| 13844 | (lambda* (#:key inputs #:allow-other-keys) |
| 13845 | (let ((jaxp (assoc-ref inputs "java-jaxp")) |
| 13846 | (resolver (assoc-ref inputs "java-apache-xml-commons-resolver"))) |
| 13847 | (with-output-to-file "build.properties" |
| 13848 | (lambda _ |
| 13849 | (format #t |
| 13850 | "jar.jaxp = ~a/share/java/jaxp.jar~@ |
| 13851 | jar.apis-ext = ~a/share/java/jaxp.jar~@ |
| 13852 | jar.resolver = ~a/share/java/xml-resolver.jar~%" |
| 13853 | jaxp jaxp resolver))) |
| 13854 | ;; Make xerces use our version of jaxp in tests |
| 13855 | (substitute* "build.xml" |
| 13856 | (("xml-apis.jar") |
| 13857 | (string-append jaxp "/share/java/jaxp.jar")) |
| 13858 | (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}") |
| 13859 | "${jar.apis}"))) |
| 13860 | #t)) |
| 13861 | (replace 'install (install-jars "build"))))) |
| 13862 | (inputs |
| 13863 | (list java-apache-xml-commons-resolver java-jaxp)) |
| 13864 | (home-page "https://xerces.apache.org/xerces2-j/") |
| 13865 | (synopsis "Validating XML parser for Java with DOM level 3 support") |
| 13866 | (description "The Xerces2 Java parser is the reference implementation of |
| 13867 | XNI, the Xerces Native Interface, and also a fully conforming XML Schema |
| 13868 | processor. |
| 13869 | |
| 13870 | Xerces2-J supports the following standards and APIs: |
| 13871 | |
| 13872 | @itemize |
| 13873 | @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation |
| 13874 | @item Namespaces in XML Recommendation |
| 13875 | @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and |
| 13876 | Range Recommendations |
| 13877 | @item Simple API for XML (SAX) 2.0.1 Core and Extension |
| 13878 | @item Java APIs for XML Processing (JAXP) 1.2.01 |
| 13879 | @item XML Schema 1.0 Structures and Datatypes Recommendations |
| 13880 | @item Experimental implementation of the Document Object Model (DOM) Level 3 |
| 13881 | Core and Load/Save Working Drafts |
| 13882 | @item Provides a partial implementation of the XML Inclusions (XInclude) W3C |
| 13883 | Candidate Recommendation |
| 13884 | @end itemize |
| 13885 | |
| 13886 | Xerces is now able to parse documents written according to the XML 1.1 |
| 13887 | Candidate Recommendation, except that it does not yet provide an option to |
| 13888 | enable normalization checking as described in section 2.13 of this |
| 13889 | specification. It also handles namespaces according to the XML Namespaces 1.1 |
| 13890 | Candidate Recommendation, and will correctly serialize XML 1.1 documents if |
| 13891 | the DOM level 3 load/save API's are in use.") |
| 13892 | (license license:asl2.0))) |
| 13893 | |
| 13894 | (define-public java-jakarta-regexp |
| 13895 | (package |
| 13896 | (name "java-jakarta-regexp") |
| 13897 | (version "1.5") |
| 13898 | (source |
| 13899 | (origin |
| 13900 | (method url-fetch) |
| 13901 | (uri (string-append |
| 13902 | "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-" |
| 13903 | version ".tar.gz")) |
| 13904 | (sha256 |
| 13905 | (base32 |
| 13906 | "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r")))) |
| 13907 | (build-system ant-build-system) |
| 13908 | (arguments |
| 13909 | `(#:test-target "test" |
| 13910 | #:phases |
| 13911 | (modify-phases %standard-phases |
| 13912 | (replace 'install |
| 13913 | (lambda* (#:key outputs #:allow-other-keys) |
| 13914 | (let* ((out (assoc-ref outputs "out")) |
| 13915 | (out-share (string-append out "/share/java"))) |
| 13916 | (mkdir-p out-share) |
| 13917 | (for-each (lambda (name) |
| 13918 | (install-file name out-share)) |
| 13919 | (find-files "build" "^jakarta-regexp-.*\\.jar$")) |
| 13920 | #t)))))) |
| 13921 | (home-page "https://attic.apache.org/projects/jakarta-regexp.html") |
| 13922 | (synopsis "Regular expression parser generator for Java") |
| 13923 | (description "@code{jakarta-regexp} is an old regular expression parser |
| 13924 | generator for Java.") |
| 13925 | (license license:asl2.0))) |
| 13926 | |
| 13927 | (define-public java-jline |
| 13928 | (package |
| 13929 | (name "java-jline") |
| 13930 | (version "1.0") |
| 13931 | (source (origin |
| 13932 | (method url-fetch) |
| 13933 | (uri (string-append "https://github.com/jline/jline1/archive/jline-" |
| 13934 | version ".tar.gz")) |
| 13935 | (sha256 |
| 13936 | (base32 |
| 13937 | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) |
| 13938 | (build-system ant-build-system) |
| 13939 | (arguments |
| 13940 | `(#:jar-name "jline.jar" |
| 13941 | #:source-dir "src/main/java" |
| 13942 | #:test-dir "src/test" |
| 13943 | #:phases |
| 13944 | (modify-phases %standard-phases |
| 13945 | (add-before 'build 'copy-resources |
| 13946 | (lambda _ |
| 13947 | (copy-recursively "src/main/resources" "build/classes") |
| 13948 | #t))))) |
| 13949 | (native-inputs |
| 13950 | (list java-junit)) |
| 13951 | (home-page "https://jline.github.io") |
| 13952 | (synopsis "Console input handling library") |
| 13953 | (description "JLine is a Java library for handling console input. It is |
| 13954 | similar in functionality to BSD editline and GNU readline but with additional |
| 13955 | features that bring it on par with the Z shell line editor.") |
| 13956 | (license license:bsd-3))) |
| 13957 | |
| 13958 | (define-public java-jline-2 |
| 13959 | (package |
| 13960 | (inherit java-jline) |
| 13961 | (version "2.14.5") |
| 13962 | (source (origin |
| 13963 | (method url-fetch) |
| 13964 | (uri (string-append "https://github.com/jline/jline2/archive/jline-" |
| 13965 | version ".tar.gz")) |
| 13966 | (sha256 |
| 13967 | (base32 |
| 13968 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) |
| 13969 | (arguments |
| 13970 | `(#:jdk ,icedtea-8 |
| 13971 | ;; Tests require powermock which uses ASM 9 compiled with Java 11, |
| 13972 | ;; creating class version incompatibility with icedtea-8. |
| 13973 | #:tests? #f |
| 13974 | ,@(package-arguments java-jline))) |
| 13975 | (inputs |
| 13976 | (list java-jansi-1 java-jansi-native)) |
| 13977 | (native-inputs |
| 13978 | (list java-powermock-modules-junit4 |
| 13979 | java-powermock-modules-junit4-common |
| 13980 | java-powermock-api-easymock |
| 13981 | java-powermock-api-support |
| 13982 | java-powermock-core |
| 13983 | java-powermock-reflect |
| 13984 | java-easymock |
| 13985 | java-jboss-javassist |
| 13986 | java-objenesis |
| 13987 | java-hamcrest-core |
| 13988 | java-cglib |
| 13989 | java-junit |
| 13990 | java-hawtjni)))) |
| 13991 | |
| 13992 | (define-public java-jline-terminal |
| 13993 | (package |
| 13994 | (name "java-jline-terminal") |
| 13995 | (version "3.14.1") |
| 13996 | (source (origin |
| 13997 | (method git-fetch) |
| 13998 | (uri (git-reference |
| 13999 | (url "https://github.com/jline/jline3") |
| 14000 | (commit (string-append "jline-parent-" version)))) |
| 14001 | (file-name (git-file-name name version)) |
| 14002 | (sha256 |
| 14003 | (base32 |
| 14004 | "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr")))) |
| 14005 | (build-system ant-build-system) |
| 14006 | (arguments |
| 14007 | `(#:jar-name "jline-terminal.jar" |
| 14008 | #:jdk ,openjdk11 |
| 14009 | #:tests? #f; TODO: tests fail on *.caps resource lookups |
| 14010 | #:source-dir "terminal/src/main/java" |
| 14011 | #:test-dir "terminal/src/test" |
| 14012 | #:phases |
| 14013 | (modify-phases %standard-phases |
| 14014 | (add-after 'unpack 'remove-build-file |
| 14015 | (lambda _ |
| 14016 | ;; Conflicts with build directory generated by ant-build-system. |
| 14017 | (delete-file "build"))) |
| 14018 | (add-after 'unpack 'patch-paths |
| 14019 | (lambda* (#:key inputs #:allow-other-keys) |
| 14020 | (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java" |
| 14021 | (("= \"infocmp\"") |
| 14022 | (string-append "= \"" (assoc-ref inputs "ncurses") |
| 14023 | "/bin/infocmp\"")) |
| 14024 | (("= \"(s?tty)\"" _ cmd) |
| 14025 | (string-append "= \"" (assoc-ref inputs "coreutils") |
| 14026 | "/bin/" cmd "\""))))) |
| 14027 | ;; Resources are not added to the JAR by ant-build-system. |
| 14028 | (add-after 'build 'add-resources |
| 14029 | (lambda* (#:key jar-name source-dir #:allow-other-keys) |
| 14030 | (let ((build (string-append (getcwd) "/build"))) |
| 14031 | (with-directory-excursion |
| 14032 | (string-append source-dir "/../resources") |
| 14033 | (apply invoke "jar" "-uvf" |
| 14034 | (string-append build "/jar/" jar-name) |
| 14035 | (find-files "."))))))))) |
| 14036 | (inputs |
| 14037 | (list ncurses)); infocmp |
| 14038 | (home-page "https://github.com/jline/jline3") |
| 14039 | (synopsis "Java JLine Terminal API and implementations") |
| 14040 | (description "JLine is a Java library for handling console input. It is |
| 14041 | similar in functionality to BSD editline and GNU readline but with additional |
| 14042 | features that bring it in par with ZSH line editor. People familiar with the |
| 14043 | readline/editline capabilities for modern shells (such as bash and tcsh) will |
| 14044 | find most of the command editing features of JLine to be familiar. |
| 14045 | |
| 14046 | This package includes the @var{Terminal} API and implementations.") |
| 14047 | (license license:bsd-3))) |
| 14048 | |
| 14049 | (define-public java-jline-reader |
| 14050 | (package |
| 14051 | (name "java-jline-reader") |
| 14052 | (version "3.14.1") |
| 14053 | (source (origin |
| 14054 | (method git-fetch) |
| 14055 | (uri (git-reference |
| 14056 | (url "https://github.com/jline/jline3") |
| 14057 | (commit (string-append "jline-parent-" version)))) |
| 14058 | (file-name (git-file-name name version)) |
| 14059 | (sha256 |
| 14060 | (base32 |
| 14061 | "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr")))) |
| 14062 | (build-system ant-build-system) |
| 14063 | (arguments |
| 14064 | `(#:jar-name "jline-reader.jar" |
| 14065 | #:jdk ,openjdk11 |
| 14066 | #:source-dir "reader/src/main/java" |
| 14067 | #:test-dir "reader/src/test" |
| 14068 | #:phases |
| 14069 | (modify-phases %standard-phases |
| 14070 | (add-before 'build 'remove-build-file |
| 14071 | (lambda _ |
| 14072 | ;; conflicts with build directory generated by ant-build-system |
| 14073 | (delete-file "build")))))) |
| 14074 | (native-inputs |
| 14075 | (list java-junit java-easymock)) |
| 14076 | (inputs |
| 14077 | (list java-jline-terminal)) |
| 14078 | (home-page "https://github.com/jline/jline3") |
| 14079 | (synopsis "Java JLine line reader") |
| 14080 | (description "JLine is a Java library for handling console input. It is |
| 14081 | similar in functionality to BSD editline and GNU readline but with additional |
| 14082 | features that bring it in par with ZSH line editor. People familiar with the |
| 14083 | readline/editline capabilities for modern shells (such as bash and tcsh) will |
| 14084 | find most of the command editing features of JLine to be familiar. |
| 14085 | |
| 14086 | This package includes the line reader.") |
| 14087 | (license license:bsd-3))) |
| 14088 | |
| 14089 | (define-public java-juniversalchardet |
| 14090 | (package |
| 14091 | (name "java-juniversalchardet") |
| 14092 | (version "2.5.0") |
| 14093 | (source (origin |
| 14094 | (method git-fetch) |
| 14095 | (uri (git-reference |
| 14096 | (url "https://github.com/albfernandez/juniversalchardet") |
| 14097 | (commit (string-append "v" version)))) |
| 14098 | (file-name (git-file-name name version)) |
| 14099 | (sha256 |
| 14100 | (base32 |
| 14101 | "039v25hmaf89mc949jn3sg70gp68gn0vilq2v159aavyircza0w7")))) |
| 14102 | (build-system ant-build-system) |
| 14103 | (arguments |
| 14104 | `(#:jar-name "juniversalchardet.jar" |
| 14105 | #:jdk ,openjdk11 |
| 14106 | #:tests? #f |
| 14107 | #:source-dir "src/main/java")) |
| 14108 | (home-page "https://github.com/albfernandez/juniversalchardet") |
| 14109 | (synopsis "Character encoding detection library for Java") |
| 14110 | (description "JUniversalChardet is a Java port of universalchardet, |
| 14111 | a character encoding detection library.") |
| 14112 | (license license:mpl2.0))) |
| 14113 | |
| 14114 | (define-public java-jline-native-for-graal-truffle |
| 14115 | (package |
| 14116 | (name "java-jline-native-for-graal-truffle") |
| 14117 | (version "3.28.0") |
| 14118 | (source (origin |
| 14119 | (method git-fetch) |
| 14120 | (uri (git-reference |
| 14121 | (url "https://github.com/jline/jline3") |
| 14122 | (commit (string-append "jline-" version)))) |
| 14123 | (file-name (git-file-name name version)) |
| 14124 | (sha256 |
| 14125 | (base32 |
| 14126 | "06804s31zxxwbh8nnf2hd4w5kbzgpgfnp4mcr9bk5h3mkgrp6lkj")))) |
| 14127 | (build-system ant-build-system) |
| 14128 | (arguments |
| 14129 | `(#:jar-name "jline-native.jar" |
| 14130 | #:tests? #f |
| 14131 | #:jdk ,openjdk25 |
| 14132 | #:source-dir "native/src/main/java" |
| 14133 | #:phases |
| 14134 | (modify-phases %standard-phases |
| 14135 | (add-after 'unpack 'remove-build-file |
| 14136 | (lambda _ |
| 14137 | (delete-file "build")))))) |
| 14138 | (home-page "https://github.com/jline/jline3") |
| 14139 | (synopsis "JLine native library support for GraalVM Truffle") |
| 14140 | (description "JLine native library module for GraalVM Truffle.") |
| 14141 | (license license:bsd-3))) |
| 14142 | |
| 14143 | (define-public java-jline-terminal-for-graal-truffle |
| 14144 | (package |
| 14145 | (inherit java-jline-terminal) |
| 14146 | (name "java-jline-terminal-for-graal-truffle") |
| 14147 | (version "3.28.0") |
| 14148 | (source (origin |
| 14149 | (method git-fetch) |
| 14150 | (uri (git-reference |
| 14151 | (url "https://github.com/jline/jline3") |
| 14152 | (commit (string-append "jline-" version)))) |
| 14153 | (file-name (git-file-name name version)) |
| 14154 | (sha256 |
| 14155 | (base32 |
| 14156 | "06804s31zxxwbh8nnf2hd4w5kbzgpgfnp4mcr9bk5h3mkgrp6lkj")))) |
| 14157 | (arguments |
| 14158 | `(#:jar-name "jline-terminal.jar" |
| 14159 | #:tests? #f |
| 14160 | #:jdk ,openjdk25 |
| 14161 | #:source-dir "terminal/src/main/java" |
| 14162 | #:test-dir "terminal/src/test" |
| 14163 | #:phases |
| 14164 | (modify-phases %standard-phases |
| 14165 | (add-after 'unpack 'remove-build-file |
| 14166 | (lambda _ |
| 14167 | (delete-file "build"))) |
| 14168 | (add-after 'unpack 'patch-paths |
| 14169 | (lambda* (#:key inputs #:allow-other-keys) |
| 14170 | (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java" |
| 14171 | (("= \"infocmp\"") |
| 14172 | (string-append "= \"" (assoc-ref inputs "ncurses") |
| 14173 | "/bin/infocmp\"")) |
| 14174 | (("= \"(s?tty)\"" _ cmd) |
| 14175 | (string-append "= \"" (assoc-ref inputs "coreutils") |
| 14176 | "/bin/" cmd "\""))))) |
| 14177 | (add-after 'build 'add-resources |
| 14178 | (lambda* (#:key jar-name source-dir #:allow-other-keys) |
| 14179 | (let ((build (string-append (getcwd) "/build"))) |
| 14180 | (with-directory-excursion |
| 14181 | (string-append source-dir "/../resources") |
| 14182 | (apply invoke "jar" "-uvf" |
| 14183 | (string-append build "/jar/" jar-name) |
| 14184 | (find-files ".")))))) |
| 14185 | (add-after 'add-resources 'create-sources-jar |
| 14186 | (lambda* (#:key source-dir #:allow-other-keys) |
| 14187 | ;; Create a sources JAR from the source files. |
| 14188 | ;; mx shading needs .java source files, not .class files. |
| 14189 | (let ((sources-jar (string-append (getcwd) "/build/jar/jline-terminal-sources.jar"))) |
| 14190 | (invoke "jar" "cf" sources-jar "-C" source-dir "org") |
| 14191 | ;; Also add resources to the sources JAR. |
| 14192 | (with-directory-excursion (string-append source-dir "/../resources") |
| 14193 | (apply invoke "jar" "-uvf" sources-jar (find-files ".")))))) |
| 14194 | (add-after 'install 'install-sources-jar |
| 14195 | (lambda* (#:key outputs #:allow-other-keys) |
| 14196 | (let* ((out (assoc-ref outputs "out")) |
| 14197 | (lib (string-append out "/share/java"))) |
| 14198 | (install-file "build/jar/jline-terminal-sources.jar" lib))))))) |
| 14199 | (inputs |
| 14200 | (list ncurses java-jline-native-for-graal-truffle)))) |
| 14201 | |
| 14202 | (define-public java-jline-reader-for-graal-truffle |
| 14203 | (package |
| 14204 | (inherit java-jline-reader) |
| 14205 | (name "java-jline-reader-for-graal-truffle") |
| 14206 | (version "3.28.0") |
| 14207 | (source (origin |
| 14208 | (method git-fetch) |
| 14209 | (uri (git-reference |
| 14210 | (url "https://github.com/jline/jline3") |
| 14211 | (commit (string-append "jline-" version)))) |
| 14212 | (file-name (git-file-name name version)) |
| 14213 | (sha256 |
| 14214 | (base32 |
| 14215 | "06804s31zxxwbh8nnf2hd4w5kbzgpgfnp4mcr9bk5h3mkgrp6lkj")))) |
| 14216 | (arguments |
| 14217 | `(#:jar-name "jline-reader.jar" |
| 14218 | #:tests? #f |
| 14219 | #:jdk ,openjdk25 |
| 14220 | #:source-dir "reader/src/main/java" |
| 14221 | #:test-dir "reader/src/test" |
| 14222 | #:phases |
| 14223 | (modify-phases %standard-phases |
| 14224 | (add-before 'build 'remove-build-file |
| 14225 | (lambda _ |
| 14226 | (delete-file "build"))) |
| 14227 | (add-after 'build 'create-sources-jar |
| 14228 | (lambda* (#:key source-dir #:allow-other-keys) |
| 14229 | ;; Create a sources JAR from the source files. |
| 14230 | (invoke "jar" "cf" "build/jar/jline-reader-sources.jar" |
| 14231 | "-C" source-dir "org"))) |
| 14232 | (add-after 'install 'install-sources-jar |
| 14233 | (lambda* (#:key outputs #:allow-other-keys) |
| 14234 | (let* ((out (assoc-ref outputs "out")) |
| 14235 | (lib (string-append out "/share/java"))) |
| 14236 | (install-file "build/jar/jline-reader-sources.jar" lib))))))) |
| 14237 | (inputs |
| 14238 | (list java-jline-terminal-for-graal-truffle)))) |
| 14239 | |
| 14240 | (define-public java-jline-builtins-for-graal-truffle |
| 14241 | (package |
| 14242 | (inherit java-jline-reader-for-graal-truffle) |
| 14243 | (name "java-jline-builtins-for-graal-truffle") |
| 14244 | (arguments |
| 14245 | `(#:jar-name "jline-builtins.jar" |
| 14246 | #:tests? #f |
| 14247 | #:jdk ,openjdk25 |
| 14248 | #:source-dir "builtins/src/main/java" |
| 14249 | #:test-dir "builtins/src/test" |
| 14250 | #:phases |
| 14251 | (modify-phases %standard-phases |
| 14252 | (add-before 'build 'remove-build-file |
| 14253 | (lambda _ |
| 14254 | (delete-file "build"))) |
| 14255 | (add-after 'build 'create-sources-jar |
| 14256 | (lambda* (#:key source-dir #:allow-other-keys) |
| 14257 | ;; Create a sources JAR from the source files. |
| 14258 | (invoke "jar" "cf" "build/jar/jline-builtins-sources.jar" |
| 14259 | "-C" source-dir "org"))) |
| 14260 | (add-after 'install 'install-sources-jar |
| 14261 | (lambda* (#:key outputs #:allow-other-keys) |
| 14262 | (let* ((out (assoc-ref outputs "out")) |
| 14263 | (lib (string-append out "/share/java"))) |
| 14264 | (install-file "build/jar/jline-builtins-sources.jar" lib))))))) |
| 14265 | (inputs |
| 14266 | (list java-jline-terminal-for-graal-truffle |
| 14267 | java-jline-reader-for-graal-truffle |
| 14268 | ;; Needed to compile Nano.java which imports UniversalDetector. |
| 14269 | ;; GraalVM's mx build patches this out during shading (in |
| 14270 | ;; org.graalvm.shadowed.org.jline) and adds a stub class, so mx |
| 14271 | ;; itself does not need juniversalchardet--only this Guix build does. |
| 14272 | java-juniversalchardet)) |
| 14273 | (synopsis "JLine builtins for GraalVM Truffle") |
| 14274 | (description "JLine builtins module for GraalVM Truffle."))) |
| 14275 | |
| 14276 | (define-public java-jline-terminal-ffm-for-graal-truffle |
| 14277 | (package |
| 14278 | (inherit java-jline-reader-for-graal-truffle) |
| 14279 | (name "java-jline-terminal-ffm-for-graal-truffle") |
| 14280 | (arguments |
| 14281 | `(#:jar-name "jline-terminal-ffm.jar" |
| 14282 | #:tests? #f |
| 14283 | #:jdk ,openjdk25 |
| 14284 | #:source-dir "terminal-ffm/src/main/java" |
| 14285 | #:test-dir "terminal-ffm/src/test" |
| 14286 | #:phases |
| 14287 | (modify-phases %standard-phases |
| 14288 | (add-before 'build 'remove-build-file |
| 14289 | (lambda _ |
| 14290 | (delete-file "build"))) |
| 14291 | (add-after 'build 'create-sources-jar |
| 14292 | (lambda* (#:key source-dir #:allow-other-keys) |
| 14293 | ;; Create a sources JAR from the source files. |
| 14294 | (invoke "jar" "cf" "build/jar/jline-terminal-ffm-sources.jar" |
| 14295 | "-C" source-dir "org"))) |
| 14296 | (add-after 'install 'install-sources-jar |
| 14297 | (lambda* (#:key outputs #:allow-other-keys) |
| 14298 | (let* ((out (assoc-ref outputs "out")) |
| 14299 | (lib (string-append out "/share/java"))) |
| 14300 | (install-file "build/jar/jline-terminal-ffm-sources.jar" lib))))))) |
| 14301 | (inputs |
| 14302 | (list java-jline-terminal-for-graal-truffle |
| 14303 | java-jline-native-for-graal-truffle)) |
| 14304 | (synopsis "JLine terminal FFM for GraalVM Truffle") |
| 14305 | (description "JLine terminal FFM (Foreign Function Memory) module for GraalVM Truffle."))) |
| 14306 | |
| 14307 | ;; org.json JSON library for GraalVM Truffle |
| 14308 | ;; GraalVM needs this for TRUFFLE_JSON which is used by TRUFFLE_PROFILER in tools. |
| 14309 | (define-public java-json-for-graal-truffle |
| 14310 | (package |
| 14311 | (name "java-json-for-graal-truffle") |
| 14312 | (version "20250517") |
| 14313 | (source (origin |
| 14314 | (method url-fetch) |
| 14315 | (uri (string-append "https://github.com/stleary/JSON-java/archive/refs/tags/" |
| 14316 | version ".tar.gz")) |
| 14317 | (file-name (string-append "java-json-" version ".tar.gz")) |
| 14318 | (sha256 |
| 14319 | (base32 "0291f9fkr9v8qh4vlxkv62vzs4dadpzhxrrcw5pbg69ml0pwq5wz")))) |
| 14320 | (build-system ant-build-system) |
| 14321 | (arguments |
| 14322 | `(#:jar-name "json.jar" |
| 14323 | #:source-dir "src/main/java" |
| 14324 | #:tests? #f ; No test source directory in release tarball |
| 14325 | #:phases |
| 14326 | (modify-phases %standard-phases |
| 14327 | (add-after 'build 'create-sources-jar |
| 14328 | (lambda _ |
| 14329 | ;; Create a sources JAR from the source files. |
| 14330 | ;; mx shading needs .java source files, not .class files. |
| 14331 | (invoke "jar" "cf" "json-sources.jar" |
| 14332 | "-C" "src/main/java" "org"))) |
| 14333 | (add-after 'install 'install-sources-jar |
| 14334 | (lambda* (#:key outputs #:allow-other-keys) |
| 14335 | (let ((share (string-append (assoc-ref outputs "out") |
| 14336 | "/share/java/"))) |
| 14337 | (install-file "json-sources.jar" share))))))) |
| 14338 | (home-page "https://github.com/stleary/JSON-java") |
| 14339 | (synopsis "JSON library for Java") |
| 14340 | (description "Reference implementation of a JSON parser in Java, used by |
| 14341 | GraalVM's TRUFFLE_JSON distribution.") |
| 14342 | (license license:public-domain))) |
| 14343 | |
| 14344 | ;; JUnit 4.13.2 for GraalVM. |
| 14345 | (define-public java-junit-for-graal |
| 14346 | (package |
| 14347 | (inherit java-junit) |
| 14348 | (name "java-junit-for-graal") |
| 14349 | (version "4.13.2") |
| 14350 | (source (origin |
| 14351 | (method git-fetch) |
| 14352 | (uri (git-reference |
| 14353 | (url "https://github.com/junit-team/junit4") |
| 14354 | (commit (string-append "r" version)))) |
| 14355 | (file-name (git-file-name name version)) |
| 14356 | (sha256 |
| 14357 | (base32 "1r7k4zzscc8019np3is3bzfigw8fxd6s3259cbhzzh02q6d5p9h3")))) |
| 14358 | (arguments |
| 14359 | (list #:jar-name "junit.jar" |
| 14360 | #:source-dir "src/main/java" |
| 14361 | #:tests? #f ; Skip tests to avoid circular dependencies |
| 14362 | #:jdk openjdk17 |
| 14363 | #:phases |
| 14364 | #~(modify-phases %standard-phases |
| 14365 | (add-after 'build 'create-sources-jar |
| 14366 | (lambda _ |
| 14367 | (invoke "jar" "cf" "junit-sources.jar" |
| 14368 | "-C" "src/main/java" "."))) |
| 14369 | (add-after 'install 'install-sources-jar |
| 14370 | (lambda _ |
| 14371 | (install-file "junit-sources.jar" |
| 14372 | (string-append #$output "/share/java/"))))))) |
| 14373 | (propagated-inputs |
| 14374 | (list java-hamcrest-core-for-graal-truffle)) |
| 14375 | (native-inputs '()) |
| 14376 | (description "JUnit is a simple framework to write repeatable tests for Java |
| 14377 | projects. This version (4.13.2) is required by the GraalVM mx build system."))) |
| 14378 | |
| 14379 | (define-public java-capnproto-runtime-for-graal-truffle |
| 14380 | (package |
| 14381 | (name "java-capnproto-runtime-for-graal-truffle") |
| 14382 | (version "0.1.16") |
| 14383 | (source (origin |
| 14384 | (method git-fetch) |
| 14385 | (uri (git-reference |
| 14386 | (url "https://github.com/capnproto/capnproto-java") |
| 14387 | (commit (string-append "v" version)))) |
| 14388 | (file-name (git-file-name name version)) |
| 14389 | (sha256 |
| 14390 | (base32 "0faq213kkrb2441k6bn7868yj5bdqvanq1xxsp2gc9mcf922vrpf")))) |
| 14391 | (build-system ant-build-system) |
| 14392 | (arguments |
| 14393 | `(#:jar-name "capnproto-runtime.jar" |
| 14394 | #:source-dir "runtime/src/main/java" |
| 14395 | #:test-dir "runtime/src/test" |
| 14396 | #:jdk ,openjdk17 |
| 14397 | #:phases |
| 14398 | (modify-phases %standard-phases |
| 14399 | (add-after 'build 'create-sources-jar |
| 14400 | (lambda _ |
| 14401 | (invoke "jar" "cf" "capnproto-runtime-sources.jar" |
| 14402 | "-C" "runtime/src/main/java" "org"))) |
| 14403 | (add-after 'install 'install-sources-jar |
| 14404 | (lambda* (#:key outputs #:allow-other-keys) |
| 14405 | (let ((share (string-append (assoc-ref outputs "out") |
| 14406 | "/share/java/"))) |
| 14407 | (install-file "capnproto-runtime-sources.jar" share))))))) |
| 14408 | (native-inputs (list java-junit-for-graal)) |
| 14409 | (home-page "https://capnproto.org/") |
| 14410 | (synopsis "Cap'n Proto runtime library for Java") |
| 14411 | (description "Cap'n Proto is an extremely fast data interchange format |
| 14412 | and capability-based RPC system. This package provides the Java runtime |
| 14413 | library needed by GraalVM's SubstrateVM.") |
| 14414 | (license license:expat))) |
| 14415 | |
| 14416 | ;; JCodings for GraalVM Truffle (character encoding library) |
| 14417 | (define-public java-jcodings-for-graal-truffle |
| 14418 | (package |
| 14419 | (name "java-jcodings-for-graal-truffle") |
| 14420 | (version "1.0.63") |
| 14421 | (source (origin |
| 14422 | (method git-fetch) |
| 14423 | (uri (git-reference |
| 14424 | (url "https://github.com/jruby/jcodings") |
| 14425 | (commit (string-append "jcodings-" version)))) |
| 14426 | (file-name (git-file-name name version)) |
| 14427 | (sha256 |
| 14428 | (base32 "1f0npcz93fsm4l7hik7gkxnf977jj660jyvgfkq1isr1aa6s90a8")))) |
| 14429 | (build-system ant-build-system) |
| 14430 | (arguments |
| 14431 | (list #:jar-name "jcodings.jar" |
| 14432 | #:source-dir "src" |
| 14433 | #:tests? #f |
| 14434 | #:jdk openjdk |
| 14435 | #:phases |
| 14436 | #~(modify-phases %standard-phases |
| 14437 | (add-after 'build 'create-sources-jar |
| 14438 | (lambda _ |
| 14439 | (invoke "jar" "cf" "jcodings-sources.jar" |
| 14440 | "-C" "src" "org"))) |
| 14441 | (add-after 'install 'install-sources-jar |
| 14442 | (lambda _ |
| 14443 | (install-file "jcodings-sources.jar" |
| 14444 | (string-append #$output "/share/java/"))))))) |
| 14445 | (home-page "https://github.com/jruby/jcodings") |
| 14446 | (synopsis "Java character encoding library for JRuby") |
| 14447 | (description "JCodings is a character encoding library used by JRuby. |
| 14448 | This version is built for GraalVM Truffle's string encoding support.") |
| 14449 | (license license:expat))) |
| 14450 | |
| 14451 | ;; Guava for GraalVM Truffle (Google core libraries for Java) |
| 14452 | ;; GraalVM requires version 31.0.1 specifically |
| 14453 | (define-public java-guava-for-graal-truffle |
| 14454 | (package |
| 14455 | (inherit java-guava) |
| 14456 | (name "java-guava-for-graal-truffle") |
| 14457 | (version "31.0.1") |
| 14458 | (source (origin |
| 14459 | (method git-fetch) |
| 14460 | (uri (git-reference |
| 14461 | (url "https://github.com/google/guava") |
| 14462 | (commit (string-append "v" version)))) |
| 14463 | (file-name (git-file-name name version)) |
| 14464 | (sha256 |
| 14465 | (base32 "1lc5hrrm8q3dkxgkwgvkjd0lhajklch9cb5xmggb2iys3qymvx50")) |
| 14466 | (patches |
| 14467 | (search-patches "java-guava-remove-annotation-deps.patch")))))) |
| 14468 | |
| 14469 | ;; JIMFS for GraalVM Truffle (in-memory file system) |
| 14470 | (define-public java-jimfs-for-graal-truffle |
| 14471 | (package |
| 14472 | (name "java-jimfs-for-graal-truffle") |
| 14473 | (version "1.2") |
| 14474 | (source (origin |
| 14475 | (method git-fetch) |
| 14476 | (uri (git-reference |
| 14477 | (url "https://github.com/google/jimfs") |
| 14478 | (commit (string-append "v" version)))) |
| 14479 | (file-name (git-file-name name version)) |
| 14480 | (sha256 |
| 14481 | (base32 "1wxdl9ljllwyzcyqgrkh7i9zqjdssz4qn9zmvbahz62vq2m9wg88")) |
| 14482 | (modules '((guix build utils))) |
| 14483 | (snippet |
| 14484 | '(for-each delete-file (find-files "." "\\.jar$"))))) |
| 14485 | (build-system ant-build-system) |
| 14486 | (arguments |
| 14487 | (list #:jar-name "jimfs.jar" |
| 14488 | #:source-dir "jimfs/src/main/java" |
| 14489 | #:tests? #f |
| 14490 | #:jdk openjdk |
| 14491 | #:phases |
| 14492 | #~(modify-phases %standard-phases |
| 14493 | (add-before 'build 'strip-annotations |
| 14494 | (lambda _ |
| 14495 | ;; Remove annotation imports and usages |
| 14496 | (for-each delete-file |
| 14497 | (find-files "jimfs/src/main/java" "package-info\\.java$")) |
| 14498 | (substitute* (find-files "jimfs/src/main/java" "\\.java$") |
| 14499 | (("import org\\.checkerframework\\..*;\n") "") |
| 14500 | (("import javax\\.annotation\\..*;\n") "") |
| 14501 | (("import com\\.google\\.auto\\..*;\n") "") |
| 14502 | (("import com\\.ibm\\.icu\\..*;\n") "") |
| 14503 | (("@AutoService.*\n") "") |
| 14504 | (("@ParametersAreNonnullByDefault") "") |
| 14505 | (("@NullableDecl") "")) |
| 14506 | ;; Remove ICU dependency - use simple ASCII normalization |
| 14507 | (substitute* "jimfs/src/main/java/com/google/common/jimfs/PathNormalization.java" |
| 14508 | (("import com\\.ibm\\.icu\\.lang\\.UCharacter;") "") |
| 14509 | (("UCharacter\\.foldCase\\(string, true\\)") "string.toLowerCase(java.util.Locale.ROOT)")))) |
| 14510 | (add-after 'build 'create-sources-jar |
| 14511 | (lambda _ |
| 14512 | (invoke "jar" "cf" "jimfs-sources.jar" |
| 14513 | "-C" "jimfs/src/main/java" "com"))) |
| 14514 | (add-after 'install 'install-sources-jar |
| 14515 | (lambda _ |
| 14516 | (install-file "jimfs-sources.jar" |
| 14517 | (string-append #$output "/share/java/"))))))) |
| 14518 | (inputs (list java-guava-for-graal-truffle)) |
| 14519 | (home-page "https://github.com/google/jimfs") |
| 14520 | (synopsis "In-memory file system for Java 7+") |
| 14521 | (description "Jimfs is an in-memory file system for Java 7+ that |
| 14522 | implements the java.nio.file.FileSystem API. Used by GraalVM Truffle |
| 14523 | for testing file system operations.") |
| 14524 | (license license:asl2.0))) |
| 14525 | |
| 14526 | ;; VisualVM JFluid Heap for GraalVM Truffle (heap dump analysis) |
| 14527 | (define-public java-visualvm-jfluid-heap-for-graal-truffle |
| 14528 | (package |
| 14529 | (name "java-visualvm-jfluid-heap-for-graal-truffle") |
| 14530 | (version "2.1.4") |
| 14531 | (source (origin |
| 14532 | (method git-fetch) |
| 14533 | (uri (git-reference |
| 14534 | (url "https://github.com/oracle/visualvm") |
| 14535 | (commit version))) |
| 14536 | (file-name (git-file-name name version)) |
| 14537 | (sha256 |
| 14538 | (base32 "1s7h51vsbnn8kh7c58qgsmkw9ps29l4z07wk3pg80p7wf8kfl33z")) |
| 14539 | (modules '((guix build utils))) |
| 14540 | (snippet |
| 14541 | '(for-each delete-file (find-files "." "\\.jar$"))))) |
| 14542 | (build-system ant-build-system) |
| 14543 | (arguments |
| 14544 | (list #:jar-name "visualvm-lib-jfluid-heap.jar" |
| 14545 | #:source-dir "visualvm/libs.profiler/lib.profiler.heap/src" |
| 14546 | #:tests? #f |
| 14547 | #:jdk openjdk |
| 14548 | #:phases |
| 14549 | #~(modify-phases %standard-phases |
| 14550 | (add-after 'build 'create-sources-jar |
| 14551 | (lambda _ |
| 14552 | (invoke "jar" "cf" "visualvm-lib-jfluid-heap-sources.jar" |
| 14553 | "-C" "visualvm/libs.profiler/lib.profiler.heap/src" "org"))) |
| 14554 | (add-after 'install 'install-sources-jar |
| 14555 | (lambda _ |
| 14556 | (install-file "visualvm-lib-jfluid-heap-sources.jar" |
| 14557 | (string-append #$output "/share/java/"))))))) |
| 14558 | (home-page "https://visualvm.github.io/") |
| 14559 | (synopsis "VisualVM JFluid Heap library") |
| 14560 | (description "The JFluid Heap library from VisualVM provides heap dump |
| 14561 | analysis capabilities. Used by GraalVM Truffle for memory profiling.") |
| 14562 | (license license:gpl2))) |
| 14563 | |
| 14564 | ;; Java Allocation Instrumenter for GraalVM (allocation tracking) |
| 14565 | (define-public java-allocation-instrumenter-for-graal-truffle |
| 14566 | (package |
| 14567 | (name "java-allocation-instrumenter-for-graal-truffle") |
| 14568 | (version "3.1.0") |
| 14569 | (source (origin |
| 14570 | (method git-fetch) |
| 14571 | (uri (git-reference |
| 14572 | (url "https://github.com/google/allocation-instrumenter") |
| 14573 | (commit (string-append "java-allocation-instrumenter-" version)))) |
| 14574 | (file-name (git-file-name name version)) |
| 14575 | (sha256 |
| 14576 | (base32 "1z96w3ai41za5dji7dz2xbscv6v1y082ni94qp7wzind1np2gssh")) |
| 14577 | (modules '((guix build utils))) |
| 14578 | (snippet |
| 14579 | '(for-each delete-file (find-files "." "\\.jar$"))))) |
| 14580 | (build-system ant-build-system) |
| 14581 | (arguments |
| 14582 | (list #:jar-name "java-allocation-instrumenter.jar" |
| 14583 | #:source-dir "src/main/java" |
| 14584 | #:tests? #f |
| 14585 | #:jdk openjdk |
| 14586 | #:phases |
| 14587 | #~(modify-phases %standard-phases |
| 14588 | (add-after 'build 'create-sources-jar |
| 14589 | (lambda _ |
| 14590 | (invoke "jar" "cf" "java-allocation-instrumenter-sources.jar" |
| 14591 | "-C" "src/main/java" "com"))) |
| 14592 | (add-after 'install 'install-sources-jar |
| 14593 | (lambda _ |
| 14594 | (install-file "java-allocation-instrumenter-sources.jar" |
| 14595 | (string-append #$output "/share/java/"))))))) |
| 14596 | (inputs (list java-asm-for-graal-truffle |
| 14597 | java-asm-commons-for-graal-truffle |
| 14598 | java-asm-analysis-for-graal-truffle |
| 14599 | java-asm-tree-for-graal-truffle |
| 14600 | java-guava-for-graal-truffle)) |
| 14601 | (home-page "https://github.com/google/allocation-instrumenter") |
| 14602 | (synopsis "Java agent for tracking allocations") |
| 14603 | (description "Java Allocation Instrumenter is a Java agent that rewrites |
| 14604 | bytecode to track object allocations. Used by the GraalVM compiler for |
| 14605 | allocation analysis during benchmarking.") |
| 14606 | (license license:asl2.0))) |
| 14607 | |
| 14608 | (define-public java-xmlunit |
| 14609 | (package |
| 14610 | (name "java-xmlunit") |
| 14611 | (version "2.5.1") |
| 14612 | (source (origin |
| 14613 | (method url-fetch) |
| 14614 | (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v" |
| 14615 | version ".tar.gz")) |
| 14616 | (file-name (string-append name "-" version ".tar.gz")) |
| 14617 | (sha256 |
| 14618 | (base32 |
| 14619 | "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z")))) |
| 14620 | (build-system ant-build-system) |
| 14621 | (arguments |
| 14622 | `(#:jar-name "java-xmlunit.jar" |
| 14623 | #:source-dir "xmlunit-core/src/main/java" |
| 14624 | #:test-dir "xmlunit-core/src/test" |
| 14625 | #:phases |
| 14626 | (modify-phases %standard-phases |
| 14627 | (add-before 'check 'copy-test-resources |
| 14628 | (lambda* (#:key inputs #:allow-other-keys) |
| 14629 | (copy-recursively (assoc-ref inputs "resources") "../test-resources") |
| 14630 | #t))))) |
| 14631 | (native-inputs |
| 14632 | `(("java-junit" ,java-junit) |
| 14633 | ("java-mockito-1" ,java-mockito-1) |
| 14634 | ("java-hamcrest-all" ,java-hamcrest-all) |
| 14635 | ("java-objenesis" ,java-objenesis) |
| 14636 | ("java-cglib" ,java-cglib) |
| 14637 | ("resources" |
| 14638 | ,(origin |
| 14639 | (method git-fetch) |
| 14640 | (uri (git-reference |
| 14641 | (url "https://github.com/xmlunit/test-resources") |
| 14642 | (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec"))) |
| 14643 | (file-name "java-xmlunit-test-resources") |
| 14644 | (sha256 |
| 14645 | (base32 |
| 14646 | "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr")))))) |
| 14647 | (home-page "https://www.xmlunit.org/") |
| 14648 | (synopsis "XML output testing") |
| 14649 | (description "XMLUnit provides you with the tools to verify the XML you |
| 14650 | emit is the one you want to create. It provides helpers to validate against |
| 14651 | an XML Schema, assert the values of XPath queries or compare XML documents |
| 14652 | against expected outcomes.") |
| 14653 | (license license:asl2.0))) |
| 14654 | |
| 14655 | (define-public java-xmlunit-legacy |
| 14656 | (package |
| 14657 | (inherit java-xmlunit) |
| 14658 | (name "java-xmlunit-legacy") |
| 14659 | (arguments |
| 14660 | `(#:jar-name "java-xmlunit-legacy.jar" |
| 14661 | #:source-dir "xmlunit-legacy/src/main/java" |
| 14662 | #:test-dir "xmlunit-legacy/src/test")) |
| 14663 | (inputs |
| 14664 | (list java-xmlunit java-junit)) |
| 14665 | (native-inputs |
| 14666 | `(("java-mockito-1" ,java-mockito-1))))) |
| 14667 | |
| 14668 | (define-public java-xmlunit-matchers |
| 14669 | (package |
| 14670 | (inherit java-xmlunit) |
| 14671 | (name "java-xmlunit-matchers") |
| 14672 | (arguments |
| 14673 | `(#:jar-name "java-xmlunit-matchers.jar" |
| 14674 | #:source-dir "xmlunit-matchers/src/main/java" |
| 14675 | #:test-dir "xmlunit-matchers/src/test" |
| 14676 | #:test-exclude |
| 14677 | ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd |
| 14678 | (list "**/ValidationMatcherTest.java") |
| 14679 | #:phases |
| 14680 | (modify-phases %standard-phases |
| 14681 | (add-before 'build 'copy-test-class |
| 14682 | (lambda _ |
| 14683 | (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java" |
| 14684 | "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java") |
| 14685 | #t)) |
| 14686 | (add-before 'build 'fix-test-resources-path |
| 14687 | (lambda _ |
| 14688 | (substitute* (find-files "xmlunit-matchers/src/test" ".*.java") |
| 14689 | (("../test-resources") "test-resources")) |
| 14690 | #t)) |
| 14691 | (add-before 'check 'copy-test-resources |
| 14692 | (lambda* (#:key inputs #:allow-other-keys) |
| 14693 | (copy-recursively (assoc-ref inputs "resources") "test-resources") |
| 14694 | #t))))) |
| 14695 | (inputs |
| 14696 | (list java-xmlunit java-junit)))) |
| 14697 | |
| 14698 | (define-public java-openchart2 |
| 14699 | (package |
| 14700 | (name "java-openchart2") |
| 14701 | (version "1.4.3") |
| 14702 | (source (origin |
| 14703 | (method url-fetch) |
| 14704 | (uri (string-append "http://download.approximatrix.com/openchart2/" |
| 14705 | "openchart2-" version ".source.zip")) |
| 14706 | (sha256 |
| 14707 | (base32 |
| 14708 | "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g")))) |
| 14709 | (build-system ant-build-system) |
| 14710 | (arguments |
| 14711 | `(#:test-target "test" |
| 14712 | #:phases |
| 14713 | (modify-phases %standard-phases |
| 14714 | (add-after 'unpack 'fix-junit-errors |
| 14715 | (lambda _ |
| 14716 | (with-directory-excursion "unittest/src/com/approximatrix/charting/" |
| 14717 | (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java" |
| 14718 | "coordsystem/ticklocator/NumericYTickLocatorTest.java" |
| 14719 | "coordsystem/ticklocator/ObjectXTickLocatorTest.java" |
| 14720 | "model/DefaultChartDataModelConstraintsTest.java" |
| 14721 | "model/MultiScatterDataModelConstraintsTest.java" |
| 14722 | "model/threedimensional/DotPlotDataModelConstraintsTest.java") |
| 14723 | (("(assertEquals[^;]+);" before _) |
| 14724 | (string-append (string-drop-right before 2) ", 1E-6);")))) |
| 14725 | #t)) |
| 14726 | (replace 'install (install-jars "."))))) |
| 14727 | (native-inputs |
| 14728 | (list unzip java-junit java-hamcrest-core)) |
| 14729 | (home-page "https://approximatrix.com/products/openchart2/") |
| 14730 | (synopsis "Simple plotting for Java") |
| 14731 | (description "Openchart2 provides a simple, yet powerful, interface for |
| 14732 | Java programmers to create two-dimensional charts and plots. The library |
| 14733 | features an assortment of graph styles, including advanced scatter plots, bar |
| 14734 | graphs, and pie charts.") |
| 14735 | (license license:lgpl2.1+))) |
| 14736 | |
| 14737 | (define-public java-commons-httpclient |
| 14738 | (package |
| 14739 | (name "java-commons-httpclient") |
| 14740 | (version "3.1") |
| 14741 | (source (origin |
| 14742 | (method url-fetch) |
| 14743 | (uri (string-append "mirror://apache/httpcomponents/" |
| 14744 | "commons-httpclient/source/commons-httpclient-" |
| 14745 | version "-src.tar.gz")) |
| 14746 | (sha256 |
| 14747 | (base32 |
| 14748 | "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r")))) |
| 14749 | (build-system ant-build-system) |
| 14750 | (arguments |
| 14751 | `(#:build-target "compile" |
| 14752 | #:test-target "test" |
| 14753 | #:tests? #f; requires junit-textui (junit 3) |
| 14754 | #:phases |
| 14755 | (modify-phases %standard-phases |
| 14756 | (add-before 'build 'fix-accent |
| 14757 | (lambda _ |
| 14758 | (for-each (lambda (file) |
| 14759 | (with-fluids ((%default-port-encoding "ISO-8859-1")) |
| 14760 | (substitute* file |
| 14761 | (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n")))) |
| 14762 | '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" |
| 14763 | "src/examples/TrivialApp.java" "src/examples/ClientApp.java" |
| 14764 | "src/test/org/apache/commons/httpclient/TestHttps.java" |
| 14765 | "src/test/org/apache/commons/httpclient/TestURIUtil2.java")) |
| 14766 | #t)) |
| 14767 | (replace 'install |
| 14768 | (lambda* (#:key outputs #:allow-other-keys) |
| 14769 | (invoke "ant" "dist" |
| 14770 | (string-append "-Ddist.home=" (assoc-ref outputs "out") |
| 14771 | "/share/java")) |
| 14772 | #t))))) |
| 14773 | (propagated-inputs |
| 14774 | `(("java-commons-logging" ,java-commons-logging-minimal) |
| 14775 | ("java-commons-codec" ,java-commons-codec))) |
| 14776 | (home-page "https://hc.apache.org") |
| 14777 | (synopsis "HTTP/1.1 compliant HTTP agent implementation") |
| 14778 | (description "This package contains an HTTP/1.1 compliant HTTP agent |
| 14779 | implementation. It also provides reusable components for client-side |
| 14780 | authentication, HTTP state management, and HTTP connection management.") |
| 14781 | (license license:asl2.0))) |
| 14782 | |
| 14783 | (define-public java-commons-vfs |
| 14784 | (package |
| 14785 | (name "java-commons-vfs") |
| 14786 | (version "2.2") |
| 14787 | (source (origin |
| 14788 | (method url-fetch) |
| 14789 | (uri (string-append "mirror://apache/commons/vfs/source/" |
| 14790 | "commons-vfs2-distribution-" version "-src.tar.gz")) |
| 14791 | (file-name (string-append name "-" version ".tar.gz")) |
| 14792 | (sha256 |
| 14793 | (base32 |
| 14794 | "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3")) |
| 14795 | (modules '((guix build utils))) |
| 14796 | (snippet |
| 14797 | '(begin |
| 14798 | (for-each delete-file |
| 14799 | (find-files "." "\\.jar$")) |
| 14800 | #t)))) |
| 14801 | (build-system ant-build-system) |
| 14802 | (arguments |
| 14803 | `(#:jar-name "commons-vfs.jar" |
| 14804 | #:source-dir "commons-vfs2/src/main/java" |
| 14805 | #:test-dir "commons-vfs2/src/test" |
| 14806 | ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ... |
| 14807 | #:tests? #f |
| 14808 | #:phases |
| 14809 | (modify-phases %standard-phases |
| 14810 | (add-before 'build 'remove-hadoop-and-webdav |
| 14811 | ; Remove these files as they are not required and depend on difficult |
| 14812 | ; packages. |
| 14813 | (lambda _ |
| 14814 | (for-each delete-file-recursively |
| 14815 | '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" |
| 14816 | "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")) |
| 14817 | #t))))) |
| 14818 | (inputs |
| 14819 | (list java-commons-collections4 |
| 14820 | java-commons-compress |
| 14821 | java-commons-httpclient |
| 14822 | java-commons-logging-minimal |
| 14823 | java-commons-net |
| 14824 | java-jsch)) |
| 14825 | (home-page "https://commons.apache.org/proper/commons-vfs/") |
| 14826 | (synopsis "Java file system library") |
| 14827 | (description "Commons VFS provides a single API for accessing various |
| 14828 | different file systems. It presents a uniform view of the files from various |
| 14829 | different sources, such as the files on local disk, on an HTTP server, or |
| 14830 | inside a Zip archive.") |
| 14831 | (license license:asl2.0))) |
| 14832 | |
| 14833 | (define-public java-jakarta-oro |
| 14834 | (package |
| 14835 | (name "java-jakarta-oro") |
| 14836 | (version "2.0.8") |
| 14837 | (source (origin |
| 14838 | (method url-fetch) |
| 14839 | (uri (string-append "mirror://apache/jakarta/oro/" |
| 14840 | "jakarta-oro-" version ".tar.gz")) |
| 14841 | (sha256 |
| 14842 | (base32 |
| 14843 | "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc")) |
| 14844 | (modules '((guix build utils))) |
| 14845 | (snippet |
| 14846 | `(begin |
| 14847 | (delete-file (string-append "jakarta-oro-" ,version ".jar")) |
| 14848 | #t)))) |
| 14849 | (build-system ant-build-system) |
| 14850 | (arguments |
| 14851 | `(#:build-target "package" |
| 14852 | #:make-flags (list "-DDATE" "(no recorded date for reproducibility)") |
| 14853 | #:tests? #f; tests are run as part of the build process |
| 14854 | #:phases |
| 14855 | (modify-phases %standard-phases |
| 14856 | (replace 'install |
| 14857 | (install-jars ,(string-append "jakarta-oro-" version)))))) |
| 14858 | (home-page "https://jakarta.apache.org/oro/") |
| 14859 | (synopsis "Text-processing for Java") |
| 14860 | (description "The Jakarta-ORO Java classes are a set of text-processing |
| 14861 | Java classes that provide Perl5 compatible regular expressions, AWK-like |
| 14862 | regular expressions, glob expressions, and utility classes for performing |
| 14863 | substitutions, splits, filtering filenames, etc. This library is the successor |
| 14864 | of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally |
| 14865 | from ORO, Inc.") |
| 14866 | (license license:asl1.1))) |
| 14867 | |
| 14868 | (define-public java-native-access |
| 14869 | (package |
| 14870 | (name "java-native-access") |
| 14871 | (version "4.5.1") |
| 14872 | (source (origin |
| 14873 | (method url-fetch) |
| 14874 | (uri (string-append "https://github.com/java-native-access/jna/" |
| 14875 | "archive/" version ".tar.gz")) |
| 14876 | (file-name (string-append name "-" version ".tar.gz")) |
| 14877 | (sha256 |
| 14878 | (base32 |
| 14879 | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) |
| 14880 | (modules '((guix build utils))) |
| 14881 | (snippet |
| 14882 | `(begin |
| 14883 | (for-each delete-file (find-files "." ".*.jar")) |
| 14884 | (delete-file-recursively "native/libffi") |
| 14885 | (delete-file-recursively "dist") |
| 14886 | #t)))) |
| 14887 | (build-system ant-build-system) |
| 14888 | (arguments |
| 14889 | `(#:tests? #f; FIXME: tests require reflections.jar |
| 14890 | #:test-target "test" |
| 14891 | #:make-flags (list "-Ddynlink.native=true") |
| 14892 | #:phases |
| 14893 | (modify-phases %standard-phases |
| 14894 | (add-before 'build 'fix-build.xml |
| 14895 | (lambda* (#:key inputs #:allow-other-keys) |
| 14896 | (substitute* "build.xml" |
| 14897 | ;; Since we removed the bundled ant.jar, give the correct path |
| 14898 | (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar")) |
| 14899 | ;; We removed generated native libraries. We can only rebuild one |
| 14900 | ;; so don't fail if we can't find a native library for another architecture. |
| 14901 | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) |
| 14902 | ;; Copy test dependencies |
| 14903 | (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$")) |
| 14904 | "lib/junit.jar") |
| 14905 | (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 14906 | "jar$")) |
| 14907 | "lib/hamcrest-core.jar") |
| 14908 | ;; FIXME: once reflections.jar is built, copy it to lib/test. |
| 14909 | #t)) |
| 14910 | (add-before 'build 'build-native |
| 14911 | (lambda _ |
| 14912 | (invoke "ant" "-Ddynlink.native=true" "native") |
| 14913 | #t)) |
| 14914 | (replace 'install |
| 14915 | (install-jars "build"))))) |
| 14916 | (inputs |
| 14917 | (list libffi libx11 libxt)) |
| 14918 | (native-inputs |
| 14919 | (list gcc-7 java-junit java-hamcrest-core)) |
| 14920 | (home-page "https://github.com/java-native-access/jna") |
| 14921 | (synopsis "Access to native shared libraries from Java") |
| 14922 | (description "JNA provides Java programs easy access to native shared |
| 14923 | libraries without writing anything but Java code - no JNI or native code is |
| 14924 | required. JNA allows you to call directly into native functions using natural |
| 14925 | Java method invocation.") |
| 14926 | ;; Java Native Access project (JNA) is dual-licensed under 2 |
| 14927 | ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0. |
| 14928 | (license (list |
| 14929 | license:asl2.0 |
| 14930 | license:lgpl2.1+)))) |
| 14931 | |
| 14932 | (define-public java-native-access-platform |
| 14933 | (package |
| 14934 | (inherit java-native-access) |
| 14935 | (name "java-native-access-platform") |
| 14936 | (arguments |
| 14937 | `(#:test-target "test" |
| 14938 | #:tests? #f; require jna-test.jar |
| 14939 | #:phases |
| 14940 | (modify-phases %standard-phases |
| 14941 | (add-before 'build 'chdir |
| 14942 | (lambda _ |
| 14943 | (chdir "contrib/platform") |
| 14944 | #t)) |
| 14945 | (add-after 'chdir 'fix-ant |
| 14946 | (lambda* (#:key inputs #:allow-other-keys) |
| 14947 | (substitute* "nbproject/project.properties" |
| 14948 | (("../../build/jna.jar") |
| 14949 | (search-input-file inputs "/share/java/jna.jar")) |
| 14950 | (("../../lib/hamcrest-core-.*.jar") |
| 14951 | (car (find-files (assoc-ref inputs "java-hamcrest-core") |
| 14952 | "jar$"))) |
| 14953 | (("../../lib/junit.jar") |
| 14954 | (car (find-files (assoc-ref inputs "java-junit") |
| 14955 | "jar$")))) |
| 14956 | #t)) |
| 14957 | (replace 'install |
| 14958 | (install-jars "dist"))))) |
| 14959 | (inputs |
| 14960 | (list java-native-access)) |
| 14961 | (synopsis "Cross-platform mappings for jna") |
| 14962 | (description "java-native-access-platform has cross-platform mappings |
| 14963 | and mappings for a number of commonly used platform functions, including a |
| 14964 | large number of Win32 mappings as well as a set of utility classes that |
| 14965 | simplify native access."))) |
| 14966 | |
| 14967 | (define-public java-jsch-agentproxy-core |
| 14968 | (package |
| 14969 | (name "java-jsch-agentproxy-core") |
| 14970 | (version "0.0.8") |
| 14971 | (source (origin |
| 14972 | (method url-fetch) |
| 14973 | (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/" |
| 14974 | version ".tar.gz")) |
| 14975 | (file-name (string-append name "-" version ".tar.gz")) |
| 14976 | (sha256 |
| 14977 | (base32 |
| 14978 | "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q")))) |
| 14979 | (build-system ant-build-system) |
| 14980 | (arguments |
| 14981 | `(#:jar-name "jsch-agentproxy-core.jar" |
| 14982 | #:source-dir "jsch-agent-proxy-core/src/main/java" |
| 14983 | #:tests? #f)); no tests |
| 14984 | (home-page "https://github.com/ymnk/jsch-agent-proxy") |
| 14985 | (synopsis "Core component of the proxy to ssh-agent and Pageant in Java") |
| 14986 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 14987 | and Pageant included Putty. It will be easily integrated into JSch, and users |
| 14988 | will be allowed to use these programs for authentication.") |
| 14989 | (license license:bsd-3))) |
| 14990 | |
| 14991 | (define-public java-jsch-agentproxy-sshagent |
| 14992 | (package |
| 14993 | (inherit java-jsch-agentproxy-core) |
| 14994 | (name "java-jsch-agentproxy-sshagent") |
| 14995 | (arguments |
| 14996 | `(#:jar-name "jsch-agentproxy-sshagent.jar" |
| 14997 | #:source-dir "jsch-agent-proxy-sshagent/src/main/java" |
| 14998 | #:tests? #f)); no tests |
| 14999 | (inputs |
| 15000 | (list java-jsch-agentproxy-core)) |
| 15001 | (synopsis "Proxy to ssh-agent") |
| 15002 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 15003 | and Pageant included in Putty. This component contains the code for a proxy to |
| 15004 | ssh-agent."))) |
| 15005 | |
| 15006 | (define-public java-jsch-agentproxy-usocket-jna |
| 15007 | (package |
| 15008 | (inherit java-jsch-agentproxy-core) |
| 15009 | (name "java-jsch-agentproxy-usocket-jna") |
| 15010 | (arguments |
| 15011 | `(#:jar-name "jsch-agentproxy-usocket-jna.jar" |
| 15012 | #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java" |
| 15013 | #:tests? #f)); no tests |
| 15014 | (inputs |
| 15015 | (list java-jsch-agentproxy-core java-native-access)) |
| 15016 | (synopsis "USocketFactory implementation using JNA") |
| 15017 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 15018 | and Pageant included in Putty. This component contains an implementation of |
| 15019 | USocketFactory using @dfn{JNA} (Java Native Access)."))) |
| 15020 | |
| 15021 | (define-public java-jsch-agentproxy-pageant |
| 15022 | (package |
| 15023 | (inherit java-jsch-agentproxy-core) |
| 15024 | (name "java-jsch-agentproxy-pageant") |
| 15025 | (arguments |
| 15026 | `(#:jar-name "jsch-agentproxy-pageant.jar" |
| 15027 | #:source-dir "jsch-agent-proxy-pageant/src/main/java" |
| 15028 | #:tests? #f)); no tests |
| 15029 | (inputs |
| 15030 | (list java-jsch-agentproxy-core java-native-access |
| 15031 | java-native-access-platform)) |
| 15032 | (synopsis "Proxy to pageant") |
| 15033 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 15034 | and Pageant included in Putty. This component contains the code for a proxy to |
| 15035 | pageant."))) |
| 15036 | |
| 15037 | (define-public java-jsch-agentproxy-usocket-nc |
| 15038 | (package |
| 15039 | (inherit java-jsch-agentproxy-core) |
| 15040 | (name "java-jsch-agentproxy-usocket-nc") |
| 15041 | (arguments |
| 15042 | `(#:jar-name "jsch-agentproxy-usocket-nc.jar" |
| 15043 | #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java" |
| 15044 | #:tests? #f)); no tests |
| 15045 | (inputs |
| 15046 | (list java-jsch-agentproxy-core)) |
| 15047 | (synopsis "USocketFactory implementation using netcat") |
| 15048 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 15049 | and Pageant included in Putty. This component contains an implementation of |
| 15050 | USocketFactory using netcat."))) |
| 15051 | |
| 15052 | (define-public java-jsch-agentproxy-connector-factory |
| 15053 | (package |
| 15054 | (inherit java-jsch-agentproxy-core) |
| 15055 | (name "java-jsch-agentproxy-connector-factory") |
| 15056 | (arguments |
| 15057 | `(#:jar-name "jsch-agentproxy-connector-factory.jar" |
| 15058 | #:source-dir "jsch-agent-proxy-connector-factory/src/main/java" |
| 15059 | #:tests? #f)); no tests |
| 15060 | (inputs |
| 15061 | (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent |
| 15062 | java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant |
| 15063 | java-jsch-agentproxy-usocket-nc)) |
| 15064 | (synopsis "Connector factory for jsch agent proxy") |
| 15065 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 15066 | and Pageant included in Putty. This component contains a connector factory."))) |
| 15067 | |
| 15068 | (define-public java-jsch-agentproxy-jsch |
| 15069 | (package |
| 15070 | (inherit java-jsch-agentproxy-core) |
| 15071 | (name "java-jsch-agentproxy-jsch") |
| 15072 | (arguments |
| 15073 | `(#:jar-name "jsch-agentproxy-jsch.jar" |
| 15074 | #:source-dir "jsch-agent-proxy-jsch/src/main/java" |
| 15075 | #:tests? #f)); no tests |
| 15076 | (inputs |
| 15077 | (list java-jsch java-jsch-agentproxy-core)) |
| 15078 | (synopsis "JSch integration library for agentproxy") |
| 15079 | (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent |
| 15080 | and Pageant included in Putty. This component contains a library to use |
| 15081 | jsch-agent-proxy with JSch."))) |
| 15082 | |
| 15083 | (define-public java-apache-ivy |
| 15084 | (package |
| 15085 | (name "java-apache-ivy") |
| 15086 | (version "2.4.0") |
| 15087 | (source (origin |
| 15088 | (method url-fetch) |
| 15089 | (uri (string-append "mirror://apache//ant/ivy/" version |
| 15090 | "/apache-ivy-" version "-src.tar.gz")) |
| 15091 | (sha256 |
| 15092 | (base32 |
| 15093 | "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0")) |
| 15094 | (patches |
| 15095 | (search-patches |
| 15096 | "java-apache-ivy-port-to-latest-bouncycastle.patch")))) |
| 15097 | (build-system ant-build-system) |
| 15098 | (arguments |
| 15099 | `(#:jar-name "ivy.jar" |
| 15100 | #:tests? #f |
| 15101 | #:phases |
| 15102 | (modify-phases %standard-phases |
| 15103 | (add-before 'build 'remove-example |
| 15104 | (lambda _ |
| 15105 | (delete-file-recursively "src/example") |
| 15106 | #t)) |
| 15107 | (add-before 'build 'copy-resources |
| 15108 | (lambda _ |
| 15109 | (with-directory-excursion "src/java" |
| 15110 | (for-each (lambda (file) |
| 15111 | (install-file file (string-append "../../build/classes/" (dirname file)))) |
| 15112 | (append |
| 15113 | (find-files "." ".*.css") |
| 15114 | (find-files "." ".*.ent") |
| 15115 | (find-files "." ".*.html") |
| 15116 | (find-files "." ".*.properties") |
| 15117 | (find-files "." ".*.xsd") |
| 15118 | (find-files "." ".*.xsl") |
| 15119 | (find-files "." ".*.xml")))) |
| 15120 | #t)) |
| 15121 | (add-before 'build 'fix-vfs |
| 15122 | (lambda _ |
| 15123 | (substitute* |
| 15124 | '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java" |
| 15125 | "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java") |
| 15126 | (("import org.apache.commons.vfs") "import org.apache.commons.vfs2")) |
| 15127 | #t)) |
| 15128 | (add-before 'install 'copy-manifest |
| 15129 | (lambda _ |
| 15130 | (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF") |
| 15131 | #t)) |
| 15132 | (add-before 'install 'repack |
| 15133 | (lambda _ |
| 15134 | (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" |
| 15135 | "-C" "build/classes" "."))) |
| 15136 | (add-after 'install 'install-bin |
| 15137 | (lambda* (#:key outputs #:allow-other-keys) |
| 15138 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) |
| 15139 | (ivy (string-append bin "/ivy")) |
| 15140 | (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar"))) |
| 15141 | (mkdir-p bin) |
| 15142 | (with-output-to-file ivy |
| 15143 | (lambda _ |
| 15144 | (display (string-append |
| 15145 | "#!" (which "sh") "\n" |
| 15146 | "if [[ -z $CLASSPATH ]]; then\n" |
| 15147 | " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n" |
| 15148 | "else\n" |
| 15149 | " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n" |
| 15150 | "fi\n" |
| 15151 | (which "java") " -cp $cp org.apache.ivy.Main $@\n")))) |
| 15152 | (chmod ivy #o755) |
| 15153 | #t)))))) |
| 15154 | (inputs |
| 15155 | (list java-bouncycastle |
| 15156 | java-commons-cli |
| 15157 | java-commons-collections |
| 15158 | java-commons-httpclient |
| 15159 | java-commons-lang |
| 15160 | java-commons-vfs |
| 15161 | java-jakarta-oro |
| 15162 | java-jsch |
| 15163 | java-jsch-agentproxy-core |
| 15164 | java-jsch-agentproxy-connector-factory |
| 15165 | java-jsch-agentproxy-jsch |
| 15166 | java-junit)) |
| 15167 | (home-page "https://ant.apache.org/ivy") |
| 15168 | (synopsis "Dependency manager for the Java programming language") |
| 15169 | (description "Ivy is a tool for managing (recording, tracking, resolving |
| 15170 | and reporting) project dependencies. It is characterized by the following: |
| 15171 | |
| 15172 | @itemize |
| 15173 | @item flexibility and configurability - Ivy is essentially process agnostic |
| 15174 | and is not tied to any methodology or structure. Instead it provides the |
| 15175 | necessary flexibility and configurability to be adapted to a broad range |
| 15176 | of dependency management and build processes. |
| 15177 | @item tight integration with Apache Ant - while available as a standalone tool, |
| 15178 | Ivy works particularly well with Apache Ant providing a number of |
| 15179 | powerful Ant tasks ranging from dependency resolution to dependency |
| 15180 | reporting and publication. |
| 15181 | @end itemize") |
| 15182 | (license license:asl2.0))) |
| 15183 | |
| 15184 | (define-public java-eclipse-sisu-inject |
| 15185 | (package |
| 15186 | (name "java-eclipse-sisu-inject") |
| 15187 | (version "0.3.5") |
| 15188 | (source (origin |
| 15189 | (method git-fetch) |
| 15190 | (uri (git-reference |
| 15191 | (url "https://github.com/eclipse/sisu.inject/") |
| 15192 | (commit (string-append "releases/" version)))) |
| 15193 | (file-name (git-file-name name version)) |
| 15194 | (sha256 |
| 15195 | (base32 |
| 15196 | "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3")))) |
| 15197 | (build-system ant-build-system) |
| 15198 | (arguments |
| 15199 | `(#:jar-name "eclipse-sisu-inject.jar" |
| 15200 | #:source-dir "org.eclipse.sisu.inject/src" |
| 15201 | #:tests? #f; no tests |
| 15202 | #:phases |
| 15203 | (modify-phases %standard-phases |
| 15204 | (replace 'install |
| 15205 | (install-from-pom "org.eclipse.sisu.inject/pom.xml"))))) |
| 15206 | (propagated-inputs |
| 15207 | (list java-guice java-sisu-inject-parent-pom)) |
| 15208 | (inputs |
| 15209 | (list java-guice-servlet |
| 15210 | java-javax-inject |
| 15211 | java-javaee-servletapi |
| 15212 | java-junit |
| 15213 | java-slf4j-api |
| 15214 | java-jsr305 |
| 15215 | java-jsr250 |
| 15216 | java-cdi-api |
| 15217 | java-osgi-framework |
| 15218 | java-osgi-util-tracker |
| 15219 | java-testng)) |
| 15220 | (home-page "https://www.eclipse.org/sisu/") |
| 15221 | (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring") |
| 15222 | (description "Sisu is a modular JSR330-based container that supports |
| 15223 | classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses |
| 15224 | Google-Guice to perform dependency injection and provide the core JSR330 |
| 15225 | support, but removes the need to write explicit bindings in Guice modules. |
| 15226 | Integration with other containers via the Eclipse Extension Registry and the |
| 15227 | OSGi Service Registry is a goal of this project.") |
| 15228 | (license license:epl1.0))) |
| 15229 | |
| 15230 | (define java-sisu-inject-parent-pom |
| 15231 | (package |
| 15232 | (inherit java-eclipse-sisu-inject) |
| 15233 | (name "java-sisu-inject-parent-pom") |
| 15234 | (arguments |
| 15235 | `(#:tests? #f |
| 15236 | #:phases |
| 15237 | (modify-phases %standard-phases |
| 15238 | (delete 'configure) |
| 15239 | (delete 'build) |
| 15240 | (replace 'install |
| 15241 | (install-pom-file "pom.xml"))))) |
| 15242 | (propagated-inputs '()))) |
| 15243 | |
| 15244 | (define java-sisu-inject-parent-pom-0.9 |
| 15245 | (package |
| 15246 | (name "java-sisu-inject-parent-pom") |
| 15247 | (version "0.9.0.M3") |
| 15248 | (source (origin |
| 15249 | (method git-fetch) |
| 15250 | (uri (git-reference |
| 15251 | (url "https://github.com/eclipse/sisu.inject/") |
| 15252 | (commit (string-append "milestones/" version)))) |
| 15253 | (file-name (git-file-name "java-eclipse-sisu-inject" version)) |
| 15254 | (sha256 |
| 15255 | (base32 |
| 15256 | "1ygq3k8h2c9gd7x1lhdk2wjvfb26p554f0rm29mqc7qd5w86v8n7")))) |
| 15257 | (build-system ant-build-system) |
| 15258 | (arguments |
| 15259 | `(#:tests? #f |
| 15260 | #:phases |
| 15261 | (modify-phases %standard-phases |
| 15262 | (delete 'configure) |
| 15263 | (delete 'build) |
| 15264 | (replace 'install |
| 15265 | (install-pom-file "pom.xml"))))) |
| 15266 | (propagated-inputs |
| 15267 | (list java-guice-5)) |
| 15268 | (home-page "https://eclipse.org/sisu") |
| 15269 | (synopsis "Parent POM for Eclipse Sisu") |
| 15270 | (description "Eclipse Sisu is a modular JSR330-based container that |
| 15271 | supports classpath scanning, auto-binding, and dynamic auto-wiring.") |
| 15272 | (license license:epl1.0))) |
| 15273 | |
| 15274 | (define-public java-eclipse-sisu-inject-0.9 |
| 15275 | (package |
| 15276 | (inherit java-eclipse-sisu-inject) |
| 15277 | (version "0.9.0.M3") |
| 15278 | (source (origin |
| 15279 | (method git-fetch) |
| 15280 | (uri (git-reference |
| 15281 | (url "https://github.com/eclipse/sisu.inject/") |
| 15282 | (commit (string-append "milestones/" version)))) |
| 15283 | (file-name (git-file-name "java-eclipse-sisu-inject" version)) |
| 15284 | (sha256 |
| 15285 | (base32 |
| 15286 | "1ygq3k8h2c9gd7x1lhdk2wjvfb26p554f0rm29mqc7qd5w86v8n7")) |
| 15287 | (modules '((guix build utils))) |
| 15288 | (snippet |
| 15289 | '(begin |
| 15290 | ;; Delete test jar files to prevent them from ending up on |
| 15291 | ;; the classpath (the ant-build-system scans all inputs for |
| 15292 | ;; jar files, including the source checkout). |
| 15293 | (for-each delete-file (find-files "." "\\.jar$")))))) |
| 15294 | (arguments |
| 15295 | (substitute-keyword-arguments (package-arguments java-eclipse-sisu-inject) |
| 15296 | ((#:source-dir _) |
| 15297 | "org.eclipse.sisu.inject/src/main/java") |
| 15298 | ((#:jdk _ #f) openjdk11) |
| 15299 | ((#:phases phases) |
| 15300 | `(modify-phases ,phases |
| 15301 | (add-after 'unpack 'delete-junit5-dependent-files |
| 15302 | (lambda _ |
| 15303 | ;; InjectedTest.java is a test utility in main sources that |
| 15304 | ;; requires JUnit 5, which we don't have. |
| 15305 | (delete-file "org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/launch/InjectedTest.java"))))))) |
| 15306 | ;; Use Guice 5 which includes ASM9 for Java 11+ class file parsing |
| 15307 | (propagated-inputs |
| 15308 | (list java-guice-5 java-sisu-inject-parent-pom-0.9)))) |
| 15309 | |
| 15310 | (define-public java-eclipse-sisu-plexus |
| 15311 | (package |
| 15312 | (name "java-eclipse-sisu-plexus") |
| 15313 | (version "0.3.5") |
| 15314 | (source (origin |
| 15315 | (method git-fetch) |
| 15316 | (uri (git-reference |
| 15317 | (url "https://github.com/eclipse/sisu.plexus") |
| 15318 | (commit (string-append "releases/" version)))) |
| 15319 | (file-name (git-file-name name version)) |
| 15320 | (sha256 |
| 15321 | (base32 |
| 15322 | "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28")) |
| 15323 | (modules '((guix build utils))) |
| 15324 | (snippet |
| 15325 | '(begin |
| 15326 | (for-each delete-file (find-files "." ".*.jar")) |
| 15327 | (rename-file "org.eclipse.sisu.plexus.tests/src" |
| 15328 | "org.eclipse.sisu.plexus.tests/java") |
| 15329 | #t)))) |
| 15330 | (build-system ant-build-system) |
| 15331 | (arguments |
| 15332 | `(#:jar-name "eclipse-sisu-plexus.jar" |
| 15333 | #:source-dir "org.eclipse.sisu.plexus/src" |
| 15334 | #:test-dir "org.eclipse.sisu.plexus.tests" |
| 15335 | #:test-exclude |
| 15336 | (list |
| 15337 | ;; This test fails probably because we can't generate the necessary |
| 15338 | ;; meta-inf files. |
| 15339 | "**/PlexusLoggingTest.*" |
| 15340 | ;; FIXME: This test fails because of some injection error |
| 15341 | "**/PlexusRequirementTest.*" |
| 15342 | ;; FIXME: These tests fail with Java 11 |
| 15343 | "**/ComponentAnnotationTest.*" |
| 15344 | "**/ConfigurationAnnotationTest.*" |
| 15345 | "**/RequirementAnnotationTest.*") |
| 15346 | #:phases |
| 15347 | (modify-phases %standard-phases |
| 15348 | (add-before 'build 'copy-resources |
| 15349 | (lambda _ |
| 15350 | (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml" |
| 15351 | "build/classes/META-INF/plexus") |
| 15352 | #t)) |
| 15353 | (add-before 'check 'build-test-jar |
| 15354 | (lambda _ |
| 15355 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/" |
| 15356 | (mkdir "build") |
| 15357 | (with-directory-excursion "java" |
| 15358 | (apply invoke "javac" "-cp" |
| 15359 | (string-append (getenv "CLASSPATH") |
| 15360 | ":../../../../../build/classes") |
| 15361 | (find-files "." ".*.java")) |
| 15362 | (for-each (lambda (file) (install-file file (string-append "../build/" file))) |
| 15363 | (find-files "." ".*.jar"))) |
| 15364 | (mkdir-p "build/META-INF/plexus") |
| 15365 | (copy-file "resources/META-INF/plexus/components.xml" |
| 15366 | "build/META-INF/plexus/components.xml") |
| 15367 | (with-directory-excursion "build" |
| 15368 | (invoke "jar" "cf" "../../../component-jar-0.1.jar" "."))) |
| 15369 | (with-directory-excursion "org.eclipse.sisu.plexus.tests/" |
| 15370 | (copy-recursively "META-INF" "../build/test-classes/META-INF") |
| 15371 | (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java" |
| 15372 | (("resources/component-jar") |
| 15373 | "org.eclipse.sisu.plexus.tests/resources/component-jar"))) |
| 15374 | #t)) |
| 15375 | (replace 'install |
| 15376 | (install-from-pom "org.eclipse.sisu.plexus/pom.xml"))))) |
| 15377 | (propagated-inputs |
| 15378 | (list java-jsr250 |
| 15379 | java-plexus-classworlds |
| 15380 | java-plexus-utils |
| 15381 | java-plexus-component-annotations |
| 15382 | java-cdi-api |
| 15383 | java-eclipse-sisu-inject |
| 15384 | java-sisu-plexus-parent-pom)) |
| 15385 | (inputs |
| 15386 | (list java-osgi-framework |
| 15387 | java-slf4j-api |
| 15388 | java-javax-inject |
| 15389 | java-guice |
| 15390 | java-guava |
| 15391 | java-aopalliance |
| 15392 | java-cglib)) |
| 15393 | (native-inputs |
| 15394 | (list java-junit)) |
| 15395 | (home-page "https://www.eclipse.org/sisu/") |
| 15396 | (synopsis "Plexus support for the sisu container") |
| 15397 | (description "Sisu is a modular JSR330-based container that supports |
| 15398 | classpath scanning, auto-binding, and dynamic auto-wiring. This package |
| 15399 | adds Plexus support to the Sisu-Inject container.") |
| 15400 | (license license:epl1.0))) |
| 15401 | |
| 15402 | (define-public java-eclipse-sisu-plexus-0.9 |
| 15403 | (package |
| 15404 | (inherit java-eclipse-sisu-plexus) |
| 15405 | (version "0.9.0.M3") |
| 15406 | ;; Starting with 0.9.x, sisu.plexus was merged into the sisu.inject repo. |
| 15407 | (source (origin |
| 15408 | (method git-fetch) |
| 15409 | (uri (git-reference |
| 15410 | (url "https://github.com/eclipse/sisu.inject") |
| 15411 | (commit (string-append "milestones/" version)))) |
| 15412 | (file-name (git-file-name "java-eclipse-sisu-plexus" version)) |
| 15413 | (sha256 |
| 15414 | (base32 |
| 15415 | "1ygq3k8h2c9gd7x1lhdk2wjvfb26p554f0rm29mqc7qd5w86v8n7")) |
| 15416 | (modules '((guix build utils))) |
| 15417 | (snippet |
| 15418 | '(begin |
| 15419 | ;; Delete jar files to prevent them from ending up on |
| 15420 | ;; the classpath. |
| 15421 | (for-each delete-file (find-files "." "\\.jar$")))))) |
| 15422 | (arguments |
| 15423 | (substitute-keyword-arguments (package-arguments java-eclipse-sisu-plexus) |
| 15424 | ((#:jdk _ #f) |
| 15425 | openjdk11) |
| 15426 | ((#:source-dir _ #f) |
| 15427 | "org.eclipse.sisu.plexus/src/main/java") |
| 15428 | ((#:test-dir _ #f) |
| 15429 | "org.eclipse.sisu.plexus/src/test") |
| 15430 | ;; Delete check phase - tests require additional dependencies not |
| 15431 | ;; yet available in Guix. |
| 15432 | ((#:tests? _ #f) |
| 15433 | #f) |
| 15434 | ((#:phases phases) |
| 15435 | `(modify-phases ,phases |
| 15436 | ;; Delete build-test-jar since we don't have JUnit 5 and the |
| 15437 | ;; directory structure is different in 0.9. |
| 15438 | (delete 'build-test-jar) |
| 15439 | ;; In 0.9.0.M3, there's no components.xml in main sources. |
| 15440 | ;; Instead, classes use @Named annotations. Generate Sisu index. |
| 15441 | (replace 'copy-resources |
| 15442 | (lambda _ |
| 15443 | (mkdir-p "build/classes/META-INF/sisu") |
| 15444 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
| 15445 | (lambda () |
| 15446 | (display "org.codehaus.plexus.component.configurator.BasicComponentConfigurator\n") |
| 15447 | (display "org.codehaus.plexus.component.configurator.MapOrientedComponentConfigurator\n"))))))))) |
| 15448 | (propagated-inputs |
| 15449 | (list java-jsr250 |
| 15450 | java-plexus-classworlds |
| 15451 | java-plexus-utils |
| 15452 | java-plexus-xml |
| 15453 | java-plexus-component-annotations |
| 15454 | java-cdi-api |
| 15455 | java-eclipse-sisu-inject-0.9)))) |
| 15456 | |
| 15457 | (define java-sisu-plexus-parent-pom |
| 15458 | (package |
| 15459 | (inherit java-eclipse-sisu-plexus) |
| 15460 | (name "java-sisu-plexus-parent-pom") |
| 15461 | (arguments |
| 15462 | `(#:tests? #f |
| 15463 | #:phases |
| 15464 | (modify-phases %standard-phases |
| 15465 | (delete 'configure) |
| 15466 | (delete 'build) |
| 15467 | (replace 'install |
| 15468 | (install-pom-file "pom.xml"))))) |
| 15469 | (propagated-inputs |
| 15470 | `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9))))) |
| 15471 | |
| 15472 | (define-public java-commons-compiler |
| 15473 | (package |
| 15474 | (name "java-commons-compiler") |
| 15475 | (version "3.0.8") |
| 15476 | (source (origin |
| 15477 | (method git-fetch) |
| 15478 | (uri (git-reference |
| 15479 | (url "https://github.com/janino-compiler/janino") |
| 15480 | (commit "91aa95686d1e4ca3b16a984a03a38686572331b2"))) |
| 15481 | (file-name (string-append name "-" version)) |
| 15482 | (sha256 |
| 15483 | (base32 |
| 15484 | "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r")) |
| 15485 | (modules '((guix build utils))) |
| 15486 | (snippet |
| 15487 | '(begin |
| 15488 | (for-each delete-file |
| 15489 | (find-files "." "\\.jar$")) |
| 15490 | #t)))) |
| 15491 | (build-system ant-build-system) |
| 15492 | (arguments |
| 15493 | `(#:jar-name "commons-compiler.jar" |
| 15494 | #:source-dir "commons-compiler/src/main" |
| 15495 | #:tests? #f)); no tests |
| 15496 | (home-page "https://github.com/janino-compiler/janino") |
| 15497 | (synopsis "Java compiler") |
| 15498 | (description "Commons-compiler contains an API for janino, including the |
| 15499 | @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator} |
| 15500 | and @code{ISimpleCompiler} interfaces.") |
| 15501 | (license license:bsd-3))) |
| 15502 | |
| 15503 | (define-public java-janino |
| 15504 | (package |
| 15505 | (inherit java-commons-compiler) |
| 15506 | (name "java-janino") |
| 15507 | (arguments |
| 15508 | `(#:jar-name "janino.jar" |
| 15509 | #:source-dir "src/main/java" |
| 15510 | #:phases |
| 15511 | (modify-phases %standard-phases |
| 15512 | (add-before 'configure 'chdir |
| 15513 | (lambda _ |
| 15514 | (chdir "janino") |
| 15515 | #t))))) |
| 15516 | (inputs |
| 15517 | (list java-commons-compiler)) |
| 15518 | (native-inputs |
| 15519 | (list java-junit java-hamcrest-core)) |
| 15520 | (description "Janino is a Java compiler. Janino can compile a set of |
| 15521 | source files to a set of class files like @code{javac}, but also compile a |
| 15522 | Java expression, block, class body or source file in memory, load the bytecode |
| 15523 | and execute it directly in the same JVM. @code{janino} can also be used for |
| 15524 | static code analysis or code manipulation."))) |
| 15525 | |
| 15526 | (define-public java-logback-core |
| 15527 | (package |
| 15528 | (name "java-logback-core") |
| 15529 | (version "1.2.3") |
| 15530 | (source (origin |
| 15531 | (method git-fetch) |
| 15532 | (uri (git-reference |
| 15533 | (url "https://github.com/qos-ch/logback/") |
| 15534 | (commit (string-append "v_" version)))) |
| 15535 | (file-name (git-file-name name version)) |
| 15536 | (sha256 |
| 15537 | (base32 |
| 15538 | "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z")) |
| 15539 | (modules '((guix build utils))) |
| 15540 | (snippet |
| 15541 | '(delete-file-recursively "logback-access/lib")))) |
| 15542 | (build-system ant-build-system) |
| 15543 | (arguments |
| 15544 | `(#:jar-name "logback.jar" |
| 15545 | #:source-dir "src/main/java" |
| 15546 | #:test-dir "src/test" |
| 15547 | #:test-exclude |
| 15548 | ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator |
| 15549 | ;; which creates FastClasses |
| 15550 | (list "**/AllCoreTest.*" |
| 15551 | "**/AutoFlushingObjectWriterTest.*" |
| 15552 | "**/PackageTest.*" |
| 15553 | "**/ResilientOutputStreamTest.*" |
| 15554 | ;; And we still don't want to run abstract classes |
| 15555 | "**/Abstract*.*") |
| 15556 | #:phases |
| 15557 | (modify-phases %standard-phases |
| 15558 | (add-before 'configure 'chdir |
| 15559 | (lambda _ (chdir "logback-core")))))) |
| 15560 | (inputs |
| 15561 | (list java-javax-mail |
| 15562 | java-javaee-servletapi |
| 15563 | java-commons-compiler |
| 15564 | java-janino)) |
| 15565 | (native-inputs |
| 15566 | (list java-junit |
| 15567 | java-hamcrest-core |
| 15568 | java-mockito-1 |
| 15569 | java-cglib |
| 15570 | java-objenesis |
| 15571 | java-joda-time)) |
| 15572 | (home-page "https://logback.qos.ch") |
| 15573 | (synopsis "Logging for java") |
| 15574 | (description "Logback is intended as a successor to the popular log4j project. |
| 15575 | This module lays the groundwork for the other two modules.") |
| 15576 | ;; Either epl1.0 or lgpl2.1 |
| 15577 | (license (list license:epl1.0 |
| 15578 | license:lgpl2.1)))) |
| 15579 | |
| 15580 | (define-public java-logback-classic |
| 15581 | (package |
| 15582 | (inherit java-logback-core) |
| 15583 | (name "java-logback-classic") |
| 15584 | (arguments |
| 15585 | `(#:jar-name "logback-classic.jar" |
| 15586 | #:source-dir "src/main/java" |
| 15587 | #:test-dir "src/test" |
| 15588 | #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix |
| 15589 | #:jdk ,icedtea-8 |
| 15590 | #:phases |
| 15591 | (modify-phases %standard-phases |
| 15592 | (add-before 'configure 'chdir |
| 15593 | (lambda _ |
| 15594 | (chdir "logback-classic") |
| 15595 | #t)) |
| 15596 | (replace 'build |
| 15597 | (lambda* (#:key inputs #:allow-other-keys) |
| 15598 | (mkdir-p "build/classes") |
| 15599 | (setenv "CLASSPATH" |
| 15600 | (string-join |
| 15601 | (apply append (map (lambda (input) |
| 15602 | (find-files (assoc-ref inputs input) |
| 15603 | ".*.jar")) |
| 15604 | '("java-logback-core" "java-slf4j-api" |
| 15605 | "java-commons-compiler" "java-javaee-servletapi" |
| 15606 | "groovy"))) |
| 15607 | ":")) |
| 15608 | (apply invoke "groovyc" "-d" "build/classes" "-j" |
| 15609 | (find-files "src/main/" ".*\\.(groovy|java)$")) |
| 15610 | (invoke "ant" "jar") |
| 15611 | #t))))) |
| 15612 | (inputs |
| 15613 | (modify-inputs (package-inputs java-logback-core) |
| 15614 | (prepend java-logback-core java-slf4j-api))) |
| 15615 | (native-inputs |
| 15616 | (list groovy)) |
| 15617 | (description "Logback is intended as a successor to the popular log4j project. |
| 15618 | This module can be assimilated to a significantly improved version of log4j. |
| 15619 | Moreover, @code{logback-classic} natively implements the slf4j API so that you |
| 15620 | can readily switch back and forth between logback and other logging frameworks |
| 15621 | such as log4j or @code{java.util.logging} (JUL)."))) |
| 15622 | |
| 15623 | (define-public java-jgit |
| 15624 | (package |
| 15625 | (name "java-jgit") |
| 15626 | (version "4.7.0.201704051617-r") |
| 15627 | (source (origin |
| 15628 | (method url-fetch) |
| 15629 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 15630 | "org/eclipse/jgit/org.eclipse.jgit/" |
| 15631 | version "/org.eclipse.jgit-" |
| 15632 | version "-sources.jar")) |
| 15633 | (sha256 |
| 15634 | (base32 |
| 15635 | "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k")))) |
| 15636 | (build-system ant-build-system) |
| 15637 | (arguments |
| 15638 | `(#:tests? #f ; There are no tests to run. |
| 15639 | #:jar-name "jgit.jar" |
| 15640 | ;; JGit must be built with a JDK supporting Java 8. |
| 15641 | #:jdk ,icedtea-8 |
| 15642 | ;; Target our older default JDK. |
| 15643 | #:make-flags (list "-Dtarget=1.7") |
| 15644 | #:phases |
| 15645 | (modify-phases %standard-phases |
| 15646 | ;; The jar file generated by the default build.xml does not include |
| 15647 | ;; the text properties files, so we need to add them. |
| 15648 | (add-after 'build 'add-properties |
| 15649 | (lambda* (#:key jar-name #:allow-other-keys) |
| 15650 | (with-directory-excursion "src" |
| 15651 | (apply invoke "jar" "-uf" |
| 15652 | (string-append "../build/jar/" jar-name) |
| 15653 | (find-files "." "\\.properties$"))) |
| 15654 | #t))))) |
| 15655 | (inputs |
| 15656 | (list java-classpathx-servletapi java-javaewah java-jsch |
| 15657 | java-slf4j-api)) |
| 15658 | (home-page "https://eclipse.org/jgit/") |
| 15659 | (synopsis "Java library implementing the Git version control system") |
| 15660 | (description "JGit is a lightweight, pure Java library implementing the |
| 15661 | Git version control system, providing repository access routines, support for |
| 15662 | network protocols, and core version control algorithms.") |
| 15663 | (license license:edl1.0))) |
| 15664 | |
| 15665 | ;; For axoloti. |
| 15666 | (define-public java-jgit-4.2 |
| 15667 | (package (inherit java-jgit) |
| 15668 | (version "4.2.0.201601211800-r") |
| 15669 | (source (origin |
| 15670 | (method url-fetch) |
| 15671 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 15672 | "org/eclipse/jgit/org.eclipse.jgit/" |
| 15673 | version "/org.eclipse.jgit-" |
| 15674 | version "-sources.jar")) |
| 15675 | (sha256 |
| 15676 | (base32 |
| 15677 | "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm")))) |
| 15678 | (build-system ant-build-system) |
| 15679 | (arguments |
| 15680 | (substitute-keyword-arguments (package-arguments java-jgit) |
| 15681 | ((#:phases phases) |
| 15682 | `(modify-phases ,phases |
| 15683 | (add-after 'unpack 'use-latest-javaewah-API |
| 15684 | (lambda _ |
| 15685 | (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java" |
| 15686 | (("wordinbits") "WORD_IN_BITS")))))))) |
| 15687 | (inputs |
| 15688 | (list java-javaewah java-jsch java-slf4j-api)))) |
| 15689 | |
| 15690 | (define-public abcl |
| 15691 | (package |
| 15692 | (name "abcl") |
| 15693 | (version "1.9.3") |
| 15694 | (source |
| 15695 | (origin |
| 15696 | (method url-fetch) |
| 15697 | (uri (string-append "https://abcl.org/releases/" |
| 15698 | version "/abcl-src-" version ".tar.gz")) |
| 15699 | (sha256 |
| 15700 | (base32 |
| 15701 | "1zxjpwv98bq2yd5qg08sbkajj17m7b8xmzqhw296161s7lia215v")) |
| 15702 | (patches |
| 15703 | (search-patches |
| 15704 | "abcl-fix-build-xml.patch")))) |
| 15705 | (build-system ant-build-system) |
| 15706 | (native-inputs |
| 15707 | (list java-junit)) |
| 15708 | (arguments |
| 15709 | `(#:build-target "abcl.jar" |
| 15710 | #:test-target "abcl.test" |
| 15711 | #:phases |
| 15712 | (modify-phases %standard-phases |
| 15713 | (replace 'install |
| 15714 | (lambda* (#:key outputs #:allow-other-keys) |
| 15715 | (let ((share (string-append (assoc-ref outputs "out") |
| 15716 | "/share/java/")) |
| 15717 | (bin (string-append (assoc-ref outputs "out") |
| 15718 | "/bin/"))) |
| 15719 | (mkdir-p share) |
| 15720 | (install-file "dist/abcl.jar" share) |
| 15721 | (install-file "dist/abcl-contrib.jar" share) |
| 15722 | (mkdir-p bin) |
| 15723 | (with-output-to-file (string-append bin "abcl") |
| 15724 | (lambda _ |
| 15725 | (let ((classpath (string-append |
| 15726 | share "abcl.jar" |
| 15727 | ":" |
| 15728 | share "abcl-contrib.jar"))) |
| 15729 | (display (string-append |
| 15730 | "#!" (which "bash") "\n" |
| 15731 | "if [[ -z $CLASSPATH ]]; then\n" |
| 15732 | " cp=\"" classpath "\"\n" |
| 15733 | "else\n" |
| 15734 | " cp=\"" classpath ":$CLASSPATH\"\n" |
| 15735 | "fi\n" |
| 15736 | "exec " (which "java") |
| 15737 | " -cp \"$cp\" org.armedbear.lisp.Main \"$@\"\n"))))) |
| 15738 | (chmod (string-append bin "abcl") #o755) |
| 15739 | #t)))))) |
| 15740 | (home-page "https://abcl.org/") |
| 15741 | (synopsis "Common Lisp Implementation on the JVM") |
| 15742 | (description |
| 15743 | "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common |
| 15744 | Lisp language featuring both an interpreter and a compiler, running in the |
| 15745 | JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine |
| 15746 | in any Java application. Additionally, it can be used to implement (parts of) |
| 15747 | the application using Java to Lisp integration APIs.") |
| 15748 | (native-search-paths |
| 15749 | (list (search-path-specification |
| 15750 | (variable "XDG_DATA_DIRS") |
| 15751 | (files '("share"))))) |
| 15752 | (license (list license:gpl2+ |
| 15753 | ;; named-readtables is released under 3 clause BSD |
| 15754 | license:bsd-3 |
| 15755 | ;; jfli is released under CPL 1.0 |
| 15756 | license:cpl1.0)))) |
| 15757 | |
| 15758 | (define-public java-jsonp-api |
| 15759 | (package |
| 15760 | (name "java-jsonp-api") |
| 15761 | (version "1.1.6") |
| 15762 | (source (origin |
| 15763 | (method git-fetch) |
| 15764 | (uri (git-reference |
| 15765 | (url "https://github.com/eclipse-ee4j/jsonp") |
| 15766 | (commit (string-append "1.1-" version "-RELEASE")))) |
| 15767 | (file-name (git-file-name name version)) |
| 15768 | (sha256 |
| 15769 | (base32 |
| 15770 | "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc")))) |
| 15771 | (build-system ant-build-system) |
| 15772 | (arguments |
| 15773 | `(#:jar-name "jsonp-api.jar" |
| 15774 | #:tests? #f |
| 15775 | #:source-dir "api/src/main/java" |
| 15776 | #:test-dir "api/src/test")) |
| 15777 | (home-page "https://eclipse-ee4j.github.io/jsonp/") |
| 15778 | (synopsis "JSON Processing in Java") |
| 15779 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. |
| 15780 | parse, generate, transform and query) JSON messages. It produces and |
| 15781 | consumes JSON text in a streaming fashion (similar to StAX API for XML) |
| 15782 | and allows building a Java object model for JSON text using API classes |
| 15783 | (similar to DOM API for XML).") |
| 15784 | ;; either gpl2 only with classpath exception, or epl2.0. |
| 15785 | (license (list license:gpl2 |
| 15786 | license:epl2.0)))) |
| 15787 | |
| 15788 | (define-public java-jsonp-impl |
| 15789 | (package |
| 15790 | (inherit java-jsonp-api) |
| 15791 | (name "java-jsonp-impl") |
| 15792 | (arguments |
| 15793 | `(#:jar-name "jsonp-impl.jar" |
| 15794 | #:tests? #f |
| 15795 | #:source-dir "impl/src/main/java" |
| 15796 | #:test-dir "impl/src/test" |
| 15797 | #:phases |
| 15798 | (modify-phases %standard-phases |
| 15799 | (add-before 'build 'copy-resources |
| 15800 | (lambda _ |
| 15801 | (copy-recursively |
| 15802 | "impl/src/main/resources/" |
| 15803 | "build/classes") |
| 15804 | #t))))) |
| 15805 | (propagated-inputs |
| 15806 | (list java-jsonp-api)) |
| 15807 | (description "JSON Processing (JSON-P) is a Java API to process (e.g. |
| 15808 | parse, generate, transform and query) JSON messages. This package contains |
| 15809 | a reference implementation of that API."))) |
| 15810 | |
| 15811 | (define-public java-jakarta-json |
| 15812 | (package |
| 15813 | (name "java-jakarta-json") |
| 15814 | (version "2.1.3") |
| 15815 | (source (origin |
| 15816 | (method git-fetch) |
| 15817 | (uri (git-reference |
| 15818 | (url "https://github.com/jakartaee/jsonp-api") |
| 15819 | (commit (string-append version "-RELEASE")))) |
| 15820 | (file-name (git-file-name name version)) |
| 15821 | (sha256 |
| 15822 | (base32 |
| 15823 | "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f")))) |
| 15824 | (build-system ant-build-system) |
| 15825 | (arguments |
| 15826 | `(#:jar-name "jakarta-json.jar" |
| 15827 | #:source-dir "api/src/main/java" |
| 15828 | #:tests? #f; no tests |
| 15829 | #:jdk ,openjdk11)) |
| 15830 | (home-page "https://github.com/jakartaee/jsonp-api") |
| 15831 | (synopsis "Portable API for JSON handling in Java") |
| 15832 | (description "This project contains API and Compatible Implementation of |
| 15833 | Jakarta JSON Processing specification. Jakarta JSON Processing provides |
| 15834 | portable APIs to parse, generate, transform, and query JSON documents.") |
| 15835 | ;; with classpath exception |
| 15836 | (license license:epl2.0))) |
| 15837 | |
| 15838 | (define-public java-parsson |
| 15839 | (package |
| 15840 | (name "java-parsson") |
| 15841 | (version "1.1.5") |
| 15842 | (source (origin |
| 15843 | (method git-fetch) |
| 15844 | (uri (git-reference |
| 15845 | (url "https://github.com/eclipse-ee4j/parsson") |
| 15846 | (commit version))) |
| 15847 | (file-name (git-file-name name version)) |
| 15848 | (sha256 |
| 15849 | (base32 |
| 15850 | "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p")))) |
| 15851 | (build-system ant-build-system) |
| 15852 | (arguments |
| 15853 | `(#:jar-name "parsson.jar" |
| 15854 | #:source-dir "impl/src/main/java" |
| 15855 | #:test-dir "impl/src/test" |
| 15856 | #:use-java-modules? #t |
| 15857 | #:jdk ,openjdk11 |
| 15858 | #:phases |
| 15859 | (modify-phases %standard-phases |
| 15860 | (add-after 'unpack 'copy-resources |
| 15861 | (lambda _ |
| 15862 | (copy-recursively "impl/src/main/resources" |
| 15863 | "build/classes")))))) |
| 15864 | (inputs |
| 15865 | (list java-jakarta-json)) |
| 15866 | (native-inputs |
| 15867 | (list java-junit)) |
| 15868 | (home-page "https://github.com/eclipse-ee4j/parsson") |
| 15869 | (synopsis "Implementation of Jakarta JSON API") |
| 15870 | (description "Eclipse Parsson is an implementation of the Jakarta JSON |
| 15871 | Processing specification.") |
| 15872 | ;; with classpath exception |
| 15873 | (license license:epl2.0))) |
| 15874 | |
| 15875 | (define-public java-jakarta-annotations-api |
| 15876 | (package |
| 15877 | (name "java-jakarta-annotations-api") |
| 15878 | (version "2.1.1") |
| 15879 | (source (origin |
| 15880 | (method git-fetch) |
| 15881 | (uri (git-reference |
| 15882 | (url "https://github.com/jakartaee/common-annotations-api") |
| 15883 | (commit version))) |
| 15884 | (file-name (git-file-name name version)) |
| 15885 | (sha256 |
| 15886 | (base32 |
| 15887 | "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6")))) |
| 15888 | (build-system ant-build-system) |
| 15889 | (arguments |
| 15890 | `(#:jar-name "jakarta-annotations-api.jar" |
| 15891 | #:source-dir "api/src/main/java" |
| 15892 | #:tests? #f; no tests |
| 15893 | #:jdk ,openjdk11)) |
| 15894 | (home-page "https://github.com/jakartaee/common-annotations-api") |
| 15895 | (synopsis "Collection of Java annotations") |
| 15896 | (description "Jakarta Annotations defines a collection of annotations |
| 15897 | representing common semantic concepts that enable a declarative style of |
| 15898 | programming that applies across a variety of Java technologies.") |
| 15899 | ;; with classpath exception |
| 15900 | (license (list license:epl2.0 |
| 15901 | license:gpl2)))) |
| 15902 | |
| 15903 | (define-public java-xmp |
| 15904 | (package |
| 15905 | (name "java-xmp") |
| 15906 | (version "5.1.3") |
| 15907 | (source (origin |
| 15908 | (method url-fetch) |
| 15909 | (uri (string-append "http://download.macromedia.com/pub/developer" |
| 15910 | "/xmp/sdk/XMPCoreJava-" version ".zip")) |
| 15911 | (sha256 |
| 15912 | (base32 |
| 15913 | "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7")))) |
| 15914 | (build-system ant-build-system) |
| 15915 | (arguments |
| 15916 | `(#:build-target "build" |
| 15917 | #:tests? #f; no tests |
| 15918 | #:phases |
| 15919 | (modify-phases %standard-phases |
| 15920 | (add-after 'unpack 'chdir |
| 15921 | (lambda _ |
| 15922 | (chdir "XMPCore") |
| 15923 | #t)) |
| 15924 | (add-before 'build 'fix-timestamp |
| 15925 | (lambda _ |
| 15926 | (substitute* "build.xml" |
| 15927 | (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT")) |
| 15928 | #t)) |
| 15929 | (replace 'install |
| 15930 | (install-jars ".")) |
| 15931 | (add-after 'install 'install-doc |
| 15932 | (lambda* (#:key outputs #:allow-other-keys) |
| 15933 | (copy-recursively |
| 15934 | "docs" |
| 15935 | (string-append (assoc-ref outputs "out") "/share/doc/java-xmp")) |
| 15936 | #t))))) |
| 15937 | (native-inputs |
| 15938 | (list unzip)) |
| 15939 | (home-page "https://www.adobe.com/devnet/xmp.html") |
| 15940 | (synopsis "Extensible Metadat Platform (XMP) support in Java") |
| 15941 | (description "Adobe's Extensible Metadata Platform (XMP) is a labeling |
| 15942 | technology that allows you to embed data about a file, known as metadata, |
| 15943 | into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore |
| 15944 | library and the API is similar.") |
| 15945 | (license license:bsd-3))) |
| 15946 | |
| 15947 | (define-public java-args4j |
| 15948 | (package |
| 15949 | (name "java-args4j") |
| 15950 | (version "2.33") |
| 15951 | (source (origin |
| 15952 | (method git-fetch) |
| 15953 | (uri (git-reference |
| 15954 | (url "https://github.com/kohsuke/args4j") |
| 15955 | (commit (string-append "args4j-site-" version)))) |
| 15956 | (file-name (git-file-name name version)) |
| 15957 | (sha256 |
| 15958 | (base32 |
| 15959 | "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s")))) |
| 15960 | (build-system ant-build-system) |
| 15961 | (arguments |
| 15962 | `(#:jar-name "args4j.jar" |
| 15963 | #:source-dir "args4j/src" |
| 15964 | #:test-dir "args4j/test" |
| 15965 | #:test-exclude |
| 15966 | (list "**/ExampleTest.*" |
| 15967 | "**/ExternalConfiguredTest.*" ; fails to find a file |
| 15968 | ;; We still don't want to run abstract classes |
| 15969 | "**/Abstract*.*") |
| 15970 | #:phases |
| 15971 | (modify-phases %standard-phases |
| 15972 | (add-before 'check 'fix-test-dir |
| 15973 | (lambda _ |
| 15974 | (substitute* "build.xml" |
| 15975 | (("/java\">") "\">")) |
| 15976 | #t)) |
| 15977 | (add-before 'build 'copy-resources |
| 15978 | (lambda _ |
| 15979 | (let ((from-prefix "args4j/src/org/kohsuke/args4j/") |
| 15980 | (to-prefix "build/classes/org/kohsuke/args4j/")) |
| 15981 | (for-each (lambda (f) |
| 15982 | (install-file |
| 15983 | (string-append from-prefix f) |
| 15984 | (string-append to-prefix (dirname f)))) |
| 15985 | (list "Messages.properties" |
| 15986 | "Messages_de.properties" |
| 15987 | "Messages_en.properties" |
| 15988 | "Messages_ru.properties" |
| 15989 | "spi/Messages.properties" |
| 15990 | "spi/Messages_de.properties" |
| 15991 | "spi/Messages_en.properties" |
| 15992 | "spi/Messages_ru.properties"))) |
| 15993 | #t))))) |
| 15994 | (native-inputs |
| 15995 | (list java-junit)) |
| 15996 | (home-page "https://args4j.kohsuke.org/") |
| 15997 | (synopsis "Command line parser library") |
| 15998 | (description "Args4j is a small Java class library that makes it easy to |
| 15999 | parse command line options/arguments in your CUI application.") |
| 16000 | (license license:expat))) |
| 16001 | |
| 16002 | (define-public java-argparse4j |
| 16003 | (package |
| 16004 | (name "java-argparse4j") |
| 16005 | (version "0.9.0") |
| 16006 | (source (origin |
| 16007 | (method git-fetch) |
| 16008 | (uri (git-reference |
| 16009 | (url "https://github.com/argparse4j/argparse4j") |
| 16010 | (commit (string-append "argparse4j-" version)))) |
| 16011 | (file-name (git-file-name name version)) |
| 16012 | (sha256 |
| 16013 | (base32 |
| 16014 | "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb")))) |
| 16015 | (build-system ant-build-system) |
| 16016 | (arguments |
| 16017 | (list #:jar-name "java-argparse4j.jar" |
| 16018 | #:source-dir "main/src/main/" |
| 16019 | #:test-dir "main/src/test/" |
| 16020 | #:jdk openjdk11 |
| 16021 | #:phases #~(modify-phases %standard-phases |
| 16022 | (add-after 'unpack 'copy-resources |
| 16023 | (lambda _ |
| 16024 | (copy-recursively "main/src/test/resources" |
| 16025 | "target/test-classes") |
| 16026 | (copy-recursively "main/src/main/resources" |
| 16027 | "build/classes"))) |
| 16028 | (replace 'install |
| 16029 | (install-from-pom "pom.xml"))))) |
| 16030 | (inputs (list java-junit)) |
| 16031 | (home-page "https://argparse4j.github.io/") |
| 16032 | (synopsis "Java command-line argument parser library") |
| 16033 | (description "Argparse4j is a command line argument parser library for |
| 16034 | Java based on Python's @code{argparse} module.") |
| 16035 | (license license:expat))) |
| 16036 | |
| 16037 | (define-public java-metadata-extractor |
| 16038 | (package |
| 16039 | (name "java-metadata-extractor") |
| 16040 | (version "2.19.0") |
| 16041 | (source (origin |
| 16042 | (method git-fetch) |
| 16043 | (uri (git-reference |
| 16044 | (url "https://github.com/drewnoakes/metadata-extractor") |
| 16045 | (commit version))) |
| 16046 | (file-name (git-file-name name version)) |
| 16047 | (sha256 |
| 16048 | (base32 |
| 16049 | "1axnw47n06a116g8bml2l6rxx92grxp935gspyhz4pz868m7hrna")))) |
| 16050 | (build-system ant-build-system) |
| 16051 | (arguments |
| 16052 | `(#:jar-name "metadata-extractor.jar" |
| 16053 | #:source-dir "Source" |
| 16054 | #:test-dir "Tests" |
| 16055 | #:phases |
| 16056 | (modify-phases %standard-phases |
| 16057 | (add-before 'build 'fix-xmp-path |
| 16058 | (lambda _ |
| 16059 | ;; This version of metadata-extractor depends on java-xmp 6, which |
| 16060 | ;; is non-free. These changes allow using java-xmp 5, which is |
| 16061 | ;; the last free-software version of java-xmp. |
| 16062 | (substitute* (find-files "." ".*.java") |
| 16063 | (("com.adobe.internal.xmp") "com.adobe.xmp")) |
| 16064 | (substitute* "Source/com/drew/metadata/xmp/XmpReader.java" |
| 16065 | (("\\.setXMPNodesToLimit.*") ";")) |
| 16066 | ;; Test failure, most likely because we use a different java-xmp |
| 16067 | ;; version. |
| 16068 | (delete-file "Tests/com/drew/metadata/xmp/XmpReaderTest.java"))) |
| 16069 | (add-before 'check 'fix-test-dir |
| 16070 | (lambda _ |
| 16071 | (substitute* "build.xml" |
| 16072 | (("/java\">") "\">")) |
| 16073 | #t))))) |
| 16074 | (propagated-inputs |
| 16075 | (list java-xmp)) |
| 16076 | (native-inputs |
| 16077 | (list java-hamcrest-core java-junit)) |
| 16078 | (home-page "https://github.com/drewnoakes/metadata-extractor") |
| 16079 | (synopsis "Extract metadata from image and video files") |
| 16080 | (description "Metadata-extractor is a straightforward Java library for |
| 16081 | reading metadata from image files. It is able to read metadata in Exif, |
| 16082 | IPTC, XMP, ICC and more formats.") |
| 16083 | (license license:asl2.0))) |
| 16084 | |
| 16085 | (define-public java-svg-salamander |
| 16086 | (package |
| 16087 | (name "java-svg-salamander") |
| 16088 | (version "1.1.2") |
| 16089 | (source (origin |
| 16090 | (method git-fetch) |
| 16091 | (uri (git-reference |
| 16092 | (url "https://github.com/blackears/svgSalamander") |
| 16093 | (commit (string-append "v" version)))) |
| 16094 | (file-name (git-file-name name version)) |
| 16095 | (sha256 |
| 16096 | (base32 |
| 16097 | "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf")) |
| 16098 | (modules '((guix build utils))) |
| 16099 | (snippet |
| 16100 | '(begin |
| 16101 | (for-each delete-file (find-files "." ".*.jar")) |
| 16102 | #t)) |
| 16103 | (patches |
| 16104 | (search-patches "java-svg-salamander-Fix-non-det.patch")))) |
| 16105 | (build-system ant-build-system) |
| 16106 | (arguments |
| 16107 | `(#:tests? #f; no tests |
| 16108 | #:phases |
| 16109 | (modify-phases %standard-phases |
| 16110 | (add-after 'unpack 'chdir |
| 16111 | (lambda _ |
| 16112 | (chdir "svg-core") |
| 16113 | #t)) |
| 16114 | (add-before 'build 'copy-jars |
| 16115 | (lambda* (#:key inputs #:allow-other-keys) |
| 16116 | (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$")) |
| 16117 | "../libraries/javacc.jar") |
| 16118 | (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$")) |
| 16119 | "../libraries/ant.jar") |
| 16120 | #t)) |
| 16121 | (replace 'install |
| 16122 | (install-jars "dist"))))) |
| 16123 | (native-inputs |
| 16124 | (list javacc)) |
| 16125 | (home-page "https://github.com/blackears/svgSalamander") |
| 16126 | (synopsis "SVG engine for Java") |
| 16127 | (description "SVG Salamander is an SVG engine for Java that's designed |
| 16128 | to be small, fast, and allow programmers to use it with a minimum of fuss. |
| 16129 | It's in particular targeted for making it easy to integrate SVG into Java |
| 16130 | games and making it much easier for artists to design 2D game content - from |
| 16131 | rich interactive menus to charts and graphcs to complex animations.") |
| 16132 | (license license:bsd-2))) |
| 16133 | |
| 16134 | (define-public java-jboss-transaction-api-spec |
| 16135 | (package |
| 16136 | (name "java-jboss-transaction-api-spec") |
| 16137 | (version "1.2+1.1.1") |
| 16138 | (source (origin |
| 16139 | (method git-fetch) |
| 16140 | (uri (git-reference |
| 16141 | (url "https://github.com/jboss/jboss-transaction-api_spec") |
| 16142 | (commit "jboss-transaction-api_1.2_spec-1.1.1.Final"))) |
| 16143 | (file-name (git-file-name name version)) |
| 16144 | (sha256 |
| 16145 | (base32 |
| 16146 | "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy")))) |
| 16147 | (build-system ant-build-system) |
| 16148 | (arguments |
| 16149 | `(#:jar-name "java-jboss-transaction-api_spec.jar" |
| 16150 | #:source-dir "src/main/java" |
| 16151 | #:tests? #f)); no tests |
| 16152 | (inputs |
| 16153 | (list java-cdi-api java-jboss-interceptors-api-spec)) |
| 16154 | (home-page "https://github.com/jboss/jboss-transaction-api_spec") |
| 16155 | (synopsis "Generic transaction management API in Java") |
| 16156 | (description "Java-jboss-transaction-api-spec implements the Transactions |
| 16157 | API. A transaction is a unit of work containing one or more operations |
| 16158 | involving one or more shared resources having ACID (Atomicity, Consistency, |
| 16159 | Isolation and Durability) properties.") |
| 16160 | ;; either gpl2 only with classpath exception or cddl. |
| 16161 | (license (list license:gpl2 license:cddl1.0)))) |
| 16162 | |
| 16163 | (define-public java-picocli |
| 16164 | (package |
| 16165 | (name "java-picocli") |
| 16166 | (version "4.3.2") |
| 16167 | (source (origin |
| 16168 | (method git-fetch) |
| 16169 | (uri (git-reference |
| 16170 | (url "https://github.com/remkop/picocli") |
| 16171 | (commit (string-append "v" version)))) |
| 16172 | (file-name (git-file-name name version)) |
| 16173 | (sha256 |
| 16174 | (base32 |
| 16175 | "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c")))) |
| 16176 | (build-system ant-build-system) |
| 16177 | (arguments |
| 16178 | `(#:jar-name "picocli.jar" |
| 16179 | #:source-dir "src/main/java" |
| 16180 | ;; Tests require missing dependencies (junitparams, system-rules) |
| 16181 | #:tests? #f)) |
| 16182 | (home-page "https://picocli.info") |
| 16183 | (synopsis "REPL for the JVM") |
| 16184 | (description "Picocli is a framework for building command line applications |
| 16185 | for the JVM. It supports colors, autocompletion, subcommands, and more. Written |
| 16186 | in Java, usable from Groovy, Kotlin, Scala, etc.") |
| 16187 | (license license:asl2.0))) |
| 16188 | |
| 16189 | (define-public java-pj |
| 16190 | (package |
| 16191 | (name "java-pj") |
| 16192 | (version "20150107") |
| 16193 | (source (origin |
| 16194 | (method url-fetch) |
| 16195 | (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc" |
| 16196 | version ".jar")) |
| 16197 | (sha256 |
| 16198 | (base32 |
| 16199 | "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3")) |
| 16200 | (modules '((guix build utils))) |
| 16201 | (snippet |
| 16202 | '(for-each delete-file |
| 16203 | (find-files "." "\\.class$"))))) |
| 16204 | (build-system ant-build-system) |
| 16205 | (arguments |
| 16206 | (list |
| 16207 | #:tests? #false ;there are none |
| 16208 | #:phases |
| 16209 | #~(modify-phases %standard-phases |
| 16210 | (add-after 'unpack 'chdir |
| 16211 | (lambda _ (chdir "src/pj"))) |
| 16212 | (add-after 'chdir 'patch-source-directory |
| 16213 | (lambda _ |
| 16214 | (substitute* "compile" |
| 16215 | (("SRCDIR1=/home/ark/public_html/pj/lib") |
| 16216 | (string-append "SRCDIR1=" (getcwd) "/lib"))))) |
| 16217 | (replace 'build |
| 16218 | (lambda _ |
| 16219 | (invoke "bash" "./compile" "linux") |
| 16220 | (with-directory-excursion "lib" |
| 16221 | (apply invoke "jar" "cf" (string-append "pj" #$version ".jar") |
| 16222 | (find-files "." "\\.class$"))))) |
| 16223 | (replace 'install (install-jars "."))))) |
| 16224 | (home-page "https://www.cs.rit.edu/~ark/pj.shtml") |
| 16225 | (synopsis "Parallel programming in Java") |
| 16226 | (description "Parallel Java (PJ) is an API and middleware for parallel |
| 16227 | programming in 100% Java on shared memory multiprocessor (SMP) parallel |
| 16228 | computers, cluster parallel computers, and hybrid SMP cluster parallel |
| 16229 | computers.") |
| 16230 | (license license:gpl3+))) |
| 16231 | |
| 16232 | (define-public java-jetbrains-annotations |
| 16233 | (package |
| 16234 | (name "java-jetbrains-annotations") |
| 16235 | (version "19.0.0") |
| 16236 | (source (origin |
| 16237 | (method git-fetch) |
| 16238 | (uri (git-reference |
| 16239 | (url "https://github.com/JetBrains/java-annotations") |
| 16240 | (commit version))) |
| 16241 | (file-name (git-file-name name version)) |
| 16242 | (sha256 |
| 16243 | (base32 |
| 16244 | "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v")))) |
| 16245 | (build-system ant-build-system) |
| 16246 | (arguments |
| 16247 | `(#:jar-name "jetbrains-annotations.jar" |
| 16248 | #:source-dir "common/src/main/java:java8/src/main/java" |
| 16249 | #:tests? #f)); no tests |
| 16250 | (home-page "https://github.com/JetBrains/java-annotations") |
| 16251 | (synopsis "Annotations for Java and other JVM languages") |
| 16252 | (description "This package contains a set of Java annotations which can be |
| 16253 | used in JVM-based languages. They serve as an additional documentation and |
| 16254 | can be interpreted by IDEs and static analysis tools to improve code analysis.") |
| 16255 | (license license:expat))) |
| 16256 | |
| 16257 | (define-public java-javaparser |
| 16258 | (package |
| 16259 | (name "java-javaparser") |
| 16260 | (version "3.16.1") |
| 16261 | (source (origin |
| 16262 | (method git-fetch) |
| 16263 | (uri (git-reference |
| 16264 | (url "https://github.com/javaparser/javaparser") |
| 16265 | (commit (string-append "javaparser-parent-" version)))) |
| 16266 | (file-name (git-file-name name version)) |
| 16267 | (sha256 |
| 16268 | (base32 |
| 16269 | "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9")) |
| 16270 | (modules '((guix build utils))) |
| 16271 | (snippet |
| 16272 | '(begin |
| 16273 | (for-each delete-file |
| 16274 | (find-files "." "\\.jar$")) |
| 16275 | #t)))) |
| 16276 | (build-system ant-build-system) |
| 16277 | (arguments |
| 16278 | `(#:tests? #f; tests require jbehave and junit5 |
| 16279 | #:phases |
| 16280 | (modify-phases %standard-phases |
| 16281 | (add-before 'build 'fill-template |
| 16282 | (lambda _ |
| 16283 | (with-directory-excursion "javaparser-core/src/main" |
| 16284 | (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java" |
| 16285 | "java/com/github/javaparser/JavaParserBuild.java") |
| 16286 | (substitute* "java/com/github/javaparser/JavaParserBuild.java" |
| 16287 | (("\\$\\{project.version\\}") ,version) |
| 16288 | (("\\$\\{project.name\\}") "javaparser") |
| 16289 | (("\\$\\{project.build.finalName\\}") "javaparser") |
| 16290 | (("\\$\\{maven.version\\}") "fake") |
| 16291 | (("\\$\\{maven.build.version\\}") "fake") |
| 16292 | (("\\$\\{build.timestamp\\}") "0") |
| 16293 | (("\\$\\{java.vendor\\}") "Guix") |
| 16294 | (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix") |
| 16295 | (("\\$\\{java.version\\}") "1.8") |
| 16296 | (("\\$\\{os.arch\\}") "any") |
| 16297 | (("\\$\\{os.name\\}") "Guix") |
| 16298 | (("\\$\\{os.version\\}") "not available"))) |
| 16299 | #t)) |
| 16300 | (add-before 'build 'generate-javacc |
| 16301 | (lambda _ |
| 16302 | (with-directory-excursion "javaparser-core/src/main/java" |
| 16303 | (invoke "java" "javacc" "../javacc/java.jj")) |
| 16304 | #t)) |
| 16305 | (add-before 'build 'copy-javacc-support |
| 16306 | (lambda _ |
| 16307 | (with-directory-excursion "javaparser-core/src/main" |
| 16308 | (copy-recursively "javacc-support" "java")) |
| 16309 | #t)) |
| 16310 | (replace 'build |
| 16311 | (lambda _ |
| 16312 | (define (build name) |
| 16313 | (format #t "Building ~a~%" name) |
| 16314 | (delete-file-recursively "build/classes") |
| 16315 | (mkdir-p "build/classes") |
| 16316 | (apply invoke "javac" |
| 16317 | "-cp" (string-append (getenv "CLASSPATH") ":" |
| 16318 | (string-join (find-files "build/jar" ".") |
| 16319 | ":")) |
| 16320 | "-d" "build/classes" |
| 16321 | (find-files (string-append name "/src/main/java") |
| 16322 | ".*.java")) |
| 16323 | (invoke "jar" "-cf" (string-append "build/jar/" name ".jar") |
| 16324 | "-C" "build/classes" ".")) |
| 16325 | (mkdir-p "build/classes") |
| 16326 | (mkdir-p "build/test-classes") |
| 16327 | (mkdir-p "build/jar") |
| 16328 | (build "javaparser-core") |
| 16329 | (build "javaparser-core-serialization") |
| 16330 | (build "javaparser-core-generators") |
| 16331 | (build "javaparser-core-metamodel-generator") |
| 16332 | (build "javaparser-symbol-solver-core") |
| 16333 | #t)) |
| 16334 | (replace 'install |
| 16335 | (install-jars "build/jar"))))) |
| 16336 | (inputs |
| 16337 | (list java-guava java-jboss-javassist java-jsonp-api)) |
| 16338 | (native-inputs |
| 16339 | (list javacc)) |
| 16340 | (home-page "https://javaparser.org/") |
| 16341 | (synopsis "Parser for Java") |
| 16342 | (description |
| 16343 | "This project contains a set of libraries implementing a Java 1.0 - Java |
| 16344 | 11 Parser with advanced analysis functionalities.") |
| 16345 | (license (list |
| 16346 | ;; either lgpl or asl |
| 16347 | license:lgpl3+ |
| 16348 | license:asl2.0)))) |
| 16349 | |
| 16350 | (define-public tla2tools |
| 16351 | ;; This package was originally based on the "v1.8.0" tag, but that merely |
| 16352 | ;; points to the moving master branch. That might be because the ‘latest |
| 16353 | ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than |
| 16354 | ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0. |
| 16355 | (let* ((release "1.7.1") |
| 16356 | (revision "0") |
| 16357 | (commit "6932e19083fc6df42473464857fc1280cb5aaecc")) |
| 16358 | (package |
| 16359 | (name "tla2tools") |
| 16360 | (version (git-version release revision commit)) |
| 16361 | (source (origin |
| 16362 | (method git-fetch) |
| 16363 | (uri (git-reference |
| 16364 | (url "https://github.com/tlaplus/tlaplus") |
| 16365 | (commit commit))) |
| 16366 | (file-name (git-file-name name version)) |
| 16367 | (sha256 |
| 16368 | (base32 |
| 16369 | "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs")) |
| 16370 | (patches |
| 16371 | (search-patches "tla2tools-build-xml.patch")) |
| 16372 | (modules '((guix build utils))) |
| 16373 | (snippet |
| 16374 | '(begin |
| 16375 | ;; Remove packaged libraries (see 'replace-libs below) |
| 16376 | (for-each delete-file (find-files "." ".*.jar$")))))) |
| 16377 | (build-system ant-build-system) |
| 16378 | (arguments |
| 16379 | (let* ((tlatools "tlatools/org.lamport.tlatools/") |
| 16380 | (build-xml (string-append tlatools "customBuild.xml"))) |
| 16381 | `(#:jdk ,openjdk11 |
| 16382 | #:modules ((guix build ant-build-system) |
| 16383 | (guix build utils) |
| 16384 | (ice-9 match) |
| 16385 | (srfi srfi-26)) |
| 16386 | #:make-flags '("-f" ,build-xml) |
| 16387 | #:phases |
| 16388 | (modify-phases %standard-phases |
| 16389 | ;; Replace packed libs with references to jars in store |
| 16390 | (add-after 'unpack 'replace-libs |
| 16391 | (lambda* (#:key inputs #:allow-other-keys) |
| 16392 | (define (input-jar input) |
| 16393 | (car (find-files (assoc-ref inputs input) "\\.jar$"))) |
| 16394 | (for-each |
| 16395 | (match-lambda |
| 16396 | ((file . input) |
| 16397 | (symlink (input-jar input) |
| 16398 | (string-append ,tlatools "/lib/" file)))) |
| 16399 | '(("gson/gson-2.8.6.jar" . "java-gson") |
| 16400 | ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail") |
| 16401 | ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal") |
| 16402 | ("jline/jline-reader-3.14.1.jar" . "java-jline-reader") |
| 16403 | ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" . |
| 16404 | "java-eclipse-lsp4j-debug") |
| 16405 | ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" . |
| 16406 | "java-eclipse-lsp4j-jsonrpc") |
| 16407 | ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" . |
| 16408 | "java-eclipse-lsp4j-jsonrpc-debug") |
| 16409 | ("junit-4.12.jar" . "java-junit") |
| 16410 | ("easymock-3.3.1.jar" . "java-easymock"))) |
| 16411 | ;; Retain a tiny subset of the original X-Git-* |
| 16412 | ;; manifest values just to aid in debugging. |
| 16413 | (substitute* ,build-xml |
| 16414 | (("\\$\\{git.tag\\}") (string-append "v" ,release))))) |
| 16415 | (add-before 'check 'prepare-tests |
| 16416 | (lambda _ |
| 16417 | ;; The pcal tests write to .cfg files. |
| 16418 | (for-each (cut chmod <> #o644) |
| 16419 | (find-files (string-append ,tlatools |
| 16420 | "/test-model/pcal") |
| 16421 | "\\.cfg$")))) |
| 16422 | (replace 'install |
| 16423 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 16424 | (let* ((share (string-append (assoc-ref outputs "out") "/share/java")) |
| 16425 | (jar-name "tla2tools.jar"); set in project.properties |
| 16426 | (jar (string-append ,tlatools |
| 16427 | "/dist/" jar-name)) |
| 16428 | (java-cp (string-append share "/" jar-name)) |
| 16429 | (bin (string-append (assoc-ref outputs "out") "/bin")) |
| 16430 | (java (search-input-file inputs "/bin/java"))) |
| 16431 | (install-file jar share) |
| 16432 | (mkdir-p bin) |
| 16433 | ;; Generate wrapper scripts for bin/, which invoke common |
| 16434 | ;; commands within tla2tools.jar. Users can still invoke |
| 16435 | ;; tla2tools.jar for the rest. |
| 16436 | (for-each |
| 16437 | (match-lambda |
| 16438 | ((wrapper . class) |
| 16439 | (let ((file (string-append bin "/" wrapper))) |
| 16440 | (begin |
| 16441 | (with-output-to-file file |
| 16442 | (lambda _ |
| 16443 | (display |
| 16444 | (string-append |
| 16445 | "#!/bin/sh\n" |
| 16446 | java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\"")))) |
| 16447 | (chmod file #o755))))) |
| 16448 | ;; bin/wrapper . java-class |
| 16449 | '(("pcal" . "pcal.trans") |
| 16450 | ("tlatex" . "tla2tex.TLA") |
| 16451 | ("tla2sany" . "tla2sany.SANY") |
| 16452 | ("tlc2" . "tlc2.TLC") |
| 16453 | ("tlc2-repl" . "tlc2.REPL")))))))))) |
| 16454 | (native-inputs |
| 16455 | (list java-junit java-easymock)) |
| 16456 | (inputs |
| 16457 | (list java-javax-mail |
| 16458 | java-gson-2.8.6 |
| 16459 | java-jline-terminal |
| 16460 | java-jline-reader |
| 16461 | java-eclipse-lsp4j-jsonrpc |
| 16462 | java-eclipse-lsp4j-jsonrpc-debug |
| 16463 | java-eclipse-lsp4j-debug)) |
| 16464 | (home-page "https://lamport.azurewebsites.net/tla/tools.html") |
| 16465 | (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)") |
| 16466 | (description "TLA+ is a high-level language for modeling programs and |
| 16467 | systems---especially concurrent and distributed ones. It's based on the idea |
| 16468 | that the best way to describe things precisely is with simple |
| 16469 | mathematics. TLA+ and its tools are useful for eliminating fundamental design |
| 16470 | errors, which are hard to find and expensive to correct in code. |
| 16471 | |
| 16472 | The following TLA+ tools are available in this distribution: |
| 16473 | |
| 16474 | @itemize |
| 16475 | @item The Syntactic Analyzer: A parser and syntax checker for |
| 16476 | TLA+ specifications; |
| 16477 | @item TLC: A model checker and simulator for a subclass of \"executable\" TLA+ |
| 16478 | specifications; |
| 16479 | @item TLATeX: A program for typesetting TLA+ specifications; |
| 16480 | @item Beta test versions of 1-3 for the TLA+2 language; and |
| 16481 | @item The PlusCal translator. |
| 16482 | @end itemize") |
| 16483 | (license license:expat)))) |
| 16484 | |
| 16485 | ;;; |
| 16486 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
| 16487 | ;;; of a merge conflict, place them above by existing packages with similar |
| 16488 | ;;; functionality or similar names. |
| 16489 | ;;; |