Add Graal

Change-Id: I0350197af84ac351031e70a63fd0d483d022bad9
This commit is contained in:
Danny Milosavljevic 2026-01-01 18:31:59 +01:00
parent 31b32eac3f
commit fc37076ed9
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5
16 changed files with 5308 additions and 415 deletions

View file

@ -343,6 +343,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/gperf.scm \ %D%/packages/gperf.scm \
%D%/packages/gpodder.scm \ %D%/packages/gpodder.scm \
%D%/packages/gps.scm \ %D%/packages/gps.scm \
%D%/packages/graal.scm \
%D%/packages/graph.scm \ %D%/packages/graph.scm \
%D%/packages/graphics.scm \ %D%/packages/graphics.scm \
%D%/packages/graphviz.scm \ %D%/packages/graphviz.scm \
@ -1523,6 +1524,7 @@ dist_patch_DATA = \
%D%/packages/patches/gpaste-fix-paths.patch \ %D%/packages/patches/gpaste-fix-paths.patch \
%D%/packages/patches/gpm-glibc-2.26.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \
%D%/packages/patches/gpodder-disable-updater.patch \ %D%/packages/patches/gpodder-disable-updater.patch \
%D%/packages/patches/graalvm-mx-check-failed-after-join.patch \
%D%/packages/patches/grantlee-fix-i586-precision.patch \ %D%/packages/patches/grantlee-fix-i586-precision.patch \
%D%/packages/patches/grantlee-register-metaenumvariable.patch \ %D%/packages/patches/grantlee-register-metaenumvariable.patch \
%D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \

View file

@ -855,6 +855,7 @@ dependency graph expansion and the creation of classpaths.")
#:doc-dirs '() #:doc-dirs '()
;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory ;; FIXME: Could not initialize class org.eclipse.aether.transport.http.SslSocketFactory
#:tests? #f #:tests? #f
#:jdk ,openjdk11
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
;; FIXME: Currently, the S3 transporter depends on ClojureScript, ;; FIXME: Currently, the S3 transporter depends on ClojureScript,

View file

