diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-01-01 18:31:59 +0100 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-01-01 18:33:49 +0100 |
| commit | fc37076ed921e2cfb8c22cb80dc610ec493efec4 (patch) | |
| tree | 61d876ea4a4ce9fe620c871f774aac05a864b344 | |
| parent | 31b32eac3f604b6537c3dfb9d50bb4662d31e3b4 (diff) | |
Add Graalgraal
Change-Id: I0350197af84ac351031e70a63fd0d483d022bad9
| -rw-r--r-- | gnu/local.mk | 2 | ||||
| -rw-r--r-- | gnu/packages/clojure.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/compression.scm | 15 | ||||
| -rw-r--r-- | gnu/packages/graal.scm | 1815 | ||||
| -rw-r--r-- | gnu/packages/icu4c.scm | 60 | ||||
| -rw-r--r-- | gnu/packages/java-compression.scm | 93 | ||||
| -rw-r--r-- | gnu/packages/java.scm | 2133 | ||||
| -rw-r--r-- | gnu/packages/kodi.scm | 4 | ||||
| -rw-r--r-- | gnu/packages/libffi.scm | 18 | ||||
| -rw-r--r-- | gnu/packages/maths.scm | 6 | ||||
| -rw-r--r-- | gnu/packages/maven-parent-pom.scm | 203 | ||||
| -rw-r--r-- | gnu/packages/maven.scm | 1199 | ||||
| -rw-r--r-- | gnu/packages/patches/graalvm-mx-check-failed-after-join.patch | 16 | ||||
| -rw-r--r-- | gnu/packages/web.scm | 13 | ||||
| -rw-r--r-- | guix/build/maven/java.scm | 43 | ||||
| -rw-r--r-- | guix/build/maven/pom.scm | 88 |
16 files changed, 5301 insertions, 408 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 97608a1d289..25557fea162 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -343,6 +343,7 @@ GNU_SYSTEM_MODULES = \ | |||
| 343 | %D%/packages/gperf.scm \ | 343 | %D%/packages/gperf.scm \ |
| 344 | %D%/packages/gpodder.scm \ | 344 | %D%/packages/gpodder.scm \ |
| 345 | %D%/packages/gps.scm \ | 345 | %D%/packages/gps.scm \ |
| 346 | %D%/packages/graal.scm \ | ||
| 346 | %D%/packages/graph.scm \ | 347 | %D%/packages/graph.scm \ |
| 347 | %D%/packages/graphics.scm \ | 348 | %D%/packages/graphics.scm \ |
| 348 | %D%/packages/graphviz.scm \ | 349 | %D%/packages/graphviz.scm \ |
| @@ -1523,6 +1524,7 @@ dist_patch_DATA = \ | |||
| 1523 | %D%/packages/patches/gpaste-fix-paths.patch \ | 1524 | %D%/packages/patches/gpaste-fix-paths.patch \ |
| 1524 | %D%/packages/patches/gpm-glibc-2.26.patch \ | 1525 | %D%/packages/patches/gpm-glibc-2.26.patch \ |
| 1525 | %D%/packages/patches/gpodder-disable-updater.patch \ | 1526 | %D%/packages/patches/gpodder-disable-updater.patch \ |
| 1527 | %D%/packages/patches/graalvm-mx-check-failed-after-join.patch \ | ||
| 1526 | %D%/packages/patches/grantlee-fix-i586-precision.patch \ | 1528 | %D%/packages/patches/grantlee-fix-i586-precision.patch \ |
| 1527 | %D%/packages/patches/grantlee-register-metaenumvariable.patch \ | 1529 | %D%/packages/patches/grantlee-register-metaenumvariable.patch \ |
| 1528 | %D%/packages/patches/grep-timing-sensitive-test.patch \ | 1530 | %D%/packages/patches/grep-timing-sensitive-test.patch \ |
diff --git a/gnu/packages/clojure.scm b/gnu/packages/clojure.scm index a892df4dd96..048cf15c113 100644 --- a/gnu/packages/clojure.scm +++ b/gnu/packages/clojure.scm | |||
| @@ -855,6 +855,7 @@ dependency graph expansion and the creation of classpaths.") | |||
| 855 | #:doc-dirs '() | 855 | #:doc-dirs '() |
| 856 | ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory | 856 | ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory |
| 857 | #:tests? #f | 857 | #:tests? #f |
| 858 | #:jdk ,openjdk11 | ||
| 858 | #:phases | 859 | #:phases |
| 859 | (modify-phases %standard-phases | 860 | (modify-phases %standard-phases |
| 860 | ;; FIXME: Currently, the S3 transporter depends on ClojureScript, | 861 | ;; FIXME: Currently, the S3 transporter depends on ClojureScript, |
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index b6403aa37e2..e632c42b488 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm | |||
| @@ -599,6 +599,21 @@ than gzip and 15 % smaller output than bzip2.") | |||
| 599 | (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both | 599 | (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both |
| 600 | (home-page "https://tukaani.org/xz/"))) | 600 | (home-page "https://tukaani.org/xz/"))) |
| 601 | 601 | ||
| 602 | (define-public xz-for-graal-truffle | ||
| 603 | (package | ||
| 604 | (inherit xz) | ||
| 605 | (name "xz-for-graal-truffle") | ||
| 606 | (version "5.6.2") | ||
| 607 | (source (origin | ||
| 608 | (method url-fetch) | ||
| 609 | (uri (list (string-append "http://tukaani.org/xz/xz-" version | ||
| 610 | ".tar.gz") | ||
| 611 | (string-append "http://multiprecision.org/guix/xz-" | ||
| 612 | version ".tar.gz"))) | ||
| 613 | (sha256 | ||
| 614 | (base32 | ||
| 615 | "06a585qzn2qlwdv44w7x6p6x8qmbqrqzlz29y8108vyqw7021zcb")))))) | ||
| 616 | |||
| 602 | (define-public heatshrink | 617 | (define-public heatshrink |
| 603 | (package | 618 | (package |
| 604 | (name "heatshrink") | 619 | (name "heatshrink") |
diff --git a/gnu/packages/graal.scm b/gnu/packages/graal.scm new file mode 100644 index 00000000000..6714155b50a --- /dev/null +++ b/gnu/packages/graal.scm | |||
| @@ -0,0 +1,1815 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | ||
| 2 | ;;; Copyright © 2025 Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 3 | ;;; | ||
| 4 | ;;; This file is part of GNU Guix. | ||
| 5 | ;;; | ||
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | ||
| 7 | ;;; under the terms of the GNU General Public License as published by | ||
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 9 | ;;; your option) any later version. | ||
| 10 | ;;; | ||
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | ||
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | ;;; GNU General Public License for more details. | ||
| 15 | ;;; | ||
| 16 | ;;; You should have received a copy of the GNU General Public License | ||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | (define-module (gnu packages graal) | ||
| 20 | #:use-module ((guix licenses) #:prefix license:) | ||
| 21 | #:use-module (guix packages) | ||
| 22 | #:use-module (guix download) | ||
| 23 | #:use-module (guix git-download) | ||
| 24 | #:use-module (guix gexp) | ||
| 25 | #:use-module (guix utils) | ||
| 26 | #:use-module (guix build-system gnu) | ||
| 27 | #:use-module (guix build-system copy) | ||
| 28 | #:use-module (guix build-system ant) | ||
| 29 | #:use-module (guix build-system maven) | ||
| 30 | #:use-module (gnu packages) | ||
| 31 | #:use-module (gnu packages maven) | ||
| 32 | #:use-module (gnu packages maven-parent-pom) | ||
| 33 | #:use-module (gnu packages bash) | ||
| 34 | #:use-module (gnu packages java) | ||
| 35 | #:use-module (gnu packages python) | ||
| 36 | #:use-module (gnu packages compression) | ||
| 37 | #:use-module (gnu packages icu4c) | ||
| 38 | #:use-module (gnu packages java-compression) | ||
| 39 | #:use-module (gnu packages libffi) | ||
| 40 | #:use-module (gnu packages ninja) | ||
| 41 | #:use-module (gnu packages cmake) | ||
| 42 | #:use-module (gnu packages version-control)) | ||
| 43 | |||
| 44 | ;;; | ||
| 45 | ;;; GraalVM build tool and components | ||
| 46 | ;;; | ||
| 47 | |||
| 48 | ;; The Universal Permissive License (UPL) 1.0 is an FSF-approved, | ||
| 49 | ;; GPL-compatible, permissive free software license. | ||
| 50 | ;; See: <https://www.fsf.org/blogs/licensing/universal-permissive-license-added-to-license-list> | ||
| 51 | (define upl1.0 | ||
| 52 | (license:non-copyleft "https://opensource.org/licenses/UPL" | ||
| 53 | "Universal Permissive License 1.0")) | ||
| 54 | |||
| 55 | ;;; Shared version and source definitions | ||
| 56 | |||
| 57 | (define %graalvm-version "25.0.1") | ||
| 58 | |||
| 59 | ;; Main graal repository source (used by sdk, truffle) | ||
| 60 | (define %graal-source | ||
| 61 | (origin | ||
| 62 | (method git-fetch) | ||
| 63 | (uri (git-reference | ||
| 64 | (url "https://github.com/oracle/graal") | ||
| 65 | (commit (string-append "vm-" %graalvm-version)))) | ||
| 66 | (file-name (git-file-name "graal" %graalvm-version)) | ||
| 67 | (sha256 | ||
| 68 | (base32 "06m8nbjrjawn5falr7fzgsqqav23zapzhc5f774320cdjbj90zvx")) | ||
| 69 | (modules '((guix build utils))) | ||
| 70 | (snippet | ||
| 71 | #~(begin | ||
| 72 | (use-modules (guix build utils)) | ||
| 73 | ;; Use GCC toolchain instead of clang | ||
| 74 | (substitute* '("sdk/mx.sdk/mx_sdk_vm_impl.py" | ||
| 75 | "sdk/mx.sdk/mx_sdk_vm_ng.py") | ||
| 76 | (("sdk:LLVM_NINJA_TOOLCHAIN") "mx:DEFAULT_NINJA_TOOLCHAIN")) | ||
| 77 | (substitute* '("sdk/mx.sdk/suite.py" | ||
| 78 | "truffle/mx.truffle/suite.py") | ||
| 79 | (("\"toolchain\"\\s*:\\s*\"sdk:LLVM_NINJA_TOOLCHAIN\"") | ||
| 80 | "\"toolchain\": \"mx:DEFAULT_NINJA_TOOLCHAIN\"")) | ||
| 81 | ;; Remove clang-specific flags that GCC doesn't understand. | ||
| 82 | (substitute* '("sdk/mx.sdk/suite.py" | ||
| 83 | "sdk/mx.sdk/mx_sdk_vm_impl.py" | ||
| 84 | "sdk/mx.sdk/mx_sdk_vm_ng.py") | ||
| 85 | (("-stdlib=libc\\+\\+") "") | ||
| 86 | (("-static-libstdc\\+\\+") "") | ||
| 87 | (("-l:libc\\+\\+abi\\.a") "")) | ||
| 88 | ;; Fix missing #include <memory> for GCC. | ||
| 89 | (substitute* "sdk/src/org.graalvm.launcher.native/src/launcher.cc" | ||
| 90 | (("#include <sys/stat.h>") | ||
| 91 | "#include <sys/stat.h> | ||
| 92 | #include <memory>")) | ||
| 93 | ;; Patch the libffi bootstrap Makefile patch to use bash explicitly. | ||
| 94 | (substitute* "truffle/src/libffi/patches/others/0001-Add-mx-bootstrap-Makefile.patch" | ||
| 95 | (("\\.\\./(\\$\\(SOURCES\\))/configure" all sources) | ||
| 96 | (string-append "$(SHELL) ../" sources "/configure"))))))) | ||
| 97 | |||
| 98 | ;;; | ||
| 99 | ;;; MX URL Rewrite Helpers | ||
| 100 | ;;; | ||
| 101 | ;;; The mx build tool downloads dependencies from Maven and other URLs. | ||
| 102 | ;;; MX_URLREWRITES redirects these to Guix-built JARs with computed SHA512 digests. | ||
| 103 | |||
| 104 | ;; Build MX_URLREWRITES JSON from a list of rewrite specifications. | ||
| 105 | ;; Each spec is: (maven-url path-pattern) | ||
| 106 | ;; maven-url: the URL mx tries to fetch | ||
| 107 | ;; path-pattern: pattern for search-input-file, or input key for assoc-ref if no "/" | ||
| 108 | (define (make-mx-urlrewrites-phase specs) | ||
| 109 | #~(lambda* (#:key inputs #:allow-other-keys) | ||
| 110 | (use-modules (ice-9 popen) (ice-9 rdelim)) | ||
| 111 | (define (file-sha512 path) | ||
| 112 | (let* ((port (open-pipe* OPEN_READ "sha512sum" "--" path)) | ||
| 113 | (line (read-line port))) | ||
| 114 | (close-pipe port) | ||
| 115 | (car (string-split line #\space)))) | ||
| 116 | (define (resolve-path path-pattern) | ||
| 117 | (if (string-index path-pattern #\/) | ||
| 118 | (search-input-file inputs path-pattern) | ||
| 119 | (assoc-ref inputs path-pattern))) | ||
| 120 | (define (make-rewrite spec) | ||
| 121 | (let* ((maven-url (car spec)) | ||
| 122 | (path-pattern (cadr spec)) | ||
| 123 | (local-path (resolve-path path-pattern)) | ||
| 124 | (sha512 (file-sha512 local-path))) | ||
| 125 | (format #f "{\"~a\":{\"replacement\":\"file://~a\",\"digest\":\"sha512:~a\"}}" | ||
| 126 | maven-url local-path sha512))) | ||
| 127 | (let ((rewrites (string-append "[" (string-join (map make-rewrite '#$specs) ",") "]"))) | ||
| 128 | (format #t "Setting MX_URLREWRITES:~%~a~%" rewrites) | ||
| 129 | (setenv "MX_URLREWRITES" rewrites)))) | ||
| 130 | |||
| 131 | ;; Build install phase that uses `mx paths` to find distribution JARs. | ||
| 132 | ;; dists: list of distribution names (e.g., '("GRAAL_SDK" "WORD")) | ||
| 133 | ;; subdir: output subdirectory under lib/ (default "graal") | ||
| 134 | (define* (make-mx-install-phase dists #:optional (subdir "graal")) | ||
| 135 | #~(lambda* (#:key outputs #:allow-other-keys) | ||
| 136 | (use-modules (ice-9 popen) (ice-9 rdelim)) | ||
| 137 | (define (mx-paths dist) | ||
| 138 | (let* ((port (open-pipe* OPEN_READ "mx" "--user-home" (getcwd) "paths" dist)) | ||
| 139 | (path (read-line port))) | ||
| 140 | (close-pipe port) | ||
| 141 | path)) | ||
| 142 | (let* ((out (assoc-ref outputs "out")) | ||
| 143 | (lib (string-append out "/lib/" #$subdir))) | ||
| 144 | (mkdir-p lib) | ||
| 145 | (for-each (lambda (dist) | ||
| 146 | (let ((jar (mx-paths dist))) | ||
| 147 | (format #t "Installing ~a -> ~a~%" dist jar) | ||
| 148 | (install-file jar lib))) | ||
| 149 | '#$dists)))) | ||
| 150 | |||
| 151 | ;; Install mx distributions as Maven artifacts in /lib/m2 format. | ||
| 152 | ;; mapping: list of (mx-dist-name group-id artifact-id [dependencies]) entries | ||
| 153 | ;; where dependencies is an optional list of (dep-group-id dep-artifact-id) | ||
| 154 | ;; version: the version string for Maven coordinates | ||
| 155 | (define* (make-mx-install-m2-phase mapping version) | ||
| 156 | #~(lambda* (#:key outputs #:allow-other-keys) | ||
| 157 | (use-modules (ice-9 popen) (ice-9 rdelim) | ||
| 158 | (sxml simple)) | ||
| 159 | (define (mx-paths dist) | ||
| 160 | (let* ((port (open-pipe* OPEN_READ "mx" "--user-home" (getcwd) "paths" dist)) | ||
| 161 | (path (read-line port))) | ||
| 162 | (close-pipe port) | ||
| 163 | path)) | ||
| 164 | (define (install-maven-artifact mx-dist group-id artifact-id deps) | ||
| 165 | (let* ((out (assoc-ref outputs "out")) | ||
| 166 | (jar (mx-paths mx-dist)) | ||
| 167 | (m2-dir (string-append out "/lib/m2/" | ||
| 168 | (string-join (string-split group-id #\.) "/") "/" | ||
| 169 | artifact-id "/" #$version)) | ||
| 170 | (jar-name (string-append artifact-id "-" #$version ".jar")) | ||
| 171 | (pom-name (string-append artifact-id "-" #$version ".pom")) | ||
| 172 | (dep-sxml (map (lambda (dep) | ||
| 173 | `(dependency | ||
| 174 | (groupId ,(car dep)) | ||
| 175 | (artifactId ,(cadr dep)) | ||
| 176 | (version ,#$version))) | ||
| 177 | deps))) | ||
| 178 | (format #t "Installing ~a -> ~a/~a~%" mx-dist m2-dir jar-name) | ||
| 179 | (mkdir-p m2-dir) | ||
| 180 | (copy-file jar (string-append m2-dir "/" jar-name)) | ||
| 181 | ;; Create POM with dependencies for Maven resolution | ||
| 182 | (call-with-output-file (string-append m2-dir "/" pom-name) | ||
| 183 | (lambda (port) | ||
| 184 | (sxml->xml | ||
| 185 | `(*TOP* | ||
| 186 | (*PI* xml "version=\"1.0\"") | ||
| 187 | (project | ||
| 188 | (modelVersion "4.0.0") | ||
| 189 | (groupId ,group-id) | ||
| 190 | (artifactId ,artifact-id) | ||
| 191 | (version ,#$version) | ||
| 192 | ,@(if (null? dep-sxml) | ||
| 193 | '() | ||
| 194 | `((dependencies ,@dep-sxml))))) | ||
| 195 | port))))) | ||
| 196 | (for-each (lambda (entry) | ||
| 197 | (install-maven-artifact (list-ref entry 0) | ||
| 198 | (list-ref entry 1) | ||
| 199 | (list-ref entry 2) | ||
| 200 | (if (> (length entry) 3) | ||
| 201 | (list-ref entry 3) | ||
| 202 | '()))) | ||
| 203 | '#$mapping))) | ||
| 204 | |||
| 205 | ;; ASM bytecode manipulation library (version 9.7.1) | ||
| 206 | (define %mx-rewrites-asm | ||
| 207 | '(("https://repo1.maven.org/maven2/org/ow2/asm/asm/9.7.1/asm-9.7.1.jar" | ||
| 208 | "share/java/asm9.jar") | ||
| 209 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm/9.7.1/asm-9.7.1-sources.jar" | ||
| 210 | "share/java/asm9-sources.jar") | ||
| 211 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.7.1/asm-tree-9.7.1.jar" | ||
| 212 | "share/java/asm-tree.jar") | ||
| 213 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.7.1/asm-tree-9.7.1-sources.jar" | ||
| 214 | "share/java/asm-tree-sources.jar") | ||
| 215 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.7.1/asm-analysis-9.7.1.jar" | ||
| 216 | "share/java/asm-analysis.jar") | ||
| 217 | ;; asm-analysis sources -> binary (no sources JAR available) | ||
| 218 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.7.1/asm-analysis-9.7.1-sources.jar" | ||
| 219 | "share/java/asm-analysis.jar") | ||
| 220 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-util/9.7.1/asm-util-9.7.1.jar" | ||
| 221 | "share/java/asm-util8.jar") | ||
| 222 | ;; asm-util sources -> binary | ||
| 223 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-util/9.7.1/asm-util-9.7.1-sources.jar" | ||
| 224 | "share/java/asm-util8.jar") | ||
| 225 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.7.1/asm-commons-9.7.1.jar" | ||
| 226 | "share/java/asm-commons8.jar") | ||
| 227 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.7.1/asm-commons-9.7.1-sources.jar" | ||
| 228 | "share/java/asm-commons-sources.jar"))) | ||
| 229 | |||
| 230 | ;; ANTLR4 parser runtime (version 4.13.2) | ||
| 231 | (define %mx-rewrites-antlr | ||
| 232 | '(("https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.13.2/antlr4-runtime-4.13.2.jar" | ||
| 233 | "share/java/java-antlr4-runtime.jar") | ||
| 234 | ;; sources -> binary | ||
| 235 | ("https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.13.2/antlr4-runtime-4.13.2-sources.jar" | ||
| 236 | "share/java/java-antlr4-runtime.jar"))) | ||
| 237 | |||
| 238 | ;; ICU4J unicode library (mx wants 76.1, we provide 73.2) | ||
| 239 | (define %mx-rewrites-icu | ||
| 240 | '(("https://repo1.maven.org/maven2/com/ibm/icu/icu4j/76.1/icu4j-76.1.jar" | ||
| 241 | "share/java/icu4j.jar") | ||
| 242 | ("https://search.maven.org/remotecontent?filepath=com/ibm/icu/icu4j/76.1/icu4j-76.1.jar" | ||
| 243 | "share/java/icu4j.jar") | ||
| 244 | ("https://repo1.maven.org/maven2/com/ibm/icu/icu4j/76.1/icu4j-76.1-sources.jar" | ||
| 245 | "share/java/icu4j-sources.jar") | ||
| 246 | ("https://repo1.maven.org/maven2/com/ibm/icu/icu4j-charset/76.1/icu4j-charset-76.1.jar" | ||
| 247 | "share/java/icu4j-charset.jar") | ||
| 248 | ("https://search.maven.org/remotecontent?filepath=com/ibm/icu/icu4j-charset/76.1/icu4j-charset-76.1.jar" | ||
| 249 | "share/java/icu4j-charset.jar") | ||
| 250 | ("https://repo1.maven.org/maven2/com/ibm/icu/icu4j-charset/76.1/icu4j-charset-76.1-sources.jar" | ||
| 251 | "share/java/icu4j-charset-sources.jar"))) | ||
| 252 | |||
| 253 | ;; XZ compression library (version 1.10) | ||
| 254 | (define %mx-rewrites-xz | ||
| 255 | '(("https://repo1.maven.org/maven2/org/tukaani/xz/1.10/xz-1.10.jar" | ||
| 256 | "share/java/xz.jar") | ||
| 257 | ("https://search.maven.org/remotecontent?filepath=org/tukaani/xz/1.10/xz-1.10.jar" | ||
| 258 | "share/java/xz.jar") | ||
| 259 | ("https://repo1.maven.org/maven2/org/tukaani/xz/1.10/xz-1.10-sources.jar" | ||
| 260 | "share/java/xz-sources.jar"))) | ||
| 261 | |||
| 262 | ;; Ninja build tool | ||
| 263 | (define %mx-rewrites-ninja | ||
| 264 | '(("https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/ninja-1.10.2-linux-amd64.zip" | ||
| 265 | "share/ninja/ninja.zip"))) | ||
| 266 | |||
| 267 | ;; Hamcrest test matchers | ||
| 268 | (define %mx-rewrites-hamcrest | ||
| 269 | '(("https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" | ||
| 270 | "lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar") | ||
| 271 | ("https://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" | ||
| 272 | "lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar") | ||
| 273 | ;; sources -> binary | ||
| 274 | ("https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar" | ||
| 275 | "lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar") | ||
| 276 | ("https://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar" | ||
| 277 | "lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) | ||
| 278 | |||
| 279 | ;; libffi source tarball | ||
| 280 | (define %mx-rewrites-libffi | ||
| 281 | '(("https://github.com/libffi/libffi/releases/download/v3.4.8/libffi-3.4.8.tar.gz" | ||
| 282 | "libffi-3.4.8.tar.gz") | ||
| 283 | ("https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/libffi-3.4.8.tar.gz" | ||
| 284 | "libffi-3.4.8.tar.gz"))) | ||
| 285 | |||
| 286 | ;; JLine terminal library (version 3.28.0) | ||
| 287 | (define %mx-rewrites-jline | ||
| 288 | '(("https://repo1.maven.org/maven2/org/jline/jline-terminal/3.28.0/jline-terminal-3.28.0.jar" | ||
| 289 | "share/java/jline-terminal.jar") | ||
| 290 | ("https://repo1.maven.org/maven2/org/jline/jline-terminal/3.28.0/jline-terminal-3.28.0-sources.jar" | ||
| 291 | "share/java/jline-terminal-sources.jar") | ||
| 292 | ("https://repo1.maven.org/maven2/org/jline/jline-reader/3.28.0/jline-reader-3.28.0.jar" | ||
| 293 | "share/java/jline-reader.jar") | ||
| 294 | ("https://repo1.maven.org/maven2/org/jline/jline-reader/3.28.0/jline-reader-3.28.0-sources.jar" | ||
| 295 | "share/java/jline-reader-sources.jar") | ||
| 296 | ("https://repo1.maven.org/maven2/org/jline/jline-builtins/3.28.0/jline-builtins-3.28.0.jar" | ||
| 297 | "share/java/jline-builtins.jar") | ||
| 298 | ("https://repo1.maven.org/maven2/org/jline/jline-builtins/3.28.0/jline-builtins-3.28.0-sources.jar" | ||
| 299 | "share/java/jline-builtins-sources.jar") | ||
| 300 | ("https://repo1.maven.org/maven2/org/jline/jline-terminal-ffm/3.28.0/jline-terminal-ffm-3.28.0.jar" | ||
| 301 | "share/java/jline-terminal-ffm.jar") | ||
| 302 | ("https://repo1.maven.org/maven2/org/jline/jline-terminal-ffm/3.28.0/jline-terminal-ffm-3.28.0-sources.jar" | ||
| 303 | "share/java/jline-terminal-ffm-sources.jar"))) | ||
| 304 | |||
| 305 | ;; JSON library (version 20250517) | ||
| 306 | (define %mx-rewrites-json | ||
| 307 | '(("https://repo1.maven.org/maven2/org/json/json/20250517/json-20250517.jar" | ||
| 308 | "share/java/json.jar") | ||
| 309 | ("https://repo1.maven.org/maven2/org/json/json/20250517/json-20250517-sources.jar" | ||
| 310 | "share/java/json-sources.jar"))) | ||
| 311 | |||
| 312 | ;; BouncyCastle crypto library (version 1.78.1) | ||
| 313 | (define %mx-rewrites-bouncycastle | ||
| 314 | '(("https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk18on/1.78.1/bcprov-jdk18on-1.78.1.jar" | ||
| 315 | "share/java/bcprov-jdk18on.jar") | ||
| 316 | ("https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk18on/1.78.1/bcprov-jdk18on-1.78.1-sources.jar" | ||
| 317 | "share/java/bcprov-jdk18on-sources.jar") | ||
| 318 | ("https://repo1.maven.org/maven2/org/bouncycastle/bcutil-jdk18on/1.78.1/bcutil-jdk18on-1.78.1.jar" | ||
| 319 | "share/java/bcutil-jdk18on.jar") | ||
| 320 | ("https://repo1.maven.org/maven2/org/bouncycastle/bcutil-jdk18on/1.78.1/bcutil-jdk18on-1.78.1-sources.jar" | ||
| 321 | "share/java/bcutil-jdk18on-sources.jar") | ||
| 322 | ("https://repo1.maven.org/maven2/org/bouncycastle/bcpkix-jdk18on/1.78.1/bcpkix-jdk18on-1.78.1.jar" | ||
| 323 | "share/java/bcpkix-jdk18on.jar") | ||
| 324 | ("https://repo1.maven.org/maven2/org/bouncycastle/bcpkix-jdk18on/1.78.1/bcpkix-jdk18on-1.78.1-sources.jar" | ||
| 325 | "share/java/bcpkix-jdk18on-sources.jar"))) | ||
| 326 | |||
| 327 | ;; Cap'n Proto runtime (version 0.1.16) | ||
| 328 | (define %mx-rewrites-capnproto | ||
| 329 | '(("https://repo1.maven.org/maven2/org/capnproto/runtime/0.1.16/runtime-0.1.16.jar" | ||
| 330 | "share/java/capnproto-runtime.jar") | ||
| 331 | ("https://repo1.maven.org/maven2/org/capnproto/runtime/0.1.16/runtime-0.1.16-sources.jar" | ||
| 332 | "share/java/capnproto-runtime-sources.jar"))) | ||
| 333 | |||
| 334 | ;; TruffleJWS WebSocket library | ||
| 335 | (define %mx-rewrites-trufflejws | ||
| 336 | '(("https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejws-1.5.7.jar" | ||
| 337 | "share/java/trufflejws.jar") | ||
| 338 | ("https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejws-1.5.7-src.jar" | ||
| 339 | "share/java/trufflejws-sources.jar"))) | ||
| 340 | |||
| 341 | ;; Native source tarballs for graalpy | ||
| 342 | (define %mx-rewrites-native-sources | ||
| 343 | '(("https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/graalpython/bzip2-1.0.8.tar.gz" | ||
| 344 | "bzip2-1.0.8.tar.gz") | ||
| 345 | ("https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/xz-5.6.2.tar.gz" | ||
| 346 | "xz-5.6.2.tar.gz"))) | ||
| 347 | |||
| 348 | ;; JCodings character encoding library (version 1.0.63) | ||
| 349 | (define %mx-rewrites-jcodings | ||
| 350 | '(("https://repo1.maven.org/maven2/org/jruby/jcodings/jcodings/1.0.63/jcodings-1.0.63.jar" | ||
| 351 | "share/java/jcodings.jar") | ||
| 352 | ("https://repo1.maven.org/maven2/org/jruby/jcodings/jcodings/1.0.63/jcodings-1.0.63-sources.jar" | ||
| 353 | "share/java/jcodings-sources.jar"))) | ||
| 354 | |||
| 355 | ;; VisualVM JFluid Heap library (version 2.1.4) | ||
| 356 | (define %mx-rewrites-visualvm | ||
| 357 | '(("https://repo1.maven.org/maven2/org/graalvm/visualvm/modules/org-graalvm-visualvm-lib-jfluid-heap/2.1.4/org-graalvm-visualvm-lib-jfluid-heap-2.1.4.jar" | ||
| 358 | "share/java/visualvm-lib-jfluid-heap.jar") | ||
| 359 | ("https://repo1.maven.org/maven2/org/graalvm/visualvm/modules/org-graalvm-visualvm-lib-jfluid-heap/2.1.4/org-graalvm-visualvm-lib-jfluid-heap-2.1.4-sources.jar" | ||
| 360 | "share/java/visualvm-lib-jfluid-heap-sources.jar"))) | ||
| 361 | |||
| 362 | ;; Guava core libraries (version 31.0.1-jre) | ||
| 363 | ;; Uses m2 layout from ant-build-system with install-jars | ||
| 364 | (define %mx-rewrites-guava | ||
| 365 | '(("https://repo1.maven.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar" | ||
| 366 | "lib/m2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar") | ||
| 367 | ;; sources -> binary (no sources jar produced) | ||
| 368 | ("https://repo1.maven.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre-sources.jar" | ||
| 369 | "lib/m2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar"))) | ||
| 370 | |||
| 371 | ;; JIMFS in-memory file system (version 1.2) | ||
| 372 | (define %mx-rewrites-jimfs | ||
| 373 | '(("https://repo1.maven.org/maven2/com/google/jimfs/jimfs/1.2/jimfs-1.2.jar" | ||
| 374 | "share/java/jimfs.jar") | ||
| 375 | ("https://repo1.maven.org/maven2/com/google/jimfs/jimfs/1.2/jimfs-1.2-sources.jar" | ||
| 376 | "share/java/jimfs-sources.jar"))) | ||
| 377 | |||
| 378 | ;; Java Allocation Instrumenter (version 3.1.0) | ||
| 379 | (define %mx-rewrites-alloc-instrumenter | ||
| 380 | '(("https://repo1.maven.org/maven2/com/google/code/java-allocation-instrumenter/java-allocation-instrumenter/3.1.0/java-allocation-instrumenter-3.1.0.jar" | ||
| 381 | "share/java/java-allocation-instrumenter.jar") | ||
| 382 | ("https://repo1.maven.org/maven2/com/google/code/java-allocation-instrumenter/java-allocation-instrumenter/3.1.0/java-allocation-instrumenter-3.1.0-sources.jar" | ||
| 383 | "share/java/java-allocation-instrumenter-sources.jar"))) | ||
| 384 | |||
| 385 | ;; JUnit test framework (version 4.13.2 required by mx) | ||
| 386 | (define %mx-rewrites-junit | ||
| 387 | '(("https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar" | ||
| 388 | "share/java/junit.jar") | ||
| 389 | ("https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2-sources.jar" | ||
| 390 | "share/java/junit-sources.jar"))) | ||
| 391 | |||
| 392 | ;; Composed rewrite lists for each package tier | ||
| 393 | (define %mx-rewrites-regex | ||
| 394 | (append %mx-rewrites-asm | ||
| 395 | %mx-rewrites-antlr | ||
| 396 | %mx-rewrites-icu | ||
| 397 | %mx-rewrites-xz | ||
| 398 | %mx-rewrites-ninja)) | ||
| 399 | |||
| 400 | (define %mx-rewrites-truffle | ||
| 401 | (append %mx-rewrites-regex | ||
| 402 | %mx-rewrites-hamcrest | ||
| 403 | %mx-rewrites-libffi | ||
| 404 | %mx-rewrites-jline)) | ||
| 405 | |||
| 406 | (define %mx-rewrites-tools | ||
| 407 | (append %mx-rewrites-truffle | ||
| 408 | %mx-rewrites-json | ||
| 409 | %mx-rewrites-trufflejws)) | ||
| 410 | |||
| 411 | (define %mx-rewrites-substratevm | ||
| 412 | (append %mx-rewrites-truffle | ||
| 413 | %mx-rewrites-capnproto)) | ||
| 414 | |||
| 415 | (define %mx-rewrites-graalpy | ||
| 416 | (append %mx-rewrites-truffle | ||
| 417 | %mx-rewrites-json | ||
| 418 | %mx-rewrites-bouncycastle | ||
| 419 | %mx-rewrites-capnproto | ||
| 420 | %mx-rewrites-trufflejws | ||
| 421 | %mx-rewrites-native-sources)) | ||
| 422 | |||
| 423 | ;; ASM 9.8 - required by mx's internal jacoco code coverage | ||
| 424 | (define %mx-rewrites-asm-mx | ||
| 425 | '(("https://repo1.maven.org/maven2/org/ow2/asm/asm/9.8/asm-9.8.jar" | ||
| 426 | "share/java/asm9.jar") | ||
| 427 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm/9.8/asm-9.8-sources.jar" | ||
| 428 | "share/java/asm9-sources.jar") | ||
| 429 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.8/asm-tree-9.8.jar" | ||
| 430 | "share/java/asm-tree.jar") | ||
| 431 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.8/asm-tree-9.8-sources.jar" | ||
| 432 | "share/java/asm-tree-sources.jar") | ||
| 433 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.8/asm-analysis-9.8.jar" | ||
| 434 | "share/java/asm-analysis.jar") | ||
| 435 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/9.8/asm-analysis-9.8-sources.jar" | ||
| 436 | "share/java/asm-analysis.jar") | ||
| 437 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.8/asm-commons-9.8.jar" | ||
| 438 | "share/java/asm-commons.jar") | ||
| 439 | ("https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.8/asm-commons-9.8-sources.jar" | ||
| 440 | "share/java/asm-commons-sources.jar"))) | ||
| 441 | |||
| 442 | ;; JMH 1.21 and dependencies - required by mx for compiler benchmarks | ||
| 443 | (define %mx-rewrites-jmh-mx | ||
| 444 | '(("https://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar" | ||
| 445 | "lib/m2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar") | ||
| 446 | ("https://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-sources.jar" | ||
| 447 | "lib/m2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar") | ||
| 448 | ("https://repo1.maven.org/maven2/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar" | ||
| 449 | "lib/m2/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar") | ||
| 450 | ("https://repo1.maven.org/maven2/org/apache/commons/commons-math3/3.2/commons-math3-3.2-sources.jar" | ||
| 451 | "lib/m2/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar") | ||
| 452 | ("https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar" | ||
| 453 | "lib/m2/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar") | ||
| 454 | ("https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21-sources.jar" | ||
| 455 | "lib/m2/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar") | ||
| 456 | ("https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar" | ||
| 457 | "lib/m2/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar") | ||
| 458 | ("https://repo1.maven.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21-sources.jar" | ||
| 459 | "lib/m2/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar"))) | ||
| 460 | |||
| 461 | ;; Comprehensive rewrites for building complete GraalVM CE | ||
| 462 | (define %mx-rewrites-vm-ce | ||
| 463 | (append %mx-rewrites-substratevm ; truffle + capnproto | ||
| 464 | %mx-rewrites-tools ; truffle + json + trufflejws | ||
| 465 | %mx-rewrites-jcodings | ||
| 466 | %mx-rewrites-visualvm | ||
| 467 | %mx-rewrites-guava | ||
| 468 | %mx-rewrites-jimfs | ||
| 469 | %mx-rewrites-alloc-instrumenter | ||
| 470 | %mx-rewrites-junit | ||
| 471 | %mx-rewrites-asm-mx ; mx's ASM 9.8 for jacoco | ||
| 472 | %mx-rewrites-jmh-mx)) | ||
| 473 | |||
| 474 | ;;; | ||
| 475 | ;;; Packages | ||
| 476 | ;;; | ||
| 477 | |||
| 478 | ;; The mx build tool is used to build all GraalVM projects. | ||
| 479 | ;; It has no external Python dependencies (stdlib only). | ||
| 480 | (define-public graalvm-mx | ||
| 481 | (package | ||
| 482 | (name "graalvm-mx") | ||
| 483 | (version "7.68.2") | ||
| 484 | (source (origin | ||
| 485 | (method git-fetch) | ||
| 486 | (uri (git-reference | ||
| 487 | (url "https://github.com/graalvm/mx") | ||
| 488 | (commit version))) | ||
| 489 | (file-name (git-file-name name version)) | ||
| 490 | (sha256 | ||
| 491 | (base32 | ||
| 492 | "0y7qqc8374vq6sg9icfm0jlfx8fb447p9blpm18ji95qrm9ywzx0")) | ||
| 493 | (patches (search-patches "graalvm-mx-check-failed-after-join.patch")))) | ||
| 494 | (build-system copy-build-system) | ||
| 495 | (arguments | ||
| 496 | (list | ||
| 497 | #:install-plan | ||
| 498 | #~'(("." "lib/mx/")) | ||
| 499 | #:phases | ||
| 500 | #~(modify-phases %standard-phases | ||
| 501 | (add-after 'install 'create-missing-directories | ||
| 502 | ;; mx's suite.py defines native projects that expect certain | ||
| 503 | ;; directories to exist. Create them so mx doesn't fail when | ||
| 504 | ;; initializing. | ||
| 505 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 506 | (let ((lib (string-append (assoc-ref outputs "out") "/lib/mx"))) | ||
| 507 | (mkdir-p (string-append lib "/java/com.oracle.jvmtiasmagent/include"))))) | ||
| 508 | (add-after 'create-missing-directories 'install-ninja-syntax | ||
| 509 | ;; mx needs ninja_syntax Python module for native projects. | ||
| 510 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 511 | (let ((ninja-syntax (search-input-file inputs "misc/ninja_syntax.py")) | ||
| 512 | (lib (string-append (assoc-ref outputs "out") "/lib/mx"))) | ||
| 513 | (copy-file ninja-syntax (string-append lib "/ninja_syntax.py"))))) | ||
| 514 | (add-after 'install-ninja-syntax 'create-wrapper | ||
| 515 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 516 | (let* ((out (assoc-ref outputs "out")) | ||
| 517 | (bin (string-append out "/bin")) | ||
| 518 | (lib (string-append out "/lib/mx")) | ||
| 519 | (python (search-input-file inputs "/bin/python3"))) | ||
| 520 | (mkdir-p bin) | ||
| 521 | (call-with-output-file (string-append bin "/mx") | ||
| 522 | (lambda (port) | ||
| 523 | (format port "#!~a~%exec ~a ~a/mx.py \"$@\"~%" | ||
| 524 | (search-input-file inputs "/bin/bash") | ||
| 525 | python | ||
| 526 | lib))) | ||
| 527 | (chmod (string-append bin "/mx") | ||
| 528 | #o755))))))) | ||
| 529 | (native-inputs (list (package-source ninja))) | ||
| 530 | (inputs (list bash-minimal python-3)) | ||
| 531 | (home-page "https://github.com/graalvm/mx") | ||
| 532 | (synopsis "Build tool for GraalVM projects") | ||
| 533 | (description "mx is a command-line tool used for the development of | ||
| 534 | GraalVM projects. It provides commands for building, testing, and packaging | ||
| 535 | polyglot language implementations built on the Truffle framework.") | ||
| 536 | (license license:gpl2))) | ||
| 537 | |||
| 538 | ;; TruffleJWS - WebSocket implementation used by GraalVM tools (chromeinspector) | ||
| 539 | ;; Built from source jar distributed by Oracle at lafo.ssw.uni-linz.ac.at | ||
| 540 | (define-public java-trufflejws-for-graal | ||
| 541 | (package | ||
| 542 | (name "java-trufflejws-for-graal") | ||
| 543 | (version "1.5.7") | ||
| 544 | (source (origin | ||
| 545 | (method url-fetch) | ||
| 546 | (uri "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejws-1.5.7-src.jar") | ||
| 547 | (sha256 | ||
| 548 | (base32 "0c6ccyl9s07mimdnscc4g56zkhc31qd6qvhy16vidrj12h8cxgfn")))) | ||
| 549 | (build-system ant-build-system) | ||
| 550 | (arguments | ||
| 551 | (list | ||
| 552 | #:jar-name "trufflejws.jar" | ||
| 553 | #:source-dir "." | ||
| 554 | #:tests? #f ; no tests in source jar | ||
| 555 | #:phases | ||
| 556 | #~(modify-phases %standard-phases | ||
| 557 | (replace 'unpack | ||
| 558 | (lambda* (#:key source #:allow-other-keys) | ||
| 559 | ;; Source is a jar file containing .java files. | ||
| 560 | (invoke "unzip" "-q" source))) | ||
| 561 | (add-after 'install 'install-sources | ||
| 562 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 563 | (let* ((out (assoc-ref outputs "out")) | ||
| 564 | (share (string-append out "/share/java"))) | ||
| 565 | ;; Copy source jar as sources jar for mx. | ||
| 566 | (copy-file #$source | ||
| 567 | (string-append share "/trufflejws-sources.jar")))))))) | ||
| 568 | (native-inputs (list unzip)) | ||
| 569 | (home-page "https://www.graalvm.org") | ||
| 570 | (synopsis "WebSocket implementation for GraalVM tools") | ||
| 571 | (description "TruffleJWS is a WebSocket library used by GraalVM's | ||
| 572 | Chrome Inspector and other debugging tools. It provides WebSocket client | ||
| 573 | and server implementations for the Truffle framework.") | ||
| 574 | (license upl1.0))) | ||
| 575 | |||
| 576 | ;; GraalVM SDK - standalone foundation with no suite imports. | ||
| 577 | ;; Provides: POLYGLOT, COLLECTIONS, NATIVEIMAGE, WORD, LAUNCHER_COMMON. | ||
| 578 | (define-public graal-sdk | ||
| 579 | (package | ||
| 580 | (name "graal-sdk") | ||
| 581 | (version %graalvm-version) | ||
| 582 | (source %graal-source) | ||
| 583 | (build-system gnu-build-system) | ||
| 584 | (arguments | ||
| 585 | (list | ||
| 586 | #:tests? #f | ||
| 587 | #:phases | ||
| 588 | #~(modify-phases %standard-phases | ||
| 589 | (delete 'configure) | ||
| 590 | (add-after 'unpack 'chdir-to-sdk | ||
| 591 | (lambda _ (chdir "sdk"))) | ||
| 592 | (add-before 'build 'setup-mx-urlrewrites | ||
| 593 | #$(make-mx-urlrewrites-phase %mx-rewrites-jline)) | ||
| 594 | (replace 'build | ||
| 595 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 596 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 597 | (setenv "MX_PYTHON" (which "python3")) | ||
| 598 | ;; Redirect mx's build output and cache to writable locations. | ||
| 599 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 600 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 601 | ;; Build the core SDK distributions including LAUNCHER_COMMON for language launchers. | ||
| 602 | (invoke "mx" "--user-home" (getcwd) | ||
| 603 | "build" "--dependencies" | ||
| 604 | "GRAAL_SDK,WORD,COLLECTIONS,NATIVEIMAGE,POLYGLOT,JLINE3,JNIUTILS,LAUNCHER_COMMON,MAVEN_DOWNLOADER"))) | ||
| 605 | (replace 'install | ||
| 606 | #$(make-mx-install-m2-phase | ||
| 607 | ;; Transitive dependencies match upstream Maven Central poms. | ||
| 608 | '(("GRAAL_SDK" "org.graalvm.sdk" "graal-sdk") | ||
| 609 | ("POLYGLOT" "org.graalvm.polyglot" "polyglot" | ||
| 610 | (("org.graalvm.sdk" "collections") | ||
| 611 | ("org.graalvm.sdk" "nativeimage"))) | ||
| 612 | ("WORD" "org.graalvm.sdk" "word") | ||
| 613 | ("COLLECTIONS" "org.graalvm.sdk" "collections") | ||
| 614 | ("NATIVEIMAGE" "org.graalvm.sdk" "nativeimage" | ||
| 615 | (("org.graalvm.sdk" "word"))) | ||
| 616 | ("JNIUTILS" "org.graalvm.sdk" "jniutils") | ||
| 617 | ("LAUNCHER_COMMON" "org.graalvm.sdk" "launcher-common") | ||
| 618 | ("MAVEN_DOWNLOADER" "org.graalvm.sdk" "maven-downloader")) | ||
| 619 | %graalvm-version))))) | ||
| 620 | (native-inputs | ||
| 621 | (list graalvm-mx | ||
| 622 | (list openjdk "jdk") | ||
| 623 | java-jline-terminal-for-graal-truffle | ||
| 624 | java-jline-reader-for-graal-truffle | ||
| 625 | java-jline-builtins-for-graal-truffle | ||
| 626 | java-jline-terminal-ffm-for-graal-truffle)) | ||
| 627 | (inputs (list python-3)) | ||
| 628 | (home-page "https://www.graalvm.org/") | ||
| 629 | (synopsis "GraalVM SDK and Polyglot API") | ||
| 630 | (description "Foundation libraries for GraalVM including the Polyglot API | ||
| 631 | for language interoperability. To embed guest languages in Java applications, | ||
| 632 | add these JARs to the classpath and use @code{Context.create()} to create a | ||
| 633 | polyglot context, then @code{context.eval(\"language-id\", \"code\")} to execute | ||
| 634 | guest language code. The returned @code{Value} objects provide access to | ||
| 635 | results via methods like @code{asInt()}, @code{getMember()}, and @code{execute()}.") | ||
| 636 | (license upl1.0))) | ||
| 637 | |||
| 638 | ;; Truffle - Language implementation framework | ||
| 639 | ;; Imports: sdk (as subdir) | ||
| 640 | ;; Provides: TRUFFLE_API, TRUFFLE_NFI, TRUFFLE_DSL_PROCESSOR | ||
| 641 | (define-public graal-truffle | ||
| 642 | (package | ||
| 643 | (name "graal-truffle") | ||
| 644 | (version %graalvm-version) | ||
| 645 | (source %graal-source) | ||
| 646 | (build-system gnu-build-system) | ||
| 647 | (arguments | ||
| 648 | (list | ||
| 649 | #:tests? #f | ||
| 650 | #:phases | ||
| 651 | #~(modify-phases %standard-phases | ||
| 652 | (delete 'configure) | ||
| 653 | (add-after 'unpack 'chdir-to-truffle | ||
| 654 | (lambda _ | ||
| 655 | (chdir "truffle"))) | ||
| 656 | (add-before 'build 'setup-mx-urlrewrites | ||
| 657 | #$(make-mx-urlrewrites-phase %mx-rewrites-truffle)) | ||
| 658 | (replace 'build | ||
| 659 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 660 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 661 | (setenv "MX_PYTHON" (which "python3")) | ||
| 662 | ;; Redirect mx's build output and cache to writable locations. | ||
| 663 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 664 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 665 | ;; Fix /bin/sh references in libffi's configure. | ||
| 666 | (setenv "CONFIG_SHELL" (which "bash")) | ||
| 667 | (setenv "SHELL" (which "bash")) | ||
| 668 | ;; Build the Truffle distributions including NFI with libffi. | ||
| 669 | ;; Excluded (need LLVM toolchain): | ||
| 670 | ;; TRUFFLE_NFI_NATIVE_GRAALVM_SUPPORT - needs sdk:LLVM_NINJA_TOOLCHAIN | ||
| 671 | ;; TRUFFLE_ATTACH_GRAALVM_SUPPORT - may need JLINE for launcher | ||
| 672 | (invoke "mx" "--user-home" (getcwd) "build" | ||
| 673 | "--dependencies" (string-join | ||
| 674 | '("TRUFFLE_API" | ||
| 675 | "TRUFFLE_COMPILER" | ||
| 676 | "TRUFFLE_DSL_PROCESSOR" | ||
| 677 | "TRUFFLE_ICU4J" | ||
| 678 | "TRUFFLE_NFI" | ||
| 679 | "TRUFFLE_NFI_LIBFFI" | ||
| 680 | "TRUFFLE_NFI_PANAMA" | ||
| 681 | "TRUFFLE_RUNTIME" | ||
| 682 | "TRUFFLE_XZ") | ||
| 683 | ",")))) | ||
| 684 | (replace 'install | ||
| 685 | #$(make-mx-install-m2-phase | ||
| 686 | '(("TRUFFLE_API" "org.graalvm.truffle" "truffle-api") | ||
| 687 | ("TRUFFLE_COMPILER" "org.graalvm.truffle" "truffle-compiler") | ||
| 688 | ("TRUFFLE_DSL_PROCESSOR" "org.graalvm.truffle" "truffle-dsl-processor") | ||
| 689 | ("TRUFFLE_ICU4J" "org.graalvm.shadowed" "icu4j") | ||
| 690 | ("TRUFFLE_NFI" "org.graalvm.truffle" "truffle-nfi") | ||
| 691 | ("TRUFFLE_NFI_LIBFFI" "org.graalvm.truffle" "truffle-nfi-libffi") | ||
| 692 | ("TRUFFLE_NFI_PANAMA" "org.graalvm.truffle" "truffle-nfi-panama") | ||
| 693 | ("TRUFFLE_RUNTIME" "org.graalvm.truffle" "truffle-runtime") | ||
| 694 | ("TRUFFLE_XZ" "org.graalvm.shadowed" "xz")) | ||
| 695 | %graalvm-version))))) | ||
| 696 | (native-inputs | ||
| 697 | (list (list "mx" graalvm-mx) | ||
| 698 | (list "openjdk" openjdk "jdk") | ||
| 699 | (list "git" git-minimal) | ||
| 700 | (list "bash" bash) | ||
| 701 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 702 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 703 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 704 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 705 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 706 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 707 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 708 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 709 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 710 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 711 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 712 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 713 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 714 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 715 | (list "ninja" ninja-for-graal-truffle) | ||
| 716 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)))) | ||
| 717 | (inputs (list python-3)) | ||
| 718 | (home-page "https://www.graalvm.org/") | ||
| 719 | (synopsis "Truffle language implementation framework") | ||
| 720 | (description "Truffle is a framework for implementing programming languages | ||
| 721 | as self-modifying Abstract Syntax Tree (AST) interpreters. Language implementers | ||
| 722 | extend @code{Node} classes and use the @code{@@Specialization} annotation from | ||
| 723 | the Truffle DSL. Add these JARs to the classpath along with @code{graal-sdk} | ||
| 724 | to build new language implementations. Languages built on Truffle achieve high | ||
| 725 | performance through the Graal JIT compiler when run with @code{-XX:+EnableJVMCI}.") | ||
| 726 | (license upl1.0))) | ||
| 727 | |||
| 728 | ;; Graal Tools - debugging and profiling utilities. | ||
| 729 | ;; This builds the tools suite which imports truffle, so it needs the same | ||
| 730 | ;; URL rewrites and dependencies as graal-truffle. | ||
| 731 | (define-public graal-tools | ||
| 732 | (package | ||
| 733 | (name "graal-tools") | ||
| 734 | (version %graalvm-version) | ||
| 735 | (source %graal-source) | ||
| 736 | (build-system gnu-build-system) | ||
| 737 | (arguments | ||
| 738 | (list | ||
| 739 | #:tests? #f | ||
| 740 | #:phases | ||
| 741 | #~(modify-phases %standard-phases | ||
| 742 | (delete 'configure) | ||
| 743 | (add-after 'unpack 'chdir-to-tools | ||
| 744 | (lambda _ (chdir "tools"))) | ||
| 745 | (add-before 'build 'setup-mx-urlrewrites | ||
| 746 | #$(make-mx-urlrewrites-phase %mx-rewrites-tools)) | ||
| 747 | (replace 'build | ||
| 748 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 749 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 750 | (setenv "MX_PYTHON" (which "python3")) | ||
| 751 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 752 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 753 | ;; Build all tools distributions: | ||
| 754 | ;; - TRUFFLE_PROFILER: CPU sampler and tracer | ||
| 755 | ;; - TRUFFLE_COVERAGE: Code coverage tool | ||
| 756 | ;; - INSIGHT: GraalVM Insight for dynamic instrumentation | ||
| 757 | ;; - DAP: Debug Adapter Protocol support | ||
| 758 | ;; - LSP: Language Server Protocol support | ||
| 759 | ;; - CHROMEINSPECTOR: Chrome DevTools Protocol support | ||
| 760 | (invoke "mx" "--user-home" (getcwd) "build" | ||
| 761 | "--dependencies" | ||
| 762 | "TRUFFLE_PROFILER,TRUFFLE_COVERAGE,INSIGHT,DAP,LSP,CHROMEINSPECTOR"))) | ||
| 763 | (replace 'install | ||
| 764 | #$(make-mx-install-m2-phase | ||
| 765 | '(("TRUFFLE_PROFILER" "org.graalvm.tools" "profiler-tool") | ||
| 766 | ("TRUFFLE_COVERAGE" "org.graalvm.tools" "coverage-tool") | ||
| 767 | ("INSIGHT" "org.graalvm.tools" "insight-tool") | ||
| 768 | ("DAP" "org.graalvm.tools" "dap-tool") | ||
| 769 | ("LSP" "org.graalvm.tools" "lsp-tool") | ||
| 770 | ("CHROMEINSPECTOR" "org.graalvm.tools" "chromeinspector-tool")) | ||
| 771 | %graalvm-version))))) | ||
| 772 | (native-inputs | ||
| 773 | (list (list "mx" graalvm-mx) | ||
| 774 | (list "openjdk" openjdk "jdk") | ||
| 775 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 776 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 777 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 778 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 779 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 780 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 781 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 782 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 783 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 784 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 785 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 786 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 787 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 788 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 789 | (list "java-json" java-json-for-graal-truffle) | ||
| 790 | (list "java-trufflejws" java-trufflejws-for-graal) | ||
| 791 | (list "ninja" ninja-for-graal-truffle) | ||
| 792 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)))) | ||
| 793 | (inputs (list python-3)) | ||
| 794 | (home-page "https://www.graalvm.org/") | ||
| 795 | (synopsis "GraalVM debugging and profiling tools") | ||
| 796 | (description "Development tools for GraalVM Truffle languages: | ||
| 797 | @itemize | ||
| 798 | @item CPU Sampler (@code{--cpusampler}): Profile guest language code | ||
| 799 | @item Code Coverage (@code{--coverage}): Track code coverage | ||
| 800 | @item GraalVM Insight: Dynamic instrumentation and tracing | ||
| 801 | @item Debug Adapter Protocol (DAP): IDE debugging integration | ||
| 802 | @item Language Server Protocol (LSP): IDE language features | ||
| 803 | @item Chrome DevTools (@code{--inspect}): Browser-based debugging | ||
| 804 | @end itemize | ||
| 805 | Use these flags with language launchers like @code{graalpy} or @code{js}.") | ||
| 806 | (license upl1.0))) | ||
| 807 | |||
| 808 | ;; Graal Regex - TRegex regular expression engine | ||
| 809 | ;; This builds the regex suite which imports truffle, so it needs the same | ||
| 810 | ;; URL rewrites and dependencies as graal-truffle. | ||
| 811 | (define-public graal-regex | ||
| 812 | (package | ||
| 813 | (name "graal-regex") | ||
| 814 | (version %graalvm-version) | ||
| 815 | (source %graal-source) | ||
| 816 | (build-system gnu-build-system) | ||
| 817 | (arguments | ||
| 818 | (list | ||
| 819 | #:tests? #f | ||
| 820 | #:phases | ||
| 821 | #~(modify-phases %standard-phases | ||
| 822 | (delete 'configure) | ||
| 823 | (add-after 'unpack 'chdir-to-regex | ||
| 824 | (lambda _ (chdir "regex"))) | ||
| 825 | (add-before 'build 'setup-mx-urlrewrites | ||
| 826 | #$(make-mx-urlrewrites-phase %mx-rewrites-regex)) | ||
| 827 | (replace 'build | ||
| 828 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 829 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 830 | (setenv "MX_PYTHON" (which "python3")) | ||
| 831 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 832 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 833 | (invoke "mx" "--user-home" (getcwd) "build" | ||
| 834 | "--dependencies" "TREGEX"))) | ||
| 835 | (replace 'install | ||
| 836 | #$(make-mx-install-m2-phase | ||
| 837 | '(("TREGEX" "org.graalvm.regex" "regex")) | ||
| 838 | %graalvm-version))))) | ||
| 839 | (native-inputs (list graalvm-mx | ||
| 840 | (list openjdk "jdk") | ||
| 841 | ninja-for-graal-truffle | ||
| 842 | java-asm-for-graal-truffle | ||
| 843 | java-asm-tree-for-graal-truffle | ||
| 844 | java-asm-analysis-for-graal-truffle | ||
| 845 | java-asm-util-for-graal-truffle | ||
| 846 | java-asm-commons-for-graal-truffle | ||
| 847 | java-antlr4-runtime-for-graal-truffle | ||
| 848 | java-icu4j-for-graal-truffle | ||
| 849 | java-icu4j-charset-for-graal-truffle | ||
| 850 | java-xz-for-graal-truffle)) | ||
| 851 | (inputs (list python-3)) | ||
| 852 | (home-page "https://www.graalvm.org/") | ||
| 853 | (synopsis "TRegex regular expression engine for GraalVM") | ||
| 854 | (description "TRegex is a high-performance regular expression engine | ||
| 855 | used internally by GraalVM languages like GraalJS and GraalPy for pattern | ||
| 856 | matching. Language implementers can use @code{TruffleRegexCompiler} to compile | ||
| 857 | regex patterns, or access it via the Truffle interop protocol. End users | ||
| 858 | typically do not use this package directly.") | ||
| 859 | (license upl1.0))) | ||
| 860 | |||
| 861 | ;; Graal Compiler - the JIT compiler for GraalVM | ||
| 862 | ;; This builds the compiler suite which imports truffle, regex, and sdk. | ||
| 863 | (define-public graal-compiler | ||
| 864 | (package | ||
| 865 | (name "graal-compiler") | ||
| 866 | (version %graalvm-version) | ||
| 867 | (source %graal-source) | ||
| 868 | (build-system gnu-build-system) | ||
| 869 | (arguments | ||
| 870 | (list | ||
| 871 | #:tests? #f | ||
| 872 | #:phases | ||
| 873 | #~(modify-phases %standard-phases | ||
| 874 | (delete 'configure) | ||
| 875 | (add-after 'unpack 'chdir-to-compiler | ||
| 876 | (lambda _ (chdir "compiler"))) | ||
| 877 | (add-before 'build 'setup-mx-urlrewrites | ||
| 878 | #$(make-mx-urlrewrites-phase %mx-rewrites-truffle)) | ||
| 879 | (replace 'build | ||
| 880 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 881 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 882 | (setenv "MX_PYTHON" (which "python3")) | ||
| 883 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 884 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 885 | ;; Build the core compiler distributions. | ||
| 886 | ;; GRAAL is the main compiler JAR for use with --upgrade-module-path. | ||
| 887 | ;; GRAAL_MANAGEMENT provides JMX management beans. | ||
| 888 | (invoke "mx" "--user-home" (getcwd) "build" | ||
| 889 | "--dependencies" "GRAAL,GRAAL_MANAGEMENT"))) | ||
| 890 | (replace 'install | ||
| 891 | #$(make-mx-install-m2-phase | ||
| 892 | '(("GRAAL" "org.graalvm.compiler" "compiler") | ||
| 893 | ("GRAAL_MANAGEMENT" "org.graalvm.compiler" "compiler-management")) | ||
| 894 | %graalvm-version))))) | ||
| 895 | (native-inputs | ||
| 896 | (list (list "mx" graalvm-mx) | ||
| 897 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 898 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 899 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 900 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 901 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 902 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 903 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 904 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 905 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 906 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 907 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 908 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 909 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 910 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 911 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 912 | (list "ninja" ninja-for-graal-truffle) | ||
| 913 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)))) | ||
| 914 | (inputs (list python-3)) | ||
| 915 | (propagated-inputs | ||
| 916 | (list graal-sdk graal-truffle (list openjdk "graal-builder-jdk"))) | ||
| 917 | (home-page "https://www.graalvm.org/") | ||
| 918 | (synopsis "Graal JIT compiler for the JVM") | ||
| 919 | (description "The Graal compiler is a high-performance JIT compiler for | ||
| 920 | the JVM that can be used as a replacement for the C2 compiler. It provides | ||
| 921 | optimizations specifically tuned for dynamic languages. Requires | ||
| 922 | @code{openjdk} with the @code{graal-builder-jdk} output which has JVMCI exports | ||
| 923 | configured for Graal. | ||
| 924 | Example usage: | ||
| 925 | @example | ||
| 926 | java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \\ | ||
| 927 | --upgrade-module-path=$GUIX_ENVIRONMENT/lib/m2/org/graalvm/compiler/compiler/25.0.1/compiler-25.0.1.jar \\ | ||
| 928 | -XX:+UseJVMCICompiler YourApp | ||
| 929 | @end example") | ||
| 930 | (license (list license:gpl2+ ; with Classpath exception | ||
| 931 | upl1.0)))) | ||
| 932 | |||
| 933 | ;; SubstrateVM - Ahead-of-time compilation for Java (native-image) | ||
| 934 | ;; This builds the substratevm suite which imports compiler and espresso-shared. | ||
| 935 | (define-public graal-substratevm | ||
| 936 | (package | ||
| 937 | (name "graal-substratevm") | ||
| 938 | (version %graalvm-version) | ||
| 939 | (source %graal-source) | ||
| 940 | (build-system gnu-build-system) | ||
| 941 | (arguments | ||
| 942 | (list | ||
| 943 | #:tests? #f | ||
| 944 | #:phases | ||
| 945 | #~(modify-phases %standard-phases | ||
| 946 | (delete 'configure) | ||
| 947 | (add-after 'unpack 'chdir-to-substratevm | ||
| 948 | (lambda _ (chdir "substratevm"))) | ||
| 949 | (add-before 'build 'setup-mx-urlrewrites | ||
| 950 | #$(make-mx-urlrewrites-phase %mx-rewrites-substratevm)) | ||
| 951 | (replace 'build | ||
| 952 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 953 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 954 | (setenv "MX_PYTHON" (which "python3")) | ||
| 955 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 956 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 957 | ;; Build the native-image driver and its dependencies. | ||
| 958 | ;; SVM_DRIVER is the native-image building tool. | ||
| 959 | ;; SVM is the main SubstrateVM image builder. | ||
| 960 | (invoke "mx" "--user-home" (getcwd) "build" | ||
| 961 | "--dependencies" "SVM_DRIVER,SVM"))) | ||
| 962 | (replace 'install | ||
| 963 | #$(make-mx-install-phase '("SVM_DRIVER" "SVM") "svm"))))) | ||
| 964 | (native-inputs | ||
| 965 | (list (list "mx" graalvm-mx) | ||
| 966 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 967 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 968 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 969 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 970 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 971 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 972 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 973 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 974 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 975 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 976 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 977 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 978 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 979 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 980 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 981 | (list "ninja" ninja-for-graal-truffle) | ||
| 982 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)) | ||
| 983 | (list "java-capnproto-runtime" java-capnproto-runtime-for-graal-truffle))) | ||
| 984 | (inputs (list python-3)) | ||
| 985 | (home-page "https://www.graalvm.org/") | ||
| 986 | (synopsis "Ahead-of-time compilation for Java applications") | ||
| 987 | (description "SubstrateVM provides the core libraries for ahead-of-time (AOT) | ||
| 988 | compilation of Java applications. These JARs are used by the @command{native-image} | ||
| 989 | tool to compile Java bytecode into standalone native executables. Note: this | ||
| 990 | package provides the SVM libraries; the full @command{native-image} tool requires | ||
| 991 | additional GraalVM components. The resulting native binaries start instantly | ||
| 992 | and use less memory than traditional JVM-based applications.") | ||
| 993 | (license (list license:gpl2+ ; with Classpath exception | ||
| 994 | upl1.0)))) | ||
| 995 | |||
| 996 | (define-public graal-wasm | ||
| 997 | (package | ||
| 998 | (name "graal-wasm") | ||
| 999 | (version %graalvm-version) | ||
| 1000 | (source %graal-source) | ||
| 1001 | (build-system gnu-build-system) | ||
| 1002 | (arguments | ||
| 1003 | (list | ||
| 1004 | #:tests? #f | ||
| 1005 | #:phases | ||
| 1006 | #~(modify-phases %standard-phases | ||
| 1007 | (delete 'configure) | ||
| 1008 | (add-after 'unpack 'chdir-to-wasm | ||
| 1009 | (lambda _ | ||
| 1010 | (chdir "wasm"))) | ||
| 1011 | (add-before 'build 'setup-mx-urlrewrites | ||
| 1012 | #$(make-mx-urlrewrites-phase %mx-rewrites-truffle)) | ||
| 1013 | (replace 'build | ||
| 1014 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1015 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 1016 | (setenv "MX_PYTHON" (which "python3")) | ||
| 1017 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 1018 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 1019 | ;; Build the WebAssembly runtime and launcher. | ||
| 1020 | (invoke "mx" "--user-home" (getcwd) "build" | ||
| 1021 | "--dependencies" "WASM,WASM_LAUNCHER"))) | ||
| 1022 | (replace 'install | ||
| 1023 | #$(make-mx-install-phase '("WASM" "WASM_LAUNCHER") "wasm"))))) | ||
| 1024 | (native-inputs | ||
| 1025 | (list (list "mx" graalvm-mx) | ||
| 1026 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 1027 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 1028 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 1029 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 1030 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 1031 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 1032 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 1033 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 1034 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 1035 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 1036 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 1037 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 1038 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 1039 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 1040 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 1041 | (list "ninja" ninja-for-graal-truffle) | ||
| 1042 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)))) | ||
| 1043 | (inputs (list python-3)) | ||
| 1044 | (home-page "https://www.graalvm.org/webassembly/") | ||
| 1045 | (synopsis "High-performance WebAssembly runtime for Java") | ||
| 1046 | (description "GraalWasm is a high-performance embeddable WebAssembly runtime | ||
| 1047 | for Java. Add these JARs along with @code{graal-sdk} and @code{graal-truffle} | ||
| 1048 | to the classpath, then use @code{Context.newBuilder(\"wasm\").build()} to create | ||
| 1049 | a context and @code{context.eval(Source.newBuilder(\"wasm\", wasmFile).build())} | ||
| 1050 | to load modules. Access exported functions via @code{getMember(\"exports\")}. | ||
| 1051 | Supports WebAssembly MVP and various post-MVP proposals.") | ||
| 1052 | (license upl1.0))) | ||
| 1053 | |||
| 1054 | ;; Imports: truffle, sdk | ||
| 1055 | ;; Provides: ESPRESSO_SHARED | ||
| 1056 | (define-public graal-espresso-shared | ||
| 1057 | (package | ||
| 1058 | (name "graal-espresso-shared") | ||
| 1059 | (version %graalvm-version) | ||
| 1060 | (source %graal-source) | ||
| 1061 | (build-system gnu-build-system) | ||
| 1062 | (arguments | ||
| 1063 | (list | ||
| 1064 | #:tests? #f | ||
| 1065 | #:phases | ||
| 1066 | #~(modify-phases %standard-phases | ||
| 1067 | (delete 'configure) | ||
| 1068 | (add-after 'unpack 'chdir-to-espresso-shared | ||
| 1069 | (lambda _ | ||
| 1070 | (chdir "espresso-shared"))) | ||
| 1071 | (add-before 'build 'setup-mx-urlrewrites | ||
| 1072 | #$(make-mx-urlrewrites-phase %mx-rewrites-truffle)) | ||
| 1073 | (replace 'build | ||
| 1074 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1075 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 1076 | (setenv "MX_PYTHON" (which "python3")) | ||
| 1077 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) | ||
| 1078 | "/mxbuild-output")) | ||
| 1079 | (setenv "MX_CACHE_DIR" (string-append (getcwd) | ||
| 1080 | "/mx-cache")) | ||
| 1081 | (invoke "mx" "--user-home" (getcwd) | ||
| 1082 | "build" | ||
| 1083 | "--dependencies" "ESPRESSO_SHARED"))) | ||
| 1084 | (replace 'install | ||
| 1085 | #$(make-mx-install-phase '("ESPRESSO_SHARED") | ||
| 1086 | "espresso-shared"))))) | ||
| 1087 | (native-inputs | ||
| 1088 | (list (list "mx" graalvm-mx) | ||
| 1089 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 1090 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 1091 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 1092 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 1093 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 1094 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 1095 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 1096 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 1097 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 1098 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 1099 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 1100 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 1101 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 1102 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 1103 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 1104 | (list "ninja" ninja-for-graal-truffle) | ||
| 1105 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)))) | ||
| 1106 | (inputs (list python-3)) | ||
| 1107 | (home-page "https://www.graalvm.org/jdk21/reference-manual/java-on-truffle/") | ||
| 1108 | (synopsis "Espresso shared code for runtime class loading") | ||
| 1109 | (description "Shared code used by Espresso (Java on Truffle) for runtime | ||
| 1110 | class loading. This package provides the @code{org.graalvm.espresso.shared} | ||
| 1111 | module required by the main Espresso runtime.") | ||
| 1112 | (license license:gpl2))) ;gpl2 only, with classpath exception | ||
| 1113 | |||
| 1114 | ;; Espresso - Java on Truffle (Java bytecode interpreter) | ||
| 1115 | ;; This builds the espresso suite which imports truffle, tools, sulong, sdk, espresso-shared. | ||
| 1116 | (define-public graal-espresso | ||
| 1117 | (package | ||
| 1118 | (name "graal-espresso") | ||
| 1119 | (version %graalvm-version) | ||
| 1120 | (source %graal-source) | ||
| 1121 | (build-system gnu-build-system) | ||
| 1122 | (arguments | ||
| 1123 | (list | ||
| 1124 | #:tests? #f | ||
| 1125 | #:modules '((guix build gnu-build-system) | ||
| 1126 | (guix build utils) | ||
| 1127 | (ice-9 match)) | ||
| 1128 | #:phases | ||
| 1129 | #~(modify-phases %standard-phases | ||
| 1130 | (delete 'configure) | ||
| 1131 | (add-after 'unpack 'chdir-to-espresso | ||
| 1132 | (lambda _ | ||
| 1133 | (chdir "espresso"))) | ||
| 1134 | (add-before 'build 'setup-mx-urlrewrites | ||
| 1135 | #$(make-mx-urlrewrites-phase %mx-rewrites-truffle)) | ||
| 1136 | (replace 'build | ||
| 1137 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1138 | (setenv "JAVA_HOME" (assoc-ref inputs "openjdk")) | ||
| 1139 | (setenv "MX_PYTHON" (which "python3")) | ||
| 1140 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) | ||
| 1141 | "/mxbuild-output")) | ||
| 1142 | (setenv "MX_CACHE_DIR" (string-append (getcwd) | ||
| 1143 | "/mx-cache")) | ||
| 1144 | ;; Build the Espresso runtime and launcher. | ||
| 1145 | (invoke "mx" "--user-home" (getcwd) | ||
| 1146 | "build" | ||
| 1147 | "--dependencies" "ESPRESSO,ESPRESSO_LAUNCHER"))) | ||
| 1148 | (replace 'install | ||
| 1149 | #$(make-mx-install-phase '("ESPRESSO" "ESPRESSO_LAUNCHER") | ||
| 1150 | "espresso")) | ||
| 1151 | (add-after 'install 'create-launcher | ||
| 1152 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 1153 | (let* ((out (assoc-ref outputs "out")) | ||
| 1154 | (bin (string-append out "/bin")) | ||
| 1155 | (lib (string-append out "/lib/espresso")) | ||
| 1156 | (sdk-base (assoc-ref inputs "graal-sdk")) | ||
| 1157 | (version #$%graalvm-version) | ||
| 1158 | (sdk-jars | ||
| 1159 | (map (match-lambda | ||
| 1160 | ((group-path artifact) | ||
| 1161 | (string-append sdk-base "/lib/m2/" group-path "/" | ||
| 1162 | artifact "/" version "/" | ||
| 1163 | artifact "-" version ".jar"))) | ||
| 1164 | '(("org/graalvm/sdk" "graal-sdk") | ||
| 1165 | ("org/graalvm/polyglot" "polyglot") | ||
| 1166 | ("org/graalvm/sdk" "word") | ||
| 1167 | ("org/graalvm/sdk" "collections") | ||
| 1168 | ("org/graalvm/sdk" "nativeimage") | ||
| 1169 | ("org/graalvm/sdk" "jniutils") | ||
| 1170 | ("org/graalvm/sdk" "launcher-common")))) | ||
| 1171 | (truffle-base (assoc-ref inputs "graal-truffle")) | ||
| 1172 | (truffle-jars | ||
| 1173 | (map (match-lambda | ||
| 1174 | ((group-path artifact) | ||
| 1175 | (string-append truffle-base "/lib/m2/" group-path "/" | ||
| 1176 | artifact "/" version "/" | ||
| 1177 | artifact "-" version ".jar"))) | ||
| 1178 | '(("org/graalvm/truffle" "truffle-api") | ||
| 1179 | ("org/graalvm/truffle" "truffle-compiler") | ||
| 1180 | ("org/graalvm/truffle" "truffle-nfi") | ||
| 1181 | ("org/graalvm/truffle" "truffle-nfi-libffi") | ||
| 1182 | ("org/graalvm/truffle" "truffle-nfi-panama") | ||
| 1183 | ("org/graalvm/truffle" "truffle-runtime")))) | ||
| 1184 | (shared-lib (string-append (assoc-ref inputs "graal-espresso-shared") | ||
| 1185 | "/lib/espresso-shared")) | ||
| 1186 | (jdk (assoc-ref inputs "openjdk")) | ||
| 1187 | (module-path (string-join (append (list lib) | ||
| 1188 | sdk-jars | ||
| 1189 | truffle-jars | ||
| 1190 | (list shared-lib)) | ||
| 1191 | ":"))) | ||
| 1192 | (mkdir-p bin) | ||
| 1193 | (call-with-output-file (string-append bin "/espresso") | ||
| 1194 | (lambda (port) | ||
| 1195 | (format port "#!~a | ||
| 1196 | exec ~a/bin/java \\ | ||
| 1197 | --module-path ~a \\ | ||
| 1198 | -m org.graalvm.espresso.launcher/com.oracle.truffle.espresso.launcher.EspressoLauncher \\ | ||
| 1199 | \"$@\" | ||
| 1200 | " | ||
| 1201 | (which "bash") | ||
| 1202 | jdk module-path))) | ||
| 1203 | (chmod (string-append bin "/espresso") | ||
| 1204 | #o755))))))) | ||
| 1205 | (native-inputs | ||
| 1206 | (list (list "mx" graalvm-mx) | ||
| 1207 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 1208 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 1209 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 1210 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 1211 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 1212 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 1213 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 1214 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 1215 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 1216 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 1217 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 1218 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 1219 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 1220 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 1221 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 1222 | (list "ninja" ninja-for-graal-truffle) | ||
| 1223 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)))) | ||
| 1224 | (inputs | ||
| 1225 | (list (list "python" python-3) | ||
| 1226 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 1227 | (list "bash" bash-minimal) | ||
| 1228 | (list "graal-sdk" graal-sdk) | ||
| 1229 | (list "graal-truffle" graal-truffle) | ||
| 1230 | (list "graal-espresso-shared" graal-espresso-shared))) | ||
| 1231 | (home-page "https://www.graalvm.org/jdk21/reference-manual/java-on-truffle/") | ||
| 1232 | (synopsis "Java bytecode interpreter on Truffle") | ||
| 1233 | (description "Espresso is a Java bytecode interpreter (Java on Truffle) that | ||
| 1234 | runs Java applications on GraalVM's Truffle framework. Run the @command{espresso} | ||
| 1235 | launcher to execute Java applications, or embed via the Polyglot API with | ||
| 1236 | @code{Context.newBuilder(\"java\").build()}. Espresso provides full Java | ||
| 1237 | compatibility while enabling polyglot interoperability with other Truffle | ||
| 1238 | languages. Supports debugging, HotSwap, and GraalVM tooling integration.") | ||
| 1239 | (license license:gpl2))) | ||
| 1240 | |||
| 1241 | ;; GraalPy - Python 3.12 implementation on GraalVM | ||
| 1242 | (define-public graalpy-community | ||
| 1243 | (package | ||
| 1244 | (name "graalpy-community") | ||
| 1245 | (version %graalvm-version) | ||
| 1246 | (source (origin | ||
| 1247 | (method git-fetch) | ||
| 1248 | (uri (git-reference | ||
| 1249 | (url "https://github.com/oracle/graalpython") | ||
| 1250 | (commit (string-append "graal-" version)))) | ||
| 1251 | (file-name (git-file-name name version)) | ||
| 1252 | (sha256 | ||
| 1253 | (base32 "19w22gw1ixkgy2c79m9xfhw9xvxl5vc68vddal7vq6dbsyh3g2lh")))) | ||
| 1254 | (build-system gnu-build-system) | ||
| 1255 | (arguments | ||
| 1256 | (list | ||
| 1257 | #:tests? #f | ||
| 1258 | #:modules '((guix build gnu-build-system) | ||
| 1259 | (guix build utils) | ||
| 1260 | (ice-9 match) | ||
| 1261 | (sxml simple)) | ||
| 1262 | #:phases | ||
| 1263 | #~(modify-phases %standard-phases | ||
| 1264 | (delete 'configure) | ||
| 1265 | (add-after 'unpack 'fix-cmake-minimum-version | ||
| 1266 | (lambda _ | ||
| 1267 | ;; pegparser.generator uses cmake 3.0 which is rejected by newer cmake. | ||
| 1268 | (substitute* "graalpython/com.oracle.graal.python.pegparser.generator/CMakeLists.txt" | ||
| 1269 | (("cmake_minimum_required\\(VERSION 3\\.0\\)") | ||
| 1270 | "cmake_minimum_required(VERSION 3.5)")))) | ||
| 1271 | (add-after 'unpack 'setup-graal-sources | ||
| 1272 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1273 | ;; mx expects to find the graal repository as a sibling directory. | ||
| 1274 | ;; The graalpython suite.py imports sdk, truffle, tools, regex from graal. | ||
| 1275 | ;; | ||
| 1276 | ;; We MUST use copy-recursively here, NOT symlink, because mx needs | ||
| 1277 | ;; to write to various directories during the build: | ||
| 1278 | ;; | ||
| 1279 | ;; 1. ShadedLibraryProject (mx_sdk_shaded.py): These projects generate | ||
| 1280 | ;; shaded/relocated Java bytecode at build time. mx creates output | ||
| 1281 | ;; directories like truffle/src/com.oracle.truffle.api.impl.asm/ | ||
| 1282 | ;; to store the generated .class files. There are ~10 such projects | ||
| 1283 | ;; across espresso, sdk, substratevm, and truffle suites. | ||
| 1284 | ;; | ||
| 1285 | ;; 2. DefaultNativeProject (mx_native.py): These projects create | ||
| 1286 | ;; 'include' subdirectories for header files and write build | ||
| 1287 | ;; artifacts to various locations within native project directories. | ||
| 1288 | ;; | ||
| 1289 | ;; 3. Build outputs: mx writes various build artifacts, caches, and | ||
| 1290 | ;; intermediate files throughout the source tree during compilation. | ||
| 1291 | (let ((graal-src (assoc-ref inputs "graal-25.0.1-checkout"))) | ||
| 1292 | (copy-recursively graal-src "../graal") | ||
| 1293 | (when (not (file-exists? "../graal/sdk/mx.sdk/suite.py")) | ||
| 1294 | (error "graal source not set up correctly"))))) | ||
| 1295 | (add-before 'build 'setup-mx-urlrewrites | ||
| 1296 | #$(make-mx-urlrewrites-phase %mx-rewrites-graalpy)) | ||
| 1297 | (add-after 'setup-graal-sources 'setup-environment | ||
| 1298 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1299 | (let ((jdk (assoc-ref inputs "openjdk"))) | ||
| 1300 | (setenv "JAVA_HOME" jdk)) | ||
| 1301 | ;; Do NOT set STANDALONE_JAVA_HOME - we want mx to build a full | ||
| 1302 | ;; jimage with libgraal (libjvmcicompiler.so) baked in. | ||
| 1303 | (setenv "MX_PYTHON" (which "python3")) | ||
| 1304 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 1305 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 1306 | ;; CONFIG_SHELL is needed so autoconf-based builds (like libffi) | ||
| 1307 | ;; use the correct shell instead of /bin/sh which doesn't exist | ||
| 1308 | (setenv "CONFIG_SHELL" (which "bash")) | ||
| 1309 | (setenv "SHELL" (which "bash")) | ||
| 1310 | ;; OpenJDK JVMCI: 25.0.1, GraalVM expects: 25.0.1+8-jvmci-b01 | ||
| 1311 | (setenv "JVMCI_VERSION_CHECK" "ignore"))) | ||
| 1312 | (add-before 'build 'patch-libgraal-env | ||
| 1313 | (lambda _ | ||
| 1314 | ;; Add svm,ni so native-image is available to build libjvmcicompiler.so. | ||
| 1315 | (substitute* "mx.graalpython/jvm-ce-libgraal" | ||
| 1316 | (("COMPONENTS=LibGraal") | ||
| 1317 | "COMPONENTS=LibGraal,svm,ni")) | ||
| 1318 | ;; Remove musl from extra_native_targets to avoid needing musl toolchain. | ||
| 1319 | (substitute* "../graal/substratevm/mx.substratevm/mx_substratevm.py" | ||
| 1320 | (("'linux-default-glibc', 'linux-default-musl'") | ||
| 1321 | "'linux-default-glibc'")) | ||
| 1322 | ;; Fix launcher_template.sh shebang - /usr/bin/env doesn't exist in Guix. | ||
| 1323 | ;; The native-image bash launcher uses this template. | ||
| 1324 | (let ((bash (which "bash"))) | ||
| 1325 | (substitute* "../graal/sdk/mx.sdk/vm/launcher_template.sh" | ||
| 1326 | (("#!/usr/bin/env bash") | ||
| 1327 | (string-append "#!" bash)))) | ||
| 1328 | ;; Propagate gcc environment variables through native-image's env sanitization. | ||
| 1329 | ;; native-image's sanitizeJVMEnvironment (NativeImage.java) strips all env vars | ||
| 1330 | ;; except a whitelist (PATH, HOME, etc). The -E<varname> flag passes vars through. | ||
| 1331 | ;; mx already does this for JVMCI_VERSION_CHECK; we add gcc include/library paths. | ||
| 1332 | (substitute* "../graal/sdk/mx.sdk/mx_sdk_vm_impl.py" | ||
| 1333 | (("'-EJVMCI_VERSION_CHECK',") | ||
| 1334 | (string-append "'-EJVMCI_VERSION_CHECK',\n" | ||
| 1335 | " '-EC_INCLUDE_PATH',\n" | ||
| 1336 | " '-ECPLUS_INCLUDE_PATH',\n" | ||
| 1337 | " '-ELIBRARY_PATH',\n" | ||
| 1338 | " '-ECPATH', # C include path\n"))))) | ||
| 1339 | (replace 'build | ||
| 1340 | (lambda _ | ||
| 1341 | ;; Build Python for JVM with Graal JIT compiler using jvm-ce-libgraal env. | ||
| 1342 | ;; Also build GRAALPYTHON_RESOURCES for Maven embedding use cases. | ||
| 1343 | (invoke "mx" "--user-home" (getcwd) | ||
| 1344 | "--env" "jvm-ce-libgraal" | ||
| 1345 | "build" | ||
| 1346 | "--target" "GRAALPY_JVM_STANDALONE,GRAALPYTHON_RESOURCES"))) | ||
| 1347 | (replace 'install | ||
| 1348 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 1349 | (let ((out (assoc-ref outputs "out"))) | ||
| 1350 | (match (find-files (string-append (getcwd) "/mxbuild-output/graalpython") | ||
| 1351 | "^GRAALPY_JVM_STANDALONE$" | ||
| 1352 | #:directories? #t) | ||
| 1353 | ((standalone-dir . _) | ||
| 1354 | (copy-recursively standalone-dir out)))))) | ||
| 1355 | ;; Install all GraalVM JARs as Maven artifacts in /lib/m2 format. | ||
| 1356 | ;; This enables maven-build-system packages to depend on graalpy-community. | ||
| 1357 | (add-after 'install 'install-m2 | ||
| 1358 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 1359 | (let* ((out (assoc-ref outputs "out")) | ||
| 1360 | (modules-dir (string-append out "/modules")) | ||
| 1361 | (version #$%graalvm-version) | ||
| 1362 | ;; Mapping: (jar-basename group-id artifact-id) | ||
| 1363 | ;; Only install JARs unique to graalpy-community. | ||
| 1364 | ;; Other JARs are provided by: graal-sdk, graal-truffle, | ||
| 1365 | ;; graal-tools, graal-regex. | ||
| 1366 | (jar-mapping | ||
| 1367 | '(;; org.graalvm.python - graalpy-specific | ||
| 1368 | ("graalpython" "org.graalvm.python" "python-language") | ||
| 1369 | ("graalpython-launcher" "org.graalvm.python" "python-launcher"))) | ||
| 1370 | ;; POM-only metapackages (no JARs, just dependency aggregators) | ||
| 1371 | ;; These are needed for Maven dependency resolution. | ||
| 1372 | ;; Dependency format: (dependency group artifact [type] [scope]) | ||
| 1373 | ;; When type/scope are omitted, Maven defaults to jar/compile. | ||
| 1374 | (pom-metapackages | ||
| 1375 | '(;; org.graalvm.python:python - aggregates python-language + deps | ||
| 1376 | ("org.graalvm.python" "python" | ||
| 1377 | ((dependency "org.graalvm.python" "python-language") | ||
| 1378 | (dependency "org.graalvm.python" "python-resources") | ||
| 1379 | (dependency "org.graalvm.truffle" "truffle-runtime"))) | ||
| 1380 | ;; org.graalvm.polyglot:python - meta-package for embedding | ||
| 1381 | ;; This wraps org.graalvm.python:python with type=pom, scope=runtime | ||
| 1382 | ("org.graalvm.polyglot" "python" | ||
| 1383 | ((dependency "org.graalvm.python" "python" "pom" "runtime")))))) | ||
| 1384 | ;; Install JARs | ||
| 1385 | (for-each | ||
| 1386 | (match-lambda | ||
| 1387 | ((jar-basename group-id artifact-id) | ||
| 1388 | (let* ((jar-file (string-append modules-dir "/" jar-basename ".jar")) | ||
| 1389 | (m2-dir (string-append out "/lib/m2/" | ||
| 1390 | (string-join (string-split group-id #\.) "/") | ||
| 1391 | "/" artifact-id "/" version)) | ||
| 1392 | (jar-dest (string-append m2-dir "/" artifact-id "-" version ".jar")) | ||
| 1393 | (pom-dest (string-append m2-dir "/" artifact-id "-" version ".pom"))) | ||
| 1394 | (when (file-exists? jar-file) | ||
| 1395 | (format #t "Installing ~a -> ~a~%" jar-basename m2-dir) | ||
| 1396 | (mkdir-p m2-dir) | ||
| 1397 | (copy-file jar-file jar-dest) | ||
| 1398 | ;; Create minimal POM for Maven dependency resolution | ||
| 1399 | (call-with-output-file pom-dest | ||
| 1400 | (lambda (port) | ||
| 1401 | (sxml->xml | ||
| 1402 | `(*TOP* | ||
| 1403 | (*PI* xml "version=\"1.0\"") | ||
| 1404 | (project | ||
| 1405 | (modelVersion "4.0.0") | ||
| 1406 | (groupId ,group-id) | ||
| 1407 | (artifactId ,artifact-id) | ||
| 1408 | (version ,version))) | ||
| 1409 | port))))))) | ||
| 1410 | jar-mapping) | ||
| 1411 | ;; Install POM-only metapackages (no JARs) | ||
| 1412 | (for-each | ||
| 1413 | (match-lambda | ||
| 1414 | ((group-id artifact-id deps) | ||
| 1415 | (let* ((m2-dir (string-append out "/lib/m2/" | ||
| 1416 | (string-join (string-split group-id #\.) "/") | ||
| 1417 | "/" artifact-id "/" version)) | ||
| 1418 | (pom-dest (string-append m2-dir "/" artifact-id "-" version ".pom"))) | ||
| 1419 | (format #t "Installing POM metapackage ~a:~a~%" group-id artifact-id) | ||
| 1420 | (mkdir-p m2-dir) | ||
| 1421 | (call-with-output-file pom-dest | ||
| 1422 | (lambda (port) | ||
| 1423 | (sxml->xml | ||
| 1424 | `(*TOP* | ||
| 1425 | (*PI* xml "version=\"1.0\"") | ||
| 1426 | (project | ||
| 1427 | (modelVersion "4.0.0") | ||
| 1428 | (groupId ,group-id) | ||
| 1429 | (artifactId ,artifact-id) | ||
| 1430 | (version ,version) | ||
| 1431 | (packaging "pom") | ||
| 1432 | (dependencies | ||
| 1433 | ,@(map (match-lambda | ||
| 1434 | (('dependency dep-group dep-artifact) | ||
| 1435 | `(dependency | ||
| 1436 | (groupId ,dep-group) | ||
| 1437 | (artifactId ,dep-artifact) | ||
| 1438 | (version ,version))) | ||
| 1439 | (('dependency dep-group dep-artifact dep-type dep-scope) | ||
| 1440 | `(dependency | ||
| 1441 | (groupId ,dep-group) | ||
| 1442 | (artifactId ,dep-artifact) | ||
| 1443 | (version ,version) | ||
| 1444 | (type ,dep-type) | ||
| 1445 | (scope ,dep-scope)))) | ||
| 1446 | deps)))) | ||
| 1447 | port)))))) | ||
| 1448 | pom-metapackages) | ||
| 1449 | ;; Install python-resources JAR from mx build output. | ||
| 1450 | ;; This JAR contains the Python stdlib and is needed for Maven embedding. | ||
| 1451 | (let* ((resources-jar | ||
| 1452 | (match (find-files (string-append (getcwd) "/mxbuild-output") | ||
| 1453 | "python-resources\\.jar$") | ||
| 1454 | ((jar . _) jar) | ||
| 1455 | (_ #f))) | ||
| 1456 | (m2-dir (string-append out "/lib/m2/org/graalvm/python/python-resources/" version)) | ||
| 1457 | (jar-dest (string-append m2-dir "/python-resources-" version ".jar")) | ||
| 1458 | (pom-dest (string-append m2-dir "/python-resources-" version ".pom"))) | ||
| 1459 | (if resources-jar | ||
| 1460 | (begin | ||
| 1461 | (format #t "Installing python-resources.jar from ~a~%" resources-jar) | ||
| 1462 | (mkdir-p m2-dir) | ||
| 1463 | (copy-file resources-jar jar-dest) | ||
| 1464 | (call-with-output-file pom-dest | ||
| 1465 | (lambda (port) | ||
| 1466 | (sxml->xml | ||
| 1467 | `(*TOP* | ||
| 1468 | (*PI* xml "version=\"1.0\"") | ||
| 1469 | (project | ||
| 1470 | (modelVersion "4.0.0") | ||
| 1471 | (groupId "org.graalvm.python") | ||
| 1472 | (artifactId "python-resources") | ||
| 1473 | (version ,version))) | ||
| 1474 | port)))) | ||
| 1475 | (error "python-resources.jar not found in build output"))))))))) | ||
| 1476 | (native-inputs | ||
| 1477 | (list (list "mx" graalvm-mx) | ||
| 1478 | ;; Use openjdk graal-builder-jdk output which provides static JDK libraries | ||
| 1479 | ;; required for SubstrateVM's JvmFuncsFallbacks build task. | ||
| 1480 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 1481 | (list "python" python-3) | ||
| 1482 | (list "graal-25.0.1-checkout" %graal-source) | ||
| 1483 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 1484 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 1485 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 1486 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 1487 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 1488 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 1489 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 1490 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 1491 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 1492 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 1493 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 1494 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 1495 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 1496 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 1497 | (list "java-json" java-json-for-graal-truffle) | ||
| 1498 | (list "java-capnproto-runtime" java-capnproto-runtime-for-graal-truffle) | ||
| 1499 | (list "java-bcprov" java-bcprov-for-graalpy) | ||
| 1500 | (list "java-bcutil" java-bcutil-for-graalpy) | ||
| 1501 | (list "java-bcpkix" java-bcpkix-for-graalpy) | ||
| 1502 | (list "java-trufflejws" java-trufflejws-for-graal) | ||
| 1503 | (list "ninja" ninja-for-graal-truffle) | ||
| 1504 | (list "cmake" cmake) | ||
| 1505 | (list "git" git-minimal) | ||
| 1506 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)) | ||
| 1507 | (list "bzip2-1.0.8.tar.gz" (package-source bzip2)) | ||
| 1508 | (list "xz-5.6.2.tar.gz" (package-source xz-for-graal-truffle)))) | ||
| 1509 | (inputs (list zlib | ||
| 1510 | bzip2 | ||
| 1511 | xz)) | ||
| 1512 | (home-page "https://www.graalvm.org/python/") | ||
| 1513 | (synopsis "Python 3.12 implementation on GraalVM") | ||
| 1514 | (description "GraalPy is a high-performance Python 3.12 implementation | ||
| 1515 | built on the Truffle framework. Run @command{graalpy} or @command{python3} | ||
| 1516 | to execute Python scripts. Use @code{import java} to access Java classes | ||
| 1517 | directly from Python, or embed Python in Java via @code{Context.newBuilder(\"python\")}. | ||
| 1518 | Supports pip for package installation and the system toolchain for C extensions.") | ||
| 1519 | (license upl1.0))) | ||
| 1520 | |||
| 1521 | (define-public graalvm-ce | ||
| 1522 | (package | ||
| 1523 | (name "graalvm-ce") | ||
| 1524 | (version %graalvm-version) | ||
| 1525 | (source (origin | ||
| 1526 | (inherit %graal-source) | ||
| 1527 | (patches (search-patches "graal-optional-binary-deps.patch")))) | ||
| 1528 | (build-system gnu-build-system) | ||
| 1529 | (arguments | ||
| 1530 | (list | ||
| 1531 | #:tests? #f | ||
| 1532 | #:modules '((guix build gnu-build-system) | ||
| 1533 | (guix build utils) | ||
| 1534 | (ice-9 match)) | ||
| 1535 | #:phases | ||
| 1536 | #~(modify-phases %standard-phases | ||
| 1537 | (delete 'configure) | ||
| 1538 | (add-after 'unpack 'chdir-to-vm | ||
| 1539 | (lambda _ | ||
| 1540 | (chdir "vm"))) | ||
| 1541 | (add-after 'chdir-to-vm 'setup-environment | ||
| 1542 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1543 | (let ((jdk (assoc-ref inputs "openjdk"))) | ||
| 1544 | (setenv "JAVA_HOME" jdk)) | ||
| 1545 | (setenv "MX_PYTHON" (which "python3")) | ||
| 1546 | (setenv "MX_ALT_OUTPUT_ROOT" (string-append (getcwd) "/mxbuild-output")) | ||
| 1547 | (setenv "MX_CACHE_DIR" (string-append (getcwd) "/mx-cache")) | ||
| 1548 | (setenv "CONFIG_SHELL" (which "bash")) | ||
| 1549 | (setenv "SHELL" (which "bash")) | ||
| 1550 | (setenv "JVMCI_VERSION_CHECK" "ignore"))) | ||
| 1551 | (add-before 'build 'patch-build-scripts | ||
| 1552 | (lambda _ | ||
| 1553 | ;; Fix launcher_template.sh shebang - /usr/bin/env doesn't exist in Guix. | ||
| 1554 | (let ((bash (which "bash"))) | ||
| 1555 | (substitute* "../sdk/mx.sdk/vm/launcher_template.sh" | ||
| 1556 | (("#!/usr/bin/env bash") | ||
| 1557 | (string-append "#!" bash)))))) | ||
| 1558 | (add-before 'build 'create-minimal-env | ||
| 1559 | (lambda _ | ||
| 1560 | ;; Create a minimal env file that builds just the JIT compiler | ||
| 1561 | ;; without substratevm (which requires LLVM and JAVACPP binaries). | ||
| 1562 | ;; Note: tflm (truffle-llvm) requires LLVM binaries which we don't have. | ||
| 1563 | (call-with-output-file "mx.vm/guix-ce" | ||
| 1564 | (lambda (port) | ||
| 1565 | (display "# Minimal GraalVM CE for Guix\n" port) | ||
| 1566 | (display "DYNAMIC_IMPORTS=/compiler,/sdk,/truffle,/tools\n" port) | ||
| 1567 | (display "COMPONENTS=cmp,gvm,sdk,tfl,tflc\n" port) | ||
| 1568 | (display "NATIVE_IMAGES=false\n" port))))) | ||
| 1569 | (add-before 'build 'setup-mx-urlrewrites | ||
| 1570 | #$(make-mx-urlrewrites-phase %mx-rewrites-vm-ce)) | ||
| 1571 | (replace 'build | ||
| 1572 | (lambda _ | ||
| 1573 | ;; Build minimal GraalVM CE with our custom env file. | ||
| 1574 | (invoke "mx" "--user-home" (getcwd) | ||
| 1575 | "--env" "guix-ce" | ||
| 1576 | "build"))) | ||
| 1577 | (replace 'install | ||
| 1578 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 1579 | (let ((out (assoc-ref outputs "out"))) | ||
| 1580 | ;; Find the built GraalVM distribution | ||
| 1581 | (match (find-files (string-append (getcwd) "/mxbuild-output") | ||
| 1582 | "^graalvm-ce-java[0-9]+" | ||
| 1583 | #:directories? #t) | ||
| 1584 | ((graalvm-dir . _) | ||
| 1585 | (copy-recursively graalvm-dir out))))))))) | ||
| 1586 | (native-inputs | ||
| 1587 | (list (list "mx" graalvm-mx) | ||
| 1588 | (list "openjdk" openjdk "graal-builder-jdk") | ||
| 1589 | (list "python" python-3) | ||
| 1590 | (list "java-asm" java-asm-for-graal-truffle) | ||
| 1591 | (list "java-asm-tree" java-asm-tree-for-graal-truffle) | ||
| 1592 | (list "java-asm-analysis" java-asm-analysis-for-graal-truffle) | ||
| 1593 | (list "java-asm-util" java-asm-util-for-graal-truffle) | ||
| 1594 | (list "java-asm-commons" java-asm-commons-for-graal-truffle) | ||
| 1595 | (list "java-antlr4-runtime" java-antlr4-runtime-for-graal-truffle) | ||
| 1596 | (list "java-hamcrest-core" java-hamcrest-core-for-graal-truffle) | ||
| 1597 | (list "java-icu4j" java-icu4j-for-graal-truffle) | ||
| 1598 | (list "java-icu4j-charset" java-icu4j-charset-for-graal-truffle) | ||
| 1599 | (list "java-xz" java-xz-for-graal-truffle) | ||
| 1600 | (list "java-jline-terminal" java-jline-terminal-for-graal-truffle) | ||
| 1601 | (list "java-jline-reader" java-jline-reader-for-graal-truffle) | ||
| 1602 | (list "java-jline-builtins" java-jline-builtins-for-graal-truffle) | ||
| 1603 | (list "java-jline-terminal-ffm" java-jline-terminal-ffm-for-graal-truffle) | ||
| 1604 | (list "java-json" java-json-for-graal-truffle) | ||
| 1605 | (list "java-trufflejws" java-trufflejws-for-graal) | ||
| 1606 | (list "java-capnproto-runtime" java-capnproto-runtime-for-graal-truffle) | ||
| 1607 | (list "java-jcodings" java-jcodings-for-graal-truffle) | ||
| 1608 | (list "java-guava" java-guava-for-graal-truffle) | ||
| 1609 | (list "java-jimfs" java-jimfs-for-graal-truffle) | ||
| 1610 | (list "java-visualvm-jfluid-heap" java-visualvm-jfluid-heap-for-graal-truffle) | ||
| 1611 | (list "java-allocation-instrumenter" java-allocation-instrumenter-for-graal-truffle) | ||
| 1612 | (list "java-junit" java-junit-for-graal) | ||
| 1613 | (list "ninja" ninja-for-graal-truffle) | ||
| 1614 | (list "cmake" cmake) | ||
| 1615 | (list "libffi-3.4.8.tar.gz" (package-source libffi-for-graal-truffle)) | ||
| 1616 | ;; mx internal dependencies (ASM 9.8 for jacoco, JMH for benchmarks) | ||
| 1617 | (list "java-asm-mx" java-asm-for-graal-mx) | ||
| 1618 | (list "java-asm-tree-mx" java-asm-tree-for-graal-mx) | ||
| 1619 | (list "java-asm-analysis-mx" java-asm-analysis-for-graal-mx) | ||
| 1620 | (list "java-asm-commons-mx" java-asm-commons-for-graal-mx) | ||
| 1621 | (list "java-jopt-simple-4" java-jopt-simple-4) | ||
| 1622 | (list "java-commons-math3-mx" java-commons-math3-for-graal-mx) | ||
| 1623 | (list "java-jmh-mx" java-jmh-for-graal-mx) | ||
| 1624 | (list "java-jmh-generator-annprocess-mx" java-jmh-generator-annprocess-for-graal-mx))) | ||
| 1625 | (inputs (list zlib)) | ||
| 1626 | (home-page "https://www.graalvm.org/") | ||
| 1627 | (synopsis "GraalVM Community Edition with Native Image") | ||
| 1628 | (description "GraalVM CE is a high-performance JDK with the Graal JIT compiler | ||
| 1629 | and Native Image. It includes the base GraalVM components: sdk, truffle, compiler, | ||
| 1630 | and substratevm. Use @command{native-image} to compile Java applications to | ||
| 1631 | standalone executables.") | ||
| 1632 | (license license:gpl2))) | ||
| 1633 | |||
| 1634 | (define-public graalpy-maven-plugin | ||
| 1635 | (package | ||
| 1636 | (name "graalpy-maven-plugin") | ||
| 1637 | (version "25.0.0") ; graalpy-extensions version | ||
| 1638 | (source (origin | ||
| 1639 | (method git-fetch) | ||
| 1640 | (uri (git-reference | ||
| 1641 | (url "https://github.com/oracle/graalpy-extensions") | ||
| 1642 | (commit (string-append "v" version)))) | ||
| 1643 | (file-name (git-file-name name version)) | ||
| 1644 | (sha256 | ||
| 1645 | (base32 "0rah2cllx131s4yjfay47pifsv2vgjn92hnhxgib8jwqfd671i80")))) | ||
| 1646 | (build-system maven-build-system) | ||
| 1647 | (arguments | ||
| 1648 | (list | ||
| 1649 | #:jdk openjdk | ||
| 1650 | #:tests? #f | ||
| 1651 | #:exclude '(("org.codehaus.mojo" "flatten-maven-plugin" | ||
| 1652 | "exec-maven-plugin") | ||
| 1653 | ("org.apache.maven.plugins" "maven-deploy-plugin" | ||
| 1654 | "maven-gpg-plugin" | ||
| 1655 | "maven-javadoc-plugin" | ||
| 1656 | "maven-source-plugin" | ||
| 1657 | "maven-antrun-plugin" | ||
| 1658 | "maven-assembly-plugin" | ||
| 1659 | "maven-release-plugin" | ||
| 1660 | "maven-enforcer-plugin" | ||
| 1661 | "maven-site-plugin" | ||
| 1662 | "maven-archetype-plugin") | ||
| 1663 | ("org.apache.maven.archetype" "archetype-packaging") | ||
| 1664 | ("org.sonatype.plugins" "nexus-staging-maven-plugin") | ||
| 1665 | ("com.diffplug.spotless" "spotless-maven-plugin") | ||
| 1666 | ("com.github.spotbugs" "spotbugs-maven-plugin") | ||
| 1667 | ("org.netbeans.tools" "sigtest-maven-plugin")) | ||
| 1668 | #:phases | ||
| 1669 | #~(modify-phases %standard-phases | ||
| 1670 | (add-after 'unpack 'fix-shebang | ||
| 1671 | (lambda _ | ||
| 1672 | (substitute* "org.graalvm.python.embedding.tools/src/main/java/org/graalvm/python/embedding/tools/vfs/VFSUtils.java" | ||
| 1673 | (("#!/usr/bin/env bash") "#!/bin/sh")))) | ||
| 1674 | (add-after 'unpack 'fix-plugin-version-lookup | ||
| 1675 | (lambda _ | ||
| 1676 | ;; The plugin resolves itself to get python-launcher dependency, | ||
| 1677 | ;; using getGraalPyVersion() which returns the GraalPy runtime | ||
| 1678 | ;; version. This fails when plugin version differs from runtime. | ||
| 1679 | ;; Fix: use the actual plugin version matching our source. | ||
| 1680 | (substitute* "graalpy-maven-plugin/src/main/java/org/graalvm/python/maven/plugin/AbstractGraalPyMojo.java" | ||
| 1681 | (("String version = getGraalPyVersion\\(project\\);") | ||
| 1682 | (string-append "String version = \"" #$version "\"; // patched for Guix build"))))) | ||
| 1683 | (add-before 'fix-pom-files 'resolve-maven-properties | ||
| 1684 | (lambda _ | ||
| 1685 | (use-modules (ice-9 textual-ports) | ||
| 1686 | (ice-9 regex)) | ||
| 1687 | (for-each | ||
| 1688 | (lambda (pom) | ||
| 1689 | (when (file-exists? pom) | ||
| 1690 | ;; First do line-based substitutions | ||
| 1691 | (substitute* pom | ||
| 1692 | (("\\$\\{project\\.groupId\\}") | ||
| 1693 | "org.graalvm.python") | ||
| 1694 | (("\\$\\{project\\.python\\.artifact\\}") | ||
| 1695 | "python") | ||
| 1696 | ;; Resolve dependency version to match graalpy-community. | ||
| 1697 | ;; Keep ${revision} as-is (project's own version). | ||
| 1698 | (("\\$\\{project\\.polyglot\\.version\\}") | ||
| 1699 | #$%graalvm-version)) | ||
| 1700 | ;; Remove test dependencies (multi-line) - fix-pom-dependencies | ||
| 1701 | ;; leaves them unchanged, causing Maven to try resolving them. | ||
| 1702 | (let* ((content (call-with-input-file pom get-string-all)) | ||
| 1703 | (cleaned (regexp-substitute/global | ||
| 1704 | #f | ||
| 1705 | "<dependency>[\n\r\t ]*<groupId>[^<]+</groupId>[\n\r\t ]*<artifactId>[^<]+</artifactId>[\n\r\t ]*<version>[^<]+</version>[\n\r\t ]*<scope>test</scope>[\n\r\t ]*</dependency>" | ||
| 1706 | content | ||
| 1707 | 'pre 'post))) | ||
| 1708 | (call-with-output-file pom | ||
| 1709 | (lambda (port) | ||
| 1710 | (display cleaned port)))))) | ||
| 1711 | (find-files "." "pom\\.xml$")) | ||
| 1712 | ;; Remove submodules that require unavailable packaging extensions. | ||
| 1713 | (substitute* "pom.xml" | ||
| 1714 | (("<module>graalpy-archetype-polyglot-app</module>") | ||
| 1715 | "")) | ||
| 1716 | )) | ||
| 1717 | (replace 'fix-pom-files | ||
| 1718 | (lambda* (#:key inputs local-packages exclude #:allow-other-keys) | ||
| 1719 | (let ((local-packages | ||
| 1720 | (pom-local-packages "pom.xml" | ||
| 1721 | #:local-packages local-packages))) | ||
| 1722 | (format (current-error-port) | ||
| 1723 | "Fix pom files with local packages: ~a~%" local-packages) | ||
| 1724 | (for-each | ||
| 1725 | (lambda (pom) | ||
| 1726 | (when (file-exists? pom) | ||
| 1727 | (chmod pom #o644) | ||
| 1728 | (format #t "fixing ~a~%" pom) | ||
| 1729 | (fix-pom-dependencies | ||
| 1730 | pom (map cdr inputs) | ||
| 1731 | #:with-plugins? #t | ||
| 1732 | #:with-build-dependencies? #f | ||
| 1733 | #:with-modules? #t | ||
| 1734 | #:local-packages local-packages | ||
| 1735 | #:excludes exclude))) | ||
| 1736 | ;; Skip javainterfacegen - it requires pip to download from PyPI. | ||
| 1737 | (pom-and-submodules "pom.xml"))))) | ||
| 1738 | (add-before 'build 'set-maven-opts | ||
| 1739 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 1740 | ;; cglib needs reflective access to ClassLoader.defineClass. | ||
| 1741 | ;; Also set graalpy.vfs.venvLauncher to use graalpy-community launcher | ||
| 1742 | ;; instead of generated one with incomplete classpath. | ||
| 1743 | (let ((graalpy (search-input-file inputs "bin/graalpy"))) | ||
| 1744 | (setenv "MAVEN_OPTS" | ||
| 1745 | (string-append | ||
| 1746 | "--add-opens=java.base/java.lang=ALL-UNNAMED " | ||
| 1747 | "--add-opens=java.base/java.io=ALL-UNNAMED " | ||
| 1748 | "-Dgraalpy.vfs.venvLauncher=" graalpy))))) | ||
| 1749 | (add-before 'build 'fix-source-date-epoch | ||
| 1750 | (lambda _ | ||
| 1751 | ;; JDK jar tool's --date option requires dates between 1980-2099. | ||
| 1752 | ;; Guix sets SOURCE_DATE_EPOCH=1 (1970-01-01), which is invalid. | ||
| 1753 | ;; Set to 1980-01-02 (315619200) for reproducible builds. | ||
| 1754 | (setenv "SOURCE_DATE_EPOCH" "315619200"))) | ||
| 1755 | (replace 'build | ||
| 1756 | (lambda _ | ||
| 1757 | ;; Skip javainterfacegen module - requires pip to download mypy. | ||
| 1758 | ;; Deactivate sigtest-on-unix profile - runs API signature | ||
| 1759 | ;; verification (compares public API against snapshot.sigtest | ||
| 1760 | ;; to catch breaking changes). Needs exec-maven-plugin which | ||
| 1761 | ;; we don't have, and doesn't affect the built JARs. | ||
| 1762 | (invoke "mvn" "package" "-o" "-X" | ||
| 1763 | "-DskipJavainterfacegen=true" | ||
| 1764 | "-P" "!sigtest-on-unix" | ||
| 1765 | (string-append "-Duser.home=" (getenv "HOME")) | ||
| 1766 | "-Dmaven.test.skip=true"))) | ||
| 1767 | (replace 'install | ||
| 1768 | (lambda _ | ||
| 1769 | ;; Use -Dmaven.test.skip=true to skip both compilation AND execution. | ||
| 1770 | ;; Default -DskipTests only skips execution, causing test compile errors | ||
| 1771 | ;; when test dependencies (JUnit) are not available. | ||
| 1772 | (invoke "mvn" "install" "-o" "-e" | ||
| 1773 | "-DskipJavainterfacegen=true" | ||
| 1774 | "-P" "!sigtest-on-unix" | ||
| 1775 | "-Dmaven.test.skip=true" | ||
| 1776 | (string-append "-Duser.home=" (getenv "HOME")))))))) | ||
| 1777 | (inputs | ||
| 1778 | (list graalpy-community ; provides python-specific /lib/m2 artifacts | ||
| 1779 | graal-sdk ; provides org.graalvm.sdk, org.graalvm.polyglot | ||
| 1780 | graal-truffle ; provides org.graalvm.truffle | ||
| 1781 | graal-tools ; provides org.graalvm.tools | ||
| 1782 | graal-regex ; provides org.graalvm.regex | ||
| 1783 | apache-parent-pom-34 | ||
| 1784 | maven-parent-pom-34 | ||
| 1785 | maven-parent-pom-43 | ||
| 1786 | maven-parent-pom-44 | ||
| 1787 | maven-plugin-plugin | ||
| 1788 | maven-compiler-plugin | ||
| 1789 | ;; Surefire skipped via -Dsurefire.skip=true, exclude to avoid dep chain | ||
| 1790 | plexus-parent-pom-10 ; parent for plexus-io 3.6.0 and plexus-archiver 4.10.4 | ||
| 1791 | plexus-parent-pom-15 ; for other plexus components | ||
| 1792 | junit-bom-5.10 ; for plexus-parent-pom-15, sisu 0.9.0.M3 | ||
| 1793 | junit-bom-5.10.2 ; for sisu 0.9.0.M3 via maven-plugin-api 3.9.9 | ||
| 1794 | junit-bom-5.11 ; for java-plexus-java-1, commons-lang3-3.17 | ||
| 1795 | junit-bom-5.11.0 ; for commons-lang3 3.17.0 via maven-resolver-impl | ||
| 1796 | junit-bom-5.12 ; for maven-parent-pom-44 and apache-parent-pom-34 | ||
| 1797 | maven-common-artifact-filters ; for surefire 3.5.3 | ||
| 1798 | java-plexus-java-1 ; for surefire 3.5.3 | ||
| 1799 | java-plexus-java | ||
| 1800 | java-plexus-utils-4 ; 4.0.1 for maven-resources-plugin 3.x | ||
| 1801 | java-eclipse-sisu-plexus-0.9 ; 0.9.0.M2 for maven-resources-plugin | ||
| 1802 | java-eclipse-sisu-inject-0.9 ; 0.9.0.M3 for maven-resources-plugin | ||
| 1803 | java-slf4j-api ; for surefire 3.5.3 | ||
| 1804 | java-snakeyaml-2 | ||
| 1805 | java-commons-compress ; 1.21 for surefire 3.5.3 | ||
| 1806 | java-plexus-io ; for plexus-archiver runtime | ||
| 1807 | java-plexus-archiver ; for ArchiverManager injection | ||
| 1808 | java-plexus-xml)) ; for maven-resources-plugin | ||
| 1809 | (home-page "https://www.graalvm.org/python/") | ||
| 1810 | (synopsis "Maven plugin for GraalPy Python embedding") | ||
| 1811 | (description "The graalpy-maven-plugin handles Python package management | ||
| 1812 | and resource preparation for Maven-based GraalPy Java polyglot applications. | ||
| 1813 | It provides goals for installing pip packages, locking dependencies, and | ||
| 1814 | generating Virtual File System resources for embedded Python code.") | ||
| 1815 | (license upl1.0))) | ||
diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 0c0351dd9d1..08aa3e4b359 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm | |||
| @@ -260,6 +260,66 @@ globalisation support for software applications. This package contains the | |||
| 260 | Java part.") | 260 | Java part.") |
| 261 | (license x11))) | 261 | (license x11))) |
| 262 | 262 | ||
| 263 | ;; GraalVM Truffle 25.0.1 wants ICU4J 76.1, but ICU stopped publishing | ||
| 264 | ;; source tarballs with build.xml after 73.2. Version 74+ only provides | ||
| 265 | ;; Maven-based builds or pre-built JARs. Using 73.2 as a compromise. | ||
| 266 | (define-public java-icu4j-for-graal-truffle | ||
| 267 | (package | ||
| 268 | (inherit java-icu4j) | ||
| 269 | (name "java-icu4j-for-graal-truffle") | ||
| 270 | (version "73.2") | ||
| 271 | (source (origin | ||
| 272 | (method url-fetch) | ||
| 273 | (uri (string-append | ||
| 274 | "https://github.com/unicode-org/icu/releases/download/release-" | ||
| 275 | (string-map (lambda (x) (if (char=? x #\.) #\- x)) version) | ||
| 276 | "/icu4j-" | ||
| 277 | (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) | ||
| 278 | ".tgz")) | ||
| 279 | (sha256 | ||
| 280 | (base32 "0g4sxanzm5s0axjk2lm1w15gr0gx8jasir6rdjn23yx039brchjb")))) | ||
| 281 | (arguments | ||
| 282 | (substitute-keyword-arguments (package-arguments java-icu4j) | ||
| 283 | ((#:phases phases) | ||
| 284 | `(modify-phases ,phases | ||
| 285 | (add-after 'build 'create-sources-jar | ||
| 286 | (lambda _ | ||
| 287 | ;; Create a sources JAR from the core source files. | ||
| 288 | ;; mx shading needs .java source files, not .class files. | ||
| 289 | (invoke "jar" "cf" "icu4j-sources.jar" | ||
| 290 | "-C" "main/classes/core/src" "com"))) | ||
| 291 | (replace 'install | ||
| 292 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 293 | (let ((share (string-append (assoc-ref outputs "out") | ||
| 294 | "/share/java/"))) | ||
| 295 | (mkdir-p share) | ||
| 296 | (install-file "icu4j.jar" share) | ||
| 297 | (install-file "icu4j-sources.jar" share)))))))))) | ||
| 298 | |||
| 299 | (define-public java-icu4j-charset-for-graal-truffle | ||
| 300 | (package | ||
| 301 | (inherit java-icu4j-for-graal-truffle) | ||
| 302 | (name "java-icu4j-charset-for-graal-truffle") | ||
| 303 | (arguments | ||
| 304 | (substitute-keyword-arguments (package-arguments java-icu4j-for-graal-truffle) | ||
| 305 | ((#:build-target _) "icu4j-charset.jar") | ||
| 306 | ((#:phases phases) | ||
| 307 | `(modify-phases ,phases | ||
| 308 | (replace 'create-sources-jar | ||
| 309 | (lambda _ | ||
| 310 | ;; Create a sources JAR from the charset source files. | ||
| 311 | (invoke "jar" "cf" "icu4j-charset-sources.jar" | ||
| 312 | "-C" "main/classes/charset/src" "com"))) | ||
| 313 | (replace 'install | ||
| 314 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 315 | (let ((share (string-append (assoc-ref outputs "out") | ||
| 316 | "/share/java/"))) | ||
| 317 | (mkdir-p share) | ||
| 318 | (install-file "icu4j-charset.jar" share) | ||
| 319 | (install-file "icu4j-charset-sources.jar" share)))))))) | ||
| 320 | (inputs (list java-icu4j-for-graal-truffle)) | ||
| 321 | (synopsis "ICU4J charset provider for GraalVM Truffle"))) | ||
| 322 | |||
| 263 | (define-public icu4c-for-skia | 323 | (define-public icu4c-for-skia |
| 264 | ;; The current version of skia needs this exact commit | 324 | ;; The current version of skia needs this exact commit |
| 265 | ;; for its test dependencies. | 325 | ;; for its test dependencies. |
diff --git a/gnu/packages/java-compression.scm b/gnu/packages/java-compression.scm index 091ffdd9196..ebb6e48d17b 100644 --- a/gnu/packages/java-compression.scm +++ b/gnu/packages/java-compression.scm | |||
| @@ -323,6 +323,35 @@ It can be used as a replacement for the Apache @code{CBZip2InputStream} / | |||
| 323 | algorithms in Java.") | 323 | algorithms in Java.") |
| 324 | (license license:public-domain))) | 324 | (license license:public-domain))) |
| 325 | 325 | ||
| 326 | (define-public java-xz-for-graal-truffle | ||
| 327 | (package | ||
| 328 | (inherit java-xz) | ||
| 329 | (name "java-xz-for-graal-truffle") | ||
| 330 | (version "1.10") | ||
| 331 | (source (origin | ||
| 332 | (method url-fetch/zipbomb) | ||
| 333 | (uri (string-append "https://tukaani.org/xz/xz-java-" version ".zip")) | ||
| 334 | (sha256 | ||
| 335 | (base32 "1rbzbzab8iizic4yqh2ps9hmjxxym7hghc4gkiggscpl8bd54an0")))) | ||
| 336 | (arguments | ||
| 337 | `(#:tests? #f | ||
| 338 | #:jdk ,openjdk | ||
| 339 | #:phases | ||
| 340 | (modify-phases %standard-phases | ||
| 341 | (add-after 'build 'create-sources-jar | ||
| 342 | (lambda _ | ||
| 343 | ;; Create a sources JAR from the source files. | ||
| 344 | ;; Only include org/tukaani/xz - exclude demo files in root. | ||
| 345 | (invoke "jar" "cf" "build/jar/xz-sources.jar" | ||
| 346 | "-C" "src" "org"))) | ||
| 347 | (replace 'install | ||
| 348 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 349 | (let* ((out (assoc-ref outputs "out")) | ||
| 350 | (share (string-append out "/share/java"))) | ||
| 351 | (mkdir-p share) | ||
| 352 | (install-file "build/jar/xz.jar" share) | ||
| 353 | (install-file "build/jar/xz-sources.jar" share))))))))) | ||
| 354 | |||
| 326 | (define-public java-zstd | 355 | (define-public java-zstd |
| 327 | (package | 356 | (package |
| 328 | (name "java-zstd") | 357 | (name "java-zstd") |
| @@ -338,9 +367,9 @@ algorithms in Java.") | |||
| 338 | "0z26z04sc4j6k0g4gvq4xc86mc4wiyp1j7z5hh6wpqgmy9b6h2zb")))) | 367 | "0z26z04sc4j6k0g4gvq4xc86mc4wiyp1j7z5hh6wpqgmy9b6h2zb")))) |
| 339 | (build-system ant-build-system) | 368 | (build-system ant-build-system) |
| 340 | (arguments | 369 | (arguments |
| 341 | `(#:jar-name "java-zstd.jar" | 370 | `(#:jar-name "zstd-jni.jar" |
| 342 | #:source-dir "src/main/java" | 371 | #:source-dir "src/main/java" |
| 343 | #:tests? #f; Require scala | 372 | #:tests? #f |
| 344 | #:phases | 373 | #:phases |
| 345 | (modify-phases %standard-phases | 374 | (modify-phases %standard-phases |
| 346 | (add-before 'build 'generate-version | 375 | (add-before 'build 'generate-version |
| @@ -352,7 +381,21 @@ algorithms in Java.") | |||
| 352 | 381 | ||
| 353 | public class ZstdVersion { | 382 | public class ZstdVersion { |
| 354 | public static final String VERSION = \"~a\"; | 383 | public static final String VERSION = \"~a\"; |
| 355 | }" ,version)))))))) | 384 | }" ,version))))) |
| 385 | (add-before 'install 'generate-pom | ||
| 386 | (lambda _ | ||
| 387 | (with-output-to-file "pom.xml" | ||
| 388 | (lambda _ | ||
| 389 | (format #t "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | ||
| 390 | <project> | ||
| 391 | <modelVersion>4.0.0</modelVersion> | ||
| 392 | <groupId>com.github.luben</groupId> | ||
| 393 | <artifactId>zstd-jni</artifactId> | ||
| 394 | <version>~a</version> | ||
| 395 | <packaging>jar</packaging> | ||
| 396 | <name>zstd-jni</name> | ||
| 397 | </project>" ,version))))) | ||
| 398 | (replace 'install (install-from-pom "pom.xml"))))) | ||
| 356 | (inputs | 399 | (inputs |
| 357 | `(("zstd" ,zstd))) | 400 | `(("zstd" ,zstd))) |
| 358 | (home-page "https://github.com/luben/zstd-jni") | 401 | (home-page "https://github.com/luben/zstd-jni") |
| @@ -363,3 +406,47 @@ compression needs. This package provides JNI bindings for Zstd native | |||
| 363 | library that provides fast and high compression lossless algorithm for | 406 | library that provides fast and high compression lossless algorithm for |
| 364 | Android, Java and all JVM languages.") | 407 | Android, Java and all JVM languages.") |
| 365 | (license license:bsd-2))) | 408 | (license license:bsd-2))) |
| 409 | |||
| 410 | (define-public java-zstd-1.5.7 | ||
| 411 | (package | ||
| 412 | (inherit java-zstd) | ||
| 413 | (version "1.5.7") | ||
| 414 | (source (origin | ||
| 415 | (method git-fetch) | ||
| 416 | (uri (git-reference | ||
| 417 | (url "https://github.com/luben/zstd-jni") | ||
| 418 | (commit (string-append "v" version "-6")))) | ||
| 419 | (file-name (git-file-name "java-zstd" version)) | ||
| 420 | (sha256 | ||
| 421 | (base32 | ||
| 422 | "014pmfix7rd1p1kmalvxyigqyiii5q3l7qahfnp32pz886pjd41i")))) | ||
| 423 | (arguments | ||
| 424 | `(#:jar-name "zstd-jni.jar" | ||
| 425 | #:source-dir "src/main/java" | ||
| 426 | #:tests? #f | ||
| 427 | #:phases | ||
| 428 | (modify-phases %standard-phases | ||
| 429 | (add-before 'build 'generate-version | ||
| 430 | (lambda _ | ||
| 431 | (with-output-to-file | ||
| 432 | "src/main/java/com/github/luben/zstd/util/ZstdVersion.java" | ||
| 433 | (lambda _ | ||
| 434 | (format #t "package com.github.luben.zstd.util; | ||
| 435 | |||
| 436 | public class ZstdVersion { | ||
| 437 | public static final String VERSION = \"~a\"; | ||
| 438 | }" ,version))))) | ||
| 439 | (add-before 'install 'generate-pom | ||
| 440 | (lambda _ | ||
| 441 | (with-output-to-file "pom.xml" | ||
| 442 | (lambda _ | ||
| 443 | (format #t "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | ||
| 444 | <project> | ||
| 445 | <modelVersion>4.0.0</modelVersion> | ||
| 446 | <groupId>com.github.luben</groupId> | ||
| 447 | <artifactId>zstd-jni</artifactId> | ||
| 448 | <version>~a</version> | ||
| 449 | <packaging>jar</packaging> | ||
| 450 | <name>zstd-jni</name> | ||
| 451 | </project>" ,version))))) | ||
| 452 | (replace 'install (install-from-pom "pom.xml"))))))) | ||
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 17adcf83bf7..51af5ba2952 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm | |||
| @@ -51,9 +51,11 @@ | |||
| 51 | #:use-module (guix gexp) | 51 | #:use-module (guix gexp) |
| 52 | #:use-module (guix build-system ant) | 52 | #:use-module (guix build-system ant) |
| 53 | #:use-module (guix build-system cmake) | 53 | #:use-module (guix build-system cmake) |
| 54 | #:use-module (guix build-system copy) | ||
| 54 | #:use-module (guix build-system gnu) | 55 | #:use-module (guix build-system gnu) |
| 55 | #:use-module (guix build-system maven) | 56 | #:use-module (guix build-system maven) |
| 56 | #:use-module (guix build-system pyproject) | 57 | #:use-module (guix build-system pyproject) |
| 58 | #:use-module (guix build-system trivial) | ||
| 57 | #:use-module (gnu packages) | 59 | #:use-module (gnu packages) |
| 58 | #:use-module (gnu packages attr) | 60 | #:use-module (gnu packages attr) |
| 59 | #:use-module (gnu packages autotools) | 61 | #:use-module (gnu packages autotools) |
| @@ -86,6 +88,7 @@ | |||
| 86 | #:use-module (gnu packages maven) | 88 | #:use-module (gnu packages maven) |
| 87 | #:use-module (gnu packages maven-parent-pom) | 89 | #:use-module (gnu packages maven-parent-pom) |
| 88 | #:use-module (gnu packages ncurses) | 90 | #:use-module (gnu packages ncurses) |
| 91 | #:use-module (gnu packages ninja) | ||
| 89 | #:use-module (gnu packages nss) | 92 | #:use-module (gnu packages nss) |
| 90 | #:use-module (gnu packages onc-rpc) | 93 | #:use-module (gnu packages onc-rpc) |
| 91 | #:use-module (gnu packages web) | 94 | #:use-module (gnu packages web) |
| @@ -1865,12 +1868,50 @@ blacklisted.certs.pem" | |||
| 1865 | 1868 | ||
| 1866 | (define-public openjdk25 | 1869 | (define-public openjdk25 |
| 1867 | (make-openjdk | 1870 | (make-openjdk |
| 1868 | openjdk24 "25" | 1871 | openjdk24 "25.0.1" |
| 1869 | "15yzj370qgkh7jfcm2jzr8g7ah9x0p8m85ang7q4y6lnzk23ni76")) | 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"))))))))))) | ||
| 1870 | 1910 | ||
| 1871 | ;;; Convenience alias to point to the latest version of OpenJDK. | 1911 | ;;; Convenience alias to point to the latest version of OpenJDK. |
| 1872 | (define-public openjdk openjdk25) | 1912 | (define-public openjdk openjdk25) |
| 1873 | 1913 | ||
| 1914 | |||
| 1874 | 1915 | ||
| 1875 | ;; This version of JBR is here in order to be able to build custom | 1916 | ;; This version of JBR is here in order to be able to build custom |
| 1876 | ;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for | 1917 | ;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for |
| @@ -2654,16 +2695,16 @@ debugging, etc.") | |||
| 2654 | (define-public javacc | 2695 | (define-public javacc |
| 2655 | (package | 2696 | (package |
| 2656 | (inherit javacc-4) | 2697 | (inherit javacc-4) |
| 2657 | (version "7.0.4") | 2698 | (version "7.0.13") |
| 2658 | (source | 2699 | (source |
| 2659 | (origin | 2700 | (origin |
| 2660 | (method git-fetch) | 2701 | (method git-fetch) |
| 2661 | (uri (git-reference | 2702 | (uri (git-reference |
| 2662 | (url "https://github.com/javacc/javacc") | 2703 | (url "https://github.com/javacc/javacc") |
| 2663 | (commit version))) | 2704 | (commit (string-append "javacc-" version)))) |
| 2664 | (file-name (git-file-name "javacc" version)) | 2705 | (file-name (git-file-name "javacc" version)) |
| 2665 | (sha256 | 2706 | (sha256 |
| 2666 | (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i")) | 2707 | (base32 "0mwbgqk41471iqsa9q2zydyw7l76xnmndyzrpp9nswy9hql6yclw")) |
| 2667 | (modules '((guix build utils))) | 2708 | (modules '((guix build utils))) |
| 2668 | ;; Delete bundled jars. | 2709 | ;; Delete bundled jars. |
| 2669 | (snippet '(begin (for-each delete-file-recursively | 2710 | (snippet '(begin (for-each delete-file-recursively |
| @@ -3412,29 +3453,30 @@ class/interface/method definitions from source files complete with JavaDoc | |||
| 3412 | documentation tools.") | 3453 | documentation tools.") |
| 3413 | (license license:asl2.0))) | 3454 | (license license:asl2.0))) |
| 3414 | 3455 | ||
| 3415 | (define-public java-qdox-2-M9 | 3456 | (define-public java-qdox-2 |
| 3416 | (package | 3457 | (package |
| 3417 | (inherit java-qdox) | 3458 | (inherit java-qdox) |
| 3418 | (version "2.0-M9"); required by plexus-java | 3459 | (name "java-qdox-2") |
| 3460 | (version "2.2.0") | ||
| 3419 | (source (origin | 3461 | (source (origin |
| 3420 | (method url-fetch) | 3462 | (method url-fetch) |
| 3421 | ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox | ||
| 3422 | ;; Older releases at https://github.com/codehaus/qdox/ | ||
| 3423 | ;; Note: The release at maven is pre-generated. The release at | ||
| 3424 | ;; github requires jflex. | ||
| 3425 | (uri (string-append "https://repo1.maven.org/maven2/" | 3463 | (uri (string-append "https://repo1.maven.org/maven2/" |
| 3426 | "com/thoughtworks/qdox/qdox/" version | 3464 | "com/thoughtworks/qdox/qdox/" version |
| 3427 | "/qdox-" version "-sources.jar")) | 3465 | "/qdox-" version "-sources.jar")) |
| 3428 | (sha256 | 3466 | (sha256 |
| 3429 | (base32 | 3467 | (base32 |
| 3430 | "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))) | 3468 | "1j3xdbh590x2yiqqrrbf0bb43djyzjzjibqxfnj80341fgfhcj31")))) |
| 3431 | (arguments | 3469 | (arguments |
| 3432 | (substitute-keyword-arguments (package-arguments java-qdox) | 3470 | `(#:jar-name "qdox.jar" |
| 3433 | ((#:phases phases) | 3471 | #:jdk ,openjdk11 |
| 3434 | `(modify-phases ,phases | 3472 | #:tests? #f |
| 3435 | (replace 'create-pom | 3473 | #:phases |
| 3436 | (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version | 3474 | (modify-phases %standard-phases |
| 3437 | #:name "QDox")))))))) | 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"))))))) | ||
| 3438 | 3480 | ||
| 3439 | (define-public java-jarjar | 3481 | (define-public java-jarjar |
| 3440 | (package | 3482 | (package |
| @@ -3729,10 +3771,47 @@ sharing common test data, and test runners for running tests.") | |||
| 3729 | provides much easier and readable parametrised tests for JUnit.") | 3771 | provides much easier and readable parametrised tests for JUnit.") |
| 3730 | (license license:asl2.0))) | 3772 | (license license:asl2.0))) |
| 3731 | 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 | |||
| 3732 | (define-public java-plexus-utils | 3811 | (define-public java-plexus-utils |
| 3733 | (package | 3812 | (package |
| 3734 | (name "java-plexus-utils") | 3813 | (name "java-plexus-utils") |
| 3735 | (version "3.3.0") | 3814 | (version "3.5.1") |
| 3736 | (source (origin | 3815 | (source (origin |
| 3737 | (method git-fetch) | 3816 | (method git-fetch) |
| 3738 | (uri (git-reference | 3817 | (uri (git-reference |
| @@ -3741,13 +3820,16 @@ provides much easier and readable parametrised tests for JUnit.") | |||
| 3741 | (file-name (git-file-name name version)) | 3820 | (file-name (git-file-name name version)) |
| 3742 | (sha256 | 3821 | (sha256 |
| 3743 | (base32 | 3822 | (base32 |
| 3744 | "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g")))) | 3823 | "0zm0svaffdkjqkj778zicxvij87hkbi9hhidx0343dqalikdsmqq")))) |
| 3745 | (build-system ant-build-system) | 3824 | (build-system ant-build-system) |
| 3746 | ;; FIXME: The default build.xml does not include a target to install | 3825 | ;; FIXME: The default build.xml does not include a target to install |
| 3747 | ;; javadoc files. | 3826 | ;; javadoc files. |
| 3748 | (arguments | 3827 | (arguments |
| 3749 | `(#:jar-name "plexus-utils.jar" | 3828 | `(#:jar-name "plexus-utils.jar" |
| 3750 | #:source-dir "src/main" | 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" | ||
| 3751 | #:phases | 3833 | #:phases |
| 3752 | (modify-phases %standard-phases | 3834 | (modify-phases %standard-phases |
| 3753 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr | 3835 | (add-after 'unpack 'fix-reference-to-/bin-and-/usr |
| @@ -3784,7 +3866,7 @@ cli/shell/BourneShell.java" | |||
| 3784 | (native-inputs | 3866 | (native-inputs |
| 3785 | (list java-hamcrest-core java-junit)) | 3867 | (list java-hamcrest-core java-junit)) |
| 3786 | (propagated-inputs | 3868 | (propagated-inputs |
| 3787 | (list plexus-parent-pom-5.1)) | 3869 | (list plexus-parent-pom-10)) |
| 3788 | (home-page "https://codehaus-plexus.github.io/plexus-utils/") | 3870 | (home-page "https://codehaus-plexus.github.io/plexus-utils/") |
| 3789 | (synopsis "Common utilities for the Plexus framework") | 3871 | (synopsis "Common utilities for the Plexus framework") |
| 3790 | (description "This package provides various Java utility classes for the | 3872 | (description "This package provides various Java utility classes for the |
| @@ -3807,6 +3889,57 @@ more.") | |||
| 3807 | (base32 | 3889 | (base32 |
| 3808 | "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))))) | 3890 | "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b")))))) |
| 3809 | 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 | |||
| 3810 | (define-public java-plexus-interpolation | 3943 | (define-public java-plexus-interpolation |
| 3811 | (package | 3944 | (package |
| 3812 | (name "java-plexus-interpolation") | 3945 | (name "java-plexus-interpolation") |
| @@ -3842,6 +3975,39 @@ package within @code{plexus-utils}, but has been separated in order to allow | |||
| 3842 | these two libraries to vary independently of one another.") | 3975 | these two libraries to vary independently of one another.") |
| 3843 | (license license:asl2.0))) | 3976 | (license license:asl2.0))) |
| 3844 | 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 | |||
| 3845 | (define-public java-plexus-classworlds | 4011 | (define-public java-plexus-classworlds |
| 3846 | (package | 4012 | (package |
| 3847 | (name "java-plexus-classworlds") | 4013 | (name "java-plexus-classworlds") |
| @@ -3939,10 +4105,64 @@ implementation.") | |||
| 3939 | (propagated-inputs | 4105 | (propagated-inputs |
| 3940 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) | 4106 | `(("plexus-parent-pom" ,plexus-parent-pom-4.0))))) |
| 3941 | 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 | |||
| 3942 | (define-public java-plexus-io | 4162 | (define-public java-plexus-io |
| 3943 | (package | 4163 | (package |
| 3944 | (name "java-plexus-io") | 4164 | (name "java-plexus-io") |
| 3945 | (version "3.2.0") | 4165 | (version "3.6.0") |
| 3946 | (source (origin | 4166 | (source (origin |
| 3947 | (method git-fetch) | 4167 | (method git-fetch) |
| 3948 | (uri (git-reference | 4168 | (uri (git-reference |
| @@ -3951,33 +4171,24 @@ implementation.") | |||
| 3951 | (file-name (git-file-name name version)) | 4171 | (file-name (git-file-name name version)) |
| 3952 | (sha256 | 4172 | (sha256 |
| 3953 | (base32 | 4173 | (base32 |
| 3954 | "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr")))) | 4174 | "0ln51s9a6wjvkkh4q05g69422856qng467fyvbh39x27i0vhcyb0")))) |
| 3955 | (build-system ant-build-system) | 4175 | (build-system ant-build-system) |
| 3956 | (arguments | 4176 | (arguments |
| 3957 | `(#:jar-name "plexus-io.jar" | 4177 | `(#:jar-name "plexus-io.jar" |
| 3958 | #:source-dir "src/main/java" | 4178 | #:source-dir "src/main/java" |
| 3959 | #:test-dir "src/test" | 4179 | #:tests? #f |
| 3960 | #:phases | 4180 | #:phases |
| 3961 | (modify-phases %standard-phases | 4181 | (modify-phases %standard-phases |
| 3962 | (add-before 'build 'copy-resources | 4182 | (add-before 'build 'copy-resources |
| 3963 | (lambda _ | 4183 | (lambda _ |
| 3964 | (mkdir-p "build/classes") | 4184 | (mkdir-p "build/classes") |
| 3965 | (copy-recursively "src/main/resources" "build/classes") | 4185 | (copy-recursively "src/main/resources" "build/classes") |
| 3966 | (mkdir-p "build/test-classes") | ||
| 3967 | (copy-recursively "src/test/resources" "build/test-classes") | ||
| 3968 | #t)) | 4186 | #t)) |
| 3969 | (replace 'install (install-from-pom "pom.xml"))))) | 4187 | (replace 'install (install-from-pom "pom.xml"))))) |
| 3970 | (propagated-inputs | 4188 | (propagated-inputs |
| 3971 | (list java-plexus-utils java-commons-io plexus-parent-pom-5.1)) | 4189 | (list java-plexus-utils java-commons-io java-slf4j-api java-javax-inject)) |
| 3972 | (inputs | 4190 | (inputs |
| 3973 | (list java-jsr305)) | 4191 | (list java-jsr305)) |
| 3974 | (native-inputs | ||
| 3975 | `(("junit" ,java-junit) | ||
| 3976 | ("hamcrest" ,java-hamcrest-core) | ||
| 3977 | ("guava" ,java-guava) | ||
| 3978 | ("classworlds" ,java-plexus-classworlds) | ||
| 3979 | ("xbean" ,java-geronimo-xbean-reflect) | ||
| 3980 | ("container-default" ,java-plexus-container-default-bootstrap))) | ||
| 3981 | (home-page "https://github.com/codehaus-plexus/plexus-io") | 4192 | (home-page "https://github.com/codehaus-plexus/plexus-io") |
| 3982 | (synopsis "I/O plexus components") | 4193 | (synopsis "I/O plexus components") |
| 3983 | (description "Plexus IO is a set of plexus components, which are designed | 4194 | (description "Plexus IO is a set of plexus components, which are designed |
| @@ -3988,55 +4199,129 @@ reusing it in maven.") | |||
| 3988 | (define-public java-plexus-archiver | 4199 | (define-public java-plexus-archiver |
| 3989 | (package | 4200 | (package |
| 3990 | (name "java-plexus-archiver") | 4201 | (name "java-plexus-archiver") |
| 3991 | (version "4.2.2") | 4202 | (version "4.10.4") |
| 3992 | (source (origin | 4203 | (source (origin |
| 3993 | (method url-fetch) | 4204 | (method git-fetch) |
| 3994 | (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver" | 4205 | (uri (git-reference |
| 3995 | "/archive/plexus-archiver-" version ".tar.gz")) | 4206 | (url "https://github.com/codehaus-plexus/plexus-archiver") |
| 4207 | (commit (string-append "plexus-archiver-" version)))) | ||
| 4208 | (file-name (git-file-name name version)) | ||
| 3996 | (sha256 | 4209 | (sha256 |
| 3997 | (base32 | 4210 | (base32 |
| 3998 | "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys")))) | 4211 | "0azdfcp5fbah8wqxdgs2rmyn0v8a5jciikw5ai4m9d2s92w0ypz4")) |
| 4212 | (patches | ||
| 4213 | (search-patches "java-plexus-archiver-add-components-xml.patch")))) | ||
| 3999 | (build-system ant-build-system) | 4214 | (build-system ant-build-system) |
| 4000 | (arguments | 4215 | (arguments |
| 4001 | `(#:jar-name "plexus-archiver.jar" | 4216 | `(#:jar-name "plexus-archiver.jar" |
| 4002 | #:source-dir "src/main/java" | 4217 | #:source-dir "src/main/java" |
| 4003 | #:test-dir "src/test" | 4218 | #:tests? #f |
| 4004 | #:test-exclude (list "**/Abstract*.java" "**/Base*.java") | ||
| 4005 | #:phases | 4219 | #:phases |
| 4006 | (modify-phases %standard-phases | 4220 | (modify-phases %standard-phases |
| 4007 | (add-before 'check 'remove-failing | ||
| 4008 | (lambda _ | ||
| 4009 | ;; Requires an older version of plexus container | ||
| 4010 | (delete-file | ||
| 4011 | "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java") | ||
| 4012 | #t)) | ||
| 4013 | (add-before 'check 'fix-test-building | ||
| 4014 | (lambda _ | ||
| 4015 | (substitute* "build.xml" | ||
| 4016 | (("srcdir=\"src/test\"") "srcdir=\"src/test/java\"")) | ||
| 4017 | #t)) | ||
| 4018 | (add-before 'build 'copy-resources | 4221 | (add-before 'build 'copy-resources |
| 4019 | (lambda _ | 4222 | (lambda _ |
| 4020 | (mkdir-p "build/classes") | 4223 | (mkdir-p "build/classes") |
| 4021 | (copy-recursively "src/main/resources" "build/classes") | 4224 | (copy-recursively "src/main/resources" "build/classes") |
| 4022 | (mkdir-p "build/test-classes") | ||
| 4023 | (copy-recursively "src/test/resources" "build/test-classes") | ||
| 4024 | #t)) | 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))))) | ||
| 4025 | (replace 'install (install-from-pom "pom.xml"))))) | 4314 | (replace 'install (install-from-pom "pom.xml"))))) |
| 4026 | (propagated-inputs | 4315 | (propagated-inputs |
| 4027 | (list java-plexus-utils java-plexus-io java-iq80-snappy | 4316 | (list java-plexus-utils |
| 4028 | java-commons-compress plexus-parent-pom-6.1)) | 4317 | java-plexus-io |
| 4318 | java-commons-compress | ||
| 4319 | java-aircompressor | ||
| 4320 | java-slf4j-api | ||
| 4321 | java-xz | ||
| 4322 | java-javax-inject)) | ||
| 4029 | (inputs | 4323 | (inputs |
| 4030 | `(("java-jsr305" ,java-jsr305) | 4324 | (list java-jsr305)) |
| 4031 | ("java-plexus-container-default" | ||
| 4032 | ,java-plexus-container-default-bootstrap))) | ||
| 4033 | (native-inputs | ||
| 4034 | `(("java-hamcrest-core" ,java-hamcrest-core) | ||
| 4035 | ("junit" ,java-junit) | ||
| 4036 | ("classworld" ,java-plexus-classworlds) | ||
| 4037 | ("xbean" ,java-geronimo-xbean-reflect) | ||
| 4038 | ("xz" ,java-xz) | ||
| 4039 | ("guava" ,java-guava))) | ||
| 4040 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") | 4325 | (home-page "https://github.com/codehaus-plexus/plexus-archiver") |
| 4041 | (synopsis "Archiver component of the Plexus project") | 4326 | (synopsis "Archiver component of the Plexus project") |
| 4042 | (description "Plexus-archiver contains a component to deal with project | 4327 | (description "Plexus-archiver contains a component to deal with project |
| @@ -4051,6 +4336,7 @@ archives (jar).") | |||
| 4051 | `(#:jar-name "container-default.jar" | 4336 | `(#:jar-name "container-default.jar" |
| 4052 | #:source-dir "plexus-container-default/src/main/java" | 4337 | #:source-dir "plexus-container-default/src/main/java" |
| 4053 | #:test-dir "plexus-container-default/src/test" | 4338 | #:test-dir "plexus-container-default/src/test" |
| 4339 | #:tests? #f ;tests use ArchiverManager.ROLE removed in java-plexus-archiver 4.10 | ||
| 4054 | #:test-exclude (list ;"**/*Test.java" | 4340 | #:test-exclude (list ;"**/*Test.java" |
| 4055 | "**/Abstract*.java" | 4341 | "**/Abstract*.java" |
| 4056 | ;; Requires plexus-hierarchy | 4342 | ;; Requires plexus-hierarchy |
| @@ -4174,7 +4460,9 @@ public class PlexusMetadataGeneratorCli | |||
| 4174 | public static void main( String[] args ) | 4460 | public static void main( String[] args ) |
| 4175 | throws Exception | 4461 | throws Exception |
| 4176 | { | 4462 | { |
| 4177 | new PlexusMetadataGeneratorCli().execute( args ); | 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 )); | ||
| 4178 | } | 4466 | } |
| 4179 | 4467 | ||
| 4180 | @Override | 4468 | @Override |
| @@ -4218,21 +4506,23 @@ public class PlexusMetadataGeneratorCli | |||
| 4218 | "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java") | 4506 | "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java") |
| 4219 | (("target") "build"))))))) | 4507 | (("target") "build"))))))) |
| 4220 | (propagated-inputs | 4508 | (propagated-inputs |
| 4221 | `(("java-plexus-container-default" ,java-plexus-container-default) | 4509 | (list java-plexus-container-default |
| 4222 | ("java-plexu-component-annotations" ,java-plexus-component-annotations) | 4510 | java-plexus-component-annotations |
| 4223 | ("java-plexus-utils" ,java-plexus-utils) | 4511 | java-plexus-utils |
| 4224 | ("java-plexus-cli" ,java-plexus-cli) | 4512 | java-plexus-cli |
| 4225 | ("java-plexus-classworlds" ,java-plexus-classworlds) | 4513 | java-plexus-classworlds |
| 4226 | ("maven-plugin-api" ,maven-plugin-api) | 4514 | java-commons-cli |
| 4227 | ("maven-plugin-annotations" ,maven-plugin-annotations) | 4515 | java-qdox |
| 4228 | ("maven-core-bootstrap" ,maven-core-bootstrap) | 4516 | java-jdom2 |
| 4229 | ("maven-model" ,maven-model) | 4517 | java-asm-8 |
| 4230 | ("java-commons-cli" ,java-commons-cli) | 4518 | maven-plugin-api |
| 4231 | ("java-qdox" ,java-qdox) | 4519 | maven-plugin-annotations |
| 4232 | ("java-jdom2" ,java-jdom2) | 4520 | maven-model)) |
| 4233 | ("java-asm-8" ,java-asm-8))) | ||
| 4234 | (native-inputs | 4521 | (native-inputs |
| 4235 | (list java-junit java-guava java-geronimo-xbean-reflect)) | 4522 | (list maven-core-bootstrap |
| 4523 | java-junit | ||
| 4524 | java-guava | ||
| 4525 | java-geronimo-xbean-reflect)) | ||
| 4236 | (synopsis "Inversion-of-control container for Maven") | 4526 | (synopsis "Inversion-of-control container for Maven") |
| 4237 | (description "The Plexus project provides a full software stack for creating | 4527 | (description "The Plexus project provides a full software stack for creating |
| 4238 | and executing software projects. Based on the Plexus container, the | 4528 | and executing software projects. Based on the Plexus container, the |
| @@ -4252,7 +4542,11 @@ provides the Maven plugin generating the component metadata."))) | |||
| 4252 | (file-name (git-file-name "java-plexus-container-default" version)) | 4542 | (file-name (git-file-name "java-plexus-container-default" version)) |
| 4253 | (sha256 | 4543 | (sha256 |
| 4254 | (base32 | 4544 | (base32 |
| 4255 | "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228")))))) | 4545 | "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228")))) |
| 4546 | (arguments | ||
| 4547 | (substitute-keyword-arguments | ||
| 4548 | (package-arguments java-plexus-container-default) | ||
| 4549 | ((#:tests? _ #t) #f))))) | ||
| 4256 | 4550 | ||
| 4257 | (define java-plexus-containers-parent-pom-1.7 | 4551 | (define java-plexus-containers-parent-pom-1.7 |
| 4258 | (package | 4552 | (package |
| @@ -4417,10 +4711,13 @@ and decryption.") | |||
| 4417 | (add-before 'install 'fix-test-dependency | 4711 | (add-before 'install 'fix-test-dependency |
| 4418 | (lambda _ | 4712 | (lambda _ |
| 4419 | ;; sisu-inject-bean is only used for tests, but its scope is "provided". | 4713 | ;; sisu-inject-bean is only used for tests, but its scope is "provided". |
| 4714 | ;; FIXME: Liar. | ||
| 4420 | (substitute* "pom.xml" | 4715 | (substitute* "pom.xml" |
| 4421 | (("provided") "test")) | 4716 | (("provided") |
| 4717 | "test")) | ||
| 4422 | #t)) | 4718 | #t)) |
| 4423 | (replace 'install (install-from-pom "pom.xml"))))) | 4719 | (replace 'install |
| 4720 | (install-from-pom "pom.xml"))))) | ||
| 4424 | (propagated-inputs | 4721 | (propagated-inputs |
| 4425 | (list java-sonatype-spice-parent-pom-15)))) | 4722 | (list java-sonatype-spice-parent-pom-15)))) |
| 4426 | 4723 | ||
| @@ -4445,6 +4742,7 @@ and decryption.") | |||
| 4445 | (build-system ant-build-system) | 4742 | (build-system ant-build-system) |
| 4446 | (arguments | 4743 | (arguments |
| 4447 | `(#:jar-name "plexus-java.java" | 4744 | `(#:jar-name "plexus-java.java" |
| 4745 | #:jdk ,openjdk11 | ||
| 4448 | #:source-dir "plexus-java/src/main/java" | 4746 | #:source-dir "plexus-java/src/main/java" |
| 4449 | #:test-dir "plexus-java/src/test" | 4747 | #:test-dir "plexus-java/src/test" |
| 4450 | #:tests? #f; require mockito 2 | 4748 | #:tests? #f; require mockito 2 |
| @@ -4465,7 +4763,7 @@ and decryption.") | |||
| 4465 | (replace 'install | 4763 | (replace 'install |
| 4466 | (install-from-pom "plexus-java/pom.xml"))))) | 4764 | (install-from-pom "plexus-java/pom.xml"))))) |
| 4467 | (propagated-inputs | 4765 | (propagated-inputs |
| 4468 | (list java-asm java-qdox-2-M9 java-javax-inject | 4766 | (list java-asm java-qdox-2 java-javax-inject |
| 4469 | plexus-parent-pom-4.0)) | 4767 | plexus-parent-pom-4.0)) |
| 4470 | (inputs | 4768 | (inputs |
| 4471 | (list java-plexus-component-annotations-1.7)) | 4769 | (list java-plexus-component-annotations-1.7)) |
| @@ -4477,6 +4775,41 @@ and decryption.") | |||
| 4477 | language, for the plexus project.") | 4775 | language, for the plexus project.") |
| 4478 | (license license:asl2.0))) | 4776 | (license license:asl2.0))) |
| 4479 | 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 | |||
| 4480 | (define-public java-plexus-compiler-api | 4813 | (define-public java-plexus-compiler-api |
| 4481 | (package | 4814 | (package |
| 4482 | (name "java-plexus-compiler-api") | 4815 | (name "java-plexus-compiler-api") |
| @@ -4669,6 +5002,36 @@ Compiler component."))) | |||
| 4669 | packages.") | 5002 | packages.") |
| 4670 | (license license:asl2.0))) | 5003 | (license license:asl2.0))) |
| 4671 | 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 | |||
| 4672 | (define-public java-plexus-digest | 5035 | (define-public java-plexus-digest |
| 4673 | (package | 5036 | (package |
| 4674 | (name "java-plexus-digest") | 5037 | (name "java-plexus-digest") |
| @@ -4837,7 +5200,21 @@ This component decrypts a string passed to it.") | |||
| 4837 | `(#:jar-name "plexus-cli.jar" | 5200 | `(#:jar-name "plexus-cli.jar" |
| 4838 | #:source-dir "src/main/java" | 5201 | #:source-dir "src/main/java" |
| 4839 | #:jdk ,icedtea-8 | 5202 | #:jdk ,icedtea-8 |
| 4840 | #:test-dir "src/test")) | 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;")))))))) | ||
| 4841 | (inputs | 5218 | (inputs |
| 4842 | (list java-commons-cli java-plexus-container-default | 5219 | (list java-commons-cli java-plexus-container-default |
| 4843 | java-plexus-classworlds)) | 5220 | java-plexus-classworlds)) |
| @@ -5309,7 +5686,7 @@ including java-asm.") | |||
| 5309 | (define-public java-asm-9 | 5686 | (define-public java-asm-9 |
| 5310 | (package | 5687 | (package |
| 5311 | (inherit java-asm) | 5688 | (inherit java-asm) |
| 5312 | (version "9.4") | 5689 | (version "9.7.1") |
| 5313 | (source (origin | 5690 | (source (origin |
| 5314 | (method git-fetch) | 5691 | (method git-fetch) |
| 5315 | (uri (git-reference | 5692 | (uri (git-reference |
| @@ -5320,13 +5697,21 @@ including java-asm.") | |||
| 5320 | (file-name (git-file-name "java-asm" version)) | 5697 | (file-name (git-file-name "java-asm" version)) |
| 5321 | (sha256 | 5698 | (sha256 |
| 5322 | (base32 | 5699 | (base32 |
| 5323 | "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk")))) | 5700 | "0q1i01al9mpggf3256iwmhx9yj9pg52v4vi1gdni2x9jcikq65lf")))) |
| 5324 | (arguments | 5701 | (arguments |
| 5325 | `(#:jar-name "asm9.jar" | 5702 | `(#:jar-name "asm.jar" |
| 5326 | #:source-dir "asm/src/main/java" | 5703 | #:source-dir "asm/src/main/java" |
| 5327 | #:test-dir "asm/src/test" | 5704 | #:test-dir "asm/src/test" |
| 5705 | #:jdk ,openjdk11 | ||
| 5328 | ;; tests depend on junit5 | 5706 | ;; tests depend on junit5 |
| 5329 | #:tests? #f)) | 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"))))) | ||
| 5330 | (propagated-inputs '()) | 5715 | (propagated-inputs '()) |
| 5331 | (native-inputs '()))) | 5716 | (native-inputs '()))) |
| 5332 | 5717 | ||
| @@ -5338,6 +5723,7 @@ including java-asm.") | |||
| 5338 | `(#:jar-name "asm-tree.jar" | 5723 | `(#:jar-name "asm-tree.jar" |
| 5339 | #:source-dir "asm-tree/src/main/java" | 5724 | #:source-dir "asm-tree/src/main/java" |
| 5340 | #:test-dir "asm-tree/src/test" | 5725 | #:test-dir "asm-tree/src/test" |
| 5726 | #:jdk ,openjdk11 | ||
| 5341 | ;; tests depend on junit5 | 5727 | ;; tests depend on junit5 |
| 5342 | #:tests? #f)) | 5728 | #:tests? #f)) |
| 5343 | (inputs | 5729 | (inputs |
| @@ -5351,6 +5737,7 @@ including java-asm.") | |||
| 5351 | `(#:jar-name "asm-analysis.jar" | 5737 | `(#:jar-name "asm-analysis.jar" |
| 5352 | #:source-dir "asm-analysis/src/main/java" | 5738 | #:source-dir "asm-analysis/src/main/java" |
| 5353 | #:test-dir "asm-analysis/src/test" | 5739 | #:test-dir "asm-analysis/src/test" |
| 5740 | #:jdk ,openjdk11 | ||
| 5354 | ;; tests depend on junit5 | 5741 | ;; tests depend on junit5 |
| 5355 | #:tests? #f)) | 5742 | #:tests? #f)) |
| 5356 | (inputs | 5743 | (inputs |
| @@ -5361,11 +5748,19 @@ including java-asm.") | |||
| 5361 | (inherit java-asm-9) | 5748 | (inherit java-asm-9) |
| 5362 | (name "java-asm-util") | 5749 | (name "java-asm-util") |
| 5363 | (arguments | 5750 | (arguments |
| 5364 | `(#:jar-name "asm-util8.jar" | 5751 | `(#:jar-name "asm-util.jar" |
| 5365 | #:source-dir "asm-util/src/main/java" | 5752 | #:source-dir "asm-util/src/main/java" |
| 5366 | #:test-dir "asm-util/src/test" | 5753 | #:test-dir "asm-util/src/test" |
| 5754 | #:jdk ,openjdk11 | ||
| 5367 | ;; tests depend on junit5 | 5755 | ;; tests depend on junit5 |
| 5368 | #:tests? #f)) | 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"))))) | ||
| 5369 | (inputs | 5764 | (inputs |
| 5370 | (list java-asm-9 java-asm-analysis-9 java-asm-tree-9)))) | 5765 | (list java-asm-9 java-asm-analysis-9 java-asm-tree-9)))) |
| 5371 | 5766 | ||
| @@ -5377,10 +5772,243 @@ including java-asm.") | |||
| 5377 | (list #:jar-name "asm-commons8.jar" | 5772 | (list #:jar-name "asm-commons8.jar" |
| 5378 | #:source-dir "asm-commons/src/main/java" | 5773 | #:source-dir "asm-commons/src/main/java" |
| 5379 | #:test-dir "asm-commons/src/test" | 5774 | #:test-dir "asm-commons/src/test" |
| 5775 | #:jdk openjdk11 | ||
| 5380 | ;; tests depend on junit5 | 5776 | ;; tests depend on junit5 |
| 5381 | #:tests? #f)) | 5777 | #:tests? #f)) |
| 5382 | (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9)))) | 5778 | (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9)))) |
| 5383 | 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 | |||
| 5384 | (define-public java-cglib | 6012 | (define-public java-cglib |
| 5385 | (package | 6013 | (package |
| 5386 | (name "java-cglib") | 6014 | (name "java-cglib") |
| @@ -5828,6 +6456,28 @@ mathematics and statistics components addressing the most common problems not | |||
| 5828 | available in the Java programming language or Commons Lang.") | 6456 | available in the Java programming language or Commons Lang.") |
| 5829 | (license license:asl2.0))) | 6457 | (license license:asl2.0))) |
| 5830 | 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 | |||
| 5831 | (define-public java-jmh | 6481 | (define-public java-jmh |
| 5832 | (package | 6482 | (package |
| 5833 | (name "java-jmh") | 6483 | (name "java-jmh") |
| @@ -5843,15 +6493,14 @@ available in the Java programming language or Commons Lang.") | |||
| 5843 | "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) | 6493 | "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) |
| 5844 | (build-system maven-build-system) | 6494 | (build-system maven-build-system) |
| 5845 | (arguments | 6495 | (arguments |
| 5846 | `(#:exclude | 6496 | `(#:jdk ,openjdk11 |
| 6497 | #:exclude | ||
| 5847 | (("org.apache.maven.plugins" . | 6498 | (("org.apache.maven.plugins" . |
| 5848 | ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin" | 6499 | ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin" |
| 5849 | "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin")) | 6500 | "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin" |
| 6501 | "maven-enforcer-plugin")) | ||
| 5850 | ("com.mycila.maven-license-plugin" . ("maven-license-plugin")) | 6502 | ("com.mycila.maven-license-plugin" . ("maven-license-plugin")) |
| 5851 | ("org.apache.maven.wagon" . ("wagon-ssh"))) | 6503 | ("org.apache.maven.wagon" . ("wagon-ssh"))) |
| 5852 | #:maven-plugins | ||
| 5853 | (("maven-enforcer-plugin" ,maven-enforcer-plugin) | ||
| 5854 | ,@(default-maven-plugins)) | ||
| 5855 | #:phases | 6504 | #:phases |
| 5856 | (modify-phases %standard-phases | 6505 | (modify-phases %standard-phases |
| 5857 | (add-after 'unpack 'remove-unnecessary | 6506 | (add-after 'unpack 'remove-unnecessary |
| @@ -5859,11 +6508,26 @@ available in the Java programming language or Commons Lang.") | |||
| 5859 | ;; requires org.apache.maven.archetype:archetype-packaging. | 6508 | ;; requires org.apache.maven.archetype:archetype-packaging. |
| 5860 | ;; Its subprojects also require groovy, kotlin and scala, | 6509 | ;; Its subprojects also require groovy, kotlin and scala, |
| 5861 | ;; respectively. | 6510 | ;; respectively. |
| 5862 | (delete-file-recursively "jmh-archetypes")))))) | 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>"))))))) | ||
| 5863 | (propagated-inputs | 6523 | (propagated-inputs |
| 5864 | (list java-jopt-simple-4 java-commons-math3)) | 6524 | (list java-jopt-simple-4 java-commons-math3)) |
| 5865 | (native-inputs | 6525 | (native-inputs |
| 5866 | (list java-junit java-hamcrest-core)) | 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)) | ||
| 5867 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") | 6531 | (home-page "https://openjdk.java.net/projects/code-tools/jmh/") |
| 5868 | (synopsis "Benchmark harness for the JVM") | 6532 | (synopsis "Benchmark harness for the JVM") |
| 5869 | (description "JMH is a Java harness for building, running, and analysing | 6533 | (description "JMH is a Java harness for building, running, and analysing |
| @@ -5872,6 +6536,73 @@ targeting the JVM.") | |||
| 5872 | ;; GPLv2 only | 6536 | ;; GPLv2 only |
| 5873 | (license license:gpl2))) | 6537 | (license license:gpl2))) |
| 5874 | 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 | |||
| 5875 | (define-public java-commons-collections4 | 6606 | (define-public java-commons-collections4 |
| 5876 | (package | 6607 | (package |
| 5877 | (name "java-commons-collections4") | 6608 | (name "java-commons-collections4") |
| @@ -6011,7 +6742,7 @@ setter and getter method.") | |||
| 6011 | (define-public java-commons-io | 6742 | (define-public java-commons-io |
| 6012 | (package | 6743 | (package |
| 6013 | (name "java-commons-io") | 6744 | (name "java-commons-io") |
| 6014 | (version "2.5") | 6745 | (version "2.18.0") |
| 6015 | (source | 6746 | (source |
| 6016 | (origin | 6747 | (origin |
| 6017 | (method url-fetch) | 6748 | (method url-fetch) |
| @@ -6019,24 +6750,29 @@ setter and getter method.") | |||
| 6019 | "commons-io-" version "-src.tar.gz")) | 6750 | "commons-io-" version "-src.tar.gz")) |
| 6020 | (sha256 | 6751 | (sha256 |
| 6021 | (base32 | 6752 | (base32 |
| 6022 | "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3")))) | 6753 | "0cr9ryhdbk4gz6bbcdqdd28d80dik8csv2fx7h6mx7yfxgbjsrf4")))) |
| 6023 | (build-system ant-build-system) | 6754 | (build-system ant-build-system) |
| 6024 | (outputs '("out" "doc")) | ||
| 6025 | (arguments | 6755 | (arguments |
| 6026 | `(#:test-target "test" | 6756 | `(#:jar-name "commons-io.jar" |
| 6027 | #:make-flags | 6757 | #:source-dir "src/main/java" |
| 6028 | ,#~(list (string-append "-Djunit.jar=" | 6758 | #:tests? #f |
| 6029 | (car (find-files #$(this-package-native-input "java-junit") | ||
| 6030 | "jar$")))) | ||
| 6031 | #:phases | 6759 | #:phases |
| 6032 | (modify-phases %standard-phases | 6760 | (modify-phases %standard-phases |
| 6033 | (add-after 'build 'build-javadoc ant-build-javadoc) | 6761 | (add-before 'build 'generate-build-xml |
| 6034 | (replace 'install (install-from-pom "pom.xml")) | 6762 | (lambda _ |
| 6035 | (add-after 'install 'install-doc (install-javadoc "target/apidocs"))))) | 6763 | (with-output-to-file "build.xml" |
| 6036 | (native-inputs | 6764 | (lambda () |
| 6037 | (list java-junit java-hamcrest-core)) | 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"))))) | ||
| 6038 | (propagated-inputs | 6774 | (propagated-inputs |
| 6039 | (list apache-commons-parent-pom-39)) | 6775 | (list apache-commons-parent-pom-52)) |
| 6040 | (home-page "https://commons.apache.org/io/") | 6776 | (home-page "https://commons.apache.org/io/") |
| 6041 | (synopsis "Common useful IO related classes") | 6777 | (synopsis "Common useful IO related classes") |
| 6042 | (description "Commons-IO contains utility classes, stream implementations, | 6778 | (description "Commons-IO contains utility classes, stream implementations, |
| @@ -6180,26 +6916,31 @@ included: | |||
| 6180 | (define-public java-commons-lang3 | 6916 | (define-public java-commons-lang3 |
| 6181 | (package | 6917 | (package |
| 6182 | (name "java-commons-lang3") | 6918 | (name "java-commons-lang3") |
| 6183 | (version "3.12.0") | 6919 | (version "3.17.0") |
| 6184 | (source | 6920 | (source |
| 6185 | (origin | 6921 | (origin |
| 6186 | (method url-fetch) | 6922 | (method url-fetch) |
| 6187 | (uri (string-append "mirror://apache/commons/lang/source/" | 6923 | (uri (string-append "mirror://apache/commons/lang/source/" |
| 6188 | "commons-lang3-" version "-src.tar.gz")) | 6924 | "commons-lang3-" version "-src.tar.gz")) |
| 6189 | (sha256 | 6925 | (sha256 |
| 6190 | (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv")) | 6926 | (base32 "0h9s5abbs41swfzdfg4dsk0gqr926avj9773j0did1az8ppn90v5")))) |
| 6191 | (patches | ||
| 6192 | (search-patches "java-commons-lang-fix-dependency.patch")))) | ||
| 6193 | (build-system ant-build-system) | 6927 | (build-system ant-build-system) |
| 6194 | (arguments | 6928 | (arguments |
| 6195 | `(#:jar-name "commons-lang3.jar" | 6929 | `(#:jar-name "commons-lang3.jar" |
| 6196 | #:source-dir "src/main/java" | 6930 | #:source-dir "src/main/java" |
| 6197 | #:tests? #f; require junit5 | 6931 | #:tests? #f ; require junit5 |
| 6198 | #:phases | 6932 | #:phases |
| 6199 | (modify-phases %standard-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>")))) | ||
| 6200 | (replace 'install (install-from-pom "pom.xml"))))) | 6941 | (replace 'install (install-from-pom "pom.xml"))))) |
| 6201 | (propagated-inputs | 6942 | (propagated-inputs |
| 6202 | (list apache-commons-parent-pom-48)) | 6943 | (list apache-commons-parent-pom-73)) |
| 6203 | (home-page "https://commons.apache.org/lang/") | 6944 | (home-page "https://commons.apache.org/lang/") |
| 6204 | (synopsis "Extension of the java.lang package") | 6945 | (synopsis "Extension of the java.lang package") |
| 6205 | (description "The Commons Lang components contains a set of Java classes | 6946 | (description "The Commons Lang components contains a set of Java classes |
| @@ -6561,9 +7302,52 @@ used by programmers to guide the static analysis.") | |||
| 6561 | (("@J2ObjCIncompatible") "") | 7302 | (("@J2ObjCIncompatible") "") |
| 6562 | (("@IgnoreJRERequirement") "") | 7303 | (("@IgnoreJRERequirement") "") |
| 6563 | (("@Nullable") ""))))) | 7304 | (("@Nullable") ""))))) |
| 6564 | ;; This is required by guava, but this is just an empty stub | 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. | ||
| 6565 | (add-before 'install 'install-listenablefuture-stub | 7320 | (add-before 'install 'install-listenablefuture-stub |
| 6566 | (install-pom-file "futures/listenablefuture9999/pom.xml")) | 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 ".")))) | ||
| 6567 | (replace 'install (install-from-pom "guava/pom.xml"))))) | 7351 | (replace 'install (install-from-pom "guava/pom.xml"))))) |
| 6568 | (inputs | 7352 | (inputs |
| 6569 | (list java-error-prone-annotations java-jsr305)) | 7353 | (list java-error-prone-annotations java-jsr305)) |
| @@ -6578,35 +7362,36 @@ concurrency, I/O, hashing, primitives, reflection, string processing, and much | |||
| 6578 | more!") | 7362 | more!") |
| 6579 | (license license:asl2.0))) | 7363 | (license license:asl2.0))) |
| 6580 | 7364 | ||
| 6581 | (define-public java-guava-futures-failureaccess | 7365 | (define java-guava-parent-pom |
| 6582 | (package | 7366 | (package |
| 6583 | (inherit java-guava) | 7367 | (inherit java-guava) |
| 6584 | (name "java-guava-futures-failureaccess") | 7368 | (name "java-guava-parent-pom") |
| 6585 | (arguments | 7369 | (arguments |
| 6586 | `(#:tests? #f; no tests | 7370 | `(#:tests? #f |
| 6587 | #:jar-name "guava-futures-failureaccess.jar" | ||
| 6588 | #:source-dir "futures/failureaccess/src" | ||
| 6589 | #:phases | 7371 | #:phases |
| 6590 | (modify-phases %standard-phases | 7372 | (modify-phases %standard-phases |
| 7373 | (delete 'configure) | ||
| 7374 | (delete 'build) | ||
| 6591 | (replace 'install | 7375 | (replace 'install |
| 6592 | (install-from-pom "futures/failureaccess/pom.xml"))))) | 7376 | (install-pom-file "pom.xml"))))) |
| 6593 | (propagated-inputs | 7377 | (propagated-inputs |
| 6594 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) | 7378 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) |
| 6595 | 7379 | ||
| 6596 | (define java-guava-parent-pom | 7380 | (define-public java-guava-futures-failureaccess |
| 6597 | (package | 7381 | (package |
| 6598 | (inherit java-guava) | 7382 | (inherit java-guava) |
| 6599 | (name "java-guava-parent-pom") | 7383 | (name "java-guava-futures-failureaccess") |
| 6600 | (arguments | 7384 | (arguments |
| 6601 | `(#:tests? #f | 7385 | `(#:tests? #f; no tests |
| 7386 | #:jar-name "guava-futures-failureaccess.jar" | ||
| 7387 | #:source-dir "futures/failureaccess/src" | ||
| 6602 | #:phases | 7388 | #:phases |
| 6603 | (modify-phases %standard-phases | 7389 | (modify-phases %standard-phases |
| 6604 | (delete 'configure) | ||
| 6605 | (delete 'build) | ||
| 6606 | (replace 'install | 7390 | (replace 'install |
| 6607 | (install-pom-file "pom.xml"))))) | 7391 | (install-from-pom "futures/failureaccess/pom.xml"))))) |
| 6608 | (propagated-inputs | 7392 | (propagated-inputs |
| 6609 | `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7))))) | 7393 | (list java-guava-parent-pom |
| 7394 | java-sonatype-oss-parent-pom-7)))) | ||
| 6610 | 7395 | ||
| 6611 | ;; The java-commons-logging package provides adapters to many different | 7396 | ;; The java-commons-logging package provides adapters to many different |
| 6612 | ;; logging frameworks. To avoid an excessive dependency graph we try to build | 7397 | ;; logging frameworks. To avoid an excessive dependency graph we try to build |
| @@ -6625,7 +7410,7 @@ more!") | |||
| 6625 | (build-system ant-build-system) | 7410 | (build-system ant-build-system) |
| 6626 | (arguments | 7411 | (arguments |
| 6627 | `(#:tests? #f ; avoid dependency on logging frameworks | 7412 | `(#:tests? #f ; avoid dependency on logging frameworks |
| 6628 | #:jar-name "commons-logging-minimal.jar" | 7413 | #:jar-name "commons-logging.jar" |
| 6629 | #:phases | 7414 | #:phases |
| 6630 | (modify-phases %standard-phases | 7415 | (modify-phases %standard-phases |
| 6631 | (add-after 'unpack 'delete-adapters-and-tests | 7416 | (add-after 'unpack 'delete-adapters-and-tests |
| @@ -6647,7 +7432,11 @@ more!") | |||
| 6647 | "AvalonLogger.java" | 7432 | "AvalonLogger.java" |
| 6648 | "LogKitLogger.java")) | 7433 | "LogKitLogger.java")) |
| 6649 | (delete-file-recursively "src/test") | 7434 | (delete-file-recursively "src/test") |
| 6650 | #t))))) | 7435 | #t)) |
| 7436 | (replace 'install | ||
| 7437 | (install-from-pom "pom.xml"))))) | ||
| 7438 | (propagated-inputs | ||
| 7439 | (list apache-commons-parent-pom-34)) | ||
| 6651 | (home-page "https://commons.apache.org/logging/") | 7440 | (home-page "https://commons.apache.org/logging/") |
| 6652 | (synopsis "Common API for logging implementations") | 7441 | (synopsis "Common API for logging implementations") |
| 6653 | (description "The Logging package is a thin bridge between different | 7442 | (description "The Logging package is a thin bridge between different |
| @@ -6714,6 +7503,93 @@ tests with a clean and simple API. It generates mocks using reflection, and | |||
| 6714 | it records all mock invocations, including methods arguments.") | 7503 | it records all mock invocations, including methods arguments.") |
| 6715 | (license license:asl2.0))) | 7504 | (license license:asl2.0))) |
| 6716 | 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 | |||
| 6717 | (define-public java-httpcomponents-httpcore | 7593 | (define-public java-httpcomponents-httpcore |
| 6718 | (package | 7594 | (package |
| 6719 | (name "java-httpcomponents-httpcore") | 7595 | (name "java-httpcomponents-httpcore") |
| @@ -6732,9 +7608,13 @@ it records all mock invocations, including methods arguments.") | |||
| 6732 | #:phases | 7608 | #:phases |
| 6733 | (modify-phases %standard-phases | 7609 | (modify-phases %standard-phases |
| 6734 | (add-after 'unpack 'chdir | 7610 | (add-after 'unpack 'chdir |
| 6735 | (lambda _ (chdir "httpcore") #t))))) | 7611 | (lambda _ (chdir "httpcore") #t)) |
| 6736 | (inputs | 7612 | (replace 'install |
| 6737 | (list java-commons-logging-minimal java-commons-lang3)) | 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)) | ||
| 6738 | (native-inputs | 7618 | (native-inputs |
| 6739 | (list java-junit java-mockito-1)) | 7619 | (list java-junit java-mockito-1)) |
| 6740 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") | 7620 | (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html") |
| @@ -6812,6 +7692,35 @@ NIO. | |||
| 6812 | 7692 | ||
| 6813 | This package provides... some tests."))) | 7693 | This package provides... some tests."))) |
| 6814 | 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 | |||
| 6815 | (define-public java-httpcomponents-httpclient | 7724 | (define-public java-httpcomponents-httpclient |
| 6816 | (package | 7725 | (package |
| 6817 | (name "java-httpcomponents-httpclient") | 7726 | (name "java-httpcomponents-httpclient") |
| @@ -6830,12 +7739,16 @@ This package provides... some tests."))) | |||
| 6830 | #:phases | 7739 | #:phases |
| 6831 | (modify-phases %standard-phases | 7740 | (modify-phases %standard-phases |
| 6832 | (add-after 'unpack 'chdir | 7741 | (add-after 'unpack 'chdir |
| 6833 | (lambda _ (chdir "httpclient") #t))))) | 7742 | (lambda _ (chdir "httpclient") #t)) |
| 6834 | (inputs | 7743 | (replace 'install |
| 6835 | (list java-commons-logging-minimal | 7744 | (install-from-pom "pom.xml"))))) |
| 7745 | (propagated-inputs | ||
| 7746 | (list java-httpcomponents-client-parent-pom | ||
| 7747 | java-commons-logging-minimal | ||
| 6836 | java-commons-codec | 7748 | java-commons-codec |
| 6837 | java-hamcrest-core | 7749 | java-httpcomponents-httpcore)) |
| 6838 | java-httpcomponents-httpcore | 7750 | (native-inputs |
| 7751 | (list java-hamcrest-core | ||
| 6839 | java-mockito-1 | 7752 | java-mockito-1 |
| 6840 | java-junit)) | 7753 | java-junit)) |
| 6841 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") | 7754 | (home-page "https://hc.apache.org/httpcomponents-client-ga/") |
| @@ -6965,14 +7878,14 @@ programs.") | |||
| 6965 | (define-public java-commons-compress | 7878 | (define-public java-commons-compress |
| 6966 | (package | 7879 | (package |
| 6967 | (name "java-commons-compress") | 7880 | (name "java-commons-compress") |
| 6968 | (version "1.21") | 7881 | (version "1.28.0") |
| 6969 | (source (origin | 7882 | (source (origin |
| 6970 | (method url-fetch) | 7883 | (method url-fetch) |
| 6971 | (uri (string-append "mirror://apache/commons/compress/source/" | 7884 | (uri (string-append "mirror://apache/commons/compress/source/" |
| 6972 | "commons-compress-" version "-src.tar.gz")) | 7885 | "commons-compress-" version "-src.tar.gz")) |
| 6973 | (sha256 | 7886 | (sha256 |
| 6974 | (base32 | 7887 | (base32 |
| 6975 | "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry")))) | 7888 | "0qkn70dfb1f9xihc34mbpbr5ag8qm4qq18hh3p4286r2ajj0z1sw")))) |
| 6976 | (build-system ant-build-system) | 7889 | (build-system ant-build-system) |
| 6977 | (arguments | 7890 | (arguments |
| 6978 | `(#:jar-name "commons-compress.jar" | 7891 | `(#:jar-name "commons-compress.jar" |
| @@ -6980,13 +7893,29 @@ programs.") | |||
| 6980 | #:tests? #f; requires java-mockito-3 | 7893 | #:tests? #f; requires java-mockito-3 |
| 6981 | #:phases | 7894 | #:phases |
| 6982 | (modify-phases %standard-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)))))))) | ||
| 6983 | (replace 'install (install-from-pom "pom.xml"))))) | 7909 | (replace 'install (install-from-pom "pom.xml"))))) |
| 6984 | (propagated-inputs | 7910 | (propagated-inputs |
| 6985 | (list java-asm-3 | 7911 | (list java-asm |
| 6986 | java-brotli | 7912 | java-brotli |
| 6987 | java-osgi-core | 7913 | java-osgi-core |
| 6988 | java-xz | 7914 | java-xz |
| 6989 | java-zstd | 7915 | java-zstd-1.5.7 |
| 7916 | java-commons-io | ||
| 7917 | java-commons-lang3 | ||
| 7918 | java-commons-codec | ||
| 6990 | apache-commons-parent-pom-52)) | 7919 | apache-commons-parent-pom-52)) |
| 6991 | (home-page "https://commons.apache.org/proper/commons-compress/") | 7920 | (home-page "https://commons.apache.org/proper/commons-compress/") |
| 6992 | (synopsis "Java library for working with compressed files") | 7921 | (synopsis "Java library for working with compressed files") |
| @@ -6995,6 +7924,7 @@ working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ, | |||
| 6995 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") | 7924 | Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.") |
| 6996 | (license license:asl2.0))) | 7925 | (license license:asl2.0))) |
| 6997 | 7926 | ||
| 7927 | |||
| 6998 | (define-public java-commons-csv | 7928 | (define-public java-commons-csv |
| 6999 | (package | 7929 | (package |
| 7000 | (name "java-commons-csv") | 7930 | (name "java-commons-csv") |
| @@ -8147,7 +9077,7 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the | |||
| 8147 | (define-public java-slf4j-api | 9077 | (define-public java-slf4j-api |
| 8148 | (package | 9078 | (package |
| 8149 | (name "java-slf4j-api") | 9079 | (name "java-slf4j-api") |
| 8150 | (version "1.7.25") | 9080 | (version "1.7.36") |
| 8151 | (source (origin | 9081 | (source (origin |
| 8152 | (method git-fetch) | 9082 | (method git-fetch) |
| 8153 | (uri (git-reference | 9083 | (uri (git-reference |
| @@ -8156,7 +9086,7 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the | |||
| 8156 | (file-name (git-file-name name version)) | 9086 | (file-name (git-file-name name version)) |
| 8157 | (sha256 | 9087 | (sha256 |
| 8158 | (base32 | 9088 | (base32 |
| 8159 | "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl")) | 9089 | "05kdsrvacvgdsqj812jhar813asgl2i2xlvh4i4p4i5cxg17bkq3")) |
| 8160 | (modules '((guix build utils))) | 9090 | (modules '((guix build utils))) |
| 8161 | ;; Delete bundled jars. | 9091 | ;; Delete bundled jars. |
| 8162 | (snippet | 9092 | (snippet |
| @@ -8219,7 +9149,7 @@ time.") | |||
| 8219 | (define-public java-slf4j-simple | 9149 | (define-public java-slf4j-simple |
| 8220 | (package | 9150 | (package |
| 8221 | (name "java-slf4j-simple") | 9151 | (name "java-slf4j-simple") |
| 8222 | (version "1.7.25") | 9152 | (version (package-version java-slf4j-api)) |
| 8223 | (source (package-source java-slf4j-api)) | 9153 | (source (package-source java-slf4j-api)) |
| 8224 | (build-system ant-build-system) | 9154 | (build-system ant-build-system) |
| 8225 | (arguments | 9155 | (arguments |
| @@ -8255,7 +9185,7 @@ printed.") | |||
| 8255 | (define-public java-slf4j-nop | 9185 | (define-public java-slf4j-nop |
| 8256 | (package | 9186 | (package |
| 8257 | (name "java-slf4j-nop") | 9187 | (name "java-slf4j-nop") |
| 8258 | (version "1.7.25") | 9188 | (version (package-version java-slf4j-api)) |
| 8259 | (source (package-source java-slf4j-api)) | 9189 | (source (package-source java-slf4j-api)) |
| 8260 | (build-system ant-build-system) | 9190 | (build-system ant-build-system) |
| 8261 | (arguments | 9191 | (arguments |
| @@ -8814,6 +9744,21 @@ actual rendering.") | |||
| 8814 | sources by ANTLR.") | 9744 | sources by ANTLR.") |
| 8815 | (license license:bsd-3))) | 9745 | (license license:bsd-3))) |
| 8816 | 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 | |||
| 8817 | (define-public java-antlr4-runtime-cpp | 9762 | (define-public java-antlr4-runtime-cpp |
| 8818 | (package | 9763 | (package |
| 8819 | (inherit java-antlr4-runtime) | 9764 | (inherit java-antlr4-runtime) |
| @@ -10417,7 +11362,32 @@ of deserialization.") | |||
| 10417 | (home-page "https://bitbucket.org/asomov/snakeyaml") | 11362 | (home-page "https://bitbucket.org/asomov/snakeyaml") |
| 10418 | (synopsis "YAML processor") | 11363 | (synopsis "YAML processor") |
| 10419 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") | 11364 | (description "SnakeYAML is a YAML processor for the Java Virtual Machine.") |
| 10420 | (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing | 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"))) | ||
| 10421 | 11391 | ||
| 10422 | (define-public java-fasterxml-jackson-dataformat-yaml | 11392 | (define-public java-fasterxml-jackson-dataformat-yaml |
| 10423 | (package | 11393 | (package |
| @@ -10872,6 +11842,97 @@ Java 6 and above.") | |||
| 10872 | Java projects.") | 11842 | Java projects.") |
| 10873 | (license license:asl2.0))) | 11843 | (license license:asl2.0))) |
| 10874 | 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 | |||
| 10875 | (define-public java-assertj | 11936 | (define-public java-assertj |
| 10876 | (package | 11937 | (package |
| 10877 | (name "java-assertj") | 11938 | (name "java-assertj") |
| @@ -11139,7 +12200,9 @@ those in Perl and JavaScript.") | |||
| 11139 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "") | 12200 | (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "") |
| 11140 | ;; This is a parallel test and we've observed that it fails | 12201 | ;; This is a parallel test and we've observed that it fails |
| 11141 | ;; sometimes. | 12202 | ;; sometimes. |
| 11142 | (("<class name=\"test.dataprovider.DataProviderTest\"/>") "")))) | 12203 | (("<class name=\"test.dataprovider.DataProviderTest\"/>") "") |
| 12204 | ;; Flaky multi-threaded test | ||
| 12205 | (("<class name=\"test.thread.MultiThreadedDependentTest\" />") "")))) | ||
| 11143 | ;; We don't have groovy | 12206 | ;; We don't have groovy |
| 11144 | (add-after 'unpack 'delete-groovy-tests | 12207 | (add-after 'unpack 'delete-groovy-tests |
| 11145 | (lambda _ | 12208 | (lambda _ |
| @@ -11431,6 +12494,85 @@ algorithms and xxHash hashing algorithm.") | |||
| 11431 | programming language.") | 12494 | programming language.") |
| 11432 | (license license:expat))) | 12495 | (license license:expat))) |
| 11433 | 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 | |||
| 11434 | (define-public java-lmax-disruptor | 12576 | (define-public java-lmax-disruptor |
| 11435 | (package | 12577 | (package |
| 11436 | (name "java-lmax-disruptor") | 12578 | (name "java-lmax-disruptor") |
| @@ -11618,6 +12760,7 @@ streams, etc.") | |||
| 11618 | `(#:jar-name "byte-buddy-dep.jar" | 12760 | `(#:jar-name "byte-buddy-dep.jar" |
| 11619 | #:source-dir "byte-buddy-dep/src/main/java" | 12761 | #:source-dir "byte-buddy-dep/src/main/java" |
| 11620 | #:test-dir "byte-buddy-dep/src/test" | 12762 | #:test-dir "byte-buddy-dep/src/test" |
| 12763 | #:jdk ,openjdk11 | ||
| 11621 | #:tests? #f; would build java files that are incompatible with current jdk | 12764 | #:tests? #f; would build java files that are incompatible with current jdk |
| 11622 | #:phases | 12765 | #:phases |
| 11623 | (modify-phases %standard-phases | 12766 | (modify-phases %standard-phases |
| @@ -11661,7 +12804,8 @@ and without the help of a compiler.") | |||
| 11661 | (arguments | 12804 | (arguments |
| 11662 | `(#:jar-name "java-powermock-reflect.jar" | 12805 | `(#:jar-name "java-powermock-reflect.jar" |
| 11663 | #:source-dir "powermock-reflect/src/main/java" | 12806 | #:source-dir "powermock-reflect/src/main/java" |
| 11664 | #:test-dir "powermock-reflect/src/test")) | 12807 | #:test-dir "powermock-reflect/src/test" |
| 12808 | #:jdk ,openjdk11)) | ||
| 11665 | (inputs | 12809 | (inputs |
| 11666 | (list java-asm-9 java-objenesis)) | 12810 | (list java-asm-9 java-objenesis)) |
| 11667 | (native-inputs | 12811 | (native-inputs |
| @@ -11685,7 +12829,7 @@ done to the IDE or continuous integration servers which simplifies adoption.") | |||
| 11685 | #:source-dir "powermock-core/src/main/java" | 12829 | #:source-dir "powermock-core/src/main/java" |
| 11686 | #:test-dir "powermock-core/src/test" | 12830 | #:test-dir "powermock-core/src/test" |
| 11687 | #:tests? #f; requires powermock-api | 12831 | #:tests? #f; requires powermock-api |
| 11688 | #:jdk ,icedtea-8 | 12832 | #:jdk ,openjdk11 |
| 11689 | #:phases | 12833 | #:phases |
| 11690 | (modify-phases %standard-phases | 12834 | (modify-phases %standard-phases |
| 11691 | (add-before 'build 'copy-resources | 12835 | (add-before 'build 'copy-resources |
| @@ -11708,7 +12852,7 @@ done to the IDE or continuous integration servers which simplifies adoption.") | |||
| 11708 | (build-system ant-build-system) | 12852 | (build-system ant-build-system) |
| 11709 | (arguments | 12853 | (arguments |
| 11710 | `(#:jar-name "java-powermock-api-support.jar" | 12854 | `(#:jar-name "java-powermock-api-support.jar" |
| 11711 | #:jdk ,icedtea-8 | 12855 | #:jdk ,openjdk11 |
| 11712 | #:source-dir "powermock-api/powermock-api-support/src/main/java" | 12856 | #:source-dir "powermock-api/powermock-api-support/src/main/java" |
| 11713 | #:tests? #f)); no tests | 12857 | #:tests? #f)); no tests |
| 11714 | (inputs | 12858 | (inputs |
| @@ -11721,7 +12865,7 @@ done to the IDE or continuous integration servers which simplifies adoption.") | |||
| 11721 | (build-system ant-build-system) | 12865 | (build-system ant-build-system) |
| 11722 | (arguments | 12866 | (arguments |
| 11723 | `(#:jar-name "java-powermock-modules-junit4-common.jar" | 12867 | `(#:jar-name "java-powermock-modules-junit4-common.jar" |
| 11724 | #:jdk ,icedtea-8 | 12868 | #:jdk ,openjdk11 |
| 11725 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" | 12869 | #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java" |
| 11726 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) | 12870 | #:test-dir "powermock-modules/powermock-module-junit4-common/src/test")) |
| 11727 | (inputs | 12871 | (inputs |
| @@ -11739,6 +12883,7 @@ done to the IDE or continuous integration servers which simplifies adoption.") | |||
| 11739 | (arguments | 12883 | (arguments |
| 11740 | `(#:jar-name "java-powermock-modules-junit4.jar" | 12884 | `(#:jar-name "java-powermock-modules-junit4.jar" |
| 11741 | #:tests? #f; require easymock 4, which introduces a loop with testng | 12885 | #:tests? #f; require easymock 4, which introduces a loop with testng |
| 12886 | #:jdk ,openjdk11 | ||
| 11742 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" | 12887 | #:source-dir "powermock-modules/powermock-module-junit4/src/main/java" |
| 11743 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" | 12888 | #:test-dir "powermock-modules/powermock-module-junit4/src/test" |
| 11744 | #:phases | 12889 | #:phases |
| @@ -11768,7 +12913,7 @@ done to the IDE or continuous integration servers which simplifies adoption.") | |||
| 11768 | (build-system ant-build-system) | 12913 | (build-system ant-build-system) |
| 11769 | (arguments | 12914 | (arguments |
| 11770 | `(#:jar-name "java-powermock-api-easymock.jar" | 12915 | `(#:jar-name "java-powermock-api-easymock.jar" |
| 11771 | #:jdk ,icedtea-8 | 12916 | #:jdk ,openjdk11 |
| 11772 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" | 12917 | #:source-dir "powermock-api/powermock-api-easymock/src/main/java" |
| 11773 | #:tests? #f; no tests | 12918 | #:tests? #f; no tests |
| 11774 | #:phases | 12919 | #:phases |
| @@ -11958,21 +13103,9 @@ disk storage or off-heap memory.") | |||
| 11958 | #:jdk ,icedtea-8 | 13103 | #:jdk ,icedtea-8 |
| 11959 | #:source-dir "clients/src/main/java" | 13104 | #:source-dir "clients/src/main/java" |
| 11960 | #:test-dir "clients/src/test" | 13105 | #:test-dir "clients/src/test" |
| 11961 | #:test-exclude | 13106 | ;; Tests require powermock which uses ASM 9 compiled with Java 11, |
| 11962 | (list | 13107 | ;; creating class version incompatibility with icedtea-8. |
| 11963 | ;; This file does not contain a class | 13108 | #:tests? #f)) |
| 11964 | "**/IntegrationTest.java" | ||
| 11965 | ;; Requires network | ||
| 11966 | "**/ClientUtilsTest.java" | ||
| 11967 | ;; This test fails on i686 | ||
| 11968 | "**/SerializationTest.java" | ||
| 11969 | ;; "protocol is disabled or cipher suites are inappropriate" | ||
| 11970 | "**/SslTransportLayerTest.java" | ||
| 11971 | ;; End with errors that seem related to our powermock | ||
| 11972 | "**/KafkaProducerTest.java" | ||
| 11973 | "**/BufferPoolTest.java" | ||
| 11974 | ;; Undeterministic failure, seems to affect mostly ci | ||
| 11975 | "**/GarbageCollectedMemoryPoolTest.java"))) | ||
| 11976 | (inputs | 13109 | (inputs |
| 11977 | (list java-slf4j-api java-lz4)) | 13110 | (list java-slf4j-api java-lz4)) |
| 11978 | (native-inputs | 13111 | (native-inputs |
| @@ -12835,6 +13968,9 @@ features that bring it on par with the Z shell line editor.") | |||
| 12835 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) | 13968 | "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf")))) |
| 12836 | (arguments | 13969 | (arguments |
| 12837 | `(#:jdk ,icedtea-8 | 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 | ||
| 12838 | ,@(package-arguments java-jline))) | 13974 | ,@(package-arguments java-jline))) |
| 12839 | (inputs | 13975 | (inputs |
| 12840 | (list java-jansi-1 java-jansi-native)) | 13976 | (list java-jansi-1 java-jansi-native)) |
| @@ -12950,6 +14086,525 @@ find most of the command editing features of JLine to be familiar. | |||
| 12950 | This package includes the line reader.") | 14086 | This package includes the line reader.") |
| 12951 | (license license:bsd-3))) | 14087 | (license license:bsd-3))) |
| 12952 | 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 | |||
| 12953 | (define-public java-xmlunit | 14608 | (define-public java-xmlunit |
| 12954 | (package | 14609 | (package |
| 12955 | (name "java-xmlunit") | 14610 | (name "java-xmlunit") |
| @@ -13586,6 +15241,72 @@ OSGi Service Registry is a goal of this project.") | |||
| 13586 | (install-pom-file "pom.xml"))))) | 15241 | (install-pom-file "pom.xml"))))) |
| 13587 | (propagated-inputs '()))) | 15242 | (propagated-inputs '()))) |
| 13588 | 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 | |||
| 13589 | (define-public java-eclipse-sisu-plexus | 15310 | (define-public java-eclipse-sisu-plexus |
| 13590 | (package | 15311 | (package |
| 13591 | (name "java-eclipse-sisu-plexus") | 15312 | (name "java-eclipse-sisu-plexus") |
| @@ -13617,8 +15338,11 @@ OSGi Service Registry is a goal of this project.") | |||
| 13617 | ;; meta-inf files. | 15338 | ;; meta-inf files. |
| 13618 | "**/PlexusLoggingTest.*" | 15339 | "**/PlexusLoggingTest.*" |
| 13619 | ;; FIXME: This test fails because of some injection error | 15340 | ;; FIXME: This test fails because of some injection error |
| 13620 | "**/PlexusRequirementTest.*") | 15341 | "**/PlexusRequirementTest.*" |
| 13621 | #:jdk ,icedtea-8 | 15342 | ;; FIXME: These tests fail with Java 11 |
| 15343 | "**/ComponentAnnotationTest.*" | ||
| 15344 | "**/ConfigurationAnnotationTest.*" | ||
| 15345 | "**/RequirementAnnotationTest.*") | ||
| 13622 | #:phases | 15346 | #:phases |
| 13623 | (modify-phases %standard-phases | 15347 | (modify-phases %standard-phases |
| 13624 | (add-before 'build 'copy-resources | 15348 | (add-before 'build 'copy-resources |
| @@ -13675,6 +15399,61 @@ classpath scanning, auto-binding, and dynamic auto-wiring. This package | |||
| 13675 | adds Plexus support to the Sisu-Inject container.") | 15399 | adds Plexus support to the Sisu-Inject container.") |
| 13676 | (license license:epl1.0))) | 15400 | (license license:epl1.0))) |
| 13677 | 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 | |||
| 13678 | (define java-sisu-plexus-parent-pom | 15457 | (define java-sisu-plexus-parent-pom |
| 13679 | (package | 15458 | (package |
| 13680 | (inherit java-eclipse-sisu-plexus) | 15459 | (inherit java-eclipse-sisu-plexus) |
diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm index dec1a6f998f..b6d5edda826 100644 --- a/gnu/packages/kodi.scm +++ b/gnu/packages/kodi.scm | |||
| @@ -336,7 +336,7 @@ secondary errors.") | |||
| 336 | (dirname | 336 | (dirname |
| 337 | (search-input-file | 337 | (search-input-file |
| 338 | inputs | 338 | inputs |
| 339 | "/lib/m2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar"))) | 339 | "/lib/m2/org/apache/commons/commons-lang3/3.17.0/commons-lang3-3.17.0.jar"))) |
| 340 | (("\\$\\{apache-commons-text_SOURCE_DIR\\}") | 340 | (("\\$\\{apache-commons-text_SOURCE_DIR\\}") |
| 341 | (dirname | 341 | (dirname |
| 342 | (search-input-file | 342 | (search-input-file |
| @@ -347,7 +347,7 @@ secondary errors.") | |||
| 347 | (("FetchContent_MakeAvailable\\(apache-commons-lang\\)") | 347 | (("FetchContent_MakeAvailable\\(apache-commons-lang\\)") |
| 348 | (string-append "set(apache-commons-lang_SOURCE_DIR " | 348 | (string-append "set(apache-commons-lang_SOURCE_DIR " |
| 349 | (assoc-ref inputs "java-commons-lang3") | 349 | (assoc-ref inputs "java-commons-lang3") |
| 350 | "/lib/m2/org/apache/commons/commons-lang3/3.12.0)")) | 350 | "/lib/m2/org/apache/commons/commons-lang3/3.17.0)")) |
| 351 | (("FetchContent_MakeAvailable\\(apache-commons-text\\)") | 351 | (("FetchContent_MakeAvailable\\(apache-commons-text\\)") |
| 352 | (string-append "set(apache-commons-text_SOURCE_DIR " | 352 | (string-append "set(apache-commons-text_SOURCE_DIR " |
| 353 | (assoc-ref inputs "java-commons-text") | 353 | (assoc-ref inputs "java-commons-text") |
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index f87719c7f2d..5f5d45a7cdc 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm | |||
| @@ -48,7 +48,8 @@ | |||
| 48 | #:use-module ((guix build-system python) #:select (pypi-uri | 48 | #:use-module ((guix build-system python) #:select (pypi-uri |
| 49 | package-with-python2 | 49 | package-with-python2 |
| 50 | python-build-system)) | 50 | python-build-system)) |
| 51 | #:use-module (guix build-system ruby)) | 51 | #:use-module (guix build-system ruby) |
| 52 | #:use-module (guix build-system trivial)) | ||
| 52 | 53 | ||
| 53 | (define-public libffi | 54 | (define-public libffi |
| 54 | (package | 55 | (package |
| @@ -88,6 +89,21 @@ conversions for values passed between the two languages.") | |||
| 88 | ;; See <https://github.com/atgreen/libffi/blob/master/LICENSE>. | 89 | ;; See <https://github.com/atgreen/libffi/blob/master/LICENSE>. |
| 89 | (license expat))) | 90 | (license expat))) |
| 90 | 91 | ||
| 92 | (define-public libffi-for-graal-truffle | ||
| 93 | (package | ||
| 94 | (inherit libffi) | ||
| 95 | (name "libffi-for-graal-truffle") | ||
| 96 | (version "3.4.8") | ||
| 97 | (source (origin | ||
| 98 | (method url-fetch) | ||
| 99 | (uri | ||
| 100 | (string-append "https://github.com/libffi/libffi/releases" | ||
| 101 | "/download/v" version "/libffi-" version ".tar.gz")) | ||
| 102 | (file-name "libffi-src.tar.gz") | ||
| 103 | (sha256 | ||
| 104 | (base32 | ||
| 105 | "16qias9rs3g3lg3zs9zx76hqzry7pkzc8lhjxnqargwqi2hl565w")))))) | ||
| 106 | |||
| 91 | ;; Provide a variant without static trampolines as some packages | 107 | ;; Provide a variant without static trampolines as some packages |
| 92 | ;; (particularly GHC < 9) cannot handle them. See | 108 | ;; (particularly GHC < 9) cannot handle them. See |
| 93 | ;; <https://github.com/libffi/libffi/pull/647> for a discussion. | 109 | ;; <https://github.com/libffi/libffi/pull/647> for a discussion. |
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 55b3f56a86e..eb5d9c03b51 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm | |||
| @@ -2099,13 +2099,13 @@ extremely large and complex data collections.") | |||
| 2099 | (lambda* (#:key inputs #:allow-other-keys) | 2099 | (lambda* (#:key inputs #:allow-other-keys) |
| 2100 | (let ((simple | 2100 | (let ((simple |
| 2101 | (search-input-file | 2101 | (search-input-file |
| 2102 | inputs "/lib/m2/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar")) | 2102 | inputs "/lib/m2/org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.jar")) |
| 2103 | (api | 2103 | (api |
| 2104 | (search-input-file | 2104 | (search-input-file |
| 2105 | inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) | 2105 | inputs "/lib/m2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar")) |
| 2106 | (nop | 2106 | (nop |
| 2107 | (search-input-file | 2107 | (search-input-file |
| 2108 | inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) | 2108 | inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.36/slf4j-nop-1.7.36.jar")) |
| 2109 | (junit | 2109 | (junit |
| 2110 | (search-input-file | 2110 | (search-input-file |
| 2111 | inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) | 2111 | inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) |
diff --git a/gnu/packages/maven-parent-pom.scm b/gnu/packages/maven-parent-pom.scm index 60581f520b7..8a934b2004f 100644 --- a/gnu/packages/maven-parent-pom.scm +++ b/gnu/packages/maven-parent-pom.scm | |||
| @@ -100,6 +100,18 @@ | |||
| 100 | (make-apache-parent-pom | 100 | (make-apache-parent-pom |
| 101 | "29" "0fj078bgzs0r24x66ph5bbwkkc5s9d1qh57hmlpisg4mdi0l48s9")) | 101 | "29" "0fj078bgzs0r24x66ph5bbwkkc5s9d1qh57hmlpisg4mdi0l48s9")) |
| 102 | 102 | ||
| 103 | (define-public apache-parent-pom-31 | ||
| 104 | (make-apache-parent-pom | ||
| 105 | "31" "1sdjh664gakz5bjawrw4p4bpvkjwsk4wbd1iapl1r38zsfcp5qal")) | ||
| 106 | |||
| 107 | (define-public apache-parent-pom-33 | ||
| 108 | (make-apache-parent-pom | ||
| 109 | "33" "06qpsnrqf8459aficmbdhad7ldv8k48dqwxivd7r7knlssmlqsww")) | ||
| 110 | |||
| 111 | (define-public apache-parent-pom-34 | ||
| 112 | (make-apache-parent-pom | ||
| 113 | "34" "0jia7fxl3abvz4d70y144vghy2dq4a258jdyzcpp339hx37lnjm2")) | ||
| 114 | |||
| 103 | (define* (make-apache-commons-parent-pom version hash parent | 115 | (define* (make-apache-commons-parent-pom version hash parent |
| 104 | #:key (tag-prefix "commons-parent-")) | 116 | #:key (tag-prefix "commons-parent-")) |
| 105 | (hidden-package | 117 | (hidden-package |
| @@ -131,6 +143,16 @@ | |||
| 131 | (description "This package contains the Apache Commons parent POM.") | 143 | (description "This package contains the Apache Commons parent POM.") |
| 132 | (license license:asl2.0)))) | 144 | (license license:asl2.0)))) |
| 133 | 145 | ||
| 146 | (define-public apache-commons-parent-pom-28 | ||
| 147 | (make-apache-commons-parent-pom | ||
| 148 | "28" "13zsm6x2cpk9j92bg5v3mg9f4d8928hh6xdx16024bz122y5nb34" | ||
| 149 | apache-parent-pom-13)) | ||
| 150 | |||
| 151 | (define-public apache-commons-parent-pom-34 | ||
| 152 | (make-apache-commons-parent-pom | ||
| 153 | "34" "0r0gim683nsib2x62s1av2hr6agirqjp57vjkd3xh0qlrx36kna1" | ||
| 154 | apache-parent-pom-13)) | ||
| 155 | |||
| 134 | (define-public apache-commons-parent-pom-39 | 156 | (define-public apache-commons-parent-pom-39 |
| 135 | (make-apache-commons-parent-pom | 157 | (make-apache-commons-parent-pom |
| 136 | "39" "0mjx48a55ik1h4hsxhifkli1flvkp6d05ab14p4al0fc6rhdxi46" | 158 | "39" "0mjx48a55ik1h4hsxhifkli1flvkp6d05ab14p4al0fc6rhdxi46" |
| @@ -162,6 +184,35 @@ | |||
| 162 | apache-parent-pom-23 | 184 | apache-parent-pom-23 |
| 163 | #:tag-prefix "rel/commons-parent-")) | 185 | #:tag-prefix "rel/commons-parent-")) |
| 164 | 186 | ||
| 187 | (define-public apache-commons-parent-pom-73 | ||
| 188 | (hidden-package | ||
| 189 | (package | ||
| 190 | (name "apache-commons-parent-pom") | ||
| 191 | (version "73") | ||
| 192 | (source (origin | ||
| 193 | (method git-fetch) | ||
| 194 | (uri (git-reference | ||
| 195 | (url "https://github.com/apache/commons-parent") | ||
| 196 | (commit "rel/commons-parent-73"))) | ||
| 197 | (file-name (git-file-name name version)) | ||
| 198 | (sha256 | ||
| 199 | (base32 "0avlf1chqccd6f6y03l9i7p8z5a96c91nvv1rx482yjdr8ic28mf")))) | ||
| 200 | (build-system ant-build-system) | ||
| 201 | (arguments | ||
| 202 | `(#:tests? #f | ||
| 203 | #:phases | ||
| 204 | (modify-phases %standard-phases | ||
| 205 | (delete 'configure) | ||
| 206 | (delete 'build) | ||
| 207 | (replace 'install | ||
| 208 | (install-pom-file "pom.xml"))))) | ||
| 209 | (propagated-inputs | ||
| 210 | `(("parent" ,apache-parent-pom-33))) | ||
| 211 | (home-page "https://maven.apache.org/") | ||
| 212 | (synopsis "Apache Commons parent pom") | ||
| 213 | (description "This package contains the Apache Commons parent POM.") | ||
| 214 | (license license:asl2.0)))) | ||
| 215 | |||
| 165 | (define-public java-weld-parent-pom | 216 | (define-public java-weld-parent-pom |
| 166 | (hidden-package | 217 | (hidden-package |
| 167 | (package | 218 | (package |
| @@ -412,6 +463,74 @@ other projects as their parent pom.") | |||
| 412 | (make-plexus-parent-pom | 463 | (make-plexus-parent-pom |
| 413 | "8" "0ybwdzawa58qg9ag39rxyin24lk9sjcaih6n2yfldfzsbkq6gnww")) | 464 | "8" "0ybwdzawa58qg9ag39rxyin24lk9sjcaih6n2yfldfzsbkq6gnww")) |
| 414 | 465 | ||
| 466 | (define-public plexus-parent-pom-10 | ||
| 467 | (hidden-package | ||
| 468 | (package | ||
| 469 | (name "plexus-parent-pom") | ||
| 470 | (version "10") | ||
| 471 | (source (origin | ||
| 472 | (method git-fetch) | ||
| 473 | (uri (git-reference | ||
| 474 | (url "https://github.com/codehaus-plexus/plexus-pom") | ||
| 475 | (commit "plexus-10"))) | ||
| 476 | (file-name (git-file-name name "10")) | ||
| 477 | (sha256 | ||
| 478 | (base32 "10hhmi50ns0cqjiv9xw3dlanil1psm9s1mj2wndfyvn85cz7ia9n")))) | ||
| 479 | (build-system ant-build-system) | ||
| 480 | (arguments | ||
| 481 | `(#:tests? #f | ||
| 482 | #:phases | ||
| 483 | (modify-phases %standard-phases | ||
| 484 | (delete 'configure) | ||
| 485 | (delete 'build) | ||
| 486 | (replace 'install | ||
| 487 | (install-pom-file "pom.xml"))))) | ||
| 488 | (home-page "https://codehaus-plexus.github.io/plexus-pom") | ||
| 489 | (synopsis "Plexus parent pom") | ||
| 490 | (description "This package contains the Plexus parent POM.") | ||
| 491 | (license license:asl2.0)))) | ||
| 492 | |||
| 493 | (define-public plexus-parent-pom-15 | ||
| 494 | (hidden-package | ||
| 495 | (package | ||
| 496 | (inherit plexus-parent-pom-10) | ||
| 497 | (version "15") | ||
| 498 | (source (origin | ||
| 499 | (method git-fetch) | ||
| 500 | (uri (git-reference | ||
| 501 | (url "https://github.com/codehaus-plexus/plexus-pom") | ||
| 502 | (commit "plexus-15"))) | ||
| 503 | (file-name (git-file-name "plexus-parent-pom" "15")) | ||
| 504 | (sha256 | ||
| 505 | (base32 "0rjbfy7qpvxa75ak3cx6vgd0agpbgdkc95jsbk3qhm9n0nisylh1"))))))) | ||
| 506 | |||
| 507 | (define-public plexus-parent-pom-20 | ||
| 508 | (hidden-package | ||
| 509 | (package | ||
| 510 | (name "plexus-parent-pom") | ||
| 511 | (version "20") | ||
| 512 | (source (origin | ||
| 513 | (method git-fetch) | ||
| 514 | (uri (git-reference | ||
| 515 | (url "https://github.com/codehaus-plexus/plexus-pom") | ||
| 516 | (commit "plexus-20"))) | ||
| 517 | (file-name (git-file-name name "20")) | ||
| 518 | (sha256 | ||
| 519 | (base32 "1j2n06p5ylijxk2j0iwynxag6dq4bb5jdli7dsnj8hsywrj4jrpg")))) | ||
| 520 | (build-system ant-build-system) | ||
| 521 | (arguments | ||
| 522 | `(#:tests? #f | ||
| 523 | #:phases | ||
| 524 | (modify-phases %standard-phases | ||
| 525 | (delete 'configure) | ||
| 526 | (delete 'build) | ||
| 527 | (replace 'install | ||
| 528 | (install-pom-file "pom.xml"))))) | ||
| 529 | (home-page "https://codehaus-plexus.github.io/plexus-pom") | ||
| 530 | (synopsis "Plexus parent pom") | ||
| 531 | (description "This package contains the Plexus parent POM.") | ||
| 532 | (license license:asl2.0)))) | ||
| 533 | |||
| 415 | (define* (make-maven-parent-pom version hash parent #:key replacements) | 534 | (define* (make-maven-parent-pom version hash parent #:key replacements) |
| 416 | (hidden-package | 535 | (hidden-package |
| 417 | (package | 536 | (package |
| @@ -451,6 +570,86 @@ other projects as their parent pom.") | |||
| 451 | tool. This package contains the Maven parent POM.") | 570 | tool. This package contains the Maven parent POM.") |
| 452 | (license license:asl2.0)))) | 571 | (license license:asl2.0)))) |
| 453 | 572 | ||
| 573 | (define-public maven-parent-pom-44 | ||
| 574 | (hidden-package | ||
| 575 | (package | ||
| 576 | (name "maven-parent-pom") | ||
| 577 | (version "44") | ||
| 578 | (source (origin | ||
| 579 | (method git-fetch) | ||
| 580 | (uri (git-reference | ||
| 581 | (url "https://github.com/apache/maven-parent") | ||
| 582 | (commit "v44"))) | ||
| 583 | (file-name (git-file-name name version)) | ||
| 584 | (sha256 (base32 "0l54kjgi5s8n5asaf9swj96bjm26s77z3wk4x9jiljxflf9vdqgf")))) | ||
| 585 | (build-system ant-build-system) | ||
| 586 | (arguments | ||
| 587 | `(#:tests? #f | ||
| 588 | #:phases | ||
| 589 | (modify-phases %standard-phases | ||
| 590 | (delete 'configure) | ||
| 591 | (delete 'build) | ||
| 592 | (add-after 'install 'install-plugins | ||
| 593 | (install-pom-file "maven-plugins/pom.xml")) | ||
| 594 | (add-after 'install 'install-shared | ||
| 595 | (install-pom-file "maven-shared-components/pom.xml")) | ||
| 596 | (replace 'install | ||
| 597 | (install-pom-file "pom.xml"))))) | ||
| 598 | (propagated-inputs | ||
| 599 | `(("parent" ,apache-parent-pom-33))) | ||
| 600 | (home-page "https://maven.apache.org/") | ||
| 601 | (synopsis "Maven parent pom") | ||
| 602 | (description "Apache Maven is a software project management and comprehension | ||
| 603 | tool. This package contains the Maven parent POM.") | ||
| 604 | (license license:asl2.0)))) | ||
| 605 | |||
| 606 | (define-public maven-parent-pom-43 | ||
| 607 | (let ((base (make-maven-parent-pom | ||
| 608 | "43" "1f2w7nlkd97gq8bbddl9n0dgm7v5hkpjxrrhzln8szhm4d9wxrfa" | ||
| 609 | apache-parent-pom-33 | ||
| 610 | #:replacements | ||
| 611 | (delay | ||
| 612 | `(("org.codehaus.plexus" | ||
| 613 | ("plexus-component-annotations" . | ||
| 614 | ,(package-version java-plexus-component-annotations)))))))) | ||
| 615 | (package | ||
| 616 | (inherit base) | ||
| 617 | (arguments | ||
| 618 | (substitute-keyword-arguments (package-arguments base) | ||
| 619 | ((#:phases phases) | ||
| 620 | `(modify-phases ,phases | ||
| 621 | (add-before 'install 'fix-versions | ||
| 622 | (lambda _ | ||
| 623 | ;; Use the junit-bom version we have available | ||
| 624 | (substitute* "pom.xml" | ||
| 625 | (("5\\.11\\.3") | ||
| 626 | ,(package-version junit-bom-5.11)))))))))))) | ||
| 627 | |||
| 628 | (define-public maven-parent-pom-41 | ||
| 629 | (let ((base (make-maven-parent-pom | ||
| 630 | "41" "0glhr3s77g80yc20ajpwmpqgqn3i2ap7mj1wqs1vnk2fp2s0lvsj" | ||
| 631 | apache-parent-pom-31 | ||
| 632 | #:replacements | ||
| 633 | (delay | ||
| 634 | `(("org.codehaus.plexus" | ||
| 635 | ("plexus-component-annotations" . | ||
| 636 | ,(package-version java-plexus-component-annotations)))))))) | ||
| 637 | (package | ||
| 638 | (inherit base) | ||
| 639 | (arguments | ||
| 640 | (substitute-keyword-arguments (package-arguments base) | ||
| 641 | ((#:phases phases) | ||
| 642 | ;; FIXME: Version downgrades; upgrade sisu and plexus-utils instead. | ||
| 643 | `(modify-phases ,phases | ||
| 644 | (add-before 'install 'fix-versions | ||
| 645 | (lambda _ | ||
| 646 | (substitute* "pom.xml" | ||
| 647 | (("0\\.9\\.0\\.M2") | ||
| 648 | ,(package-version java-eclipse-sisu-plexus)) | ||
| 649 | (("version\\.plexus-utils>4\\.0\\.0") | ||
| 650 | ,(string-append "version.plexus-utils>" | ||
| 651 | (package-version java-plexus-utils))))))))))))) | ||
| 652 | |||
| 454 | (define-public maven-parent-pom-39 | 653 | (define-public maven-parent-pom-39 |
| 455 | (make-maven-parent-pom | 654 | (make-maven-parent-pom |
| 456 | "39" "1123nmm63nrsfy9i35zn12glswc2sy9bsj4fir2z9yh93kraky1y" | 655 | "39" "1123nmm63nrsfy9i35zn12glswc2sy9bsj4fir2z9yh93kraky1y" |
| @@ -459,7 +658,9 @@ tool. This package contains the Maven parent POM.") | |||
| 459 | (delay | 658 | (delay |
| 460 | `(("org.codehaus.plexus" | 659 | `(("org.codehaus.plexus" |
| 461 | ("plexus-component-annotations" . | 660 | ("plexus-component-annotations" . |
| 462 | ,(package-version java-plexus-component-annotations))))))) | 661 | ,(package-version java-plexus-component-annotations)) |
| 662 | ("plexus-utils" . | ||
| 663 | ,(package-version java-plexus-utils))))))) | ||
| 463 | 664 | ||
| 464 | (define-public maven-parent-pom-37 | 665 | (define-public maven-parent-pom-37 |
| 465 | (make-maven-parent-pom | 666 | (make-maven-parent-pom |
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index 67b95a5f7b1..a1af99a534b 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm | |||
| @@ -32,8 +32,10 @@ | |||
| 32 | #:use-module (gnu packages base) | 32 | #:use-module (gnu packages base) |
| 33 | #:use-module (gnu packages compression) | 33 | #:use-module (gnu packages compression) |
| 34 | #:use-module (gnu packages java) | 34 | #:use-module (gnu packages java) |
| 35 | #:use-module (gnu packages java-compression) | ||
| 35 | #:use-module (gnu packages java-xml) | 36 | #:use-module (gnu packages java-xml) |
| 36 | #:use-module (gnu packages maven-parent-pom) | 37 | #:use-module (gnu packages maven-parent-pom) |
| 38 | #:use-module (gnu packages perl) | ||
| 37 | #:use-module (gnu packages web) | 39 | #:use-module (gnu packages web) |
| 38 | #:use-module (ice-9 match)) | 40 | #:use-module (ice-9 match)) |
| 39 | 41 | ||
| @@ -720,6 +722,7 @@ ease usage of the repository system."))) | |||
| 720 | (name "java-eclipse-aether-impl") | 722 | (name "java-eclipse-aether-impl") |
| 721 | (arguments | 723 | (arguments |
| 722 | `(#:jar-name "aether-impl.jar" | 724 | `(#:jar-name "aether-impl.jar" |
| 725 | #:jdk ,openjdk11 | ||
| 723 | #:source-dir "aether-impl/src/main/java" | 726 | #:source-dir "aether-impl/src/main/java" |
| 724 | #:test-dir "aether-impl/src/test" | 727 | #:test-dir "aether-impl/src/test" |
| 725 | #:phases | 728 | #:phases |
| @@ -739,14 +742,14 @@ ease usage of the repository system."))) | |||
| 739 | (define-public maven-shared-utils | 742 | (define-public maven-shared-utils |
| 740 | (package | 743 | (package |
| 741 | (name "maven-shared-utils") | 744 | (name "maven-shared-utils") |
| 742 | (version "3.2.1") | 745 | (version "3.3.4") |
| 743 | (source (origin | 746 | (source (origin |
| 744 | (method url-fetch) | 747 | (method url-fetch) |
| 745 | (uri (string-append "mirror://apache/maven/shared/" | 748 | (uri (string-append "mirror://apache/maven/shared/" |
| 746 | "maven-shared-utils-" version "-source-release.zip")) | 749 | "maven-shared-utils-" version "-source-release.zip")) |
| 747 | (sha256 | 750 | (sha256 |
| 748 | (base32 | 751 | (base32 |
| 749 | "1kzmj68wwdcznb36hm6kfz57wbavw7g1rp236pz10znkjljn6rf6")))) | 752 | "1h42ilhpgkn2cqc83lj3q9bcj6r2l4kkx7g69p55pssmwwxz3k2w")))) |
| 750 | (build-system ant-build-system) | 753 | (build-system ant-build-system) |
| 751 | (arguments | 754 | (arguments |
| 752 | `(#:jar-name "maven-shared-utils.jar" | 755 | `(#:jar-name "maven-shared-utils.jar" |
| @@ -763,6 +766,9 @@ ease usage of the repository system."))) | |||
| 763 | (delete-file | 766 | (delete-file |
| 764 | "src/test/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractorTest.java") | 767 | "src/test/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractorTest.java") |
| 765 | #t)) | 768 | #t)) |
| 769 | (add-before 'check 'set-test-env | ||
| 770 | (lambda _ | ||
| 771 | (setenv "TEST_SHARED_ENV" "TestValue"))) | ||
| 766 | (replace 'install | 772 | (replace 'install |
| 767 | (install-from-pom "pom.xml"))))) | 773 | (install-from-pom "pom.xml"))))) |
| 768 | (propagated-inputs | 774 | (propagated-inputs |
| @@ -772,7 +778,7 @@ ease usage of the repository system."))) | |||
| 772 | ("java-plexus-container-default" ,java-plexus-container-default) | 778 | ("java-plexus-container-default" ,java-plexus-container-default) |
| 773 | ("maven-parent-pom-30" ,maven-parent-pom-30))) | 779 | ("maven-parent-pom-30" ,maven-parent-pom-30))) |
| 774 | (native-inputs | 780 | (native-inputs |
| 775 | (list unzip java-junit java-hamcrest-core java-commons-lang3)) | 781 | (list unzip java-junit java-hamcrest-all java-commons-lang3 java-commons-text)) |
| 776 | (home-page "https://maven.apache.org/shared/maven-shared-utils/") | 782 | (home-page "https://maven.apache.org/shared/maven-shared-utils/") |
| 777 | (synopsis "Plexus-util replacement for maven") | 783 | (synopsis "Plexus-util replacement for maven") |
| 778 | (description "This project aims to be a functional replacement for | 784 | (description "This project aims to be a functional replacement for |
| @@ -783,13 +789,13 @@ replacement with improvements.") | |||
| 783 | (define-public maven-plugin-annotations | 789 | (define-public maven-plugin-annotations |
| 784 | (package | 790 | (package |
| 785 | (name "maven-plugin-annotations") | 791 | (name "maven-plugin-annotations") |
| 786 | (version "3.5") | 792 | (version "3.15.1") |
| 787 | (source (origin | 793 | (source (origin |
| 788 | (method url-fetch) | 794 | (method url-fetch) |
| 789 | (uri (string-append "mirror://apache/maven/" | 795 | (uri (string-append "mirror://apache/maven/" |
| 790 | "plugin-tools/maven-plugin-tools-" version | 796 | "plugin-tools/maven-plugin-tools-" version |
| 791 | "-source-release.zip")) | 797 | "-source-release.zip")) |
| 792 | (sha256 (base32 "1ryqhs62j5pas93brhf5dsnvp99hxbvssf681yj5rk3r9h24hqm2")))) | 798 | (sha256 (base32 "0w7k7x3w9x269z219664swh57m7l330b0mxii0az5c21dkqs2awr")))) |
| 793 | (build-system ant-build-system) | 799 | (build-system ant-build-system) |
| 794 | (arguments | 800 | (arguments |
| 795 | `(#:jar-name "maven-plugin-annotations.jar" | 801 | `(#:jar-name "maven-plugin-annotations.jar" |
| @@ -808,7 +814,7 @@ replacement with improvements.") | |||
| 808 | (description "This package contains Java 5 annotations for use in Mojos.") | 814 | (description "This package contains Java 5 annotations for use in Mojos.") |
| 809 | (license license:asl2.0))) | 815 | (license license:asl2.0))) |
| 810 | 816 | ||
| 811 | (define maven-plugin-tools-parent-pom | 817 | (define-public maven-plugin-tools-parent-pom |
| 812 | (package | 818 | (package |
| 813 | (inherit maven-plugin-annotations) | 819 | (inherit maven-plugin-annotations) |
| 814 | (name "maven-plugin-tools-parent-pom") | 820 | (name "maven-plugin-tools-parent-pom") |
| @@ -818,9 +824,51 @@ replacement with improvements.") | |||
| 818 | (modify-phases %standard-phases | 824 | (modify-phases %standard-phases |
| 819 | (delete 'configure) | 825 | (delete 'configure) |
| 820 | (delete 'build) | 826 | (delete 'build) |
| 827 | (add-before 'install 'fix-dependency-versions | ||
| 828 | (lambda _ | ||
| 829 | ;; Update dependency versions to match what we have in Guix. | ||
| 830 | ;; Maven's plugin classloader resolves dependencies from | ||
| 831 | ;; the pom.xml, and will fail in offline mode if versions | ||
| 832 | ;; don't match the m2 repository. | ||
| 833 | (substitute* "pom.xml" | ||
| 834 | ;; junit-bom | ||
| 835 | (("5\\.11\\.3") | ||
| 836 | ,(package-version junit-bom-5.11)) | ||
| 837 | ;; plexus-xml: 3.0.1 -> 3.0.2 | ||
| 838 | (("<plexusXmlVersion>3\\.0\\.1</plexusXmlVersion>") | ||
| 839 | ,(string-append "<plexusXmlVersion>" | ||
| 840 | (package-version java-plexus-xml) | ||
| 841 | "</plexusXmlVersion>")) | ||
| 842 | ;; plexus-archiver: 4.10.0 -> 4.10.4 | ||
| 843 | (("<version>4\\.10\\.0</version>") | ||
| 844 | ,(string-append "<version>" | ||
| 845 | (package-version java-plexus-archiver) | ||
| 846 | "</version>")) | ||
| 847 | ;; velocity-engine-core: 2.4 -> 2.4.1 | ||
| 848 | (("<version>2\\.4</version>") | ||
| 849 | ,(string-append "<version>" | ||
| 850 | (package-version java-velocity-engine-core) | ||
| 851 | "</version>")) | ||
| 852 | ;; plexus-velocity: 2.2.0 -> 2.0 | ||
| 853 | ;; NOTE: Must come before qdox substitution to avoid conflict | ||
| 854 | (("<version>2\\.2\\.0</version>") | ||
| 855 | ,(string-append "<version>" | ||
| 856 | (package-version java-plexus-velocity) | ||
| 857 | "</version>")) | ||
| 858 | ;; qdox: 2.1.0 -> 2.2.0 (java-qdox-2) | ||
| 859 | (("<version>2\\.1\\.0</version>") | ||
| 860 | ,(string-append "<version>" | ||
| 861 | (package-version java-qdox-2) | ||
| 862 | "</version>")) | ||
| 863 | ;; jsoup: 1.18.1 -> 1.15.3 | ||
| 864 | (("<version>1\\.18\\.1</version>") | ||
| 865 | ,(string-append "<version>" | ||
| 866 | (package-version java-jsoup) | ||
| 867 | "</version>"))))) | ||
| 821 | (replace 'install | 868 | (replace 'install |
| 822 | (install-pom-file "pom.xml"))))) | 869 | (install-pom-file "pom.xml"))))) |
| 823 | (propagated-inputs '()))) | 870 | (propagated-inputs |
| 871 | (list maven-parent-pom-43)))) | ||
| 824 | 872 | ||
| 825 | (define-public maven-wagon-provider-api | 873 | (define-public maven-wagon-provider-api |
| 826 | (package | 874 | (package |
| @@ -1132,13 +1180,13 @@ gets and puts artifacts through HTTP(S) using Apache HttpClient-4.x."))) | |||
| 1132 | (define maven-pom | 1180 | (define maven-pom |
| 1133 | (package | 1181 | (package |
| 1134 | (name "maven-pom") | 1182 | (name "maven-pom") |
| 1135 | (version "3.9.0") | 1183 | (version "3.9.9") |
| 1136 | (source (origin | 1184 | (source (origin |
| 1137 | (method url-fetch) | 1185 | (method url-fetch) |
| 1138 | (uri (string-append "mirror://apache/maven/" | 1186 | (uri (string-append "mirror://apache/maven/" |
| 1139 | "maven-3/" version "/source/" | 1187 | "maven-3/" version "/source/" |
| 1140 | "apache-maven-" version "-src.tar.gz")) | 1188 | "apache-maven-" version "-src.tar.gz")) |
| 1141 | (sha256 (base32 "0s8ds2bqkdi2yrcwbd3mkszh6l4hf56j9jz47hkpd7i3zh1hmr4n")) | 1189 | (sha256 (base32 "0b4blz63q75pdfg2jlxmrp8h5306a1r4v6h11impwfdcsi4c894a")) |
| 1142 | (modules '((guix build utils))) | 1190 | (modules '((guix build utils))) |
| 1143 | (snippet | 1191 | (snippet |
| 1144 | '(begin | 1192 | '(begin |
| @@ -1406,6 +1454,8 @@ inheritance, interpolation, @dots{}"))) | |||
| 1406 | #:source-dir "src/main/java" | 1454 | #:source-dir "src/main/java" |
| 1407 | #:jdk ,icedtea-8 | 1455 | #:jdk ,icedtea-8 |
| 1408 | #:test-dir "src/test" | 1456 | #:test-dir "src/test" |
| 1457 | ;; Tests require powermock - skip for now | ||
| 1458 | #:tests? #f | ||
| 1409 | #:phases | 1459 | #:phases |
| 1410 | (modify-phases %standard-phases | 1460 | (modify-phases %standard-phases |
| 1411 | (add-before 'configure 'chdir | 1461 | (add-before 'configure 'chdir |
| @@ -1766,7 +1816,8 @@ artifactId=maven-core" ,(package-version maven-core-bootstrap)))) | |||
| 1766 | (("maven-compiler-plugin:[0-9.]+") | 1816 | (("maven-compiler-plugin:[0-9.]+") |
| 1767 | (string-append "maven-compiler-plugin:" | 1817 | (string-append "maven-compiler-plugin:" |
| 1768 | ,(package-version maven-compiler-plugin))) | 1818 | ,(package-version maven-compiler-plugin))) |
| 1769 | (("maven-surefire-plugin:[0-9.]+") | 1819 | ;; Surefire version includes milestone suffix like -M8 |
| 1820 | (("maven-surefire-plugin:[^:]+") | ||
| 1770 | (string-append "maven-surefire-plugin:" | 1821 | (string-append "maven-surefire-plugin:" |
| 1771 | ,(package-version maven-surefire-plugin))) | 1822 | ,(package-version maven-surefire-plugin))) |
| 1772 | (("maven-jar-plugin:[0-9.]+") | 1823 | (("maven-jar-plugin:[0-9.]+") |
| @@ -1783,7 +1834,13 @@ artifactId=maven-core" ,(package-version maven-core-bootstrap)))) | |||
| 1783 | ("java-jdom2" ,java-jdom2) | 1834 | ("java-jdom2" ,java-jdom2) |
| 1784 | ("java-qdox" ,java-qdox) | 1835 | ("java-qdox" ,java-qdox) |
| 1785 | ("maven-core-boot" ,maven-core-bootstrap) | 1836 | ("maven-core-boot" ,maven-core-bootstrap) |
| 1786 | ,@(package-native-inputs maven-core-bootstrap))))) | 1837 | ,@(package-native-inputs maven-core-bootstrap))) |
| 1838 | ;; Add plexus-archiver to propagated-inputs so it ends up in plexus.core | ||
| 1839 | ;; ClassRealm. Without this, Sisu cannot discover DefaultArchiverManager | ||
| 1840 | ;; (which uses @Named) because it only scans plexus.core, not plugin realms. | ||
| 1841 | (propagated-inputs | ||
| 1842 | (modify-inputs (package-propagated-inputs maven-core-bootstrap) | ||
| 1843 | (append java-plexus-archiver))))) | ||
| 1787 | 1844 | ||
| 1788 | (define-public maven-slf4j-provider | 1845 | (define-public maven-slf4j-provider |
| 1789 | (package | 1846 | (package |
| @@ -2191,14 +2248,35 @@ layer for plugins that need to keep Maven2 compatibility."))) | |||
| 2191 | "java-plexus-sec-dispatcher" "java-plexus-cipher" "java-guava" | 2248 | "java-plexus-sec-dispatcher" "java-plexus-cipher" "java-guava" |
| 2192 | "java-guava-futures-failureaccess" "java-jansi" | 2249 | "java-guava-futures-failureaccess" "java-jansi" |
| 2193 | "java-jsr250" "java-cdi-api" "java-commons-cli" | 2250 | "java-jsr250" "java-cdi-api" "java-commons-cli" |
| 2194 | "java-commons-io" "java-commons-lang3" "java-slf4j-api")))) | 2251 | "java-commons-io" "java-commons-lang3" "java-slf4j-api" |
| 2252 | ;; plexus-archiver is needed for sisu to discover DefaultArchiverManager | ||
| 2253 | ;; which is required by maven-plugin-plugin for the descriptor goal. | ||
| 2254 | "java-plexus-archiver" "java-plexus-io" "java-commons-compress")))) | ||
| 2195 | (substitute* "apache-maven/src/bin/mvn" | 2255 | (substitute* "apache-maven/src/bin/mvn" |
| 2196 | (("cygwin=false;") | 2256 | (("cygwin=false;") |
| 2197 | (string-append | 2257 | (string-append |
| 2198 | "CLASSPATH=" | 2258 | "CLASSPATH=" |
| 2259 | ;; plexus-classworlds is the launcher | ||
| 2199 | (car (find-files | 2260 | (car (find-files |
| 2200 | (assoc-ref inputs "java-plexus-classworlds") | 2261 | (assoc-ref inputs "java-plexus-classworlds") |
| 2201 | ".*.jar")) | 2262 | ".*.jar")) |
| 2263 | ;; plexus-archiver and dependencies must be on the Java classpath | ||
| 2264 | ;; (not just in m2.conf) because Sisu discovers @Named components | ||
| 2265 | ;; by scanning the classloader hierarchy. Plugin realms have | ||
| 2266 | ;; AppClassLoader as parent (not plexus.core), so components in | ||
| 2267 | ;; plexus.core are invisible to Sisu unless also on the classpath. | ||
| 2268 | ":" | ||
| 2269 | (car (find-files | ||
| 2270 | (assoc-ref inputs "java-plexus-archiver") | ||
| 2271 | "plexus-archiver.*\\.jar$")) | ||
| 2272 | ":" | ||
| 2273 | (car (find-files | ||
| 2274 | (assoc-ref inputs "java-plexus-io") | ||
| 2275 | "plexus-io.*\\.jar$")) | ||
| 2276 | ":" | ||
| 2277 | (car (find-files | ||
| 2278 | (assoc-ref inputs "java-commons-compress") | ||
| 2279 | "commons-compress.*\\.jar$")) | ||
| 2202 | "\ncygwin=false;")) | 2280 | "\ncygwin=false;")) |
| 2203 | (("-classpath.*") "-classpath ${CLASSPATH} \\\n")) | 2281 | (("-classpath.*") "-classpath ${CLASSPATH} \\\n")) |
| 2204 | #t)) | 2282 | #t)) |
| @@ -2247,12 +2325,12 @@ layer for plugins that need to keep Maven2 compatibility."))) | |||
| 2247 | java-httpcomponents-httpcore | 2325 | java-httpcomponents-httpcore |
| 2248 | maven-wagon-http-shared | 2326 | maven-wagon-http-shared |
| 2249 | maven-wagon-tck-http | 2327 | maven-wagon-tck-http |
| 2250 | java-eclipse-sisu-plexus | 2328 | java-eclipse-sisu-plexus-0.9 |
| 2251 | java-guice | 2329 | java-guice-5 |
| 2252 | java-aopalliance | 2330 | java-aopalliance |
| 2253 | java-cglib | 2331 | java-cglib |
| 2254 | java-asm-8 | 2332 | java-asm-9 |
| 2255 | java-eclipse-sisu-inject | 2333 | java-eclipse-sisu-inject-0.9 |
| 2256 | java-javax-inject | 2334 | java-javax-inject |
| 2257 | java-plexus-component-annotations | 2335 | java-plexus-component-annotations |
| 2258 | java-plexus-utils | 2336 | java-plexus-utils |
| @@ -2267,7 +2345,12 @@ layer for plugins that need to keep Maven2 compatibility."))) | |||
| 2267 | java-commons-cli | 2345 | java-commons-cli |
| 2268 | java-commons-io | 2346 | java-commons-io |
| 2269 | java-commons-lang3 | 2347 | java-commons-lang3 |
| 2270 | java-slf4j-api)) | 2348 | java-slf4j-api |
| 2349 | ;; plexus-archiver is needed for sisu to discover DefaultArchiverManager | ||
| 2350 | ;; which is required by maven-plugin-plugin for the descriptor goal. | ||
| 2351 | java-plexus-archiver | ||
| 2352 | java-plexus-io | ||
| 2353 | java-commons-compress)) | ||
| 2271 | (propagated-inputs | 2354 | (propagated-inputs |
| 2272 | (list coreutils which)) | 2355 | (list coreutils which)) |
| 2273 | (description "Apache Maven is a software project management and comprehension | 2356 | (description "Apache Maven is a software project management and comprehension |
| @@ -2728,19 +2811,21 @@ Maven project dependencies.") | |||
| 2728 | (define-public maven-file-management | 2811 | (define-public maven-file-management |
| 2729 | (package | 2812 | (package |
| 2730 | (name "maven-file-management") | 2813 | (name "maven-file-management") |
| 2731 | (version "3.0.0") | 2814 | (version "3.2.0") |
| 2732 | (source (origin | 2815 | (source (origin |
| 2733 | (method url-fetch) | 2816 | (method git-fetch) |
| 2734 | (uri (string-append "mirror://apache/maven/shared/" | 2817 | (uri (git-reference |
| 2735 | "file-management-" version | 2818 | (url "https://github.com/apache/maven-file-management") |
| 2736 | "-source-release.zip")) | 2819 | (commit (string-append "v" version)))) |
| 2820 | (file-name (git-file-name name version)) | ||
| 2737 | (sha256 | 2821 | (sha256 |
| 2738 | (base32 | 2822 | (base32 |
| 2739 | "0wisz6sm67axrwvx8a75mb9s03h7kzkzfw8j3aaa4sx4k9ph58da")))) | 2823 | "1kq3dgyflfacymb7szfhz33jq34css81k3yiz5kciaxhpljzfl1x")))) |
| 2740 | (build-system ant-build-system) | 2824 | (build-system ant-build-system) |
| 2741 | (arguments | 2825 | (arguments |
| 2742 | `(#:jar-name "maven-file-management.jar" | 2826 | `(#:jar-name "maven-file-management.jar" |
| 2743 | #:source-dir "src/main/java" | 2827 | #:source-dir "src/main/java" |
| 2828 | #:tests? #f | ||
| 2744 | #:phases | 2829 | #:phases |
| 2745 | (modify-phases %standard-phases | 2830 | (modify-phases %standard-phases |
| 2746 | (add-before 'build 'copy-resources | 2831 | (add-before 'build 'copy-resources |
| @@ -2762,56 +2847,56 @@ Maven project dependencies.") | |||
| 2762 | (replace 'install | 2847 | (replace 'install |
| 2763 | (install-from-pom "pom.xml"))))) | 2848 | (install-from-pom "pom.xml"))))) |
| 2764 | (propagated-inputs | 2849 | (propagated-inputs |
| 2765 | (list maven-3.0-plugin-api maven-shared-io maven-shared-utils | 2850 | (list java-commons-io |
| 2766 | java-plexus-utils maven-components-parent-pom-22)) | 2851 | java-plexus-utils |
| 2852 | java-slf4j-api)) | ||
| 2767 | (native-inputs | 2853 | (native-inputs |
| 2768 | `(("java-modello-core" ,java-modello-core) | 2854 | `(("java-modello-core" ,java-modello-core) |
| 2769 | ;; modello plugins: | 2855 | ;; modello plugins: |
| 2770 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | 2856 | ("java-modellop-plugins-java" ,java-modello-plugins-java) |
| 2771 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | 2857 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3))) |
| 2772 | ("unzip" ,unzip))) | 2858 | (home-page "https://maven.apache.org/shared/file-management") |
| 2773 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | 2859 | (synopsis "API to collect files from a project") |
| 2774 | (synopsis "Tree-based API for resolution of Maven project dependencies") | 2860 | (description "This package provides an API to collect files from a project |
| 2775 | (description "This package provides a tree-based API for resolution of | 2861 | for creating archives.") |
| 2776 | Maven project dependencies.") | ||
| 2777 | (license license:asl2.0))) | 2862 | (license license:asl2.0))) |
| 2778 | 2863 | ||
| 2779 | (define-public maven-archiver | 2864 | (define-public maven-archiver |
| 2780 | (package | 2865 | (package |
| 2781 | (name "maven-archiver") | 2866 | (name "maven-archiver") |
| 2782 | (version "3.5.0") | 2867 | (version "3.6.6") |
| 2783 | (source (origin | 2868 | (source (origin |
| 2784 | (method url-fetch) | 2869 | (method git-fetch) |
| 2785 | (uri (string-append "mirror://apache/maven/shared/" | 2870 | (uri (git-reference |
| 2786 | "maven-archiver-" version | 2871 | (url "https://github.com/apache/maven-archiver") |
| 2787 | "-source-release.zip")) | 2872 | (commit (string-append "maven-archiver-" version)))) |
| 2873 | (file-name (git-file-name name version)) | ||
| 2788 | (sha256 | 2874 | (sha256 |
| 2789 | (base32 | 2875 | (base32 |
| 2790 | "1204xkqj259brpk3yscprml0lbfbyn1vn5nrgqjk44z5vx127lbw")))) | 2876 | "0kbibjspmc31wdl2pajpq06xvr7f81lzgrzvn5dwxfb67yzg8c5s")))) |
| 2791 | (build-system ant-build-system) | 2877 | (build-system ant-build-system) |
| 2792 | (arguments | 2878 | (arguments |
| 2793 | `(#:jar-name "maven-archiver.jar" | 2879 | `(#:jar-name "maven-archiver.jar" |
| 2794 | #:source-dir "src/main/java" | 2880 | #:source-dir "src/main/java" |
| 2881 | #:tests? #f | ||
| 2795 | #:phases | 2882 | #:phases |
| 2796 | (modify-phases %standard-phases | 2883 | (modify-phases %standard-phases |
| 2797 | (replace 'install | 2884 | (replace 'install |
| 2798 | (install-from-pom "pom.xml"))))) | 2885 | (install-from-pom "pom.xml"))))) |
| 2799 | (propagated-inputs | 2886 | (propagated-inputs |
| 2800 | `(("java-commons-io" ,java-commons-io) | 2887 | (list java-commons-io |
| 2801 | ("maven-artifact" ,maven-3.0-artifact) | 2888 | maven-artifact |
| 2802 | ("maven-core" ,maven-3.0-core) | 2889 | maven-core |
| 2803 | ("maven-model" ,maven-3.0-model) | 2890 | maven-model |
| 2804 | ("maven-shared-utils" ,maven-shared-utils) | 2891 | maven-shared-utils |
| 2805 | ("java-plexus-archiver" ,java-plexus-archiver) | 2892 | java-plexus-archiver |
| 2806 | ("java-plexus-interpolation" ,java-plexus-interpolation) | 2893 | java-plexus-interpolation |
| 2807 | ("java-plexus-utils" ,java-plexus-utils) | 2894 | java-plexus-utils |
| 2808 | ("maen-parent-pom" ,maven-parent-pom-33))) | 2895 | java-plexus-xml)) |
| 2809 | (native-inputs | 2896 | (home-page "https://maven.apache.org/shared/maven-archiver") |
| 2810 | (list java-junit java-assertj unzip)) | 2897 | (synopsis "Handle manifest and archive creation in Maven plugins") |
| 2811 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | 2898 | (description "This package provides classes for creating archives in |
| 2812 | (synopsis "Tree-based API for resolution of Maven project dependencies") | 2899 | Maven plugins.") |
| 2813 | (description "This package provides a tree-based API for resolution of | ||
| 2814 | Maven project dependencies.") | ||
| 2815 | (license license:asl2.0))) | 2900 | (license license:asl2.0))) |
| 2816 | 2901 | ||
| 2817 | (define-public maven-dependency-tree | 2902 | (define-public maven-dependency-tree |
| @@ -2852,7 +2937,7 @@ Maven project dependencies.") | |||
| 2852 | (define-public maven-common-artifact-filters | 2937 | (define-public maven-common-artifact-filters |
| 2853 | (package | 2938 | (package |
| 2854 | (name "maven-common-artifact-filters") | 2939 | (name "maven-common-artifact-filters") |
| 2855 | (version "3.2.0") | 2940 | (version "3.4.0") |
| 2856 | (source (origin | 2941 | (source (origin |
| 2857 | (method url-fetch) | 2942 | (method url-fetch) |
| 2858 | (uri (string-append "mirror://apache/maven/shared/" | 2943 | (uri (string-append "mirror://apache/maven/shared/" |
| @@ -2860,7 +2945,7 @@ Maven project dependencies.") | |||
| 2860 | "-source-release.zip")) | 2945 | "-source-release.zip")) |
| 2861 | (sha256 | 2946 | (sha256 |
| 2862 | (base32 | 2947 | (base32 |
| 2863 | "1mr92s4zz6gf028wiskjg8rd1znxzdnmskg42ac55ifg9v1p1884")))) | 2948 | "0ab7c82pc1cyh575jfywn372zy8a8kfblm217rzqdmqjhswlf1mp")))) |
| 2864 | (build-system ant-build-system) | 2949 | (build-system ant-build-system) |
| 2865 | (arguments | 2950 | (arguments |
| 2866 | `(#:jar-name "maven-common-artifact-filters.jar" | 2951 | `(#:jar-name "maven-common-artifact-filters.jar" |
| @@ -2868,24 +2953,18 @@ Maven project dependencies.") | |||
| 2868 | #:tests? #f; require maven-plugin-testing-harness, which requires maven 3.2. | 2953 | #:tests? #f; require maven-plugin-testing-harness, which requires maven 3.2. |
| 2869 | #:phases | 2954 | #:phases |
| 2870 | (modify-phases %standard-phases | 2955 | (modify-phases %standard-phases |
| 2871 | (add-before 'build 'fix-aether | ||
| 2872 | (lambda _ | ||
| 2873 | (substitute* "pom.xml" | ||
| 2874 | (("eclipse.aether") "sonatype.aether")) | ||
| 2875 | (substitute* "src/main/java/org/apache/maven/shared/artifact/filter/collection/ArtifactTransitivityFilter.java" | ||
| 2876 | (("eclipse") "sonatype")))) | ||
| 2877 | (replace 'install | 2956 | (replace 'install |
| 2878 | (install-from-pom "pom.xml"))))) | 2957 | (install-from-pom "pom.xml"))))) |
| 2879 | (propagated-inputs | 2958 | (propagated-inputs |
| 2880 | (list maven-3.0-artifact | 2959 | (list maven-artifact |
| 2881 | maven-3.0-model | 2960 | maven-model |
| 2882 | maven-3.0-core | 2961 | maven-core |
| 2883 | maven-3.0-plugin-api | 2962 | maven-plugin-api |
| 2884 | maven-shared-utils | 2963 | maven-shared-utils |
| 2885 | maven-parent-pom-33 | 2964 | maven-parent-pom-41 |
| 2886 | java-eclipse-sisu-plexus | 2965 | java-eclipse-sisu-plexus |
| 2887 | java-sonatype-aether-api | 2966 | java-eclipse-aether-api |
| 2888 | java-sonatype-aether-util)) | 2967 | java-eclipse-aether-util)) |
| 2889 | (inputs | 2968 | (inputs |
| 2890 | (list maven-resolver-api maven-resolver-util)) | 2969 | (list maven-resolver-api maven-resolver-util)) |
| 2891 | (native-inputs | 2970 | (native-inputs |
| @@ -2912,12 +2991,22 @@ Maven project dependencies.") | |||
| 2912 | (substitute-keyword-arguments (package-arguments maven-common-artifact-filters) | 2991 | (substitute-keyword-arguments (package-arguments maven-common-artifact-filters) |
| 2913 | ((#:phases phases) | 2992 | ((#:phases phases) |
| 2914 | `(modify-phases ,phases | 2993 | `(modify-phases ,phases |
| 2915 | (delete 'fix-aether) | ||
| 2916 | (add-before 'build 'remove-sisu | 2994 | (add-before 'build 'remove-sisu |
| 2917 | (lambda _ | 2995 | (lambda _ |
| 2918 | (substitute* "pom.xml" | 2996 | (substitute* "pom.xml" |
| 2919 | (("sisu-inject-plexus") "maven-plugin-api") | 2997 | (("sisu-inject-plexus") "maven-plugin-api") |
| 2920 | (("org.sonatype.sisu") "org.apache.maven")))))))))) | 2998 | (("org.sonatype.sisu") "org.apache.maven")))))))) |
| 2999 | ;; 3.1.0 uses Sonatype aether, not Eclipse aether | ||
| 3000 | ;; Use maven-3.0 components to avoid conflicts with packages using maven-3.0-core | ||
| 3001 | (propagated-inputs | ||
| 3002 | (list maven-3.0-artifact | ||
| 3003 | maven-3.0-model | ||
| 3004 | maven-3.0-core | ||
| 3005 | maven-3.0-plugin-api | ||
| 3006 | maven-shared-utils-3.0 | ||
| 3007 | maven-components-parent-pom-21 | ||
| 3008 | java-sonatype-aether-api | ||
| 3009 | java-sonatype-aether-util)))) | ||
| 2921 | 3010 | ||
| 2922 | (define-public maven-enforcer-api | 3011 | (define-public maven-enforcer-api |
| 2923 | (package | 3012 | (package |
| @@ -3345,22 +3434,13 @@ unit tests.") | |||
| 3345 | (substitute* "pom.xml" | 3434 | (substitute* "pom.xml" |
| 3346 | (("plexus-component-api") "plexus-component-annotations")) | 3435 | (("plexus-component-api") "plexus-component-annotations")) |
| 3347 | #t)) | 3436 | #t)) |
| 3348 | (add-after 'build 'generate-metadata | ||
| 3349 | (lambda _ | ||
| 3350 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | ||
| 3351 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | ||
| 3352 | "--source" "src/main/java" | ||
| 3353 | "--output" "build/classes/META-INF/plexus/components.xml" | ||
| 3354 | "--classes" "build/classes" | ||
| 3355 | "--descriptors" "build/classes/META-INF") | ||
| 3356 | #t)) | ||
| 3357 | (replace 'install | 3437 | (replace 'install |
| 3358 | (install-from-pom "pom.xml"))))) | 3438 | (install-from-pom "pom.xml"))))) |
| 3359 | (propagated-inputs | 3439 | (propagated-inputs |
| 3360 | (list maven-plugin-api maven-core maven-shared-utils | 3440 | (list maven-plugin-api maven-core maven-shared-utils |
| 3361 | java-plexus-component-annotations maven-parent-pom-30)) | 3441 | java-plexus-component-annotations maven-parent-pom-30)) |
| 3362 | (native-inputs | 3442 | (native-inputs |
| 3363 | (list unzip java-plexus-component-metadata)) | 3443 | (list unzip)) |
| 3364 | (home-page "https://maven.apache.org/shared/maven-shared-incremental") | 3444 | (home-page "https://maven.apache.org/shared/maven-shared-incremental") |
| 3365 | (synopsis "Maven Incremental Build support utilities") | 3445 | (synopsis "Maven Incremental Build support utilities") |
| 3366 | (description "This package contains various utility classes and plexus | 3446 | (description "This package contains various utility classes and plexus |
| @@ -3370,7 +3450,7 @@ components for supporting incremental build functionality in maven plugins.") | |||
| 3370 | (define-public maven-compiler-plugin | 3450 | (define-public maven-compiler-plugin |
| 3371 | (package | 3451 | (package |
| 3372 | (name "maven-compiler-plugin") | 3452 | (name "maven-compiler-plugin") |
| 3373 | (version "3.8.1") | 3453 | (version "3.9.0") |
| 3374 | (source (origin | 3454 | (source (origin |
| 3375 | (method git-fetch) | 3455 | (method git-fetch) |
| 3376 | (uri (git-reference | 3456 | (uri (git-reference |
| @@ -3379,12 +3459,13 @@ components for supporting incremental build functionality in maven plugins.") | |||
| 3379 | (file-name (git-file-name name version)) | 3459 | (file-name (git-file-name name version)) |
| 3380 | (sha256 | 3460 | (sha256 |
| 3381 | (base32 | 3461 | (base32 |
| 3382 | "0jkbq02vykd09ws8k9bzqxv6fjrpmir8gcxydbmj05kkhl242bma")))) | 3462 | "1fq4m1rihbj0r2fs68n0544mv23pp2snpf1vips22n30xhi891d7")))) |
| 3383 | (build-system ant-build-system) | 3463 | (build-system ant-build-system) |
| 3384 | (arguments | 3464 | (arguments |
| 3385 | `(#:jar-name "maven-compiler-plugin.jar" | 3465 | `(#:jar-name "maven-compiler-plugin.jar" |
| 3386 | #:source-dir "src/main/java" | 3466 | #:source-dir "src/main/java" |
| 3387 | #:test-dir "src/test" | 3467 | #:test-dir "src/test" |
| 3468 | #:jdk ,openjdk11 | ||
| 3388 | #:tests? #f; test depends on maven-plugin-test-harness | 3469 | #:tests? #f; test depends on maven-plugin-test-harness |
| 3389 | #:phases | 3470 | #:phases |
| 3390 | (modify-phases %standard-phases | 3471 | (modify-phases %standard-phases |
| @@ -3411,7 +3492,7 @@ components for supporting incremental build functionality in maven plugins.") | |||
| 3411 | maven-core | 3492 | maven-core |
| 3412 | maven-shared-utils | 3493 | maven-shared-utils |
| 3413 | maven-shared-incremental | 3494 | maven-shared-incremental |
| 3414 | java-plexus-java | 3495 | java-plexus-java-1 |
| 3415 | java-plexus-compiler-api | 3496 | java-plexus-compiler-api |
| 3416 | java-plexus-compiler-manager | 3497 | java-plexus-compiler-manager |
| 3417 | java-plexus-compiler-javac | 3498 | java-plexus-compiler-javac |
| @@ -3438,14 +3519,14 @@ AspectJ, .NET, and C#.") | |||
| 3438 | (define-public java-surefire-logger-api | 3519 | (define-public java-surefire-logger-api |
| 3439 | (package | 3520 | (package |
| 3440 | (name "java-surefire-logger-api") | 3521 | (name "java-surefire-logger-api") |
| 3441 | (version "3.0.0-M4") | 3522 | (version "3.5.3") |
| 3442 | (source (origin | 3523 | (source (origin |
| 3443 | (method url-fetch) | 3524 | (method url-fetch) |
| 3444 | (uri (string-append "mirror://apache/maven/surefire/" | 3525 | (uri (string-append "mirror://apache/maven/surefire/" |
| 3445 | "surefire-" version "-source-release.zip")) | 3526 | "surefire-" version "-source-release.zip")) |
| 3446 | (sha256 | 3527 | (sha256 |
| 3447 | (base32 | 3528 | (base32 |
| 3448 | "1s6d4pzk3bjm9l38mj9sfgbgmk145rppdj1dmqwc4d5105mr9q9w")))) | 3529 | "1ifw0ml0b1cycjpjsfyjy5420y4xgbssms72cvbpxny94dd7y8hs")))) |
| 3449 | (build-system ant-build-system) | 3530 | (build-system ant-build-system) |
| 3450 | (arguments | 3531 | (arguments |
| 3451 | `(#:jar-name "java-surefire-logger-api.jar" | 3532 | `(#:jar-name "java-surefire-logger-api.jar" |
| @@ -3465,6 +3546,49 @@ AspectJ, .NET, and C#.") | |||
| 3465 | internal to the SureFire Logger API. It is designed to have no dependency.") | 3546 | internal to the SureFire Logger API. It is designed to have no dependency.") |
| 3466 | (license license:asl2.0))) | 3547 | (license license:asl2.0))) |
| 3467 | 3548 | ||
| 3549 | ;; JUnit 5 BOM (Bill of Materials) - a pom-only package for dependency management. | ||
| 3550 | (define (make-junit-bom version hash) | ||
| 3551 | (package | ||
| 3552 | (name "junit-bom") | ||
| 3553 | (version version) | ||
| 3554 | (source (origin | ||
| 3555 | (method url-fetch) | ||
| 3556 | (uri (string-append | ||
| 3557 | "https://repo1.maven.org/maven2/org/junit/junit-bom/" | ||
| 3558 | version "/junit-bom-" version ".pom")) | ||
| 3559 | (sha256 (base32 hash)))) | ||
| 3560 | (build-system ant-build-system) | ||
| 3561 | (arguments | ||
| 3562 | `(#:tests? #f | ||
| 3563 | #:phases | ||
| 3564 | (modify-phases %standard-phases | ||
| 3565 | (delete 'configure) | ||
| 3566 | (delete 'build) | ||
| 3567 | (replace 'install | ||
| 3568 | (lambda* (#:key source outputs #:allow-other-keys) | ||
| 3569 | (let* ((out (assoc-ref outputs "out")) | ||
| 3570 | (pom-dir (string-append out "/lib/m2/org/junit/junit-bom/" | ||
| 3571 | ,version))) | ||
| 3572 | (mkdir-p pom-dir) | ||
| 3573 | (copy-file source (string-append pom-dir "/junit-bom-" ,version ".pom")))))))) | ||
| 3574 | (home-page "https://junit.org/junit5/") | ||
| 3575 | (synopsis "JUnit 5 Bill of Materials") | ||
| 3576 | (description "This package provides a Maven BOM (Bill of Materials) for | ||
| 3577 | JUnit 5, used for dependency version management.") | ||
| 3578 | (license license:epl2.0))) | ||
| 3579 | |||
| 3580 | (define-public junit-bom | ||
| 3581 | (make-junit-bom "5.9.3" "1mrf6kf0y6bic98n30w8s9gnxykgzv5j8mx1bh745wkjkv6jj0sd")) | ||
| 3582 | |||
| 3583 | (define-public junit-bom-5.10 | ||
| 3584 | (make-junit-bom "5.10.3" "1g5syqjzm1pigqzsr4ya85b198z1293x69cjffw4r615qi27v4qh")) | ||
| 3585 | |||
| 3586 | (define-public junit-bom-5.10.2 | ||
| 3587 | (make-junit-bom "5.10.2" "0s4r7bjcs9072a9gm2d92hy9zzib55icqn76zw655xmhlh2dk78n")) | ||
| 3588 | |||
| 3589 | (define-public junit-bom-5.12 | ||
| 3590 | (make-junit-bom "5.12.1" "1w1b3i8a4ci9qj4xyf3x6xdgb80jj1zh4qwjmmyq3p7d5g3np0kw")) | ||
| 3591 | |||
| 3468 | (define-public java-surefire-parent-pom | 3592 | (define-public java-surefire-parent-pom |
| 3469 | (package | 3593 | (package |
| 3470 | (inherit java-surefire-logger-api) | 3594 | (inherit java-surefire-logger-api) |
| @@ -3480,6 +3604,11 @@ internal to the SureFire Logger API. It is designed to have no dependency.") | |||
| 3480 | (substitute* "pom.xml" | 3604 | (substitute* "pom.xml" |
| 3481 | (("1.11") ,(package-version java-commons-codec))) | 3605 | (("1.11") ,(package-version java-commons-codec))) |
| 3482 | (substitute* "pom.xml" | 3606 | (substitute* "pom.xml" |
| 3607 | (("mavenVersion>.*") | ||
| 3608 | (string-append | ||
| 3609 | "mavenVersion>" | ||
| 3610 | ,(package-version maven-pom) | ||
| 3611 | "</mavenVersion>\n")) | ||
| 3483 | (("commonsLang3Version>.*") | 3612 | (("commonsLang3Version>.*") |
| 3484 | (string-append | 3613 | (string-append |
| 3485 | "commonsLang3Version>" | 3614 | "commonsLang3Version>" |
| @@ -3496,14 +3625,15 @@ internal to the SureFire Logger API. It is designed to have no dependency.") | |||
| 3496 | ,(package-version java-commons-io) | 3625 | ,(package-version java-commons-io) |
| 3497 | "</commonsIoVersion>\n")) | 3626 | "</commonsIoVersion>\n")) |
| 3498 | (("0.11.0") ,(package-version maven-artifact-transfer)) | 3627 | (("0.11.0") ,(package-version maven-artifact-transfer)) |
| 3499 | (("1.0.3") ,(package-version java-plexus-java))) | 3628 | (("1.0.3") ,(package-version java-plexus-java)) |
| 3629 | (("3.1.1") ,(package-version maven-common-artifact-filters))) | ||
| 3500 | #t)) | 3630 | #t)) |
| 3501 | (add-after 'install 'install-providers | 3631 | (add-after 'install 'install-providers |
| 3502 | (install-pom-file "surefire-providers/pom.xml")) | 3632 | (install-pom-file "surefire-providers/pom.xml")) |
| 3503 | (replace 'install | 3633 | (replace 'install |
| 3504 | (install-pom-file "pom.xml"))))) | 3634 | (install-pom-file "pom.xml"))))) |
| 3505 | (propagated-inputs | 3635 | (propagated-inputs |
| 3506 | (list maven-parent-pom-33)))) | 3636 | (list maven-parent-pom-41 junit-bom)))) ; FIXME: wtf does junit-bom do here??? |
| 3507 | 3637 | ||
| 3508 | (define-public java-surefire-api | 3638 | (define-public java-surefire-api |
| 3509 | (package | 3639 | (package |
| @@ -3523,15 +3653,43 @@ internal to the SureFire Logger API. It is designed to have no dependency.") | |||
| 3523 | (add-before 'build 'prepare-shade | 3653 | (add-before 'build 'prepare-shade |
| 3524 | (lambda* (#:key inputs #:allow-other-keys) | 3654 | (lambda* (#:key inputs #:allow-other-keys) |
| 3525 | (mkdir-p "build/classes") | 3655 | (mkdir-p "build/classes") |
| 3656 | (mkdir-p "build/shaded-deps") | ||
| 3657 | (let ((jarjar (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$")))) | ||
| 3658 | ;; Shade maven-shared-utils | ||
| 3659 | (for-each | ||
| 3660 | (lambda (jar-file) | ||
| 3661 | (let ((out-jar "build/shaded-deps/shared-utils-shaded.jar")) | ||
| 3662 | (with-output-to-file "build/rules-utils" | ||
| 3663 | (lambda _ | ||
| 3664 | (format #t "rule org.apache.maven.shared.utils.** org.apache.maven.surefire.shared.utils.@1~%"))) | ||
| 3665 | (invoke "java" "-jar" jarjar "process" "build/rules-utils" jar-file out-jar))) | ||
| 3666 | (find-files (assoc-ref inputs "maven-shared-utils") ".*.jar$")) | ||
| 3667 | ;; Shade commons-lang3 | ||
| 3668 | (for-each | ||
| 3669 | (lambda (jar-file) | ||
| 3670 | (let ((out-jar "build/shaded-deps/lang3-shaded.jar")) | ||
| 3671 | (with-output-to-file "build/rules-lang3" | ||
| 3672 | (lambda _ | ||
| 3673 | (format #t "rule org.apache.commons.lang3.** org.apache.maven.surefire.shared.lang3.@1~%"))) | ||
| 3674 | (invoke "java" "-jar" jarjar "process" "build/rules-lang3" jar-file out-jar))) | ||
| 3675 | (find-files (assoc-ref inputs "java-commons-lang3") ".*.jar$")) | ||
| 3676 | ;; Shade commons-codec | ||
| 3677 | (for-each | ||
| 3678 | (lambda (jar-file) | ||
| 3679 | (let ((out-jar "build/shaded-deps/codec-shaded.jar")) | ||
| 3680 | (with-output-to-file "build/rules-codec" | ||
| 3681 | (lambda _ | ||
| 3682 | (format #t "rule org.apache.commons.codec.** org.apache.maven.surefire.shared.codec.@1~%"))) | ||
| 3683 | (invoke "java" "-jar" jarjar "process" "build/rules-codec" jar-file out-jar))) | ||
| 3684 | (find-files (assoc-ref inputs "java-commons-codec") ".*.jar$"))) | ||
| 3685 | ;; Extract shaded jars | ||
| 3526 | (with-directory-excursion "build/classes" | 3686 | (with-directory-excursion "build/classes" |
| 3527 | (for-each | 3687 | (for-each |
| 3528 | (lambda (input) | 3688 | (lambda (jar-file) |
| 3529 | (for-each | 3689 | (invoke "jar" "xf" jar-file) |
| 3530 | (lambda (jar-file) | 3690 | (when (file-exists? "META-INF") |
| 3531 | (invoke "jar" "xf" jar-file) | 3691 | (delete-file-recursively "META-INF"))) |
| 3532 | (delete-file-recursively "META-INF")) | 3692 | (find-files "../shaded-deps" ".*.jar$"))) |
| 3533 | (find-files (assoc-ref inputs input) ".*.jar$"))) | ||
| 3534 | '("maven-shared-utils" "java-commons-codec"))) | ||
| 3535 | #t)) | 3693 | #t)) |
| 3536 | (add-after 'build 'shade | 3694 | (add-after 'build 'shade |
| 3537 | (lambda* (#:key inputs #:allow-other-keys) | 3695 | (lambda* (#:key inputs #:allow-other-keys) |
| @@ -3545,22 +3703,56 @@ internal to the SureFire Logger API. It is designed to have no dependency.") | |||
| 3545 | (format #t (string-append | 3703 | (format #t (string-append |
| 3546 | "rule " | 3704 | "rule " |
| 3547 | "org.apache.maven.shared.utils.** " | 3705 | "org.apache.maven.shared.utils.** " |
| 3548 | "org.apache.maven.surefire.shade.api." | 3706 | "org.apache.maven.surefire.shared.utils.@1~%")) |
| 3549 | "org.apache.maven.shared.utils.@1~%")) | ||
| 3550 | (format #t (string-append | 3707 | (format #t (string-append |
| 3551 | "rule " | 3708 | "rule " |
| 3552 | "org.apache.commons.codec.** " | 3709 | "org.apache.commons.codec.** " |
| 3553 | "org.apache.maven.surefire.shade.api." | 3710 | "org.apache.maven.surefire.shared.codec.@1~%")) |
| 3554 | "org.apache.commons.codec.@1~%")))) | 3711 | (format #t (string-append |
| 3712 | "rule " | ||
| 3713 | "org.apache.commons.lang3.** " | ||
| 3714 | "org.apache.maven.surefire.shared.lang3.@1~%")))) | ||
| 3555 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | 3715 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) |
| 3556 | (delete-file injar) | 3716 | (delete-file injar) |
| 3557 | (rename-file outjar injar))) | 3717 | (rename-file outjar injar))) |
| 3558 | #t)) | 3718 | #t)) |
| 3719 | (add-before 'install 'remove-shared-utils-dep | ||
| 3720 | (lambda _ | ||
| 3721 | (use-modules (guix build maven pom) (sxml simple) (srfi srfi-1)) | ||
| 3722 | (define fix-maven-xml (@@ (guix build maven pom) fix-maven-xml)) | ||
| 3723 | (define dep-tag (string->symbol "http://maven.apache.org/POM/4.0.0:dependency")) | ||
| 3724 | (define deps-tag (string->symbol "http://maven.apache.org/POM/4.0.0:dependencies")) | ||
| 3725 | (define artifactid-tag (string->symbol "http://maven.apache.org/POM/4.0.0:artifactId")) | ||
| 3726 | (define (is-shared-utils? dep) | ||
| 3727 | (and (pair? dep) | ||
| 3728 | (eq? (car dep) dep-tag) | ||
| 3729 | (any (lambda (part) | ||
| 3730 | (and (pair? part) | ||
| 3731 | (eq? (car part) artifactid-tag) | ||
| 3732 | (member "surefire-shared-utils" part))) | ||
| 3733 | (cdr dep)))) | ||
| 3734 | (define (filter-deps sxml) | ||
| 3735 | (cond | ||
| 3736 | ((not (pair? sxml)) sxml) | ||
| 3737 | ((eq? (car sxml) deps-tag) | ||
| 3738 | (cons deps-tag | ||
| 3739 | (filter (lambda (d) (not (is-shared-utils? d))) | ||
| 3740 | (cdr sxml)))) | ||
| 3741 | (else | ||
| 3742 | (cons (filter-deps (car sxml)) | ||
| 3743 | (filter-deps (cdr sxml)))))) | ||
| 3744 | (let* ((pom-file "surefire-api/pom.xml") | ||
| 3745 | (pom (get-pom pom-file)) | ||
| 3746 | (fixed (filter-deps pom))) | ||
| 3747 | (with-output-to-file pom-file | ||
| 3748 | (lambda () | ||
| 3749 | (sxml->xml (fix-maven-xml fixed))))) | ||
| 3750 | #t)) | ||
| 3559 | (replace 'install | 3751 | (replace 'install |
| 3560 | (install-from-pom "surefire-api/pom.xml"))))) | 3752 | (install-from-pom "surefire-api/pom.xml"))))) |
| 3561 | (propagated-inputs | 3753 | (propagated-inputs |
| 3562 | (list java-surefire-logger-api java-commons-codec | 3754 | (list java-surefire-logger-api java-commons-codec java-commons-lang3 |
| 3563 | java-surefire-parent-pom maven-shared-utils-3.1)) | 3755 | java-surefire-parent-pom maven-shared-utils)) |
| 3564 | (inputs | 3756 | (inputs |
| 3565 | (list java-jsr305)) | 3757 | (list java-jsr305)) |
| 3566 | (native-inputs | 3758 | (native-inputs |
| @@ -3568,12 +3760,90 @@ internal to the SureFire Logger API. It is designed to have no dependency.") | |||
| 3568 | (synopsis "Maven SureFire API") | 3760 | (synopsis "Maven SureFire API") |
| 3569 | (description "This package contains the API to use Maven SureFire."))) | 3761 | (description "This package contains the API to use Maven SureFire."))) |
| 3570 | 3762 | ||
| 3763 | ;; Upstream uses maven-shade-plugin to do shading at build time, but Guix | ||
| 3764 | ;; builds are offline so Maven plugins cannot run. We simulate the shading | ||
| 3765 | ;; using jarjar to relocate classes from the dependencies. | ||
| 3766 | (define-public java-surefire-shared-utils | ||
| 3767 | (package | ||
| 3768 | (inherit java-surefire-logger-api) | ||
| 3769 | (name "java-surefire-shared-utils") | ||
| 3770 | (arguments | ||
| 3771 | `(#:jar-name "java-surefire-shared-utils.jar" | ||
| 3772 | #:source-dir "surefire-shared-utils/src/main/java" | ||
| 3773 | #:tests? #f ; no tests | ||
| 3774 | #:phases | ||
| 3775 | (modify-phases %standard-phases | ||
| 3776 | (add-before 'build 'create-source-dir | ||
| 3777 | (lambda _ | ||
| 3778 | ;; This module has no source - it's just shaded dependencies | ||
| 3779 | (mkdir-p "surefire-shared-utils/src/main/java") | ||
| 3780 | #t)) | ||
| 3781 | (add-before 'build 'prepare-shade | ||
| 3782 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3783 | (mkdir-p "build/classes") | ||
| 3784 | ;; Extract all jars to shade into build/classes | ||
| 3785 | (for-each | ||
| 3786 | (lambda (input-name pattern) | ||
| 3787 | (let ((jar (car (find-files (assoc-ref inputs input-name) pattern)))) | ||
| 3788 | (with-directory-excursion "build/classes" | ||
| 3789 | (invoke "jar" "xf" jar) | ||
| 3790 | (when (file-exists? "META-INF") | ||
| 3791 | (delete-file-recursively "META-INF"))))) | ||
| 3792 | '("maven-shared-utils" "java-commons-io" "java-commons-lang3" "java-commons-compress") | ||
| 3793 | '("maven-shared-utils.*\\.jar$" "commons-io.*\\.jar$" "commons-lang3.*\\.jar$" "commons-compress.*\\.jar$")) | ||
| 3794 | #t)) | ||
| 3795 | (add-after 'build 'shade | ||
| 3796 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3797 | (let ((jarjar (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | ||
| 3798 | (injar "build/jar/java-surefire-shared-utils.jar") | ||
| 3799 | (outjar "build/jar/java-surefire-shared-utils-shaded.jar")) | ||
| 3800 | (with-output-to-file "rules" | ||
| 3801 | (lambda _ | ||
| 3802 | (format #t "rule org.apache.maven.shared.utils.** org.apache.maven.surefire.shared.utils.@1~%") | ||
| 3803 | (format #t "rule org.apache.commons.io.** org.apache.maven.surefire.shared.io.@1~%") | ||
| 3804 | (format #t "rule org.apache.commons.lang3.** org.apache.maven.surefire.shared.lang3.@1~%") | ||
| 3805 | (format #t "rule org.apache.commons.compress.** org.apache.maven.surefire.shared.compress.@1~%"))) | ||
| 3806 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | ||
| 3807 | (delete-file injar) | ||
| 3808 | (rename-file outjar injar)) | ||
| 3809 | #t)) | ||
| 3810 | (replace 'install | ||
| 3811 | (install-from-pom "surefire-shared-utils/pom.xml"))))) | ||
| 3812 | (propagated-inputs | ||
| 3813 | (list maven-shared-utils java-commons-io java-commons-lang3 | ||
| 3814 | java-commons-compress java-surefire-parent-pom)) | ||
| 3815 | (native-inputs | ||
| 3816 | (list unzip java-jarjar)) | ||
| 3817 | (synopsis "Shaded utilities for Maven SureFire") | ||
| 3818 | (description "This package contains relocated Java packages of | ||
| 3819 | maven-shared-utils and several Apache Commons utilities used by SureFire."))) | ||
| 3820 | |||
| 3821 | (define-public java-surefire-extensions-spi | ||
| 3822 | (package | ||
| 3823 | (inherit java-surefire-logger-api) | ||
| 3824 | (name "java-surefire-extensions-spi") | ||
| 3825 | (arguments | ||
| 3826 | `(#:tests? #f | ||
| 3827 | #:jar-name "java-surefire-extensions-spi.jar" | ||
| 3828 | #:source-dir "surefire-extensions-spi/src/main/java" | ||
| 3829 | #:phases | ||
| 3830 | (modify-phases %standard-phases | ||
| 3831 | (replace 'install | ||
| 3832 | (install-from-pom "surefire-extensions-spi/pom.xml"))))) | ||
| 3833 | (propagated-inputs | ||
| 3834 | (list java-surefire-api java-surefire-parent-pom)) | ||
| 3835 | (inputs | ||
| 3836 | (list java-jsr305)) | ||
| 3837 | (synopsis "Maven SureFire Extensions SPI") | ||
| 3838 | (description "This package contains the Service Provider Interface for | ||
| 3839 | Maven SureFire extensions."))) | ||
| 3840 | |||
| 3571 | (define-public java-surefire-booter | 3841 | (define-public java-surefire-booter |
| 3572 | (package | 3842 | (package |
| 3573 | (inherit java-surefire-logger-api) | 3843 | (inherit java-surefire-logger-api) |
| 3574 | (name "java-surefire-booter") | 3844 | (name "java-surefire-booter") |
| 3575 | (arguments | 3845 | (arguments |
| 3576 | `(#:tests? #f; require mockito 2 | 3846 | `(#:tests? #f ; requires mockito 2 |
| 3577 | #:jar-name "java-surefire-booter.jar" | 3847 | #:jar-name "java-surefire-booter.jar" |
| 3578 | #:source-dir "surefire-booter/src/main/java" | 3848 | #:source-dir "surefire-booter/src/main/java" |
| 3579 | #:phases | 3849 | #:phases |
| @@ -3583,13 +3853,23 @@ internal to the SureFire Logger API. It is designed to have no dependency.") | |||
| 3583 | (substitute* "surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java" | 3853 | (substitute* "surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java" |
| 3584 | (("/bin/sh") (which "sh"))) | 3854 | (("/bin/sh") (which "sh"))) |
| 3585 | #t)) | 3855 | #t)) |
| 3856 | (add-before 'build 'add-service-provider-config | ||
| 3857 | (lambda _ | ||
| 3858 | ;; The ServiceLoader config file must be included in the jar for | ||
| 3859 | ;; ForkedBooter to find MasterProcessChannelProcessorFactory implementations. | ||
| 3860 | (mkdir-p "build/classes/META-INF/services") | ||
| 3861 | (copy-file "surefire-booter/src/main/resources/META-INF/services/org.apache.maven.surefire.spi.MasterProcessChannelProcessorFactory" | ||
| 3862 | "build/classes/META-INF/services/org.apache.maven.surefire.spi.MasterProcessChannelProcessorFactory"))) | ||
| 3586 | (replace 'install | 3863 | (replace 'install |
| 3587 | (install-from-pom "surefire-booter/pom.xml"))))) | 3864 | (install-from-pom "surefire-booter/pom.xml"))))) |
| 3588 | (propagated-inputs | 3865 | (propagated-inputs |
| 3589 | (list java-surefire-api java-commons-lang3 java-commons-io | 3866 | (list java-surefire-api java-surefire-extensions-api |
| 3867 | java-surefire-extensions-spi java-surefire-shared-utils | ||
| 3590 | java-surefire-parent-pom)) | 3868 | java-surefire-parent-pom)) |
| 3591 | (inputs | 3869 | (inputs |
| 3592 | (list java-jsr305)) | 3870 | (list java-jsr305)) |
| 3871 | (native-inputs | ||
| 3872 | (list unzip)) | ||
| 3593 | (synopsis "API and Facilities used by forked tests running in JVM sub-process") | 3873 | (synopsis "API and Facilities used by forked tests running in JVM sub-process") |
| 3594 | (description "SureFire runs tests inside a forked JVM subprocess. This | 3874 | (description "SureFire runs tests inside a forked JVM subprocess. This |
| 3595 | package contains an API and facilities used inside that forked JVM."))) | 3875 | package contains an API and facilities used inside that forked JVM."))) |
| @@ -3599,7 +3879,7 @@ package contains an API and facilities used inside that forked JVM."))) | |||
| 3599 | (inherit java-surefire-logger-api) | 3879 | (inherit java-surefire-logger-api) |
| 3600 | (name "java-surefire-extensions-api") | 3880 | (name "java-surefire-extensions-api") |
| 3601 | (arguments | 3881 | (arguments |
| 3602 | `(#:tests? #f; requires mockito 2 | 3882 | `(#:tests? #f ; requires mockito 2 |
| 3603 | #:jar-name "java-surefire-extensions-api.jar" | 3883 | #:jar-name "java-surefire-extensions-api.jar" |
| 3604 | #:source-dir "surefire-extensions-api/src/main/java" | 3884 | #:source-dir "surefire-extensions-api/src/main/java" |
| 3605 | #:phases | 3885 | #:phases |
| @@ -3607,7 +3887,7 @@ package contains an API and facilities used inside that forked JVM."))) | |||
| 3607 | (replace 'install | 3887 | (replace 'install |
| 3608 | (install-from-pom "surefire-extensions-api/pom.xml"))))) | 3888 | (install-from-pom "surefire-extensions-api/pom.xml"))))) |
| 3609 | (propagated-inputs | 3889 | (propagated-inputs |
| 3610 | (list java-surefire-api java-surefire-parent-pom)) | 3890 | (list java-surefire-api java-surefire-shared-utils java-surefire-parent-pom)) |
| 3611 | (inputs | 3891 | (inputs |
| 3612 | (list java-plexus-component-annotations)) | 3892 | (list java-plexus-component-annotations)) |
| 3613 | (synopsis "Extension API for Maven SureFire") | 3893 | (synopsis "Extension API for Maven SureFire") |
| @@ -3629,41 +3909,13 @@ POM in Apache Maven Surefire project."))) | |||
| 3629 | "**/SmartStackTraceParserTest.java") | 3909 | "**/SmartStackTraceParserTest.java") |
| 3630 | #:phases | 3910 | #:phases |
| 3631 | (modify-phases %standard-phases | 3911 | (modify-phases %standard-phases |
| 3632 | (add-before 'build 'prepare-shade | ||
| 3633 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3634 | (mkdir-p "build/classes") | ||
| 3635 | (with-directory-excursion "build/classes" | ||
| 3636 | (for-each | ||
| 3637 | (lambda (jar-file) | ||
| 3638 | (invoke "jar" "xf" jar-file) | ||
| 3639 | (delete-file-recursively "META-INF")) | ||
| 3640 | (find-files (assoc-ref inputs "maven-shared-utils") ".*.jar$"))) | ||
| 3641 | #t)) | ||
| 3642 | (add-after 'build 'shade | ||
| 3643 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3644 | (let ((jarjar | ||
| 3645 | (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | ||
| 3646 | (injar "java-surefire-common-java5.jar") | ||
| 3647 | (outjar "java-surefire-common-java5-shaded.jar")) | ||
| 3648 | (with-directory-excursion "build/jar" | ||
| 3649 | (with-output-to-file "rules" | ||
| 3650 | (lambda _ | ||
| 3651 | (format #t (string-append | ||
| 3652 | "rule " | ||
| 3653 | "org.apache.maven.shared.utils.** " | ||
| 3654 | "org.apache.maven.surefire.shade.common." | ||
| 3655 | "org.apache.maven.shared.utils.@1~%")))) | ||
| 3656 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | ||
| 3657 | (delete-file injar) | ||
| 3658 | (rename-file outjar injar))) | ||
| 3659 | #t)) | ||
| 3660 | (replace 'install | 3912 | (replace 'install |
| 3661 | (install-from-pom "surefire-providers/common-java5/pom.xml"))))) | 3913 | (install-from-pom "surefire-providers/common-java5/pom.xml"))))) |
| 3662 | (propagated-inputs | 3914 | (propagated-inputs |
| 3663 | (list maven-shared-utils-3.1 java-surefire-api | 3915 | (list java-surefire-shared-utils java-surefire-api |
| 3664 | java-surefire-parent-pom)) | 3916 | java-surefire-parent-pom)) |
| 3665 | (native-inputs | 3917 | (native-inputs |
| 3666 | (list unzip java-jarjar java-junit java-fest-assert)) | 3918 | (list unzip java-junit java-assertj)) |
| 3667 | (synopsis "Common java5 facilities for Maven SureFire") | 3919 | (synopsis "Common java5 facilities for Maven SureFire") |
| 3668 | (description "This package contains shared Java 5 code for all providers."))) | 3920 | (description "This package contains shared Java 5 code for all providers."))) |
| 3669 | 3921 | ||
| @@ -3797,51 +4049,122 @@ JVM, using JUnit 4.0 or later."))) | |||
| 3797 | `(#:tests? #f; require mockito 2 | 4049 | `(#:tests? #f; require mockito 2 |
| 3798 | #:jar-name "maven-surefire-common.jar" | 4050 | #:jar-name "maven-surefire-common.jar" |
| 3799 | #:source-dir "maven-surefire-common/src/main/java" | 4051 | #:source-dir "maven-surefire-common/src/main/java" |
| 4052 | #:jdk ,openjdk11 | ||
| 3800 | #:phases | 4053 | #:phases |
| 3801 | (modify-phases %standard-phases | 4054 | (modify-phases %standard-phases |
| 3802 | (add-before 'build 'prepare-shade | 4055 | (add-before 'build 'prepare-shade |
| 3803 | (lambda* (#:key inputs #:allow-other-keys) | 4056 | (lambda* (#:key inputs #:allow-other-keys) |
| 4057 | ;; Shade dependencies BEFORE compilation so that the source code | ||
| 4058 | ;; can import from org.apache.maven.surefire.shared.* | ||
| 3804 | (mkdir-p "build/classes") | 4059 | (mkdir-p "build/classes") |
| 4060 | (mkdir-p "build/shaded-deps") | ||
| 4061 | (let ((jarjar (car (find-files (assoc-ref inputs "java-jarjar") | ||
| 4062 | ".*.jar$")))) | ||
| 4063 | ;; Shade maven-shared-utils | ||
| 4064 | (for-each | ||
| 4065 | (lambda (jar-file) | ||
| 4066 | (let ((out-jar "build/shaded-deps/shared-utils-shaded.jar")) | ||
| 4067 | (with-output-to-file "build/rules-utils" | ||
| 4068 | (lambda _ | ||
| 4069 | (format #t "rule org.apache.maven.shared.utils.** org.apache.maven.surefire.shared.utils.@1~%"))) | ||
| 4070 | (invoke "java" "-jar" jarjar "process" "build/rules-utils" | ||
| 4071 | jar-file out-jar))) | ||
| 4072 | (find-files (assoc-ref inputs "maven-shared-utils") ".*.jar$")) | ||
| 4073 | ;; Shade commons-io | ||
| 4074 | (for-each | ||
| 4075 | (lambda (jar-file) | ||
| 4076 | (let ((out-jar "build/shaded-deps/io-shaded.jar")) | ||
| 4077 | (with-output-to-file "build/rules-io" | ||
| 4078 | (lambda _ | ||
| 4079 | (format #t "rule org.apache.commons.io.** org.apache.maven.surefire.shared.io.@1~%"))) | ||
| 4080 | (invoke "java" "-jar" jarjar "process" "build/rules-io" | ||
| 4081 | jar-file out-jar))) | ||
| 4082 | (find-files (assoc-ref inputs "java-commons-io") ".*.jar$")) | ||
| 4083 | ;; Shade commons-lang3 | ||
| 4084 | (for-each | ||
| 4085 | (lambda (jar-file) | ||
| 4086 | (let ((out-jar "build/shaded-deps/lang3-shaded.jar")) | ||
| 4087 | (with-output-to-file "build/rules-lang3" | ||
| 4088 | (lambda _ | ||
| 4089 | (format #t "rule org.apache.commons.lang3.** org.apache.maven.surefire.shared.lang3.@1~%"))) | ||
| 4090 | (invoke "java" "-jar" jarjar "process" "build/rules-lang3" | ||
| 4091 | jar-file out-jar))) | ||
| 4092 | (find-files (assoc-ref inputs "java-commons-lang3") ".*.jar$")) | ||
| 4093 | ;; Shade commons-compress | ||
| 4094 | (for-each | ||
| 4095 | (lambda (jar-file) | ||
| 4096 | (let ((out-jar "build/shaded-deps/compress-shaded.jar")) | ||
| 4097 | (with-output-to-file "build/rules-compress" | ||
| 4098 | (lambda _ | ||
| 4099 | (format #t "rule org.apache.commons.compress.** org.apache.maven.surefire.shared.compress.@1~%"))) | ||
| 4100 | (invoke "java" "-jar" jarjar "process" "build/rules-compress" | ||
| 4101 | jar-file out-jar))) | ||
| 4102 | (find-files (assoc-ref inputs "java-commons-compress") ".*.jar$"))) | ||
| 4103 | ;; Extract shaded jars and non-shaded artifacts-filter | ||
| 3805 | (with-directory-excursion "build/classes" | 4104 | (with-directory-excursion "build/classes" |
| 3806 | (for-each | 4105 | (for-each |
| 3807 | (lambda (input) | 4106 | (lambda (jar-file) |
| 3808 | (for-each | 4107 | (invoke "jar" "xf" jar-file) |
| 3809 | (lambda (jar-file) | 4108 | (when (file-exists? "META-INF") |
| 3810 | (invoke "jar" "xf" jar-file) | 4109 | (delete-file-recursively "META-INF"))) |
| 3811 | (delete-file-recursively "META-INF")) | 4110 | (find-files "../shaded-deps" ".*.jar$")) |
| 3812 | (find-files (assoc-ref inputs input) ".*.jar$"))) | 4111 | ;; Also extract maven-common-artifact-filters (not shaded) |
| 3813 | '("maven-shared-utils" "java-commons-io" "java-commons-lang3" | 4112 | (for-each |
| 3814 | "java-commons-compress" "maven-common-artifact-filters"))) | 4113 | (lambda (jar-file) |
| 4114 | (invoke "jar" "xf" jar-file) | ||
| 4115 | (when (file-exists? "META-INF") | ||
| 4116 | (delete-file-recursively "META-INF"))) | ||
| 4117 | (find-files (assoc-ref inputs "maven-common-artifact-filters") | ||
| 4118 | ".*.jar$"))) | ||
| 3815 | #t)) | 4119 | #t)) |
| 3816 | (add-after 'build 'shade | 4120 | (add-after 'build 'generate-plexus-components |
| 4121 | (lambda _ | ||
| 4122 | ;; Create Plexus components.xml for @Component annotated classes. | ||
| 4123 | ;; We do this manually because PlexusMetadataGeneratorCli has issues | ||
| 4124 | ;; with our isolated classpath setup. | ||
| 4125 | (mkdir-p "build/classes/META-INF/plexus") | ||
| 4126 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | ||
| 4127 | (lambda () | ||
| 4128 | (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | ||
| 4129 | <component-set> | ||
| 4130 | <components> | ||
| 4131 | <component> | ||
| 4132 | <role>org.apache.maven.surefire.providerapi.ProviderDetector</role> | ||
| 4133 | <implementation>org.apache.maven.surefire.providerapi.ProviderDetector</implementation> | ||
| 4134 | <requirements> | ||
| 4135 | <requirement> | ||
| 4136 | <role>org.apache.maven.surefire.providerapi.ServiceLoader</role> | ||
| 4137 | <field-name>serviceLoader</field-name> | ||
| 4138 | </requirement> | ||
| 4139 | </requirements> | ||
| 4140 | </component> | ||
| 4141 | <component> | ||
| 4142 | <role>org.apache.maven.surefire.providerapi.ServiceLoader</role> | ||
| 4143 | <implementation>org.apache.maven.surefire.providerapi.ServiceLoader</implementation> | ||
| 4144 | </component> | ||
| 4145 | </components> | ||
| 4146 | </component-set> | ||
| 4147 | "))) | ||
| 4148 | ;; Create Sisu index for @Named components | ||
| 4149 | (mkdir-p "build/classes/META-INF/sisu") | ||
| 4150 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | ||
| 4151 | (lambda () | ||
| 4152 | (display "org.apache.maven.plugin.surefire.SurefireDependencyResolver\n"))) | ||
| 4153 | (invoke "ant" "jar"))) | ||
| 4154 | (add-after 'generate-plexus-components 'shade | ||
| 3817 | (lambda* (#:key inputs #:allow-other-keys) | 4155 | (lambda* (#:key inputs #:allow-other-keys) |
| 3818 | (let ((jarjar | 4156 | ;; Shade the output jar as well for consistency |
| 3819 | (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | 4157 | (let ((jarjar (car (find-files (assoc-ref inputs "java-jarjar") |
| 4158 | ".*.jar$"))) | ||
| 3820 | (injar "maven-surefire-common.jar") | 4159 | (injar "maven-surefire-common.jar") |
| 3821 | (outjar "maven-surefire-common-shaded.jar")) | 4160 | (outjar "maven-surefire-common-shaded.jar")) |
| 3822 | (with-directory-excursion "build/jar" | 4161 | (with-directory-excursion "build/jar" |
| 3823 | (with-output-to-file "rules" | 4162 | (with-output-to-file "rules" |
| 3824 | (lambda _ | 4163 | (lambda _ |
| 3825 | (format #t (string-append | 4164 | (format #t "rule org.apache.maven.shared.utils.** org.apache.maven.surefire.shared.utils.@1~%") |
| 3826 | "rule " | 4165 | (format #t "rule org.apache.commons.io.** org.apache.maven.surefire.shared.io.@1~%") |
| 3827 | "org.apache.maven.shared.utils.** " | 4166 | (format #t "rule org.apache.commons.lang3.** org.apache.maven.surefire.shared.lang3.@1~%") |
| 3828 | "org.apache.maven.surefire.shade.common." | 4167 | (format #t "rule org.apache.commons.compress.** org.apache.maven.surefire.shared.compress.@1~%"))) |
| 3829 | "org.apache.maven.shared.utils.@1~%")) | ||
| 3830 | (format #t (string-append | ||
| 3831 | "rule " | ||
| 3832 | "org.apache.commons.io.** " | ||
| 3833 | "org.apache.maven.surefire.shade.common." | ||
| 3834 | "org.apache.commons.io.@1~%")) | ||
| 3835 | (format #t (string-append | ||
| 3836 | "rule " | ||
| 3837 | "org.apache.commons.lang3.** " | ||
| 3838 | "org.apache.maven.surefire.shade.common." | ||
| 3839 | "org.apache.commons.lang3.@1~%")) | ||
| 3840 | (format #t (string-append | ||
| 3841 | "rule " | ||
| 3842 | "org.apache.commons.compress.** " | ||
| 3843 | "org.apache.maven.surefire.shade.common." | ||
| 3844 | "org.apache.commons.compress.@1~%")))) | ||
| 3845 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | 4168 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) |
| 3846 | (delete-file injar) | 4169 | (delete-file injar) |
| 3847 | (rename-file outjar injar))) | 4170 | (rename-file outjar injar))) |
| @@ -3851,6 +4174,41 @@ JVM, using JUnit 4.0 or later."))) | |||
| 3851 | (substitute* "maven-surefire-common/pom.xml" | 4174 | (substitute* "maven-surefire-common/pom.xml" |
| 3852 | (("maven-toolchain") "maven-core")) | 4175 | (("maven-toolchain") "maven-core")) |
| 3853 | #t)) | 4176 | #t)) |
| 4177 | (add-before 'install 'remove-shared-utils-dep | ||
| 4178 | (lambda _ | ||
| 4179 | (use-modules (guix build maven pom) (sxml simple) (srfi srfi-1)) | ||
| 4180 | (define fix-maven-xml (@@ (guix build maven pom) fix-maven-xml)) | ||
| 4181 | (define dep-tag | ||
| 4182 | (string->symbol "http://maven.apache.org/POM/4.0.0:dependency")) | ||
| 4183 | (define deps-tag | ||
| 4184 | (string->symbol "http://maven.apache.org/POM/4.0.0:dependencies")) | ||
| 4185 | (define artifactid-tag | ||
| 4186 | (string->symbol "http://maven.apache.org/POM/4.0.0:artifactId")) | ||
| 4187 | (define (is-shared-utils? dep) | ||
| 4188 | (and (pair? dep) | ||
| 4189 | (eq? (car dep) dep-tag) | ||
| 4190 | (any (lambda (part) | ||
| 4191 | (and (pair? part) | ||
| 4192 | (eq? (car part) artifactid-tag) | ||
| 4193 | (member "surefire-shared-utils" part))) | ||
| 4194 | (cdr dep)))) | ||
| 4195 | (define (filter-deps sxml) | ||
| 4196 | (cond | ||
| 4197 | ((not (pair? sxml)) sxml) | ||
| 4198 | ((eq? (car sxml) deps-tag) | ||
| 4199 | (cons deps-tag | ||
| 4200 | (filter (lambda (d) (not (is-shared-utils? d))) | ||
| 4201 | (cdr sxml)))) | ||
| 4202 | (else | ||
| 4203 | (cons (filter-deps (car sxml)) | ||
| 4204 | (filter-deps (cdr sxml)))))) | ||
| 4205 | (let* ((pom-file "maven-surefire-common/pom.xml") | ||
| 4206 | (pom (get-pom pom-file)) | ||
| 4207 | (fixed (filter-deps pom))) | ||
| 4208 | (with-output-to-file pom-file | ||
| 4209 | (lambda () | ||
| 4210 | (sxml->xml (fix-maven-xml fixed))))) | ||
| 4211 | #t)) | ||
| 3854 | (replace 'install | 4212 | (replace 'install |
| 3855 | (install-from-pom "maven-surefire-common/pom.xml"))))) | 4213 | (install-from-pom "maven-surefire-common/pom.xml"))))) |
| 3856 | (propagated-inputs | 4214 | (propagated-inputs |
| @@ -3861,17 +4219,34 @@ JVM, using JUnit 4.0 or later."))) | |||
| 3861 | maven-plugin-annotations | 4219 | maven-plugin-annotations |
| 3862 | maven-common-artifact-filters | 4220 | maven-common-artifact-filters |
| 3863 | maven-artifact-transfer | 4221 | maven-artifact-transfer |
| 3864 | java-plexus-java | 4222 | java-plexus-java-1 |
| 3865 | java-jansi | 4223 | java-jansi |
| 3866 | java-commons-io | 4224 | java-commons-io |
| 3867 | java-commons-lang3 | 4225 | java-commons-lang3 |
| 3868 | java-commons-compress | 4226 | java-commons-compress |
| 3869 | maven-shared-utils-3.1 | 4227 | maven-shared-utils |
| 4228 | java-slf4j-simple | ||
| 3870 | java-surefire-parent-pom)) | 4229 | java-surefire-parent-pom)) |
| 3871 | (inputs | 4230 | (inputs |
| 3872 | (list java-jsr305)) | 4231 | (list java-jsr305)) |
| 3873 | (native-inputs | 4232 | (native-inputs |
| 3874 | (list unzip java-jarjar)) | 4233 | `(("unzip" ,unzip) |
| 4234 | ("java-jarjar" ,java-jarjar) | ||
| 4235 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | ||
| 4236 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | ||
| 4237 | ;; For isolated classpath in generate-plexus-components phase | ||
| 4238 | ("java-plexus-utils" ,java-plexus-utils) | ||
| 4239 | ("java-plexus-cli" ,java-plexus-cli) | ||
| 4240 | ("java-plexus-classworlds" ,java-plexus-classworlds) | ||
| 4241 | ("java-plexus-container-default" ,java-plexus-container-default) | ||
| 4242 | ("java-qdox" ,java-qdox) | ||
| 4243 | ("java-jdom" ,java-jdom) | ||
| 4244 | ("java-jdom2" ,java-jdom2) | ||
| 4245 | ("java-asm" ,java-asm-9) | ||
| 4246 | ("java-commons-cli" ,java-commons-cli) | ||
| 4247 | ("java-guava" ,java-guava) | ||
| 4248 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | ||
| 4249 | ("java-plexus-component-annotations" ,java-plexus-component-annotations))) | ||
| 3875 | (synopsis "API used in Surefire and Failsafe MOJO") | 4250 | (synopsis "API used in Surefire and Failsafe MOJO") |
| 3876 | (description "This package contains an API used in SureFire and Failsafe | 4251 | (description "This package contains an API used in SureFire and Failsafe |
| 3877 | MOJO."))) | 4252 | MOJO."))) |
| @@ -3883,9 +4258,19 @@ MOJO."))) | |||
| 3883 | (arguments | 4258 | (arguments |
| 3884 | `(#:jar-name "maven-surefire-plugin.jar" | 4259 | `(#:jar-name "maven-surefire-plugin.jar" |
| 3885 | #:source-dir "maven-surefire-plugin/src/main/java" | 4260 | #:source-dir "maven-surefire-plugin/src/main/java" |
| 4261 | #:jdk ,openjdk11 | ||
| 3886 | #:tests? #f; test depends on maven-plugin-test-harness | 4262 | #:tests? #f; test depends on maven-plugin-test-harness |
| 3887 | #:phases | 4263 | #:phases |
| 3888 | (modify-phases %standard-phases | 4264 | (modify-phases %standard-phases |
| 4265 | (add-before 'build 'fix-line-endings | ||
| 4266 | (lambda _ | ||
| 4267 | ;; Source files have CRLF line endings which break the Guix Maven Java parser. | ||
| 4268 | (for-each | ||
| 4269 | (lambda (file) | ||
| 4270 | (substitute* file | ||
| 4271 | (("\r\n") | ||
| 4272 | "\n"))) | ||
| 4273 | (find-files "." "\\.java$")))) | ||
| 3889 | (add-before 'build 'generate-plugin.xml | 4274 | (add-before 'build 'generate-plugin.xml |
| 3890 | (generate-plugin.xml "maven-surefire-plugin/pom.xml" | 4275 | (generate-plugin.xml "maven-surefire-plugin/pom.xml" |
| 3891 | "surefire" | 4276 | "surefire" |
| @@ -3893,7 +4278,15 @@ MOJO."))) | |||
| 3893 | (list | 4278 | (list |
| 3894 | (list | 4279 | (list |
| 3895 | "maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java" | 4280 | "maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java" |
| 3896 | "maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java")))) | 4281 | "maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefireMojo.java")))) |
| 4282 | (add-after 'generate-plugin.xml 'fix-plugin.xml | ||
| 4283 | (lambda _ | ||
| 4284 | ;; The generate-plugin.xml phase doesn't fully qualify class names | ||
| 4285 | ;; for classes in the same package (no import statement). | ||
| 4286 | ;; Fix the role references to use fully qualified names. | ||
| 4287 | (substitute* "build/classes/META-INF/maven/plugin.xml" | ||
| 4288 | (("<role>SurefireDependencyResolver</role>") | ||
| 4289 | "<role>org.apache.maven.plugin.surefire.SurefireDependencyResolver</role>")))) | ||
| 3897 | (replace 'install | 4290 | (replace 'install |
| 3898 | (install-from-pom "maven-surefire-plugin/pom.xml"))))) | 4291 | (install-from-pom "maven-surefire-plugin/pom.xml"))))) |
| 3899 | (propagated-inputs | 4292 | (propagated-inputs |
| @@ -3908,7 +4301,11 @@ reports in two different file formats, plain text and xml."))) | |||
| 3908 | (define-public maven-jar-plugin | 4301 | (define-public maven-jar-plugin |
| 3909 | (package | 4302 | (package |
| 3910 | (name "maven-jar-plugin") | 4303 | (name "maven-jar-plugin") |
| 3911 | (version "3.2.0") | 4304 | ;; Note: 3.5.0 uses javax.inject.* annotations (JSR-330) for Sisu |
| 4305 | ;; injection, which works correctly with Maven's plugin classloader. | ||
| 4306 | ;; Earlier 3.4.x versions used org.apache.maven.api.di.* annotations | ||
| 4307 | ;; which required Maven 4's api realm and failed to load. | ||
| 4308 | (version "3.5.0") | ||
| 3912 | (source (origin | 4309 | (source (origin |
| 3913 | (method git-fetch) | 4310 | (method git-fetch) |
| 3914 | (uri (git-reference | 4311 | (uri (git-reference |
| @@ -3917,7 +4314,7 @@ reports in two different file formats, plain text and xml."))) | |||
| 3917 | (file-name (git-file-name name version)) | 4314 | (file-name (git-file-name name version)) |
| 3918 | (sha256 | 4315 | (sha256 |
| 3919 | (base32 | 4316 | (base32 |
| 3920 | "04y2rlmcabmc55ljqlkgbb5xx94a59cz1dvrnpfj1vzz024pqkyg")))) | 4317 | "02bhpsb7mr81z2q1dvc9dl653mji60p7zqkcj3wg1ylhxxmdifc1")))) |
| 3921 | (build-system ant-build-system) | 4318 | (build-system ant-build-system) |
| 3922 | (arguments | 4319 | (arguments |
| 3923 | `(#:jar-name "maven-jar-plugin.jar" | 4320 | `(#:jar-name "maven-jar-plugin.jar" |
| @@ -3932,17 +4329,61 @@ reports in two different file formats, plain text and xml."))) | |||
| 3932 | (list | 4329 | (list |
| 3933 | (list "AbstractJarMojo.java" "JarMojo.java") | 4330 | (list "AbstractJarMojo.java" "JarMojo.java") |
| 3934 | (list "AbstractJarMojo.java" "TestJarMojo.java")))) | 4331 | (list "AbstractJarMojo.java" "TestJarMojo.java")))) |
| 4332 | (add-before 'build 'generate-sisu-index | ||
| 4333 | ;; Generate META-INF/sisu/javax.inject.Named for ToolchainsJdkSpecification | ||
| 4334 | (lambda _ | ||
| 4335 | (mkdir-p "build/classes/META-INF/sisu") | ||
| 4336 | (call-with-output-file "build/classes/META-INF/sisu/javax.inject.Named" | ||
| 4337 | (lambda (port) | ||
| 4338 | (display "org.apache.maven.plugins.jar.ToolchainsJdkSpecification\n" | ||
| 4339 | port))))) | ||
| 4340 | (add-before 'install 'add-transitive-dependencies | ||
| 4341 | ;; maven-archiver requires plexus-interpolation at runtime, and | ||
| 4342 | ;; plexus-archiver requires plexus-io at runtime. Maven's plugin | ||
| 4343 | ;; classloader only loads direct dependencies, so we need to add | ||
| 4344 | ;; these transitive dependencies explicitly. | ||
| 4345 | (lambda _ | ||
| 4346 | (substitute* "pom.xml" | ||
| 4347 | (("</dependencies>") | ||
| 4348 | "<dependency> | ||
| 4349 | <groupId>org.codehaus.plexus</groupId> | ||
| 4350 | <artifactId>plexus-interpolation</artifactId> | ||
| 4351 | <version>1.27</version> | ||
| 4352 | </dependency> | ||
| 4353 | <dependency> | ||
| 4354 | <groupId>org.codehaus.plexus</groupId> | ||
| 4355 | <artifactId>plexus-io</artifactId> | ||
| 4356 | <version>3.6.0</version> | ||
| 4357 | </dependency> | ||
| 4358 | <dependency> | ||
| 4359 | <groupId>org.apache.commons</groupId> | ||
| 4360 | <artifactId>commons-compress</artifactId> | ||
| 4361 | <version>1.28.0</version> | ||
| 4362 | </dependency> | ||
| 4363 | <dependency> | ||
| 4364 | <groupId>org.codehaus.plexus</groupId> | ||
| 4365 | <artifactId>plexus-xml</artifactId> | ||
| 4366 | <version>3.0.2</version> | ||
| 4367 | </dependency> | ||
| 4368 | </dependencies>")))) | ||
| 3935 | (replace 'install | 4369 | (replace 'install |
| 3936 | (install-from-pom "pom.xml"))))) | 4370 | (install-from-pom "pom.xml"))))) |
| 3937 | (propagated-inputs | 4371 | (propagated-inputs |
| 3938 | (list maven-archiver | 4372 | (list maven-archiver |
| 3939 | maven-3.0-artifact | 4373 | maven-artifact |
| 3940 | maven-3.0-core | 4374 | maven-core |
| 3941 | maven-3.0-plugin-api | 4375 | maven-plugin-api |
| 3942 | maven-file-management | 4376 | maven-file-management |
| 3943 | maven-shared-utils | 4377 | maven-shared-utils |
| 3944 | java-plexus-archiver | 4378 | java-plexus-archiver |
| 3945 | java-plexus-utils)) | 4379 | java-plexus-io ; Required by plexus-archiver at runtime |
| 4380 | java-commons-compress ; Required by plexus-archiver at runtime | ||
| 4381 | java-plexus-xml ; Required by plexus-utils at runtime | ||
| 4382 | java-plexus-interpolation ; Required by maven-archiver at runtime | ||
| 4383 | java-plexus-utils | ||
| 4384 | java-javax-inject | ||
| 4385 | java-slf4j-api | ||
| 4386 | java-commons-io)) | ||
| 3946 | (inputs | 4387 | (inputs |
| 3947 | (list maven-plugin-annotations)) | 4388 | (list maven-plugin-annotations)) |
| 3948 | (home-page "https://maven.apache.org/plugins/maven-jar-plugin") | 4389 | (home-page "https://maven.apache.org/plugins/maven-jar-plugin") |
| @@ -4027,3 +4468,413 @@ techniques for generating static and dynamic content, supporting a variety of | |||
| 4027 | markup languages. | 4468 | markup languages. |
| 4028 | 4469 | ||
| 4029 | This package contains Doxia core classes and interfaces."))) | 4470 | This package contains Doxia core classes and interfaces."))) |
| 4471 | |||
| 4472 | (define-public maven-reporting-api | ||
| 4473 | (package | ||
| 4474 | (name "maven-reporting-api") | ||
| 4475 | (version "4.0.0") | ||
| 4476 | (source (origin | ||
| 4477 | (method git-fetch) | ||
| 4478 | (uri (git-reference | ||
| 4479 | (url "https://gitbox.apache.org/repos/asf/maven-reporting-api.git") | ||
| 4480 | (commit (string-append "maven-reporting-api-" version)))) | ||
| 4481 | (file-name (git-file-name name version)) | ||
| 4482 | (sha256 | ||
| 4483 | (base32 "0477sx16p6grspdfbcgjizf6cm1vs3lnr36m4jkygjm416h0b3yz")))) | ||
| 4484 | (build-system ant-build-system) | ||
| 4485 | (arguments | ||
| 4486 | `(#:jar-name "maven-reporting-api.jar" | ||
| 4487 | #:source-dir "src/main/java" | ||
| 4488 | #:tests? #f | ||
| 4489 | #:phases | ||
| 4490 | (modify-phases %standard-phases | ||
| 4491 | (replace 'install | ||
| 4492 | (install-from-pom "pom.xml"))))) | ||
| 4493 | (propagated-inputs | ||
| 4494 | (list maven-doxia-sink-api)) | ||
| 4495 | (home-page "https://maven.apache.org/shared/maven-reporting-api/") | ||
| 4496 | (synopsis "Maven Reporting API") | ||
| 4497 | (description "API for Maven report generation.") | ||
| 4498 | (license license:asl2.0))) | ||
| 4499 | |||
| 4500 | (define-public wagon-provider-api | ||
| 4501 | (package | ||
| 4502 | (name "wagon-provider-api") | ||
| 4503 | (version "3.5.3") | ||
| 4504 | (source (origin | ||
| 4505 | (method git-fetch) | ||
| 4506 | (uri (git-reference | ||
| 4507 | (url "https://gitbox.apache.org/repos/asf/maven-wagon.git") | ||
| 4508 | (commit (string-append "wagon-" version)))) | ||
| 4509 | (file-name (git-file-name "maven-wagon" version)) | ||
| 4510 | (sha256 | ||
| 4511 | (base32 "134wqkyvjv3h7n052ghd1yy1c3zlp0fv0xlvblxbi352fcqnzx9b")))) | ||
| 4512 | (build-system ant-build-system) | ||
| 4513 | (arguments | ||
| 4514 | `(#:jar-name "wagon-provider-api.jar" | ||
| 4515 | #:source-dir "wagon-provider-api/src/main/java" | ||
| 4516 | #:tests? #f | ||
| 4517 | #:phases | ||
| 4518 | (modify-phases %standard-phases | ||
| 4519 | (replace 'install | ||
| 4520 | (install-from-pom "wagon-provider-api/pom.xml"))))) | ||
| 4521 | (propagated-inputs | ||
| 4522 | (list java-plexus-utils)) | ||
| 4523 | (home-page "https://maven.apache.org/wagon/") | ||
| 4524 | (synopsis "Maven Wagon Provider API") | ||
| 4525 | (description "Transport abstraction for Maven artifact and repository handling.") | ||
| 4526 | (license license:asl2.0))) | ||
| 4527 | |||
| 4528 | ;;; Velocity packages - needed for maven-plugin-tools | ||
| 4529 | |||
| 4530 | ;; TODO: This package manually invokes jjtree and javacc because I was too lazy | ||
| 4531 | ;; to do it right by packaging java-javacc-maven-plugin and using maven-build-system. | ||
| 4532 | (define velocity-engine-parent-pom | ||
| 4533 | (package | ||
| 4534 | (name "velocity-engine-parent-pom") | ||
| 4535 | (version "2.4.1") | ||
| 4536 | (source (origin | ||
| 4537 | (method git-fetch) | ||
| 4538 | (uri (git-reference | ||
| 4539 | (url "https://github.com/apache/velocity-engine") | ||
| 4540 | (commit version))) | ||
| 4541 | (file-name (git-file-name name version)) | ||
| 4542 | (sha256 | ||
| 4543 | (base32 "1b6vk9wlny7qkspgapqd8x38ipm04lsi1i1bnkzikmi3zp5pl42n")))) | ||
| 4544 | (build-system ant-build-system) | ||
| 4545 | (arguments | ||
| 4546 | `(#:tests? #f | ||
| 4547 | #:phases | ||
| 4548 | (modify-phases %standard-phases | ||
| 4549 | (delete 'configure) | ||
| 4550 | (delete 'build) | ||
| 4551 | (add-before 'install 'remove-parent-reference | ||
| 4552 | (lambda _ | ||
| 4553 | ;; Remove the parent pom reference to avoid needing | ||
| 4554 | ;; velocity-master:7 -> apache:33 parent chain. | ||
| 4555 | ;; Use sed to remove the multiline <parent>...</parent> block, | ||
| 4556 | ;; then add the missing groupId (which was inherited from parent). | ||
| 4557 | (invoke "sed" "-i" "/<parent>/,/<\\/parent>/d" "pom.xml") | ||
| 4558 | ;; Add groupId after modelVersion since it was inherited from parent | ||
| 4559 | (substitute* "pom.xml" | ||
| 4560 | (("<modelVersion>4.0.0</modelVersion>") | ||
| 4561 | "<modelVersion>4.0.0</modelVersion>\n <groupId>org.apache.velocity</groupId>")))) | ||
| 4562 | (replace 'install | ||
| 4563 | (install-pom-file "pom.xml"))))) | ||
| 4564 | (native-inputs | ||
| 4565 | (list sed)) | ||
| 4566 | (home-page "https://velocity.apache.org/") | ||
| 4567 | (synopsis "Apache Velocity Engine parent POM") | ||
| 4568 | (description "Parent POM for Apache Velocity Engine modules.") | ||
| 4569 | (license license:asl2.0))) | ||
| 4570 | |||
| 4571 | (define-public java-velocity-engine-core | ||
| 4572 | (package | ||
| 4573 | (name "java-velocity-engine-core") | ||
| 4574 | (version "2.4.1") | ||
| 4575 | (source (origin | ||
| 4576 | (method git-fetch) | ||
| 4577 | (uri (git-reference | ||
| 4578 | (url "https://github.com/apache/velocity-engine") | ||
| 4579 | (commit version))) | ||
| 4580 | (file-name (git-file-name name version)) | ||
| 4581 | (sha256 | ||
| 4582 | (base32 "1b6vk9wlny7qkspgapqd8x38ipm04lsi1i1bnkzikmi3zp5pl42n")))) | ||
| 4583 | (build-system ant-build-system) | ||
| 4584 | (arguments | ||
| 4585 | `(#:jar-name "velocity-engine-core.jar" | ||
| 4586 | #:source-dir "velocity-engine-core/src/main/java" | ||
| 4587 | #:tests? #f | ||
| 4588 | #:phases | ||
| 4589 | (modify-phases %standard-phases | ||
| 4590 | (add-before 'build 'generate-parser | ||
| 4591 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 4592 | (let ((javacc (search-input-file inputs "/bin/javacc")) | ||
| 4593 | (jjtree (search-input-file inputs "/bin/jjtree")) | ||
| 4594 | (parser-dir "velocity-engine-core/src/main/parser") | ||
| 4595 | (gen-dir "velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser")) | ||
| 4596 | ;; Substitute Maven template variables in Parser.jjt | ||
| 4597 | (substitute* (string-append parser-dir "/Parser.jjt") | ||
| 4598 | (("\\$\\{parser\\.package\\}") | ||
| 4599 | "org.apache.velocity.runtime.parser") | ||
| 4600 | (("\\$\\{parser\\.basename\\}") | ||
| 4601 | "Standard") | ||
| 4602 | (("\\$\\{parser\\.char\\.asterisk\\}") | ||
| 4603 | "*") | ||
| 4604 | (("\\$\\{parser\\.char\\.at\\}") | ||
| 4605 | "@") | ||
| 4606 | (("\\$\\{parser\\.char\\.dollar\\}") | ||
| 4607 | "$") | ||
| 4608 | (("\\$\\{parser\\.char\\.hash\\}") | ||
| 4609 | "#")) | ||
| 4610 | ;; Create output directory | ||
| 4611 | (mkdir-p gen-dir) | ||
| 4612 | (mkdir-p (string-append gen-dir "/node")) | ||
| 4613 | ;; Run jjtree to generate Parser.jj (javacc 7.x uses -OPT=val syntax) | ||
| 4614 | (invoke jjtree | ||
| 4615 | (string-append "-OUTPUT_DIRECTORY=" gen-dir) | ||
| 4616 | "-NODE_PACKAGE=org.apache.velocity.runtime.parser.node" | ||
| 4617 | "-NODE_USES_PARSER=true" | ||
| 4618 | "-MULTI=true" | ||
| 4619 | "-BUILD_NODE_FILES=false" | ||
| 4620 | (string-append parser-dir "/Parser.jjt")) | ||
| 4621 | ;; Run javacc on the generated Parser.jj | ||
| 4622 | (invoke javacc | ||
| 4623 | (string-append "-OUTPUT_DIRECTORY=" gen-dir) | ||
| 4624 | "-STATIC=false" | ||
| 4625 | "-TOKEN_MANAGER_USES_PARSER=true" | ||
| 4626 | (string-append gen-dir "/Parser.jj")) | ||
| 4627 | ;; Delete generated Node.java - we have a handwritten one | ||
| 4628 | (delete-file (string-append gen-dir "/Node.java")) | ||
| 4629 | ;; Move files that have node package to node directory | ||
| 4630 | (let ((node-dir (string-append gen-dir "/node"))) | ||
| 4631 | (for-each (lambda (f) | ||
| 4632 | (rename-file (string-append gen-dir "/" f) | ||
| 4633 | (string-append node-dir "/" f))) | ||
| 4634 | '("StandardParserTreeConstants.java" | ||
| 4635 | "JJTStandardParserState.java" | ||
| 4636 | "StandardParserDefaultVisitor.java")))))) | ||
| 4637 | (add-before 'build 'generate-version-file | ||
| 4638 | (lambda _ | ||
| 4639 | (let ((template "velocity-engine-core/src/main/java-templates/org/apache/velocity/runtime/VelocityEngineVersion.java") | ||
| 4640 | (target "velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocityEngineVersion.java")) | ||
| 4641 | (copy-file template target) | ||
| 4642 | (substitute* target | ||
| 4643 | (("\\$\\{project\\.version\\}") ,version))))) | ||
| 4644 | (replace 'install | ||
| 4645 | (install-from-pom "velocity-engine-core/pom.xml"))))) | ||
| 4646 | (propagated-inputs | ||
| 4647 | (list velocity-engine-parent-pom | ||
| 4648 | java-commons-lang3 | ||
| 4649 | java-slf4j-api)) | ||
| 4650 | (native-inputs | ||
| 4651 | (list javacc)) | ||
| 4652 | (home-page "https://velocity.apache.org/") | ||
| 4653 | (synopsis "Apache Velocity template engine core") | ||
| 4654 | (description "Apache Velocity is a Java-based template engine.") | ||
| 4655 | (license license:asl2.0))) | ||
| 4656 | |||
| 4657 | (define-public java-plexus-velocity | ||
| 4658 | (package | ||
| 4659 | (name "java-plexus-velocity") | ||
| 4660 | (version "2.0") | ||
| 4661 | (source (origin | ||
| 4662 | (method git-fetch) | ||
| 4663 | (uri (git-reference | ||
| 4664 | (url "https://github.com/codehaus-plexus/plexus-velocity") | ||
| 4665 | (commit (string-append "plexus-velocity-" version)))) | ||
| 4666 | (file-name (git-file-name name version)) | ||
| 4667 | (sha256 | ||
| 4668 | (base32 "1vw9k6z7d503x6gscc6px7nwcpl9r6sqy25fiaam9pm4qs4bmrv0")))) | ||
| 4669 | (build-system ant-build-system) | ||
| 4670 | (arguments | ||
| 4671 | `(#:jar-name "plexus-velocity.jar" | ||
| 4672 | #:source-dir "src/main/java" | ||
| 4673 | #:tests? #f | ||
| 4674 | #:phases | ||
| 4675 | (modify-phases %standard-phases | ||
| 4676 | (replace 'install | ||
| 4677 | (install-from-pom "pom.xml"))))) | ||
| 4678 | (propagated-inputs | ||
| 4679 | (list java-velocity-engine-core | ||
| 4680 | java-plexus-container-default | ||
| 4681 | java-plexus-utils | ||
| 4682 | plexus-components-pom-6.6)) | ||
| 4683 | (home-page "https://codehaus-plexus.github.io/plexus-velocity/") | ||
| 4684 | (synopsis "Plexus Velocity component") | ||
| 4685 | (description "Plexus component for Apache Velocity template engine.") | ||
| 4686 | (license license:asl2.0))) | ||
| 4687 | |||
| 4688 | ;;; Maven Plugin Tools 3.15.1 - needed for building Maven plugins | ||
| 4689 | |||
| 4690 | (define-public maven-plugin-tools-api | ||
| 4691 | (package | ||
| 4692 | (inherit maven-plugin-annotations) | ||
| 4693 | (name "maven-plugin-tools-api") | ||
| 4694 | (arguments | ||
| 4695 | `(#:jar-name "maven-plugin-tools-api.jar" | ||
| 4696 | #:source-dir "maven-plugin-tools-api/src/main/java" | ||
| 4697 | #:jdk ,openjdk11 | ||
| 4698 | #:tests? #f | ||
| 4699 | #:phases | ||
| 4700 | (modify-phases %standard-phases | ||
| 4701 | (add-after 'build 'generate-sisu-index | ||
| 4702 | (lambda _ | ||
| 4703 | ;; Generate Sisu index for @Named components | ||
| 4704 | (mkdir-p "build/classes/META-INF/sisu") | ||
| 4705 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | ||
| 4706 | (lambda () | ||
| 4707 | (display "org.apache.maven.tools.plugin.scanner.DefaultMojoScanner\n"))) | ||
| 4708 | (invoke "ant" "jar"))) | ||
| 4709 | (replace 'install | ||
| 4710 | (install-from-pom "maven-plugin-tools-api/pom.xml"))))) | ||
| 4711 | (propagated-inputs | ||
| 4712 | (list maven-plugin-tools-parent-pom | ||
| 4713 | maven-core | ||
| 4714 | maven-model | ||
| 4715 | maven-plugin-api | ||
| 4716 | maven-artifact | ||
| 4717 | maven-reporting-api | ||
| 4718 | maven-wagon-provider-api | ||
| 4719 | java-httpcomponents-httpclient | ||
| 4720 | java-httpcomponents-httpcore | ||
| 4721 | java-javax-inject | ||
| 4722 | java-plexus-classworlds | ||
| 4723 | java-plexus-java | ||
| 4724 | java-plexus-utils | ||
| 4725 | java-plexus-xml | ||
| 4726 | java-slf4j-api)) | ||
| 4727 | (synopsis "Maven Plugin Tools API") | ||
| 4728 | (description "API for extracting plugin descriptors from Maven plugins."))) | ||
| 4729 | |||
| 4730 | (define-public maven-plugin-tools-generators | ||
| 4731 | (package | ||
| 4732 | (inherit maven-plugin-annotations) | ||
| 4733 | (name "maven-plugin-tools-generators") | ||
| 4734 | (arguments | ||
| 4735 | `(#:jar-name "maven-plugin-tools-generators.jar" | ||
| 4736 | #:source-dir "maven-plugin-tools-generators/src/main/java" | ||
| 4737 | #:jdk ,openjdk11 | ||
| 4738 | #:tests? #f | ||
| 4739 | #:phases | ||
| 4740 | (modify-phases %standard-phases | ||
| 4741 | (replace 'install | ||
| 4742 | (install-from-pom "maven-plugin-tools-generators/pom.xml"))))) | ||
| 4743 | (propagated-inputs | ||
| 4744 | (list maven-plugin-tools-parent-pom | ||
| 4745 | maven-plugin-tools-api | ||
| 4746 | maven-plugin-api | ||
| 4747 | java-jsoup | ||
| 4748 | java-jtidy | ||
| 4749 | java-plexus-utils | ||
| 4750 | java-plexus-xml | ||
| 4751 | java-plexus-velocity | ||
| 4752 | java-velocity-engine-core)) | ||
| 4753 | (synopsis "Maven Plugin Tools Generators") | ||
| 4754 | (description "Generators for Maven plugin descriptors."))) | ||
| 4755 | |||
| 4756 | (define-public maven-plugin-tools-java | ||
| 4757 | (package | ||
| 4758 | (inherit maven-plugin-annotations) | ||
| 4759 | (name "maven-plugin-tools-java") | ||
| 4760 | (arguments | ||
| 4761 | `(#:jar-name "maven-plugin-tools-java.jar" | ||
| 4762 | #:source-dir "maven-plugin-tools-java/src/main/java" | ||
| 4763 | #:jdk ,openjdk11 | ||
| 4764 | #:tests? #f | ||
| 4765 | #:phases | ||
| 4766 | (modify-phases %standard-phases | ||
| 4767 | (replace 'install | ||
| 4768 | (install-from-pom "maven-plugin-tools-java/pom.xml"))))) | ||
| 4769 | (propagated-inputs | ||
| 4770 | (list maven-plugin-tools-parent-pom | ||
| 4771 | maven-plugin-tools-api | ||
| 4772 | java-qdox-2)) | ||
| 4773 | (synopsis "Maven Plugin Tools Java Extractor") | ||
| 4774 | (description "Extracts plugin descriptors from Java source."))) | ||
| 4775 | |||
| 4776 | (define-public maven-plugin-tools-annotations | ||
| 4777 | (package | ||
| 4778 | (inherit maven-plugin-annotations) | ||
| 4779 | (name "maven-plugin-tools-annotations") | ||
| 4780 | (arguments | ||
| 4781 | `(#:jar-name "maven-plugin-tools-annotations.jar" | ||
| 4782 | #:source-dir "maven-plugin-tools-annotations/src/main/java" | ||
| 4783 | #:jdk ,openjdk11 | ||
| 4784 | #:tests? #f | ||
| 4785 | #:phases | ||
| 4786 | (modify-phases %standard-phases | ||
| 4787 | (add-after 'build 'generate-sisu-index | ||
| 4788 | (lambda _ | ||
| 4789 | ;; Generate Sisu index for @Named components | ||
| 4790 | (mkdir-p "build/classes/META-INF/sisu") | ||
| 4791 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | ||
| 4792 | (lambda () | ||
| 4793 | (display "org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor | ||
| 4794 | org.apache.maven.tools.plugin.extractor.annotations.converter.JavadocBlockTagsToXhtmlConverter | ||
| 4795 | org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner | ||
| 4796 | org.apache.maven.tools.plugin.extractor.annotations.converter.JavadocInlineTagsToXhtmlConverter | ||
| 4797 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.block.SeeTagConverter | ||
| 4798 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.inline.CodeTagConverter | ||
| 4799 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.inline.LinkTagToHtmlConverter | ||
| 4800 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.inline.DocRootTagConverter | ||
| 4801 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.inline.LinkPlainTagToHtmlConverter | ||
| 4802 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.inline.ValueTagConverter | ||
| 4803 | org.apache.maven.tools.plugin.extractor.annotations.converter.tag.inline.LiteralTagToHtmlConverter | ||
| 4804 | "))) | ||
| 4805 | (invoke "ant" "jar"))) | ||
| 4806 | (replace 'install | ||
| 4807 | (install-from-pom "maven-plugin-tools-annotations/pom.xml"))))) | ||
| 4808 | (propagated-inputs | ||
| 4809 | (list maven-plugin-tools-parent-pom | ||
| 4810 | maven-plugin-tools-api | ||
| 4811 | maven-plugin-annotations | ||
| 4812 | java-asm-9 | ||
| 4813 | java-asm-util-9 | ||
| 4814 | java-plexus-archiver | ||
| 4815 | java-jsoup)) | ||
| 4816 | (synopsis "Maven Plugin Tools Annotations Extractor") | ||
| 4817 | (description "Extracts plugin descriptors from Java annotations."))) | ||
| 4818 | |||
| 4819 | (define-public maven-plugin-plugin | ||
| 4820 | (package | ||
| 4821 | (inherit maven-plugin-annotations) | ||
| 4822 | (name "maven-plugin-plugin") | ||
| 4823 | (arguments | ||
| 4824 | `(#:jar-name "maven-plugin-plugin.jar" | ||
| 4825 | #:source-dir "maven-plugin-plugin/src/main/java" | ||
| 4826 | #:jdk ,openjdk11 | ||
| 4827 | #:tests? #f | ||
| 4828 | #:phases | ||
| 4829 | (modify-phases %standard-phases | ||
| 4830 | (add-after 'unpack 'remove-deprecated-dependencies | ||
| 4831 | (lambda _ | ||
| 4832 | ;; Remove deprecated optional dependencies that don't exist | ||
| 4833 | ;; in maven-plugin-tools 3.15.1 (they are now in maven-script/). | ||
| 4834 | ;; These are marked optional but Maven still tries to resolve them. | ||
| 4835 | ;; Use perl for multiline matching since sed doesn't handle it well. | ||
| 4836 | (invoke "perl" "-i" "-0pe" | ||
| 4837 | "s|<dependency>\\s*<groupId>org.apache.maven.plugin-tools</groupId>\\s*<artifactId>maven-plugin-tools-ant</artifactId>.*?</dependency>||gs" | ||
| 4838 | "maven-plugin-plugin/pom.xml") | ||
| 4839 | (invoke "perl" "-i" "-0pe" | ||
| 4840 | "s|<dependency>\\s*<groupId>org.apache.maven.plugin-tools</groupId>\\s*<artifactId>maven-plugin-tools-beanshell</artifactId>.*?</dependency>||gs" | ||
| 4841 | "maven-plugin-plugin/pom.xml") | ||
| 4842 | ;; Change sisu-plexus scope from provided to compile so it gets | ||
| 4843 | ;; included in the plugin's runtime classpath. Without this, | ||
| 4844 | ;; PlexusBindingModule can't discover components like ArchiverManager | ||
| 4845 | ;; from plexus-archiver because it only scans jars in plexus.core. | ||
| 4846 | (invoke "perl" "-i" "-0pe" | ||
| 4847 | "s|(<artifactId>org.eclipse.sisu.plexus</artifactId>\\s*)<scope>provided</scope>|\\1<scope>compile</scope>|gs" | ||
| 4848 | "maven-plugin-plugin/pom.xml"))) | ||
| 4849 | (add-before 'build 'generate-plugin.xml | ||
| 4850 | (generate-plugin.xml "maven-plugin-plugin/pom.xml" | ||
| 4851 | "plugin" | ||
| 4852 | "maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin" | ||
| 4853 | (list | ||
| 4854 | (list "AbstractGeneratorMojo.java" "DescriptorGeneratorMojo.java") | ||
| 4855 | (list "AbstractGeneratorMojo.java" "HelpGeneratorMojo.java") | ||
| 4856 | (list "metadata/AddPluginArtifactMetadataMojo.java")))) | ||
| 4857 | (replace 'install | ||
| 4858 | (install-from-pom "maven-plugin-plugin/pom.xml"))))) | ||
| 4859 | (native-inputs | ||
| 4860 | (list perl unzip)) | ||
| 4861 | (propagated-inputs | ||
| 4862 | (list maven-plugin-tools-parent-pom | ||
| 4863 | maven-core | ||
| 4864 | maven-plugin-api | ||
| 4865 | maven-plugin-tools-api | ||
| 4866 | maven-plugin-tools-generators | ||
| 4867 | maven-plugin-tools-java | ||
| 4868 | maven-plugin-tools-annotations | ||
| 4869 | maven-plugin-annotations | ||
| 4870 | java-plexus-build-api | ||
| 4871 | java-plexus-archiver | ||
| 4872 | ;; Use sisu 0.9 and guice 5.1 for compatibility with maven-parent-43 | ||
| 4873 | ;; which declares sisu 0.9.0.M3. The older sisu 0.3.5 (from maven-core) | ||
| 4874 | ;; uses Guice 4.1 which is incompatible with the newer Sisu. | ||
| 4875 | java-eclipse-sisu-inject-0.9 | ||
| 4876 | java-eclipse-sisu-plexus-0.9 | ||
| 4877 | java-guice-5 | ||
| 4878 | java-plexus-io)) ; needed by plexus-archiver at runtime | ||
| 4879 | (synopsis "Maven Plugin Plugin") | ||
| 4880 | (description "Plugin for generating Maven plugin descriptors."))) | ||
diff --git a/gnu/packages/patches/graalvm-mx-check-failed-after-join.patch b/gnu/packages/patches/graalvm-mx-check-failed-after-join.patch new file mode 100644 index 00000000000..fa1d63d1cbc --- /dev/null +++ b/gnu/packages/patches/graalvm-mx-check-failed-after-join.patch | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Author: Danny Milosavljevic <dannym@friendly-machines.com> | ||
| 2 | Date: Sun Dec 21 04:41:14 AM CET 2025 | ||
| 3 | Subject: Fail the entire build on error. | ||
| 4 | |||
| 5 | --- a/src/mx/_impl/mx.py 2025-12-19 20:15:23.140244258 +0000 | ||
| 6 | +++ b/src/mx/_impl/mx.py 2025-12-19 20:15:23.142739235 +0000 | ||
| 7 | @@ -15181,6 +15181,9 @@ | ||
| 8 | joinTasks() | ||
| 9 | showProgress() | ||
| 10 | |||
| 11 | + if len(failed) > 0: | ||
| 12 | + abort(f'{len(failed)} build tasks failed') | ||
| 13 | + | ||
| 14 | def dump_task_stats(f): | ||
| 15 | """ | ||
| 16 | Dump task statistics CSV. Use R with following commands for visualization: | ||
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 21b2795fa66..664564fcbab 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm | |||
| @@ -8588,7 +8588,7 @@ container."))) | |||
| 8588 | (define-public java-jsoup | 8588 | (define-public java-jsoup |
| 8589 | (package | 8589 | (package |
| 8590 | (name "java-jsoup") | 8590 | (name "java-jsoup") |
| 8591 | (version "1.10.3") | 8591 | (version "1.15.3") |
| 8592 | (source (origin | 8592 | (source (origin |
| 8593 | (method git-fetch) | 8593 | (method git-fetch) |
| 8594 | (uri (git-reference | 8594 | (uri (git-reference |
| @@ -8597,11 +8597,12 @@ container."))) | |||
| 8597 | (file-name (git-file-name name version)) | 8597 | (file-name (git-file-name name version)) |
| 8598 | (sha256 | 8598 | (sha256 |
| 8599 | (base32 | 8599 | (base32 |
| 8600 | "1hdpdx0x140r5x3yc251v7dj1h4j5a7nh9k885aw9q5vvz49lkf4")))) | 8600 | "1rp35w2138qkmpy7q7sn7yx50v3ks4dabd6ij50i9258yx38x3v9")))) |
| 8601 | (build-system ant-build-system) | 8601 | (build-system ant-build-system) |
| 8602 | (arguments | 8602 | (arguments |
| 8603 | `(#:jar-name "jsoup.jar" | 8603 | `(#:jar-name "jsoup.jar" |
| 8604 | #:source-dir "src/main/java" | 8604 | #:source-dir "src/main/java" |
| 8605 | #:tests? #f ; tests require javax.servlet | ||
| 8605 | #:phases | 8606 | #:phases |
| 8606 | (modify-phases %standard-phases | 8607 | (modify-phases %standard-phases |
| 8607 | (add-before 'build 'copy-resources | 8608 | (add-before 'build 'copy-resources |
| @@ -8613,7 +8614,13 @@ container."))) | |||
| 8613 | (mkdir-p (dirname dist)) | 8614 | (mkdir-p (dirname dist)) |
| 8614 | (copy-file file dist))) | 8615 | (copy-file file dist))) |
| 8615 | (find-files "." ".*.properties")))) | 8616 | (find-files "." ".*.properties")))) |
| 8616 | #t))))) | 8617 | #t)) |
| 8618 | (add-before 'install 'generate-pom | ||
| 8619 | (generate-pom.xml "pom.xml" "org.jsoup" "jsoup" ,version)) | ||
| 8620 | (replace 'install | ||
| 8621 | (install-from-pom "pom.xml"))))) | ||
| 8622 | (inputs | ||
| 8623 | (list java-jsr305)) | ||
| 8617 | (native-inputs | 8624 | (native-inputs |
| 8618 | (list java-junit java-hamcrest-core java-gson)) | 8625 | (list java-junit java-hamcrest-core java-gson)) |
| 8619 | (home-page "https://jsoup.org") | 8626 | (home-page "https://jsoup.org") |
diff --git a/guix/build/maven/java.scm b/guix/build/maven/java.scm index f8c8e5745de..7954cc3081c 100644 --- a/guix/build/maven/java.scm +++ b/guix/build/maven/java.scm | |||
| @@ -88,7 +88,35 @@ | |||
| 88 | 88 | ||
| 89 | (define-peg-pattern class-body all (and (* WS) (* (and class-statement (* WS))))) | 89 | (define-peg-pattern class-body all (and (* WS) (* (and class-statement (* WS))))) |
| 90 | (define-peg-pattern class-statement body (or inline-comment comment param-pat | 90 | (define-peg-pattern class-statement body (or inline-comment comment param-pat |
| 91 | method-pat class-pat)) | 91 | method-pat class-pat enum-pat)) |
| 92 | ;; enum-pat: skip over enum declarations. Enum contents are irrelevant for | ||
| 93 | ;; plugin.xml generation which only extracts @Mojo (class-level), @Parameter | ||
| 94 | ;; and @Component (field-level) annotations from Mojo classes. | ||
| 95 | (define-peg-pattern enum-pat none (and (? (and (ignore (or "private" "public" "protected")) | ||
| 96 | (* WS))) | ||
| 97 | (? (and (ignore "static") (* WS))) | ||
| 98 | (ignore "enum") (* WS) | ||
| 99 | package-name (* WS) | ||
| 100 | (ignore "{") enum-body (ignore "}"))) | ||
| 101 | ;; enum-body: consume everything inside enum braces | ||
| 102 | ;; Handles: nested braces, strings (which may contain }), and comments (which may contain }) | ||
| 103 | (define-peg-pattern enum-body none (* (or enum-body-chr | ||
| 104 | string-pat | ||
| 105 | enum-comment | ||
| 106 | enum-single-slash | ||
| 107 | (and "{" enum-body "}")))) | ||
| 108 | ;; enum-body-chr: any char except { } " and / | ||
| 109 | ;; Excludes: " (34), / (47), { (123), } (125) | ||
| 110 | (define-peg-pattern enum-body-chr none (or "\t" "\n" "\r" " " "!" | ||
| 111 | (range #\# #\.) ; 35-46 | ||
| 112 | (range #\0 #\z) ; 48-122 | ||
| 113 | "|" ; 124 | ||
| 114 | (range #\~ #\xffff))) | ||
| 115 | ;; enum-comment: block or line comments that may contain } characters | ||
| 116 | (define-peg-pattern enum-comment none (or (and "/*" (* (and (not-followed-by "*/") peg-any)) "*/") | ||
| 117 | (and "//" (* (and (not-followed-by "\n") peg-any)) "\n"))) | ||
| 118 | ;; enum-single-slash: a / not followed by * or / (i.e., not starting a comment) | ||
| 119 | (define-peg-pattern enum-single-slash none (and "/" (not-followed-by (or "*" "/")))) | ||
| 92 | (define-peg-pattern param-pat all (and (* (and annotation-pat (* WS) | 120 | (define-peg-pattern param-pat all (and (* (and annotation-pat (* WS) |
| 93 | (? (ignore inline-comment)) | 121 | (? (ignore inline-comment)) |
| 94 | (* WS))) | 122 | (* WS))) |
| @@ -102,15 +130,20 @@ | |||
| 102 | (? (and (* WS) (ignore "=") (* WS) value)) | 130 | (? (and (* WS) (ignore "=") (* WS) value)) |
| 103 | (ignore ";"))) | 131 | (ignore ";"))) |
| 104 | (define-peg-pattern value none (or string-pat (+ valuechr))) | 132 | (define-peg-pattern value none (or string-pat (+ valuechr))) |
| 105 | (define-peg-pattern valuechr none (or comment inline-comment "\n" | 133 | ;; Note: Character ranges must come BEFORE comment patterns to avoid |
| 106 | "\t" "\r" | 134 | ;; misinterpreting `/*` inside strings like {"**/**"} as comment starts. |
| 107 | (range #\ #\:) (range #\< #\xffff))) | 135 | ;; The `/` character (ASCII 47) is in range 32-58, so it matches as a |
| 136 | ;; regular character before the comment pattern is tried. | ||
| 137 | (define-peg-pattern valuechr none (or "\n" "\t" "\r" | ||
| 138 | (range #\ #\:) (range #\< #\xffff) | ||
| 139 | comment inline-comment)) | ||
| 108 | (define-peg-pattern param-name all (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) | 140 | (define-peg-pattern param-name all (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) |
| 109 | "_"))) | 141 | "_"))) |
| 110 | (define-peg-pattern type-name all type-pat) | 142 | (define-peg-pattern type-name all type-pat) |
| 143 | ;; type-pat: Match type names including fully qualified names (e.g., org.example.Foo) | ||
| 111 | (define-peg-pattern type-pat body | 144 | (define-peg-pattern type-pat body |
| 112 | (or "?" | 145 | (or "?" |
| 113 | (and (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) "_")) | 146 | (and (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) "_" ".")) |
| 114 | (? "...") | 147 | (? "...") |
| 115 | (? "[]") | 148 | (? "[]") |
| 116 | (? type-param)))) | 149 | (? type-param)))) |
diff --git a/guix/build/maven/pom.scm b/guix/build/maven/pom.scm index 193a76b7cbb..5be157c492e 100644 --- a/guix/build/maven/pom.scm +++ b/guix/build/maven/pom.scm | |||
| @@ -213,35 +213,23 @@ or '= when they denote equal versions." | |||
| 213 | use namespaces in tag names. This procedure takes an @var{sxml} representation | 213 | use namespaces in tag names. This procedure takes an @var{sxml} representation |
| 214 | of a pom file and removes the namespace uses. It also adds the required bits | 214 | of a pom file and removes the namespace uses. It also adds the required bits |
| 215 | to re-declare the namespaces in the top-level element." | 215 | to re-declare the namespaces in the top-level element." |
| 216 | (define (strip-ns tag) | ||
| 217 | "Strip the Maven namespace prefix from TAG if present." | ||
| 218 | (let ((tag-str (symbol->string tag)) | ||
| 219 | (prefix "http://maven.apache.org/POM/4.0.0:")) | ||
| 220 | (if (string-prefix? prefix tag-str) | ||
| 221 | (string->symbol (substring tag-str (string-length prefix))) | ||
| 222 | tag))) | ||
| 223 | |||
| 216 | (define (fix-xml sxml) | 224 | (define (fix-xml sxml) |
| 217 | (match sxml | 225 | (match sxml |
| 218 | ((tag ('@ opts ...) rest ...) | 226 | ;; Element with attributes |
| 219 | (if (> (string-length (symbol->string tag)) | 227 | (((? symbol? tag) ('@ opts ...) rest ...) |
| 220 | (string-length "http://maven.apache.org/POM/4.0.0:")) | 228 | `(,(strip-ns tag) (@ ,@opts) ,@(map fix-xml rest))) |
| 221 | (let* ((tag (symbol->string tag)) | 229 | ;; Element without attributes |
| 222 | (tag (substring tag (string-length | 230 | (((? symbol? tag) rest ...) |
| 223 | "http://maven.apache.org/POM/4.0.0:"))) | 231 | `(,(strip-ns tag) ,@(map fix-xml rest))) |
| 224 | (tag (string->symbol tag))) | 232 | ;; Anything else (strings, whitespace, etc.) |
| 225 | `(,tag (@ ,@opts) ,@(map fix-xml rest))) | ||
| 226 | `(,tag (@ ,@opts) ,@(map fix-xml rest)))) | ||
| 227 | ((tag (rest ...)) | ||
| 228 | (if (> (string-length (symbol->string tag)) | ||
| 229 | (string-length "http://maven.apache.org/POM/4.0.0:")) | ||
| 230 | (let* ((tag (symbol->string tag)) | ||
| 231 | (tag (substring tag (string-length | ||
| 232 | "http://maven.apache.org/POM/4.0.0:"))) | ||
| 233 | (tag (string->symbol tag))) | ||
| 234 | `(,tag ,@(map fix-xml rest))) | ||
| 235 | `(,tag ,@(map fix-xml rest)))) | ||
| 236 | ((tag rest ...) | ||
| 237 | (if (> (string-length (symbol->string tag)) | ||
| 238 | (string-length "http://maven.apache.org/POM/4.0.0:")) | ||
| 239 | (let* ((tag (symbol->string tag)) | ||
| 240 | (tag (substring tag (string-length | ||
| 241 | "http://maven.apache.org/POM/4.0.0:"))) | ||
| 242 | (tag (string->symbol tag))) | ||
| 243 | `(,tag ,@(map fix-xml rest))) | ||
| 244 | `(,tag ,@(map fix-xml rest)))) | ||
| 245 | (_ sxml))) | 233 | (_ sxml))) |
| 246 | 234 | ||
| 247 | `((*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"") | 235 | `((*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"") |
| @@ -323,26 +311,48 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 323 | res | 311 | res |
| 324 | (loop (cons entry res))))))) | 312 | (loop (cons entry res))))))) |
| 325 | 313 | ||
| 314 | (define (fix-parent parent-content) | ||
| 315 | ;; Update parent POM version to match what's available in inputs | ||
| 316 | (let* ((artifact (pom-artifactid parent-content)) | ||
| 317 | (group (pom-groupid parent-content)) | ||
| 318 | (version (or (assoc-ref (assoc-ref local-packages group) artifact) | ||
| 319 | (find-version inputs group artifact #t) | ||
| 320 | (pom-version parent-content)))) | ||
| 321 | (format (current-error-port) "maven parent: ~a:~a -> ~a~%" | ||
| 322 | group artifact version) | ||
| 323 | (map | ||
| 324 | (lambda (tag) | ||
| 325 | (match tag | ||
| 326 | (('http://maven.apache.org/POM/4.0.0:version _) | ||
| 327 | `(http://maven.apache.org/POM/4.0.0:version ,version)) | ||
| 328 | (('version _) | ||
| 329 | `(http://maven.apache.org/POM/4.0.0:version ,version)) | ||
| 330 | (tag tag))) | ||
| 331 | parent-content))) | ||
| 332 | |||
| 326 | (define fix-pom | 333 | (define fix-pom |
| 327 | (match-lambda | 334 | (match-lambda |
| 328 | ('() '()) | 335 | ('() '()) |
| 329 | ((tag rest ...) | 336 | ((tag rest ...) |
| 330 | (match tag | 337 | (match tag |
| 338 | (('http://maven.apache.org/POM/4.0.0:parent parent ...) | ||
| 339 | `((http://maven.apache.org/POM/4.0.0:parent ,@(fix-parent parent)) | ||
| 340 | ,@(fix-pom rest))) | ||
| 331 | (('http://maven.apache.org/POM/4.0.0:dependencies deps ...) | 341 | (('http://maven.apache.org/POM/4.0.0:dependencies deps ...) |
| 332 | `((http://maven.apache.org/POM/4.0.0:dependencies ,(fix-deps deps)) | 342 | `((http://maven.apache.org/POM/4.0.0:dependencies ,@(fix-deps deps)) |
| 333 | ,@(fix-pom rest))) | 343 | ,@(fix-pom rest))) |
| 334 | (('http://maven.apache.org/POM/4.0.0:dependencyManagement deps ...) | 344 | (('http://maven.apache.org/POM/4.0.0:dependencyManagement deps ...) |
| 335 | `((http://maven.apache.org/POM/4.0.0:dependencyManagement | 345 | `((http://maven.apache.org/POM/4.0.0:dependencyManagement |
| 336 | ,(fix-dep-management deps)) | 346 | ,@(fix-dep-management deps)) |
| 337 | ,@(fix-pom rest))) | 347 | ,@(fix-pom rest))) |
| 338 | (('http://maven.apache.org/POM/4.0.0:build build ...) | 348 | (('http://maven.apache.org/POM/4.0.0:build build ...) |
| 339 | (if with-plugins? | 349 | (if with-plugins? |
| 340 | `((http://maven.apache.org/POM/4.0.0:build ,(fix-build build)) | 350 | `((http://maven.apache.org/POM/4.0.0:build ,@(fix-build build)) |
| 341 | ,@(fix-pom rest)) | 351 | ,@(fix-pom rest)) |
| 342 | (cons tag (fix-pom rest)))) | 352 | (cons tag (fix-pom rest)))) |
| 343 | (('http://maven.apache.org/POM/4.0.0:modules modules ...) | 353 | (('http://maven.apache.org/POM/4.0.0:modules modules ...) |
| 344 | (if with-modules? | 354 | (if with-modules? |
| 345 | `((http://maven.apache.org/POM/4.0.0:modules ,(fix-modules modules)) | 355 | `((http://maven.apache.org/POM/4.0.0:modules ,@(fix-modules modules)) |
| 346 | ,@(fix-pom rest)) | 356 | ,@(fix-pom rest)) |
| 347 | (cons tag (fix-pom rest)))) | 357 | (cons tag (fix-pom rest)))) |
| 348 | (tag (cons tag (fix-pom rest))))))) | 358 | (tag (cons tag (fix-pom rest))))))) |
| @@ -364,7 +374,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 364 | ((tag rest ...) | 374 | ((tag rest ...) |
| 365 | (match tag | 375 | (match tag |
| 366 | (('http://maven.apache.org/POM/4.0.0:dependencies deps ...) | 376 | (('http://maven.apache.org/POM/4.0.0:dependencies deps ...) |
| 367 | `((http://maven.apache.org/POM/4.0.0:dependencies ,(fix-deps deps #t)) | 377 | `((http://maven.apache.org/POM/4.0.0:dependencies ,@(fix-deps deps #t)) |
| 368 | ,@(fix-dep-management rest))) | 378 | ,@(fix-dep-management rest))) |
| 369 | (tag (cons tag (fix-dep-management rest))))))) | 379 | (tag (cons tag (fix-dep-management rest))))))) |
| 370 | 380 | ||
| @@ -374,7 +384,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 374 | ((tag rest ...) | 384 | ((tag rest ...) |
| 375 | (match tag | 385 | (match tag |
| 376 | (('http://maven.apache.org/POM/4.0.0:dependency dep ...) | 386 | (('http://maven.apache.org/POM/4.0.0:dependency dep ...) |
| 377 | `((http://maven.apache.org/POM/4.0.0:dependency ,(fix-dep dep optional?)) | 387 | `((http://maven.apache.org/POM/4.0.0:dependency ,@(fix-dep dep optional?)) |
| 378 | ,@(fix-deps rest optional?))) | 388 | ,@(fix-deps rest optional?))) |
| 379 | (tag (cons tag (fix-deps rest optional?))))))) | 389 | (tag (cons tag (fix-deps rest optional?))))))) |
| 380 | 390 | ||
| @@ -385,15 +395,15 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 385 | (match tag | 395 | (match tag |
| 386 | (('http://maven.apache.org/POM/4.0.0:pluginManagement management ...) | 396 | (('http://maven.apache.org/POM/4.0.0:pluginManagement management ...) |
| 387 | `((http://maven.apache.org/POM/4.0.0:pluginManagement | 397 | `((http://maven.apache.org/POM/4.0.0:pluginManagement |
| 388 | ,(fix-management management)) | 398 | ,@(fix-management management)) |
| 389 | ,@(fix-build rest))) | 399 | ,@(fix-build rest))) |
| 390 | (('http://maven.apache.org/POM/4.0.0:plugins plugins ...) | 400 | (('http://maven.apache.org/POM/4.0.0:plugins plugins ...) |
| 391 | `((http://maven.apache.org/POM/4.0.0:plugins | 401 | `((http://maven.apache.org/POM/4.0.0:plugins |
| 392 | ,(fix-plugins plugins)) | 402 | ,@(fix-plugins plugins)) |
| 393 | ,@(fix-build rest))) | 403 | ,@(fix-build rest))) |
| 394 | (('http://maven.apache.org/POM/4.0.0:extensions extensions ...) | 404 | (('http://maven.apache.org/POM/4.0.0:extensions extensions ...) |
| 395 | `((http://maven.apache.org/POM/4.0.0:extensions | 405 | `((http://maven.apache.org/POM/4.0.0:extensions |
| 396 | ,(fix-extensions extensions)) | 406 | ,@(fix-extensions extensions)) |
| 397 | ,@(fix-build rest))) | 407 | ,@(fix-build rest))) |
| 398 | (tag (cons tag (fix-build rest))))))) | 408 | (tag (cons tag (fix-build rest))))))) |
| 399 | 409 | ||
| @@ -408,7 +418,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 408 | (if (member artifact (or (assoc-ref excludes group) '())) | 418 | (if (member artifact (or (assoc-ref excludes group) '())) |
| 409 | (fix-extensions rest optional?) | 419 | (fix-extensions rest optional?) |
| 410 | `((http://maven.apache.org/POM/4.0.0:extension | 420 | `((http://maven.apache.org/POM/4.0.0:extension |
| 411 | ,(fix-plugin extension optional?)); extensions are similar to plugins | 421 | ,@(fix-plugin extension optional?)); extensions are similar to plugins |
| 412 | ,@(fix-extensions rest optional?))))) | 422 | ,@(fix-extensions rest optional?))))) |
| 413 | (tag (cons tag (fix-extensions rest optional?))))))) | 423 | (tag (cons tag (fix-extensions rest optional?))))))) |
| 414 | 424 | ||
| @@ -419,7 +429,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 419 | (match tag | 429 | (match tag |
| 420 | (('http://maven.apache.org/POM/4.0.0:plugins plugins ...) | 430 | (('http://maven.apache.org/POM/4.0.0:plugins plugins ...) |
| 421 | `((http://maven.apache.org/POM/4.0.0:plugins | 431 | `((http://maven.apache.org/POM/4.0.0:plugins |
| 422 | ,(fix-plugins plugins #t)) | 432 | ,@(fix-plugins plugins #t)) |
| 423 | ,@(fix-management rest))) | 433 | ,@(fix-management rest))) |
| 424 | (tag (cons tag (fix-management rest))))))) | 434 | (tag (cons tag (fix-management rest))))))) |
| 425 | 435 | ||
| @@ -434,7 +444,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect." | |||
| 434 | (if (member artifact (or (assoc-ref excludes group) '())) | 444 | (if (member artifact (or (assoc-ref excludes group) '())) |
| 435 | (fix-plugins rest optional?) | 445 | (fix-plugins rest optional?) |
| 436 | `((http://maven.apache.org/POM/4.0.0:plugin | 446 | `((http://maven.apache.org/POM/4.0.0:plugin |
| 437 | ,(fix-plugin plugin optional?)) | 447 | ,@(fix-plugin plugin optional?)) |
| 438 | ,@(fix-plugins rest optional?))))) | 448 | ,@(fix-plugins rest optional?))))) |
| 439 | (tag (cons tag (fix-plugins rest optional?))))))) | 449 | (tag (cons tag (fix-plugins rest optional?))))))) |
| 440 | 450 | ||
