From 97a43db8b4416a1450aa61737edba9cf4126cf1c Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Sat, 17 Apr 2021 16:33:06 +1000 Subject: gnu: openjdk: Clean up runtime dependencies between Java versions. * gnu/packages/java.scm (icedtea-8, openjdk9, openjdk11): Do not consider icedtea/openjdk input paths when rewriting JNI libraries. Signed-off-by: Andreas Enge --- gnu/packages/java.scm | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 207f136513..3c4013ab6f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen -;;; Copyright © 2017, 2019 Carlo Zancanaro +;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro ;;; Copyright © 2017-2020 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong @@ -1792,8 +1792,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) (search-path library-path @@ -1931,12 +1936,18 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) - (search-path - library-path - (string-append "lib" name ".so"))))) + (or (search-path + library-path + (string-append "lib" name ".so")) + (string-append "lib" name ".so"))))) (for-each (lambda (file) (catch 'decoding-error @@ -2139,8 +2150,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (let* ((library-path (search-path-as-string->list - (getenv "LIBRARY_PATH"))) + (use-modules (srfi srfi-1)) + (define (icedtea-or-openjdk? path) + (or (string-contains path "openjdk") + (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? + (search-path-as-string->list + (getenv "LIBRARY_PATH")))) (find-library (lambda (name) (search-path library-path -- cgit v1.3 From d830106c0e06ea6f5a148316f2729ac2b54f0b91 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 21 Apr 2021 00:29:42 +0200 Subject: gnu: ant: Update to 1.10.10. * gnu/packages/java.scm (ant): Update to 1.10.10. --- gnu/packages/java.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3c4013ab6f..9f67cc4e21 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017-2020 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong -;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019 Gábor Boskovits ;;; Copyright © 2018 Chris Marusich ;;; Copyright © 2018, 2019, 2020 Efraim Flashner @@ -2494,14 +2494,14 @@ new Date();")) (define-public ant/java8 (package (inherit ant-bootstrap) (name "ant") - (version "1.10.9") + (version "1.10.10") (source (origin (method url-fetch) (uri (string-append "mirror://apache/ant/source/apache-ant-" version "-src.tar.gz")) (sha256 (base32 - "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z")) + "1dhkk9ajc378cln6sj9q0ya8bl9dpyji5xcrl1zq41zx1k6j54g5")) (modules '((guix build utils))) (snippet '(begin -- cgit v1.3 From 698c4365baaad7eac7e5f38bd6527cf517200052 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 20 Apr 2021 21:22:20 +1000 Subject: gnu: openjdk: Fix library substitution when libraries aren't found. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/java.scm (icedtea-8, openjdk9, openjdk11)[arguments]: Change 'find-library' to always return a string. Change 'find-library' callers to use 'string-append' rather than 'format'. Starting from 97a43db8b4416a1450aa61737edba9cf4126cf1c, 'find-library' could return #f and JNI substitutions would emit a literal "#f". Co-authored-by: Ludovic Courtès --- gnu/packages/java.scm | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 9f67cc4e21..3c5a438492 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1800,9 +1800,10 @@ new Date();")) (search-path-as-string->list (getenv "LIBRARY_PATH")))) (find-library (lambda (name) - (search-path - library-path - (string-append "lib" name ".so"))))) + (or (search-path + library-path + (string-append "lib" name ".so")) + (string-append "lib" name ".so"))))) (for-each (lambda (file) (catch 'decoding-error @@ -1810,9 +1811,9 @@ new Date();")) (substitute* file (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" _ name version) - (format #f "\"~a\"" (find-library name))) + (string-append "\"" (find-library name) "\"")) (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) - (format #f "\"~a\"" (find-library name))))) + (string-append "\"" (find-library name) "\"")))) (lambda _ ;; Those are safe to skip. (format (current-error-port) @@ -1955,9 +1956,9 @@ new Date();")) (substitute* file (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" _ name version) - (format #f "\"~a\"" (find-library name))) + (string-append "\"" (find-library name) "\"")) (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) - (format #f "\"~a\"" (find-library name))))) + (string-append "\"" (find-library name) "\"")))) (lambda _ ;; Those are safe to skip. (format (current-error-port) @@ -2158,9 +2159,10 @@ new Date();")) (search-path-as-string->list (getenv "LIBRARY_PATH")))) (find-library (lambda (name) - (search-path - library-path - (string-append "lib" name ".so"))))) + (or (search-path + library-path + (string-append "lib" name ".so")) + (string-append "lib" name ".so"))))) (for-each (lambda (file) (catch 'decoding-error @@ -2168,9 +2170,9 @@ new Date();")) (substitute* file (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)" _ name version) - (format #f "\"~a\"" (find-library name))) + (string-append "\"" (find-library name) "\"")) (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name) - (format #f "\"~a\"" (find-library name))))) + (string-append "\"" (find-library name) "\"")))) (lambda _ ;; Those are safe to skip. (format (current-error-port) -- cgit v1.3 From e511a1d32745e3edf429a01b8864dc2f18adf83f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 21 Apr 2021 12:52:21 +0200 Subject: gnu: openjdk: Avoid non-top-level 'use-modules'. * gnu/packages/java.scm (icedtea-8, openjdk9, openjdk11)[arguments]: Replace non-top-level 'use-modules' by '@'. --- gnu/packages/java.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3c5a438492..f5e59b9775 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1792,10 +1792,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (use-modules (srfi srfi-1)) + (define remove + (@ (srfi srfi-1) remove)) + (define (icedtea-or-openjdk? path) (or (string-contains path "openjdk") (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? (search-path-as-string->list (getenv "LIBRARY_PATH")))) @@ -1937,10 +1940,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (use-modules (srfi srfi-1)) + (define remove + (@ (srfi srfi-1) remove)) + (define (icedtea-or-openjdk? path) (or (string-contains path "openjdk") (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? (search-path-as-string->list (getenv "LIBRARY_PATH")))) @@ -2151,10 +2157,13 @@ new Date();")) (add-after 'unpack 'patch-jni-libs ;; Hardcode dynamically loaded libraries. (lambda _ - (use-modules (srfi srfi-1)) + (define remove + (@ (srfi srfi-1) remove)) + (define (icedtea-or-openjdk? path) (or (string-contains path "openjdk") (string-contains path "icedtea"))) + (let* ((library-path (remove icedtea-or-openjdk? (search-path-as-string->list (getenv "LIBRARY_PATH")))) -- cgit v1.3 From f8acd1aeefe2ff5183f58c7e10a1cec4793cffb7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 21 Apr 2021 12:53:54 +0200 Subject: gnu: openjdk: Disallow references to the JDK used for build. This ensures JDKs don't unintentionally keep references to the one used to build them, as reported at and fixed by 97a43db8b4416a1450aa61737edba9cf4126cf1c. * gnu/packages/java.scm (icedtea-8)[arguments]: Add #:disallowed-references. (openjdk9)[arguments]: Likewise. (openjdk10)[arguments]: Likewise. (openjdk11)[arguments]: Likewise. --- gnu/packages/java.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index f5e59b9775..d1cb3fbe11 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1749,6 +1749,9 @@ IcedTea build harness.") ((guix build ant-build-system) (guix build syscalls) ,@%gnu-build-system-modules) + + #:disallowed-references ((,icedtea-7 "jdk")) + ,@(substitute-keyword-arguments (package-arguments icedtea-7) ((#:modules modules) `((guix build utils) @@ -1902,6 +1905,9 @@ new Date();")) #:imported-modules ((guix build syscalls) ,@%gnu-build-system-modules) + + #:disallowed-references (,icedtea-8 (,icedtea-8 "jdk")) + #:phases (modify-phases %standard-phases (add-after 'patch-source-shebangs 'fix-java-shebangs @@ -2097,7 +2103,9 @@ new Date();")) "--with-libjpeg=system" "--with-native-debug-symbols=zipped" (string-append "--prefix=" (assoc-ref outputs "out"))) - #t)))))) + #t)))) + ((#:disallowed-references _ '()) + `(,openjdk9 (,openjdk9 "jdk"))))) (native-inputs `(("openjdk9" ,openjdk9) ("openjdk9:jdk" ,openjdk9 "jdk") @@ -2127,6 +2135,9 @@ new Date();")) (arguments `(#:imported-modules ((guix build syscalls) ,@%gnu-build-system-modules) + + #:disallowed-references (,openjdk10 (,openjdk10 "jdk")) + #:tests? #f; requires jtreg ;; TODO package jtreg #:configure-flags -- cgit v1.3 From 27ee59d6a00243e7461f85823be118aed5d8bbd6 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 4 May 2021 20:57:36 +0200 Subject: gnu: java-javaparser: Upgrade os.name to ‘Guix’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/java.scm (java-javaparser)[arguments]: Drop ‘SD’. --- gnu/packages/java.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index d1cb3fbe11..cdfaae136d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -13748,7 +13748,7 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.") (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix") (("\\$\\{java.version\\}") "1.8") (("\\$\\{os.arch\\}") "any") - (("\\$\\{os.name\\}") "GuixSD") + (("\\$\\{os.name\\}") "Guix") (("\\$\\{os.version\\}") "not available"))) #t)) (add-before 'build 'generate-javacc -- cgit v1.3 From 45915d331a30d1d2a256b917fd3eb9a9eec17f10 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 15 Apr 2021 21:23:42 -0400 Subject: gnu: Add java-gson-2.8.6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This introduces a new package rather than upgrading the exist java-gson package because it is built using OpenJDK11; I didn't want to have to propagate that JDK dependency to the other packages that use it. OpenJDK 11 was chosen becuase this dependency was introduced for tla2tools. * gnu/packages/java.scm (java-gson-2.8.6): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index cdfaae136d..c3048a8db0 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2020 Raghav Gururajan ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Vincent Legoll +;;; Copyright © 2021 Mike Gerwitz ;;; ;;; This file is part of GNU Guix. ;;; @@ -11762,6 +11763,37 @@ string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.") (license license:asl2.0))) +;; This requires a different Java version than 2.8.2 above +(define-public java-gson-2.8.6 + (package + (inherit java-gson) + (name "java-gson") + (version "2.8.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/gson") + (commit (string-append "gson-parent-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3")))) + (arguments + `(#:jar-name "gson.jar" + #:jdk ,openjdk11 + #:source-dir "gson/src/main/java" + #:test-dir "gson/src/test" + #:phases + (modify-phases %standard-phases + ;; avoid Maven dependency + (add-before 'build 'fill-template + (lambda _ + (with-directory-excursion "gson/src/main" + (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java" + "java/com/google/gson/internal/GsonBuildConfig.java") + (substitute* "java/com/google/gson/internal/GsonBuildConfig.java" + (("\\$\\{project.version\\}") ,version)))))))))) + (define-public java-hawtjni (package (name "java-hawtjni") -- cgit v1.3 From 58b0258a20989dce0645bcaeaadcf00a92c60bc1 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 15 Apr 2021 21:23:53 -0400 Subject: gnu: Add java-eclipse-xtext-xbase-lib. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This package is a component of xtext-lib. The rest of xtext-lib was not added. * gnu/packages/java.scm (java-eclipse-xtext-xbase-lib): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/java.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c3048a8db0..4520ff9d83 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7585,6 +7585,36 @@ means for generating files and compiling new Java classes based on annotations found in your source code.") (license license:epl2.0))) +(define-public java-eclipse-xtext-xbase-lib + (package + (name "java-eclipse-xtext-xbase-lib") + (version "2.25.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/eclipse/xtext-lib") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "eclipse-xtext-xbase-lib.jar" + #:jdk ,openjdk11 + #:tests? #f; TODO (maybe needs newer guava version?) + #:source-dir "org.eclipse.xtext.xbase.lib/src" + #:test-dir "org.eclipse.xtext.xbase.lib.tests/src")) + (native-inputs + `(("java-junit" ,java-junit))) + (inputs + `(("java-guava" ,java-guava))) + (home-page "https://www.eclipse.org/Xtext/") + (synopsis "Eclipse Xbase Runtime Library") + (description "This package contains runtime libraries for Xbase languages +such as Xtend.") + (license license:epl2.0))) + (define-public java-javax-mail (package (name "java-javax-mail") -- cgit v1.3 From e28ea146933f9805f422efd25def19cfee86f1dd Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 15 Apr 2021 21:24:04 -0400 Subject: gnu: Add java-eclipse-lsp4j packages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All of these packages are components of java-eclipse-lsp4j, packaged independently. This contains only what was needed for tla2tools, and so there are parts of java-eclipse-lsp4j that are not packaged. Note that this does not package the latest version (0.12.0 at the time of writing)---it depends on the Xtend language, which is a huge packaging effort. 0.10.0 is the version expected by tla2tools, for which this dependency was introduced. * gnu/packages/java.scm (java-eclipse-lsp4j-common): New variable. (java-eclipse-lsp4j-jsonrpc): New variable. (java-eclipse-lsp4j-jsonrpc-debug): New variable. (java-eclipse-lsp4j-generator): New variable. (java-eclipse-lsp4j-debug): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/java.scm | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4520ff9d83..b2a5cf0cc6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7585,6 +7585,109 @@ means for generating files and compiling new Java classes based on annotations found in your source code.") (license license:epl2.0))) +(define-public java-eclipse-lsp4j-common + (package + (name "java-eclipse-lsp4j-common") + (version "0.10.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/eclipse/lsp4j") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98")))) + (build-system ant-build-system) + (home-page "https://eclipse.org/lsp4j/") + (synopsis "LSP4J common package") + (description "Eclipse LSP4J provides Java bindings for the Language +Server Protocol and the Debug Adapter Protocol. This package is a common +definition intended to be inherited by other packages.") + (license license:epl2.0))) + +(define-public java-eclipse-lsp4j-debug + (package + (inherit java-eclipse-lsp4j-common) + (name "java-eclipse-lsp4j-debug") + (arguments + `(#:jar-name "eclipse-lsp4j-debug.jar" + #:jdk ,openjdk11 + #:tests? #f; tests fail with reflection errors + #:source-dir "org.eclipse.lsp4j.debug/src/main/java" + #:test-dir "org.eclipse.lsp4j.debug/src/test" + #:phases + (modify-phases %standard-phases + (add-before 'build 'copy-xtend + (lambda _ + (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen" + "org.eclipse.lsp4j.debug/src/main/java")))))) + (native-inputs + `(("java-junit" ,java-junit))) + (inputs + `(("java-gson" ,java-gson-2.8.6) + ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator) + ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc) + ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug) + ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib))) + (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol") + (description "Eclipse LSP4J provides Java bindings for the Language +Server Protocol and the Debug Adapter Protocol. This package contains its +LSP4J Java bindings for the Debug Server Protocol."))) + +(define-public java-eclipse-lsp4j-generator + (package + (inherit java-eclipse-lsp4j-common) + (name "java-eclipse-lsp4j-generator") + (arguments + `(#:jar-name "eclipse-lsp4j-generator.jar" + #:jdk ,openjdk11 + #:tests? #f; no tests + #:source-dir "org.eclipse.lsp4j.generator/src/main/java")) + (inputs + `(("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc))) + (synopsis "Eclipse LSP4J Generator") + (description "Eclipse LSP4J provides Java bindings for the Language +Server Protocol and the Debug Adapter Protocol. This package contains its +LSP4J code generator for Language Server Protocol classes."))) + +(define-public java-eclipse-lsp4j-jsonrpc + (package + (inherit java-eclipse-lsp4j-common) + (name "java-eclipse-lsp4j-jsonrpc") + (arguments + `(#:jar-name "eclipse-lsp4j-jsonrpc.jar" + #:jdk ,openjdk11 + #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java" + #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test")) + (native-inputs + `(("java-junit" ,java-junit))) + (inputs + `(("java-gson" ,java-gson-2.8.6))) + (synopsis "Java JSON-RPC implementation") + (description "Eclipse LSP4J provides Java bindings for the Language +Server Protocol and the Debug Adapter Protocol. This package contains its +JSON-RPC implementation."))) + +(define-public java-eclipse-lsp4j-jsonrpc-debug + (package + (inherit java-eclipse-lsp4j-common) + (name "java-eclipse-lsp4j-jsonrpc-debug") + (arguments + `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar" + #:jdk ,openjdk11 + #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java" + #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test")) + (native-inputs + `(("java-junit" ,java-junit))) + (inputs + `(("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc) + ("java-gson" ,java-gson-2.8.6))) + (synopsis "Java JSON-RPC implementation (debug protocol)") + (description "Eclipse LSP4J provides Java bindings for the Language +Server Protocol and the Debug Adapter Protocol. This package contains its +JSON-RPC implementation's debug protocol."))) + (define-public java-eclipse-xtext-xbase-lib (package (name "java-eclipse-xtext-xbase-lib") -- cgit v1.3 From 1700dfefbe17efd759569e3907f7739ee71b0e8d Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 15 Apr 2021 21:24:15 -0400 Subject: gnu: Add java-jline-terminal. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is part of JLine 3. I was able to get this working properly under Guix by providing ncurses' infocmp, as well as ensuring the *.caps files were present in the JAR, but similar methods didn't work for the tests; if you have Java knowledge, I'd appreciate the help getting those tests enabled. * gnu/packages/java.scm (java-jline-terminal): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/java.scm | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b2a5cf0cc6..68ab8683ab 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -71,6 +71,7 @@ #:use-module (gnu packages maths) #:use-module (gnu packages maven) #:use-module (gnu packages maven-parent-pom) + #:use-module (gnu packages ncurses) #:use-module (gnu packages nss) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages web) @@ -12503,6 +12504,63 @@ features that bring it on par with the Z shell line editor.") ("java-junit" ,java-junit) ("java-hawtjni" ,java-hawtjni))))) +(define-public java-jline-terminal + (package + (name "java-jline-terminal") + (version "3.14.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jline/jline3") + (commit (string-append "jline-parent-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jline-terminal.jar" + #:jdk ,openjdk11 + #:tests? #f; TODO: tests fail on *.caps resource lookups + #:source-dir "terminal/src/main/java" + #:test-dir "terminal/src/test" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-build-file + (lambda _ + ;; Conflicts with build directory generated by ant-build-system. + (delete-file "build"))) + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java" + (("= \"infocmp\"") + (string-append "= \"" (assoc-ref inputs "ncurses") + "/bin/infocmp\"")) + (("= \"(s?tty)\"" _ cmd) + (string-append "= \"" (assoc-ref inputs "coreutils") + "/bin/" cmd "\""))))) + ;; Resources are not added to the JAR by ant-build-system. + (add-after 'build 'add-resources + (lambda* (#:key jar-name source-dir #:allow-other-keys) + (let ((build (string-append (getcwd) "/build"))) + (with-directory-excursion + (string-append source-dir "/../resources") + (apply invoke "jar" "-uvf" + (string-append build "/jar/" jar-name) + (find-files "."))))))))) + (inputs + `(("ncurses" ,ncurses))); infocmp + (home-page "https://github.com/jline/jline3") + (synopsis "Java JLine Terminal API and implementations") + (description "JLine is a Java library for handling console input. It is +similar in functionality to BSD editline and GNU readline but with additional +features that bring it in par with ZSH line editor. People familiar with the +readline/editline capabilities for modern shells (such as bash and tcsh) will +find most of the command editing features of JLine to be familiar. + +This package includes the @var{Terminal} API and implementations.") + (license license:bsd-3))) + (define-public java-xmlunit (package (name "java-xmlunit") -- cgit v1.3 From 674b4bd1a611f55be401c53e065359ae6e9dec54 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 15 Apr 2021 21:24:26 -0400 Subject: gnu: Add java-jline-reader. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This package is part of JLine 3. * gnu/packages/java.scm (java-jline-reader): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/java.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 68ab8683ab..d73f1acbf8 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -12561,6 +12561,47 @@ find most of the command editing features of JLine to be familiar. This package includes the @var{Terminal} API and implementations.") (license license:bsd-3))) +(define-public java-jline-reader + (package + (name "java-jline-reader") + (version "3.14.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jline/jline3") + (commit (string-append "jline-parent-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jline-reader.jar" + #:jdk ,openjdk11 + #:source-dir "reader/src/main/java" + #:test-dir "reader/src/test" + #:phases + (modify-phases %standard-phases + (add-before 'build 'remove-build-file + (lambda _ + ;; conflicts with build directory generated by ant-build-system + (delete-file "build")))))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-easymock" ,java-easymock))) + (inputs + `(("java-jline-terminal" ,java-jline-terminal))) + (home-page "https://github.com/jline/jline3") + (synopsis "Java JLine line reader") + (description "JLine is a Java library for handling console input. It is +similar in functionality to BSD editline and GNU readline but with additional +features that bring it in par with ZSH line editor. People familiar with the +readline/editline capabilities for modern shells (such as bash and tcsh) will +find most of the command editing features of JLine to be familiar. + +This package includes the line reader.") + (license license:bsd-3))) + (define-public java-xmlunit (package (name "java-xmlunit") -- cgit v1.3 From f30e8f29096e3ae2a4de689690daf5fa27a8c91b Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Thu, 15 Apr 2021 21:24:39 -0400 Subject: gnu: Add tla2tools. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This introduces tla2tools.jar, which contains the TLA+ model checker and simulator (TLC); a TLA+ REPL; a semantic analyzer (SANY); the TLATeX typesetting system; PlusCal translator; and more. I have added five wrapper scripts for convenience, rather than invoking `java' manually. The wrapper scripts are not comprehensive; users who are familiar with tla2tools.jar, or have read the book Specifying Systems, may still invoke the commands in the traditional way. The minimum JDK version is 11. I chose to stick with that rather than bumping it to 14 (which is the largest version currently in Guix) because each OpenJDK version in Guix depends on the version before it, and so it needlessly results in many 100s of MiB of unnecessary dependencies. Note that this is _not_ the TLA+ Toolbox, which is the GUI commonly used with TLA+. * gnu/packages/java.scm (tla2tools): New variable. * gnu/packages/patches/tla2tools-build-xml.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 3 +- gnu/packages/java.scm | 132 +++++++++++++++++++++++++ gnu/packages/patches/tla2tools-build-xml.patch | 109 ++++++++++++++++++++ 3 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/tla2tools-build-xml.patch (limited to 'gnu/packages/java.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 72bc31588d..37166bb2fc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2021 Ludovic Courtès # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Andreas Enge # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Mark H Weaver @@ -1734,6 +1734,7 @@ dist_patch_DATA = \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tipp10-qt5.patch \ %D%/packages/patches/tk-find-library.patch \ + %D%/packages/patches/tla2tools-build-xml.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index d73f1acbf8..a167aafc38 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -14066,3 +14066,135 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.") ;; either lgpl or asl license:lgpl3+ license:asl2.0)))) + +(define-public tla2tools + (let* ((version "1.8.0") + (tag (string-append "v" version))) + (package + (name "tla2tools") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tlaplus/tlaplus") + (commit tag))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs")) + (patches + (search-patches "tla2tools-build-xml.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove packaged libraries (see 'replace-libs below) + (for-each delete-file (find-files "." ".*.jar$")))))) + (build-system ant-build-system) + (arguments + (let* ((tlatools "tlatools/org.lamport.tlatools/") + (build-xml (string-append tlatools "customBuild.xml"))) + `(#:jdk ,openjdk11 + #:modules ((guix build ant-build-system) + (guix build utils) + (ice-9 match) + (srfi srfi-26)) + #:make-flags '("-f" ,build-xml) + #:phases + (modify-phases %standard-phases + ;; Replace packed libs with references to jars in store + (add-after 'unpack 'replace-libs + (lambda* (#:key inputs #:allow-other-keys) + (define (input-jar input) + (car (find-files (assoc-ref inputs input) "\\.jar$"))) + (for-each + (match-lambda + ((file . input) + (symlink (input-jar input) + (string-append ,tlatools "/lib/" file)))) + '(("gson/gson-2.8.6.jar" . "java-gson") + ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail") + ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal") + ("jline/jline-reader-3.14.1.jar" . "java-jline-reader") + ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" . + "java-eclipse-lsp4j-debug") + ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" . + "java-eclipse-lsp4j-jsonrpc") + ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" . + "java-eclipse-lsp4j-jsonrpc-debug") + ("junit-4.12.jar" . "java-junit") + ("easymock-3.3.1.jar" . "java-easymock"))) + ;; Retain a tiny subset of the original X-Git-* + ;; manifest values just to aid in debugging + (substitute* ,build-xml + (("\\$\\{git.tag\\}") ,tag)))) + (add-before 'check 'prepare-tests + (lambda _ + ;; pcal tests write to cfg files + (for-each (cut chmod <> #o644) + (find-files (string-append ,tlatools + "/test-model/pcal") + "\\.cfg$")))) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (let* ((share (string-append %output "/share/java")) + (jar-name "tla2tools.jar"); set in project.properties + (jar (string-append ,tlatools + "/dist/" jar-name)) + (java-cp (string-append share "/" jar-name)) + (bin (string-append %output "/bin")) + (java (string-append (assoc-ref inputs "jdk") + "/bin/java"))) + (install-file jar share) + (mkdir-p bin) + ;; Generate wrapper scripts for bin/, which invoke common + ;; commands within tla2tools.jar. Users can still invoke + ;; tla2tools.jar for the rest. + (for-each + (match-lambda + ((wrapper . class) + (let ((file (string-append bin "/" wrapper))) + (begin + (with-output-to-file file + (lambda _ + (display + (string-append + "#!/bin/sh\n" + java " -cp " java-cp " " class " \"$@\"")))) + (chmod file #o755))))) + ;; bin/wrapper . java-class + '(("pcal" . "pcal.trans") + ("tlatex" . "tla2tex.TLA") + ("tla2sany" . "tla2sany.SANY") + ("tlc2" . "tlc2.TLC") + ("tlc2-repl" . "tlc2.REPL")))))))))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-easymock" ,java-easymock))) + (inputs + `(("java-javax-mail" ,java-javax-mail) + ("java-gson" ,java-gson-2.8.6) + ("java-jline-terminal" ,java-jline-terminal) + ("java-jline-reader" ,java-jline-reader) + ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc) + ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug) + ("java-eclipse-lsp4j-debug" ,java-eclipse-lsp4j-debug))) + (home-page "https://lamport.azurewebsites.net/tla/tools.html") + (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)") + (description "TLA+ is a high-level language for modeling programs and +systems---especially concurrent and distributed ones. It's based on the idea +that the best way to describe things precisely is with simple +mathematics. TLA+ and its tools are useful for eliminating fundamental design +errors, which are hard to find and expensive to correct in code. + +The following TLA+ tools are available in this distribution: + +@itemize +@item The Syntactic Analyzer: A parser and syntax checker for + TLA+ specifications; +@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+ + specifications; +@item TLATeX: A program for typesetting TLA+ specifications; +@item Beta test versions of 1-3 for the TLA+2 language; and +@item The PlusCal translator. +@end itemize") + (license license:expat)))) diff --git a/gnu/packages/patches/tla2tools-build-xml.patch b/gnu/packages/patches/tla2tools-build-xml.patch new file mode 100644 index 0000000000..0bba82072a --- /dev/null +++ b/gnu/packages/patches/tla2tools-build-xml.patch @@ -0,0 +1,109 @@ +tla2tools comes packaged with three separate javax.mail JARs, which it +expects to be available to include in the JAR produced by the `dist' target. +However, the `java-javax-mail' packaged with Guix contains all of these +dependencies in a single JAR, so the other two are unneeded. This patch +removes references to them. + +The JAR also was expected to contain classes that are built as part of the +test suite. That does not seem useful, nor is it available during the +`compile' phase, so that portion is removed. + +There are a number of Git attributes that are set in the final manifest. +The branch name is kept, but the others are removed. The build user is set +statically to "guix". + +Finally, since we already have a patch, two targets `jar' and `check' are +added to satisfy `ant-build-system' and keep the package definition more +lean. + +diff --git a/tlatools/org.lamport.tlatools/customBuild.xml b/tlatools/org.lamport.tlatools/customBuild.xml +index f0ba77cb7..748e60d95 100644 +--- a/tlatools/org.lamport.tlatools/customBuild.xml ++++ b/tlatools/org.lamport.tlatools/customBuild.xml +@@ -36,6 +36,17 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -217,17 +228,7 @@ + + + +- +- +- +- +- +- +- +- +- +- +- ++ + + + +@@ -259,17 +260,7 @@ + + + +- +- +- +- +- +- +- +- +- +- +- ++ + + + +@@ -373,14 +364,8 @@ + src/tla2sany/parser/Token.09-09-07, + src/tla2sany/parser/TokenMgrError.09-09-07"/> + +- +- +- +- +- +- + +- ++ + + + +@@ -389,14 +374,8 @@ + + + +- + +- + +- +- +- +- + + + -- cgit v1.3 From 2407527507991db6e4afa5868b91519e1c9c5aa0 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 12 Jun 2021 19:51:57 +0100 Subject: gnu: openjdk13: Update to 13.0.7. * gnu/packages/java.scm (openjdk13): Update to 13.0.7. [source]: Switch to https://github.com/openjdk/jdk13u. --- gnu/packages/java.scm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a167aafc38..830e5b62b0 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Vincent Legoll ;;; Copyright © 2021 Mike Gerwitz +;;; Copyright © 2021 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -2428,14 +2429,16 @@ new Date();")) (package (inherit openjdk12) (name "openjdk") - (version "13.0") + (version "13.0.7") (source (origin - (method url-fetch) - (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2") - (file-name (string-append name "-" version ".tar.bz2")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/openjdk/jdk13u") + (commit (string-append "jdk-" version "-ga")))) + (file-name (git-file-name name version)) (sha256 (base32 - "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq")) + "0wrrr0d7lz1v8qqm752mn4gz5l2vpl2kmx4ac3ysvk4mljc924hp")) (modules '((guix build utils))) (snippet `(begin -- cgit v1.3 From c2834544e3872261a55910eb1f6e619939a53bf9 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 12 Jun 2021 19:54:10 +0100 Subject: gnu: openjdk14: Update to 14.0.2. * gnu/packages/java.scm (openjdk14): Update to 14.0.2. [source]: Switch to https://github.com/openjdk/jdk14u. --- gnu/packages/java.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 830e5b62b0..09360d6b6f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2473,14 +2473,16 @@ new Date();")) (package (inherit openjdk13) (name "openjdk") - (version "14.0") + (version "14.0.2") (source (origin - (method url-fetch) - (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2") - (file-name (string-append name "-" version ".tar.bz2")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/openjdk/jdk14u") + (commit (string-append "jdk-" version "-ga")))) + (file-name (git-file-name name version)) (sha256 (base32 - "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch")) + "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6")) (modules '((guix build utils))) (snippet `(begin -- cgit v1.3 From 994235d956bc34dfcac17d7af230d3f581bdc3f8 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 12 Jun 2021 19:25:17 +0100 Subject: gnu: Add openjdk15. * gnu/packages/java.scm (openjdk15): New variable. --- gnu/packages/java.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 09360d6b6f..af3e83be00 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2517,6 +2517,29 @@ new Date();")) ("zip" ,zip))) (home-page "https://openjdk.java.net/projects/jdk/14"))) +(define-public openjdk15 + (package + (inherit openjdk14) + (name "openjdk") + (version "15.0.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/openjdk/jdk15u") + (commit (string-append "jdk-" version "-ga")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "168cr08nywp0q3vyj8njkhsmmnyd8rz9r58hk4xhzdzc6bdfkl1i")))) + (native-inputs + `(("autoconf" ,autoconf) + ("openjdk14:jdk" ,openjdk14 "jdk") + ("pkg-config" ,pkg-config) + ("unzip" ,unzip) + ("which" ,which) + ("zip" ,zip))) + (home-page "https://openjdk.java.net/projects/jdk/15"))) + (define-public icedtea icedtea-8) -- cgit v1.3 From afd4924d6a64c01a1d5138954b9f22c9bd4f4690 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 12 Jun 2021 19:26:06 +0100 Subject: gnu: Add openjdk16. * gnu/packages/java.scm (openjdk16): New variable. --- gnu/packages/java.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index af3e83be00..471cc5e906 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2540,6 +2540,44 @@ new Date();")) ("zip" ,zip))) (home-page "https://openjdk.java.net/projects/jdk/15"))) +(define-public openjdk16 + (package + (inherit openjdk15) + (name "openjdk") + (version "16.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/openjdk/jdk16u") + (commit (string-append "jdk-" version "-ga")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1ggddsbsar4dj2fycfqqqagqil7prhb30afvq6933rz7pa9apm2f")))) + (native-inputs + `(("autoconf" ,autoconf) + ("openjdk15:jdk" ,openjdk15 "jdk") + ("pkg-config" ,pkg-config) + ("unzip" ,unzip) + ("which" ,which) + ("zip" ,zip))) + (arguments + (substitute-keyword-arguments (package-arguments openjdk15) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'make-templates-writable + (lambda _ + ;; The build system copies a few .template files from the + ;; source directory into the build directory and then modifies + ;; them in-place. So these files have to be writable. + (for-each + (lambda (file) + (invoke "chmod" "u+w" file)) + (find-files "src/java.base/share/classes/jdk/internal/misc/" + "\\.template$")) + #t)))))) + (home-page "https://openjdk.java.net/projects/jdk/16"))) + (define-public icedtea icedtea-8) -- cgit v1.3 From 4c98db94b0271aa5371ff00cf98c0ebc70ab1a8d Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:14 +0200 Subject: guix: java-utils: Factorize pom.xml generation. * guix/build/java-utils.scm (generate-pom.xml): New procedure. * gnu/packages/maven.scm (java-surefire-junit4): Use it. * gnu/packages/java.scm (java-qdox, java-jsr250, java-jsr305) (java-aopalliance, java-jboss-el-api-spec) (java-jboss-interceptors-api-spec): Use it. (java-qdox-M9): Ensure the generated pom file has the correct version. --- gnu/packages/java.scm | 117 +++++++--------------------------------------- gnu/packages/maven.scm | 28 +++++------ guix/build/java-utils.scm | 29 ++++++++++++ 3 files changed, 58 insertions(+), 116 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 471cc5e906..59f9497ec2 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3847,25 +3847,11 @@ documentation tools.") (arguments `(#:jar-name "qdox.jar" #:tests? #f; no tests - #:modules - ((guix build ant-build-system) - (guix build java-utils) - (guix build utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "QDox") - (groupId "com.thoughtworks.qdox") - (artifactId "qdox") - (version ,,version)))))) - #t)) + (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version + #:name "QDox")) (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://github.com/codehaus/qdox") @@ -3891,7 +3877,14 @@ documentation tools.") "/qdox-" version "-sources.jar")) (sha256 (base32 - "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))))) + "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg")))) + (arguments + (substitute-keyword-arguments (package-arguments java-qdox) + ((#:phases phases) + `(modify-phases ,phases + (replace 'create-pom + (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version + #:name "QDox")))))))) (define-public java-jarjar (package @@ -6463,25 +6456,11 @@ bottlenecks move away from the database in an effectively cached system.") `(#:tests? #f ; no tests included #:jdk ,icedtea-8 #:jar-name "jsr250.jar" - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "jsr250") - (groupId "javax.annotation") - (artifactId "jsr250-api") - (version ,,version)))))) - #t)) + (generate-pom.xml "pom.xml" "javax.annotation" "jsr250-api" ,version + #:name "jsr250")) (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://jcp.org/en/jsr/detail?id=250") @@ -6510,25 +6489,10 @@ namespaces.") (arguments `(#:tests? #f ; no tests included #:jar-name "jsr305.jar" - #:modules ((guix build ant-build-system) - (guix build java-utils) - (guix build maven pom) - (guix build utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "jsr305") - (groupId "com.google.code.findbugs") - (artifactId "jsr305") - (version ,,version)))))) - #t)) + (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version)) (replace 'install (install-from-pom "pom.xml"))))) (home-page "http://findbugs.sourceforge.net/") @@ -10559,25 +10523,10 @@ this is not a static analysis tool.)") #:jdk ,icedtea-8 #:tests? #f; no tests #:source-dir "aopalliance/src/main" - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases (add-before 'install 'create-pom - (lambda _ - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "aopalliance") - (groupId "aopalliance") - (artifactId "aopalliance") - (version "1.0")))))) - #t)) + (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version)) (replace 'install (install-from-pom "pom.xml"))))) (home-page "http://aopalliance.sourceforge.net") @@ -12176,29 +12125,14 @@ sequences to format your console output which works on every platform.") (build-system ant-build-system) (arguments `(#:jar-name "java-jboss-el-api_spec.jar" - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases ;; the origin of javax.el:javax.el-api is unknown, so we use this package ;; instead, which implements the same thing. We override the pom file ;; to "rename" the package so it can be found by maven. (add-before 'install 'override-pom - (lambda _ - (delete-file "pom.xml") - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `(project - (modelVersion "4.0.0") - (name "el-api") - (groupId "javax.el") - (artifactId "javax.el-api") - (version "3.0"))))) - #t)) + (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0" + #:name "el-api")) (replace 'install (install-from-pom "pom.xml"))))) (inputs @@ -12230,11 +12164,6 @@ JavaServer Pages (JSP).") #:jdk ,icedtea-8 #:source-dir "." #:tests? #f; no tests - #:modules ((guix build ant-build-system) - (guix build utils) - (guix build maven pom) - (guix build java-utils) - (sxml simple)) #:phases (modify-phases %standard-phases ;; the origin of javax.interceptor:javax.interceptor-api is unknown, @@ -12242,18 +12171,8 @@ JavaServer Pages (JSP).") ;; We override the pom file to "rename" the package so it can be found ;; by maven. (add-before 'install 'override-pom - (lambda _ - (delete-file "pom.xml") - (with-output-to-file "pom.xml" - (lambda _ - (sxml->xml - `(project - (modelVersion "4.0.0") - (name "interceptor-api") - (groupId "javax.interceptor") - (artifactId "javax.interceptor-api") - (version "3.0"))))) - #t)) + (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api" + "3.0" #:name "interceptor-api")) (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://github.com/jboss/jboss-interceptors-api_spec") diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index c637e5c7ae..8f63ee9be2 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -3424,23 +3424,17 @@ starting from JUnit 4."))) #:phases (modify-phases %standard-phases (add-before 'install 'regenerate-own-pom - (lambda _ - ;; Surefire struggles resolving artifacts because of this pom - ;; file, resulting in a NullPointerException when collecting - ;; Artifacts (and a "Failure detected." message from - ;; DefaultArtifactResolver). Replace the pom file with a much - ;; simpler one. Everything is shaded anyway (as used to be the - ;; case in 2.22), so there will not be missing dependencies. - (with-output-to-file "surefire-providers/surefire-junit4/pom.xml" - (lambda _ - (sxml->xml - `((project - (modelVersion "4.0.0") - (name "Surefire JUnit4") - (groupId "org.apache.maven.surefire") - (artifactId "surefire-junit4") - (version ,,(package-version java-surefire-common-java5))))))) - #t)) + ;; Surefire struggles resolving artifacts because of this pom + ;; file, resulting in a NullPointerException when collecting + ;; Artifacts (and a "Failure detected." message from + ;; DefaultArtifactResolver). Replace the pom file with a much + ;; simpler one. Everything is shaded anyway (as used to be the + ;; case in 2.22), so there will not be missing dependencies. + (generate-pom.xml + "surefire-providers/surefire-junit4/pom.xml" + "org.apache.maven.surefire" "surefire-junit4" + ,(package-version java-surefire-common-java5) + #:name "Surefire JUnit4")) (add-before 'build 'copy-resources (lambda _ (mkdir-p "build/classes") diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm index a868e4d52c..6abd97e118 100644 --- a/guix/build/java-utils.scm +++ b/guix/build/java-utils.scm @@ -28,6 +28,7 @@ #:use-module (sxml simple) #:export (ant-build-javadoc generate-plugin.xml + generate-pom.xml install-jars install-javadoc install-pom-file @@ -206,3 +207,31 @@ recognize the package as a plugin, and find the entry points in the plugin." ,mojos (dependencies ,@dependencies))))))))) + +(define* (generate-pom.xml pom-file groupid artifactid version + #:key (dependencies '()) + (name artifactid)) + "Generates the @file{pom.xml} for a project. It is required by Maven to find +a package, and by the java build system to know where to install a package, when +a pom.xml doesn't already exist and installing to the maven repository." + (lambda _ + (mkdir-p (dirname pom-file)) + (with-output-to-file pom-file + (lambda _ + (sxml->xml + (sxml-indent + `(project + (modelVersion "4.0.0") + (name ,name) + (groupId ,groupid) + (artifactId ,artifactid) + (version ,version) + (dependencies + ,@(map + (match-lambda + ((groupid artifactid version) + `(dependency + (groupId ,groupid) + (artifactId ,artifactid) + (version ,version)))) + dependencies))))))))) -- cgit v1.3 From 01706f6e0081674dffa39a49c33e04d48aad5300 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:22 +0200 Subject: gnu: Add java-jopt-simple-4. * gnu/packges/java.scm (java-jopt-simple-4): New variable. (java-jopt-simple): Install to maven repository structure. --- gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 59f9497ec2..b34e31a612 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen ;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro -;;; Copyright © 2017-2020 Julien Lepiller +;;; Copyright © 2017-2021 Julien Lepiller ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2016, 2017, 2018 Alex Vong ;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice @@ -5781,7 +5781,13 @@ The jMock library (build-system ant-build-system) (arguments `(#:tests? #f ; there are no tests - #:jar-name "jopt-simple.jar")) + #:jar-name "jopt-simple.jar" + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version)) + (replace 'install + (install-from-pom "pom.xml"))))) (home-page "https://pholser.github.io/jopt-simple/") (synopsis "Java library for parsing command line options") (description "JOpt Simple is a Java library for parsing command line @@ -5793,6 +5799,28 @@ retrieval of options and their arguments simple and expressive, without being overly clever.") (license license:expat))) +;; Required by jmh +(define-public java-jopt-simple-4 + (package + (inherit java-jopt-simple) + (version "4.6") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/" + "net/sf/jopt-simple/jopt-simple/" + version "/jopt-simple-" + version "-sources.jar")) + (sha256 + (base32 + "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd")))) + (arguments + (substitute-keyword-arguments (package-arguments java-jopt-simple) + ((#:phases phases) + `(modify-phases ,phases + (replace 'create-pom + (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" + ,version)))))))) + (define-public java-commons-math3 (package (name "java-commons-math3") -- cgit v1.3 From 887410838628a9a1d5c15e71a6e48f4afd9ec33b Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:23 +0200 Subject: gnu: java-commons-math3: Install to maven repository. * gnu/packages/java.scm (java-commons-math3)[phases]: Use install-from-pom. --- gnu/packages/java.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b34e31a612..dd30e70635 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5855,7 +5855,7 @@ overly clever.") #t)) ;; There is no install target. (replace 'install - (install-jars "target"))))) + (install-from-pom "pom.xml"))))) (native-inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) -- cgit v1.3 From 901d48cc17ea635a34e004b1d07a2e2a9bde6188 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:26 +0200 Subject: gnu: java-jmh: Update to 1.32. * gnu/packages/java.scm (java-jmh): Update to 1.32. [source]: Switch to the git repository. --- gnu/packages/java.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index dd30e70635..7a9f1c3538 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5869,16 +5869,16 @@ available in the Java programming language or Commons Lang.") (define-public java-jmh (package (name "java-jmh") - (version "1.17.5") + (version "1.32") (source (origin - (method hg-fetch) - (uri (hg-reference - (url "http://hg.openjdk.java.net/code-tools/jmh/") - (changeset version))) - (file-name (string-append name "-" version "-checkout")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/openjdk/jmh") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084")))) + "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) (build-system ant-build-system) (arguments `(#:jar-name "jmh-core.jar" -- cgit v1.3 From 1b1eeb3b123162c4d73c939e9ca7bbbb4f79aef1 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 1 Jun 2021 00:44:27 +0200 Subject: gnu: java-jmh: Switch to maven-build-system. * gnu/packages/java.scm (java-jmh): Switch to maven-build-system. --- gnu/packages/java.scm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7a9f1c3538..270f2489e1 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -44,6 +44,7 @@ #:use-module (guix utils) #:use-module (guix build-system ant) #:use-module (guix build-system gnu) + #:use-module (guix build-system maven) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages attr) @@ -5879,26 +5880,27 @@ available in the Java programming language or Commons Lang.") (sha256 (base32 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0")))) - (build-system ant-build-system) + (build-system maven-build-system) (arguments - `(#:jar-name "jmh-core.jar" - #:source-dir "jmh-core/src/main" - #:test-dir "jmh-core/src/test" + `(#:exclude + (("org.apache.maven.plugins" . + ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin" + "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin")) + ("com.mycila.maven-license-plugin" . ("maven-license-plugin")) + ("org.apache.maven.wagon" . ("wagon-ssh"))) + #:maven-plugins + (("maven-enforcer-plugin" ,maven-enforcer-plugin) + ,@(default-maven-plugins)) #:phases (modify-phases %standard-phases - ;; This seems to be a bug in the JDK. It may not be necessary in - ;; future versions of the JDK. - (add-after 'unpack 'fix-bug + (add-after 'unpack 'remove-unnecessary (lambda _ - (with-directory-excursion - "jmh-core/src/main/java/org/openjdk/jmh/runner/options" - (substitute* '("IntegerValueConverter.java" - "ThreadsValueConverter.java") - (("public Class valueType") - "public Class valueType"))) - #t))))) - (inputs - `(("java-jopt-simple" ,java-jopt-simple) + ;; requires org.apache.maven.archetype:archetype-packaging. + ;; Its subprojects also require groovy, kotlin and scala, + ;; respectively. + (delete-file-recursively "jmh-archetypes")))))) + (propagated-inputs + `(("java-jopt-simple" ,java-jopt-simple-4) ("java-commons-math3" ,java-commons-math3))) (native-inputs `(("java-junit" ,java-junit) -- cgit v1.3 From 347846ea86e73eb34c2296d6a58edf575c543440 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 22 Jun 2021 14:19:34 +0200 Subject: gnu: java-kafka-clients: Disable failing test. * gnu/packages/java.scm (java-kafka-clients): Disable a test that fails non-deterministically. --- gnu/packages/java.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 270f2489e1..64df5a2e24 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -11681,7 +11681,9 @@ protocol-independent framework to build mail and messaging applications.") "**/ClientUtilsTest.java" ;; End with errors that seem related to our powermock "**/KafkaProducerTest.java" - "**/BufferPoolTest.java"))) + "**/BufferPoolTest.java" + ;; Undeterministic failure, seems to affect mostly ci + "**/GarbageCollectedMemoryPoolTest.java"))) (inputs `(("java-slf4j-api" ,java-slf4j-api) ("java-lz4" ,java-lz4))) -- cgit v1.3 From f91fceb920cc1c191c86326c21de046937184969 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 25 Jul 2021 21:47:26 +0200 Subject: gnu: java-commons-codec: Don't return #t from phases. * gnu/packages/java.scm (java-commons-codec)[arguments]: Don't return #t from phases. --- gnu/packages/java.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 64df5a2e24..2c4c3451ad 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7969,13 +7969,11 @@ This is a part of the Apache Commons Project.") (add-before 'build 'copy-resources (lambda _ (copy-recursively "src/main/resources" - "build/classes") - #t)) + "build/classes"))) (add-before 'check 'copy-test-resources (lambda _ (copy-recursively "src/test/resources" - "build/test-classes") - #t)) + "build/test-classes"))) (replace 'install (install-from-pom "pom.xml"))))) (native-inputs `(("java-commons-lang3" ,java-commons-lang3) -- cgit v1.3 From 94ec198506c11d1151bccfe5d51f44d562e9b5d8 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 25 Jul 2021 22:13:02 +0200 Subject: gnu: java-commons-codec: Fix build on non-huge-memory machines. * gnu/packages/java.scm (java-commons-codec)[arguments]: Add a new 'skip-ravenous-test phase. --- gnu/packages/java.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2c4c3451ad..c75adcaf0e 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7974,6 +7974,14 @@ This is a part of the Apache Commons Project.") (lambda _ (copy-recursively "src/test/resources" "build/test-classes"))) + (add-before 'check 'skip-ravenous-test + (lambda _ + ;; This test admits to being "memory hungry", but reliably fails + ;; even on a machine that should have plenty (12 GiB). Skip it. + (substitute* + "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java" + (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;") + "return;")))) (replace 'install (install-from-pom "pom.xml"))))) (native-inputs `(("java-commons-lang3" ,java-commons-lang3) -- cgit v1.3 From 3e8537c1464ac6749234492802d930a965f7efbd Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 25 Jul 2021 21:38:09 +0200 Subject: gnu: java-commons-codec: Update to 1.15. * gnu/packages/java.scm (java-commons-codec): Update to 1.15. --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c75adcaf0e..621a6fe914 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7950,14 +7950,14 @@ This is a part of the Apache Commons Project.") (define-public java-commons-codec (package (name "java-commons-codec") - (version "1.14") + (version "1.15") (source (origin (method url-fetch) (uri (string-append "mirror://apache/commons/codec/source/" "commons-codec-" version "-src.tar.gz")) (sha256 (base32 - "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9")))) + "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj")))) (build-system ant-build-system) (arguments `(#:jar-name "java-commons-codec.jar" -- cgit v1.3 From 86d316b3346eac29c7e466f66b4422067c1cdb96 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 27 Sep 2021 14:55:47 +0200 Subject: gnu: tla2tools: Build from a known commit. Reported by Andrew Patterson . * gnu/packages/java.scm (tla2tools)[version, source]: Use a commit (and GIT-VERSION) instead of a tag. --- gnu/packages/java.scm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 621a6fe914..a404250d38 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -14091,16 +14091,21 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.") license:asl2.0)))) (define-public tla2tools - (let* ((version "1.8.0") - (tag (string-append "v" version))) + ;; This package was originally based on the "v1.8.0" tag, but that merely + ;; points to the moving master branch. That might be because the ‘latest + ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than + ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0. + (let* ((release "1.7.1") + (revision "0") + (commit "6932e19083fc6df42473464857fc1280cb5aaecc")) (package (name "tla2tools") - (version version) + (version (git-version release revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/tlaplus/tlaplus") - (commit tag))) + (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 @@ -14124,7 +14129,7 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.") #:make-flags '("-f" ,build-xml) #:phases (modify-phases %standard-phases - ;; Replace packed libs with references to jars in store + ;; Replace packed libs with references to jars in store (add-after 'unpack 'replace-libs (lambda* (#:key inputs #:allow-other-keys) (define (input-jar input) @@ -14147,12 +14152,12 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.") ("junit-4.12.jar" . "java-junit") ("easymock-3.3.1.jar" . "java-easymock"))) ;; Retain a tiny subset of the original X-Git-* - ;; manifest values just to aid in debugging + ;; manifest values just to aid in debugging. (substitute* ,build-xml - (("\\$\\{git.tag\\}") ,tag)))) + (("\\$\\{git.tag\\}") (string-append "v" ,release))))) (add-before 'check 'prepare-tests (lambda _ - ;; pcal tests write to cfg files + ;; The pcal tests write to .cfg files. (for-each (cut chmod <> #o644) (find-files (string-append ,tlatools "/test-model/pcal") -- cgit v1.3