@ -599,6 +599,21 @@ than gzip and 15 % smaller output than bzip2.")
(license (list license:gpl2+ license:lgpl2.1+)) ; bits of both (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
(home-page "https://tukaani.org/xz/"))) (home-page "https://tukaani.org/xz/")))
(define-public xz-for-graal-truffle
(package
(inherit xz)
(name "xz-for-graal-truffle")
(version "5.6.2")
(source (origin
(method url-fetch)
(uri (list (string-append "http://tukaani.org/xz/xz-" version
".tar.gz")
(string-append "http://multiprecision.org/guix/xz-"
version ".tar.gz")))
(sha256
(base32
"06a585qzn2qlwdv44w7x6p6x8qmbqrqzlz29y8108vyqw7021zcb"))))))
(define-public heatshrink (define-public heatshrink
(package (package
(name "heatshrink") (name "heatshrink")

1815
gnu/packages/graal.scm Normal file

File diff suppressed because it is too large Load diff

View file

@ -260,6 +260,66 @@ globalisation support for software applications. This package contains the
Java part.") Java part.")
(license x11))) (license x11)))
;; GraalVM Truffle 25.0.1 wants ICU4J 76.1, but ICU stopped publishing
;; source tarballs with build.xml after 73.2. Version 74+ only provides
;; Maven-based builds or pre-built JARs. Using 73.2 as a compromise.
(define-public java-icu4j-for-graal-truffle
(package
(inherit java-icu4j)
(name "java-icu4j-for-graal-truffle")
(version "73.2")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/unicode-org/icu/releases/download/release-"
(string-map (lambda (x) (if (char=? x #\.) #\- x)) version)
"/icu4j-"
(string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
".tgz"))
(sha256
(base32 "0g4sxanzm5s0axjk2lm1w15gr0gx8jasir6rdjn23yx039brchjb"))))
(arguments
(substitute-keyword-arguments (package-arguments java-icu4j)
((#:phases phases)
`(modify-phases ,phases
(add-after 'build 'create-sources-jar
(lambda _
;; Create a sources JAR from the core source files.
;; mx shading needs .java source files, not .class files.
(invoke "jar" "cf" "icu4j-sources.jar"
"-C" "main/classes/core/src" "com")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((share (string-append (assoc-ref outputs "out")
"/share/java/")))
(mkdir-p share)
(install-file "icu4j.jar" share)
(install-file "icu4j-sources.jar" share))))))))))
(define-public java-icu4j-charset-for-graal-truffle
(package
(inherit java-icu4j-for-graal-truffle)
(name "java-icu4j-charset-for-graal-truffle")
(arguments
(substitute-keyword-arguments (package-arguments java-icu4j-for-graal-truffle)
((#:build-target _) "icu4j-charset.jar")
((#:phases phases)
`(modify-phases ,phases
(replace 'create-sources-jar
(lambda _
;; Create a sources JAR from the charset source files.
(invoke "jar" "cf" "icu4j-charset-sources.jar"
"-C" "main/classes/charset/src" "com")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((share (string-append (assoc-ref outputs "out")
"/share/java/")))
(mkdir-p share)
(install-file "icu4j-charset.jar" share)
(install-file "icu4j-charset-sources.jar" share))))))))
(inputs (list java-icu4j-for-graal-truffle))
(synopsis "ICU4J charset provider for GraalVM Truffle")))
(define-public icu4c-for-skia (define-public icu4c-for-skia
;; The current version of skia needs this exact commit ;; The current version of skia needs this exact commit
;; for its test dependencies. ;; for its test dependencies.

View file

@ -323,6 +323,35 @@ It can be used as a replacement for the Apache @code{CBZip2InputStream} /
algorithms in Java.") algorithms in Java.")
(license license:public-domain))) (license license:public-domain)))
(define-public java-xz-for-graal-truffle
(package
(inherit java-xz)
(name "java-xz-for-graal-truffle")
(version "1.10")
(source (origin
(method url-fetch/zipbomb)
(uri (string-append "https://tukaani.org/xz/xz-java-" version ".zip"))
(sha256
(base32 "1rbzbzab8iizic4yqh2ps9hmjxxym7hghc4gkiggscpl8bd54an0"))))
(arguments
`(#:tests? #f
#:jdk ,openjdk
#:phases
(modify-phases %standard-phases
(add-after 'build 'create-sources-jar
(lambda _
;; Create a sources JAR from the source files.
;; Only include org/tukaani/xz - exclude demo files in root.
(invoke "jar" "cf" "build/jar/xz-sources.jar"
"-C" "src" "org")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share/java")))
(mkdir-p share)
(install-file "build/jar/xz.jar" share)
(install-file "build/jar/xz-sources.jar" share)))))))))
(define-public java-zstd (define-public java-zstd
(package (package
(name "java-zstd") (name "java-zstd")
@ -338,9 +367,9 @@ algorithms in Java.")
"0z26z04sc4j6k0g4gvq4xc86mc4wiyp1j7z5hh6wpqgmy9b6h2zb")))) "0z26z04sc4j6k0g4gvq4xc86mc4wiyp1j7z5hh6wpqgmy9b6h2zb"))))
(build-system ant-build-system) (build-system ant-build-system)
(arguments (arguments
`(#:jar-name "java-zstd.jar" `(#:jar-name "zstd-jni.jar"
#:source-dir "src/main/java" #:source-dir "src/main/java"
#:tests? #f; Require scala #:tests? #f
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'build 'generate-version (add-before 'build 'generate-version
@ -352,7 +381,21 @@ algorithms in Java.")
public class ZstdVersion { public class ZstdVersion {
public static final String VERSION = \"~a\"; public static final String VERSION = \"~a\";
}" ,version)))))))) }" ,version)))))
(add-before 'install 'generate-pom
(lambda _
(with-output-to-file "pom.xml"
(lambda _
(format #t "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>~a</version>
<packaging>jar</packaging>
<name>zstd-jni</name>
</project>" ,version)))))
(replace 'install (install-from-pom "pom.xml")))))
(inputs (inputs
`(("zstd" ,zstd))) `(("zstd" ,zstd)))
(home-page "https://github.com/luben/zstd-jni") (home-page "https://github.com/luben/zstd-jni")
@ -363,3 +406,47 @@ compression needs. This package provides JNI bindings for Zstd native
library that provides fast and high compression lossless algorithm for library that provides fast and high compression lossless algorithm for
Android, Java and all JVM languages.") Android, Java and all JVM languages.")
(license license:bsd-2))) (license license:bsd-2)))
(define-public java-zstd-1.5.7
(package
(inherit java-zstd)
(version "1.5.7")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/luben/zstd-jni")
(commit (string-append "v" version "-6"))))
(file-name (git-file-name "java-zstd" version))
(sha256
(base32
"014pmfix7rd1p1kmalvxyigqyiii5q3l7qahfnp32pz886pjd41i"))))
(arguments
`(#:jar-name "zstd-jni.jar"
#:source-dir "src/main/java"
#:tests? #f
#:phases
(modify-phases %standard-phases
(add-before 'build 'generate-version
(lambda _
(with-output-to-file
"src/main/java/com/github/luben/zstd/util/ZstdVersion.java"
(lambda _
(format #t "package com.github.luben.zstd.util;
public class ZstdVersion {
public static final String VERSION = \"~a\";
}" ,version)))))
(add-before 'install 'generate-pom
(lambda _
(with-output-to-file "pom.xml"
(lambda _
(format #t "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
<version>~a</version>
<packaging>jar</packaging>
<name>zstd-jni</name>
</project>" ,version)))))
(replace 'install (install-from-pom "pom.xml")))))))

File diff suppressed because it is too large Load diff

View file

@ -336,7 +336,7 @@ secondary errors.")
(dirname (dirname
(search-input-file (search-input-file
inputs inputs
"/lib/m2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar"))) "/lib/m2/org/apache/commons/commons-lang3/3.17.0/commons-lang3-3.17.0.jar")))
(("\\$\\{apache-commons-text_SOURCE_DIR\\}") (("\\$\\{apache-commons-text_SOURCE_DIR\\}")
(dirname (dirname
(search-input-file (search-input-file
@ -347,7 +347,7 @@ secondary errors.")
(("FetchContent_MakeAvailable\\(apache-commons-lang\\)") (("FetchContent_MakeAvailable\\(apache-commons-lang\\)")
(string-append "set(apache-commons-lang_SOURCE_DIR " (string-append "set(apache-commons-lang_SOURCE_DIR "
(assoc-ref inputs "java-commons-lang3") (assoc-ref inputs "java-commons-lang3")
"/lib/m2/org/apache/commons/commons-lang3/3.12.0)")) "/lib/m2/org/apache/commons/commons-lang3/3.17.0)"))
(("FetchContent_MakeAvailable\\(apache-commons-text\\)") (("FetchContent_MakeAvailable\\(apache-commons-text\\)")
(string-append "set(apache-commons-text_SOURCE_DIR " (string-append "set(apache-commons-text_SOURCE_DIR "
(assoc-ref inputs "java-commons-text") (assoc-ref inputs "java-commons-text")

View file

@ -48,7 +48,8 @@
#:use-module ((guix build-system python) #:select (pypi-uri #:use-module ((guix build-system python) #:select (pypi-uri
package-with-python2 package-with-python2
python-build-system)) python-build-system))
#:use-module (guix build-system ruby)) #:use-module (guix build-system ruby)
#:use-module (guix build-system trivial))
(define-public libffi (define-public libffi
(package (package
@ -88,6 +89,21 @@ conversions for values passed between the two languages.")
;; See <https://github.com/atgreen/libffi/blob/master/LICENSE>. ;; See <https://github.com/atgreen/libffi/blob/master/LICENSE>.
(license expat))) (license expat)))
(define-public libffi-for-graal-truffle
(package
(inherit libffi)
(name "libffi-for-graal-truffle")
(version "3.4.8")
(source (origin
(method url-fetch)
(uri
(string-append "https://github.com/libffi/libffi/releases"
"/download/v" version "/libffi-" version ".tar.gz"))
(file-name "libffi-src.tar.gz")
(sha256
(base32
"16qias9rs3g3lg3zs9zx76hqzry7pkzc8lhjxnqargwqi2hl565w"))))))
;; Provide a variant without static trampolines as some packages ;; Provide a variant without static trampolines as some packages
;; (particularly GHC < 9) cannot handle them. See ;; (particularly GHC < 9) cannot handle them. See
;; <https://github.com/libffi/libffi/pull/647> for a discussion. ;; <https://github.com/libffi/libffi/pull/647> for a discussion.

View file

@ -2099,13 +2099,13 @@ extremely large and complex data collections.")
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((simple (let ((simple
(search-input-file (search-input-file
inputs "/lib/m2/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar")) inputs "/lib/m2/org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.jar"))
(api (api
(search-input-file (search-input-file
inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) inputs "/lib/m2/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar"))
(nop (nop
(search-input-file (search-input-file
inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.36/slf4j-nop-1.7.36.jar"))
(junit (junit
(search-input-file (search-input-file
inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar"))

View file

@ -100,6 +100,18 @@
(make-apache-parent-pom (make-apache-parent-pom
"29" "0fj078bgzs0r24x66ph5bbwkkc5s9d1qh57hmlpisg4mdi0l48s9")) "29" "0fj078bgzs0r24x66ph5bbwkkc5s9d1qh57hmlpisg4mdi0l48s9"))
(define-public apache-parent-pom-31
(make-apache-parent-pom
"31" "1sdjh664gakz5bjawrw4p4bpvkjwsk4wbd1iapl1r38zsfcp5qal"))
(define-public apache-parent-pom-33
(make-apache-parent-pom
"33" "06qpsnrqf8459aficmbdhad7ldv8k48dqwxivd7r7knlssmlqsww"))
(define-public apache-parent-pom-34
(make-apache-parent-pom
"34" "0jia7fxl3abvz4d70y144vghy2dq4a258jdyzcpp339hx37lnjm2"))
(define* (make-apache-commons-parent-pom version hash parent (define* (make-apache-commons-parent-pom version hash parent
#:key (tag-prefix "commons-parent-")) #:key (tag-prefix "commons-parent-"))
(hidden-package (hidden-package
@ -131,6 +143,16 @@
(description "This package contains the Apache Commons parent POM.") (description "This package contains the Apache Commons parent POM.")
(license license:asl2.0)))) (license license:asl2.0))))
(define-public apache-commons-parent-pom-28
(make-apache-commons-parent-pom
"28" "13zsm6x2cpk9j92bg5v3mg9f4d8928hh6xdx16024bz122y5nb34"
apache-parent-pom-13))
(define-public apache-commons-parent-pom-34
(make-apache-commons-parent-pom
"34" "0r0gim683nsib2x62s1av2hr6agirqjp57vjkd3xh0qlrx36kna1"
apache-parent-pom-13))
(define-public apache-commons-parent-pom-39 (define-public apache-commons-parent-pom-39
(make-apache-commons-parent-pom (make-apache-commons-parent-pom
"39" "0mjx48a55ik1h4hsxhifkli1flvkp6d05ab14p4al0fc6rhdxi46" "39" "0mjx48a55ik1h4hsxhifkli1flvkp6d05ab14p4al0fc6rhdxi46"
@ -162,6 +184,35 @@
apache-parent-pom-23 apache-parent-pom-23
#:tag-prefix "rel/commons-parent-")) #:tag-prefix "rel/commons-parent-"))
(define-public apache-commons-parent-pom-73
(hidden-package
(package
(name "apache-commons-parent-pom")
(version "73")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/apache/commons-parent")
(commit "rel/commons-parent-73")))
(file-name (git-file-name name version))
(sha256
(base32 "0avlf1chqccd6f6y03l9i7p8z5a96c91nvv1rx482yjdr8ic28mf"))))
(build-system ant-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(replace 'install
(install-pom-file "pom.xml")))))
(propagated-inputs
`(("parent" ,apache-parent-pom-33)))
(home-page "https://maven.apache.org/")
(synopsis "Apache Commons parent pom")
(description "This package contains the Apache Commons parent POM.")
(license license:asl2.0))))
(define-public java-weld-parent-pom (define-public java-weld-parent-pom
(hidden-package (hidden-package
(package (package
@ -412,6 +463,74 @@ other projects as their parent pom.")
(make-plexus-parent-pom (make-plexus-parent-pom
"8" "0ybwdzawa58qg9ag39rxyin24lk9sjcaih6n2yfldfzsbkq6gnww")) "8" "0ybwdzawa58qg9ag39rxyin24lk9sjcaih6n2yfldfzsbkq6gnww"))
(define-public plexus-parent-pom-10
(hidden-package
(package
(name "plexus-parent-pom")
(version "10")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/codehaus-plexus/plexus-pom")
(commit "plexus-10")))
(file-name (git-file-name name "10"))
(sha256
(base32 "10hhmi50ns0cqjiv9xw3dlanil1psm9s1mj2wndfyvn85cz7ia9n"))))
(build-system ant-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(replace 'install
(install-pom-file "pom.xml")))))
(home-page "https://codehaus-plexus.github.io/plexus-pom")
(synopsis "Plexus parent pom")
(description "This package contains the Plexus parent POM.")
(license license:asl2.0))))
(define-public plexus-parent-pom-15
(hidden-package
(package
(inherit plexus-parent-pom-10)
(version "15")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/codehaus-plexus/plexus-pom")
(commit "plexus-15")))
(file-name (git-file-name "plexus-parent-pom" "15"))
(sha256
(base32 "0rjbfy7qpvxa75ak3cx6vgd0agpbgdkc95jsbk3qhm9n0nisylh1")))))))
(define-public plexus-parent-pom-20
(hidden-package
(package
(name "plexus-parent-pom")
(version "20")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/codehaus-plexus/plexus-pom")
(commit "plexus-20")))
(file-name (git-file-name name "20"))
(sha256
(base32 "1j2n06p5ylijxk2j0iwynxag6dq4bb5jdli7dsnj8hsywrj4jrpg"))))
(build-system ant-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(replace 'install
(install-pom-file "pom.xml")))))
(home-page "https://codehaus-plexus.github.io/plexus-pom")
(synopsis "Plexus parent pom")
(description "This package contains the Plexus parent POM.")
(license license:asl2.0))))
(define* (make-maven-parent-pom version hash parent #:key replacements) (define* (make-maven-parent-pom version hash parent #:key replacements)
(hidden-package (hidden-package
(package (package
@ -451,6 +570,86 @@ other projects as their parent pom.")
tool. This package contains the Maven parent POM.") tool. This package contains the Maven parent POM.")
(license license:asl2.0)))) (license license:asl2.0))))
(define-public maven-parent-pom-44
(hidden-package
(package
(name "maven-parent-pom")
(version "44")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/apache/maven-parent")
(commit "v44")))
(file-name (git-file-name name version))
(sha256 (base32 "0l54kjgi5s8n5asaf9swj96bjm26s77z3wk4x9jiljxflf9vdqgf"))))
(build-system ant-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(add-after 'install 'install-plugins
(install-pom-file "maven-plugins/pom.xml"))
(add-after 'install 'install-shared
(install-pom-file "maven-shared-components/pom.xml"))
(replace 'install
(install-pom-file "pom.xml")))))
(propagated-inputs
`(("parent" ,apache-parent-pom-33)))
(home-page "https://maven.apache.org/")
(synopsis "Maven parent pom")
(description "Apache Maven is a software project management and comprehension
tool. This package contains the Maven parent POM.")
(license license:asl2.0))))
(define-public maven-parent-pom-43
(let ((base (make-maven-parent-pom
"43" "1f2w7nlkd97gq8bbddl9n0dgm7v5hkpjxrrhzln8szhm4d9wxrfa"
apache-parent-pom-33
#:replacements
(delay
`(("org.codehaus.plexus"
("plexus-component-annotations" .
,(package-version java-plexus-component-annotations))))))))
(package
(inherit base)
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)
`(modify-phases ,phases
(add-before 'install 'fix-versions
(lambda _
;; Use the junit-bom version we have available
(substitute* "pom.xml"
(("5\\.11\\.3")
,(package-version junit-bom-5.11))))))))))))
(define-public maven-parent-pom-41
(let ((base (make-maven-parent-pom
"41" "0glhr3s77g80yc20ajpwmpqgqn3i2ap7mj1wqs1vnk2fp2s0lvsj"
apache-parent-pom-31
#:replacements
(delay
`(("org.codehaus.plexus"
("plexus-component-annotations" .
,(package-version java-plexus-component-annotations))))))))
(package
(inherit base)
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)
;; FIXME: Version downgrades; upgrade sisu and plexus-utils instead.
`(modify-phases ,phases
(add-before 'install 'fix-versions
(lambda _
(substitute* "pom.xml"
(("0\\.9\\.0\\.M2")
,(package-version java-eclipse-sisu-plexus))
(("version\\.plexus-utils>4\\.0\\.0")
,(string-append "version.plexus-utils>"
(package-version java-plexus-utils)))))))))))))
(define-public maven-parent-pom-39 (define-public maven-parent-pom-39
(make-maven-parent-pom (make-maven-parent-pom
"39" "1123nmm63nrsfy9i35zn12glswc2sy9bsj4fir2z9yh93kraky1y" "39" "1123nmm63nrsfy9i35zn12glswc2sy9bsj4fir2z9yh93kraky1y"
@ -459,7 +658,9 @@ tool. This package contains the Maven parent POM.")
(delay (delay
`(("org.codehaus.plexus" `(("org.codehaus.plexus"
("plexus-component-annotations" . ("plexus-component-annotations" .
,(package-version java-plexus-component-annotations))))))) ,(package-version java-plexus-component-annotations))
("plexus-utils" .
,(package-version java-plexus-utils)))))))
(define-public maven-parent-pom-37 (define-public maven-parent-pom-37
(make-maven-parent-pom (make-maven-parent-pom

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,16 @@
Author: Danny Milosavljevic <dannym@friendly-machines.com>
Date: Sun Dec 21 04:41:14 AM CET 2025
Subject: Fail the entire build on error.
--- a/src/mx/_impl/mx.py 2025-12-19 20:15:23.140244258 +0000
+++ b/src/mx/_impl/mx.py 2025-12-19 20:15:23.142739235 +0000
@@ -15181,6 +15181,9 @@
joinTasks()
showProgress()
+ if len(failed) > 0:
+ abort(f'{len(failed)} build tasks failed')
+
def dump_task_stats(f):
"""
Dump task statistics CSV. Use R with following commands for visualization:

View file

@ -8588,7 +8588,7 @@ container.")))
(define-public java-jsoup (define-public java-jsoup
(package (package
(name "java-jsoup") (name "java-jsoup")
(version "1.10.3") (version "1.15.3")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
@ -8597,11 +8597,12 @@ container.")))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1hdpdx0x140r5x3yc251v7dj1h4j5a7nh9k885aw9q5vvz49lkf4")))) "1rp35w2138qkmpy7q7sn7yx50v3ks4dabd6ij50i9258yx38x3v9"))))
(build-system ant-build-system) (build-system ant-build-system)
(arguments (arguments
`(#:jar-name "jsoup.jar" `(#:jar-name "jsoup.jar"
#:source-dir "src/main/java" #:source-dir "src/main/java"
#:tests? #f ; tests require javax.servlet
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'build 'copy-resources (add-before 'build 'copy-resources
@ -8613,7 +8614,13 @@ container.")))
(mkdir-p (dirname dist)) (mkdir-p (dirname dist))
(copy-file file dist))) (copy-file file dist)))
(find-files "." ".*.properties")))) (find-files "." ".*.properties"))))
#t))))) #t))
(add-before 'install 'generate-pom
(generate-pom.xml "pom.xml" "org.jsoup" "jsoup" ,version))
(replace 'install
(install-from-pom "pom.xml")))))
(inputs
(list java-jsr305))
(native-inputs (native-inputs
(list java-junit java-hamcrest-core java-gson)) (list java-junit java-hamcrest-core java-gson))
(home-page "https://jsoup.org") (home-page "https://jsoup.org")

View file

@ -88,7 +88,35 @@
(define-peg-pattern class-body all (and (* WS) (* (and class-statement (* WS))))) (define-peg-pattern class-body all (and (* WS) (* (and class-statement (* WS)))))
(define-peg-pattern class-statement body (or inline-comment comment param-pat (define-peg-pattern class-statement body (or inline-comment comment param-pat
method-pat class-pat)) method-pat class-pat enum-pat))
;; enum-pat: skip over enum declarations. Enum contents are irrelevant for
;; plugin.xml generation which only extracts @Mojo (class-level), @Parameter
;; and @Component (field-level) annotations from Mojo classes.
(define-peg-pattern enum-pat none (and (? (and (ignore (or "private" "public" "protected"))
(* WS)))
(? (and (ignore "static") (* WS)))
(ignore "enum") (* WS)
package-name (* WS)
(ignore "{") enum-body (ignore "}")))
;; enum-body: consume everything inside enum braces
;; Handles: nested braces, strings (which may contain }), and comments (which may contain })
(define-peg-pattern enum-body none (* (or enum-body-chr
string-pat
enum-comment
enum-single-slash
(and "{" enum-body "}"))))
;; enum-body-chr: any char except { } " and /
;; Excludes: " (34), / (47), { (123), } (125)
(define-peg-pattern enum-body-chr none (or "\t" "\n" "\r" " " "!"
(range #\# #\.) ; 35-46
(range #\0 #\z) ; 48-122
"|" ; 124
(range #\~ #\xffff)))
;; enum-comment: block or line comments that may contain } characters
(define-peg-pattern enum-comment none (or (and "/*" (* (and (not-followed-by "*/") peg-any)) "*/")
(and "//" (* (and (not-followed-by "\n") peg-any)) "\n")))
;; enum-single-slash: a / not followed by * or / (i.e., not starting a comment)
(define-peg-pattern enum-single-slash none (and "/" (not-followed-by (or "*" "/"))))
(define-peg-pattern param-pat all (and (* (and annotation-pat (* WS) (define-peg-pattern param-pat all (and (* (and annotation-pat (* WS)
(? (ignore inline-comment)) (? (ignore inline-comment))
(* WS))) (* WS)))
@ -102,15 +130,20 @@
(? (and (* WS) (ignore "=") (* WS) value)) (? (and (* WS) (ignore "=") (* WS) value))
(ignore ";"))) (ignore ";")))
(define-peg-pattern value none (or string-pat (+ valuechr))) (define-peg-pattern value none (or string-pat (+ valuechr)))
(define-peg-pattern valuechr none (or comment inline-comment "\n" ;; Note: Character ranges must come BEFORE comment patterns to avoid
"\t" "\r" ;; misinterpreting `/*` inside strings like {"**/**"} as comment starts.
(range #\ #\:) (range #\< #\xffff))) ;; The `/` character (ASCII 47) is in range 32-58, so it matches as a
;; regular character before the comment pattern is tried.
(define-peg-pattern valuechr none (or "\n" "\t" "\r"
(range #\ #\:) (range #\< #\xffff)
comment inline-comment))
(define-peg-pattern param-name all (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) (define-peg-pattern param-name all (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9)
"_"))) "_")))
(define-peg-pattern type-name all type-pat) (define-peg-pattern type-name all type-pat)
;; type-pat: Match type names including fully qualified names (e.g., org.example.Foo)
(define-peg-pattern type-pat body (define-peg-pattern type-pat body
(or "?" (or "?"
(and (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) "_")) (and (* (or (range #\a #\z) (range #\A #\Z) (range #\0 #\9) "_" "."))
(? "...") (? "...")
(? "[]") (? "[]")
(? type-param)))) (? type-param))))

View file

@ -213,35 +213,23 @@ or '= when they denote equal versions."
use namespaces in tag names. This procedure takes an @var{sxml} representation use namespaces in tag names. This procedure takes an @var{sxml} representation
of a pom file and removes the namespace uses. It also adds the required bits of a pom file and removes the namespace uses. It also adds the required bits
to re-declare the namespaces in the top-level element." to re-declare the namespaces in the top-level element."
(define (strip-ns tag)
"Strip the Maven namespace prefix from TAG if present."
(let ((tag-str (symbol->string tag))
(prefix "http://maven.apache.org/POM/4.0.0:"))
(if (string-prefix? prefix tag-str)
(string->symbol (substring tag-str (string-length prefix)))
tag)))
(define (fix-xml sxml) (define (fix-xml sxml)
(match sxml (match sxml
((tag ('@ opts ...) rest ...) ;; Element with attributes
(if (> (string-length (symbol->string tag)) (((? symbol? tag) ('@ opts ...) rest ...)
(string-length "http://maven.apache.org/POM/4.0.0:")) `(,(strip-ns tag) (@ ,@opts) ,@(map fix-xml rest)))
(let* ((tag (symbol->string tag)) ;; Element without attributes
(tag (substring tag (string-length (((? symbol? tag) rest ...)
"http://maven.apache.org/POM/4.0.0:"))) `(,(strip-ns tag) ,@(map fix-xml rest)))
(tag (string->symbol tag))) ;; Anything else (strings, whitespace, etc.)
`(,tag (@ ,@opts) ,@(map fix-xml rest)))
`(,tag (@ ,@opts) ,@(map fix-xml rest))))
((tag (rest ...))
(if (> (string-length (symbol->string tag))
(string-length "http://maven.apache.org/POM/4.0.0:"))
(let* ((tag (symbol->string tag))
(tag (substring tag (string-length
"http://maven.apache.org/POM/4.0.0:")))
(tag (string->symbol tag)))
`(,tag ,@(map fix-xml rest)))
`(,tag ,@(map fix-xml rest))))
((tag rest ...)
(if (> (string-length (symbol->string tag))
(string-length "http://maven.apache.org/POM/4.0.0:"))
(let* ((tag (symbol->string tag))
(tag (substring tag (string-length
"http://maven.apache.org/POM/4.0.0:")))
(tag (string->symbol tag)))
`(,tag ,@(map fix-xml rest)))
`(,tag ,@(map fix-xml rest))))
(_ sxml))) (_ sxml)))
`((*TOP* (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"") `((*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."
res res
(loop (cons entry res))))))) (loop (cons entry res)))))))
(define (fix-parent parent-content)
;; Update parent POM version to match what's available in inputs
(let* ((artifact (pom-artifactid parent-content))
(group (pom-groupid parent-content))
(version (or (assoc-ref (assoc-ref local-packages group) artifact)
(find-version inputs group artifact #t)
(pom-version parent-content))))
(format (current-error-port) "maven parent: ~a:~a -> ~a~%"
group artifact version)
(map
(lambda (tag)
(match tag
(('http://maven.apache.org/POM/4.0.0:version _)
`(http://maven.apache.org/POM/4.0.0:version ,version))
(('version _)
`(http://maven.apache.org/POM/4.0.0:version ,version))
(tag tag)))
parent-content)))
(define fix-pom (define fix-pom
(match-lambda (match-lambda
('() '()) ('() '())
((tag rest ...) ((tag rest ...)
(match tag (match tag
(('http://maven.apache.org/POM/4.0.0:parent parent ...)
`((http://maven.apache.org/POM/4.0.0:parent ,@(fix-parent parent))
,@(fix-pom rest)))
(('http://maven.apache.org/POM/4.0.0:dependencies deps ...) (('http://maven.apache.org/POM/4.0.0:dependencies deps ...)
`((http://maven.apache.org/POM/4.0.0:dependencies ,(fix-deps deps)) `((http://maven.apache.org/POM/4.0.0:dependencies ,@(fix-deps deps))
,@(fix-pom rest))) ,@(fix-pom rest)))
(('http://maven.apache.org/POM/4.0.0:dependencyManagement deps ...) (('http://maven.apache.org/POM/4.0.0:dependencyManagement deps ...)
`((http://maven.apache.org/POM/4.0.0:dependencyManagement `((http://maven.apache.org/POM/4.0.0:dependencyManagement
,(fix-dep-management deps)) ,@(fix-dep-management deps))
,@(fix-pom rest))) ,@(fix-pom rest)))
(('http://maven.apache.org/POM/4.0.0:build build ...) (('http://maven.apache.org/POM/4.0.0:build build ...)
(if with-plugins? (if with-plugins?
`((http://maven.apache.org/POM/4.0.0:build ,(fix-build build)) `((http://maven.apache.org/POM/4.0.0:build ,@(fix-build build))
,@(fix-pom rest)) ,@(fix-pom rest))
(cons tag (fix-pom rest)))) (cons tag (fix-pom rest))))
(('http://maven.apache.org/POM/4.0.0:modules modules ...) (('http://maven.apache.org/POM/4.0.0:modules modules ...)
(if with-modules? (if with-modules?
`((http://maven.apache.org/POM/4.0.0:modules ,(fix-modules modules)) `((http://maven.apache.org/POM/4.0.0:modules ,@(fix-modules modules))
,@(fix-pom rest)) ,@(fix-pom rest))
(cons tag (fix-pom rest)))) (cons tag (fix-pom rest))))
(tag (cons tag (fix-pom rest))))))) (tag (cons tag (fix-pom rest)))))))
@ -364,7 +374,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect."
((tag rest ...) ((tag rest ...)
(match tag (match tag
(('http://maven.apache.org/POM/4.0.0:dependencies deps ...) (('http://maven.apache.org/POM/4.0.0:dependencies deps ...)
`((http://maven.apache.org/POM/4.0.0:dependencies ,(fix-deps deps #t)) `((http://maven.apache.org/POM/4.0.0:dependencies ,@(fix-deps deps #t))
,@(fix-dep-management rest))) ,@(fix-dep-management rest)))
(tag (cons tag (fix-dep-management rest))))))) (tag (cons tag (fix-dep-management rest)))))))
@ -374,7 +384,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect."
((tag rest ...) ((tag rest ...)
(match tag (match tag
(('http://maven.apache.org/POM/4.0.0:dependency dep ...) (('http://maven.apache.org/POM/4.0.0:dependency dep ...)
`((http://maven.apache.org/POM/4.0.0:dependency ,(fix-dep dep optional?)) `((http://maven.apache.org/POM/4.0.0:dependency ,@(fix-dep dep optional?))
,@(fix-deps rest optional?))) ,@(fix-deps rest optional?)))
(tag (cons tag (fix-deps rest optional?))))))) (tag (cons tag (fix-deps rest optional?)))))))
@ -385,15 +395,15 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect."
(match tag (match tag
(('http://maven.apache.org/POM/4.0.0:pluginManagement management ...) (('http://maven.apache.org/POM/4.0.0:pluginManagement management ...)
`((http://maven.apache.org/POM/4.0.0:pluginManagement `((http://maven.apache.org/POM/4.0.0:pluginManagement
,(fix-management management)) ,@(fix-management management))
,@(fix-build rest))) ,@(fix-build rest)))
(('http://maven.apache.org/POM/4.0.0:plugins plugins ...) (('http://maven.apache.org/POM/4.0.0:plugins plugins ...)
`((http://maven.apache.org/POM/4.0.0:plugins `((http://maven.apache.org/POM/4.0.0:plugins
,(fix-plugins plugins)) ,@(fix-plugins plugins))
,@(fix-build rest))) ,@(fix-build rest)))
(('http://maven.apache.org/POM/4.0.0:extensions extensions ...) (('http://maven.apache.org/POM/4.0.0:extensions extensions ...)
`((http://maven.apache.org/POM/4.0.0:extensions `((http://maven.apache.org/POM/4.0.0:extensions
,(fix-extensions extensions)) ,@(fix-extensions extensions))
,@(fix-build rest))) ,@(fix-build rest)))
(tag (cons tag (fix-build rest))))))) (tag (cons tag (fix-build rest)))))))
@ -408,7 +418,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect."
(if (member artifact (or (assoc-ref excludes group) '())) (if (member artifact (or (assoc-ref excludes group) '()))
(fix-extensions rest optional?) (fix-extensions rest optional?)
`((http://maven.apache.org/POM/4.0.0:extension `((http://maven.apache.org/POM/4.0.0:extension
,(fix-plugin extension optional?)); extensions are similar to plugins ,@(fix-plugin extension optional?)); extensions are similar to plugins
,@(fix-extensions rest optional?))))) ,@(fix-extensions rest optional?)))))
(tag (cons tag (fix-extensions rest optional?))))))) (tag (cons tag (fix-extensions rest optional?)))))))
@ -419,7 +429,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect."
(match tag (match tag
(('http://maven.apache.org/POM/4.0.0:plugins plugins ...) (('http://maven.apache.org/POM/4.0.0:plugins plugins ...)
`((http://maven.apache.org/POM/4.0.0:plugins `((http://maven.apache.org/POM/4.0.0:plugins
,(fix-plugins plugins #t)) ,@(fix-plugins plugins #t))
,@(fix-management rest))) ,@(fix-management rest)))
(tag (cons tag (fix-management rest))))))) (tag (cons tag (fix-management rest)))))))
@ -434,7 +444,7 @@ Returns nothing, but overrides the @var{pom-file} as a side-effect."
(if (member artifact (or (assoc-ref excludes group) '())) (if (member artifact (or (assoc-ref excludes group) '()))
(fix-plugins rest optional?) (fix-plugins rest optional?)
`((http://maven.apache.org/POM/4.0.0:plugin `((http://maven.apache.org/POM/4.0.0:plugin
,(fix-plugin plugin optional?)) ,@(fix-plugin plugin optional?))
,@(fix-plugins rest optional?))))) ,@(fix-plugins rest optional?)))))
(tag (cons tag (fix-plugins rest optional?))))))) (tag (cons tag (fix-plugins rest optional?)))))))