From patchwork Thu Apr 15 04:25:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Gerwitz X-Patchwork-Id: 28560 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BDC1D27BC78; Thu, 15 Apr 2021 05:29:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 65DE327BC76 for ; Thu, 15 Apr 2021 05:29:10 +0100 (BST) Received: from localhost ([::1]:53322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcr-0000ZH-KT for patchwork@mira.cbaines.net; Thu, 15 Apr 2021 00:29:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWtck-0000Yy-L0 for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWtck-0001kd-DJ for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWtck-0007iA-AN for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47789] [PATCH 1/6] gnu: Add java-gson-2.8.6. Resent-From: Mike Gerwitz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 04:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47789@debbugs.gnu.org Received: via spool by 47789-submit@debbugs.gnu.org id=B47789.161846093129573 (code B ref 47789); Thu, 15 Apr 2021 04:29:02 +0000 Received: (at 47789) by debbugs.gnu.org; 15 Apr 2021 04:28:51 +0000 Received: from localhost ([127.0.0.1]:36212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcZ-0007gs-6f for submit@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcW-0007gb-M4 for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57378) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcR-0001UQ-Dw for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:43 -0400 Received: from localhost ([::1]:48853 helo=mikegerwitz-pc) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWtcQ-00063m-4g for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:42 -0400 From: Mike Gerwitz In-Reply-To: Date: Thu, 15 Apr 2021 00:25:10 -0400 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-From-Line: 0bb3e905602bcba367d14ad4ff20ef3caa54f72b Mon Sep 17 00:00:00 2001 Message-Id: <0bb3e905602bcba367d14ad4ff20ef3caa54f72b.1618460450.git.mtg@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. --- gnu/packages/java.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 207f136513..fe75404e9c 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. ;;; @@ -11724,6 +11725,48 @@ 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 + (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")))) + (build-system ant-build-system) + (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))) + #t))))) + (native-inputs + `(("java-junit" ,java-junit) + ("java-hamcrest-core" ,java-hamcrest-core))) + (home-page "https://github.com/google/gson") + (synopsis "Java serialization/deserialization library from/to JSON") + (description "Gson is a Java library that can be used to convert Java +Objects into their JSON representation. It can also be used to convert a JSON +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))) + (define-public java-hawtjni (package (name "java-hawtjni") From patchwork Thu Apr 15 04:26:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Gerwitz X-Patchwork-Id: 28564 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0561E27BC77; Thu, 15 Apr 2021 05:29:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B05DA27BC76 for ; Thu, 15 Apr 2021 05:29:30 +0100 (BST) Received: from localhost ([::1]:53948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtdB-0000qU-V6 for patchwork@mira.cbaines.net; Thu, 15 Apr 2021 00:29:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWtcl-0000Z4-0O for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52913) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWtck-0001lH-Pt for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWtck-0007iH-Mc for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47789] [PATCH 2/6] gnu: Add java-eclipse-xtext-xbase-lib. Resent-From: Mike Gerwitz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 04:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47789@debbugs.gnu.org Received: via spool by 47789-submit@debbugs.gnu.org id=B47789.161846093529591 (code B ref 47789); Thu, 15 Apr 2021 04:29:02 +0000 Received: (at 47789) by debbugs.gnu.org; 15 Apr 2021 04:28:55 +0000 Received: from localhost ([127.0.0.1]:36216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcc-0007hD-Hj for submit@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcZ-0007gf-6e for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57380) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcU-0001WR-1b for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:46 -0400 Received: from localhost ([::1]:48855 helo=mikegerwitz-pc) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWtcS-0006AH-QA for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:45 -0400 From: Mike Gerwitz In-Reply-To: Date: Thu, 15 Apr 2021 00:26:28 -0400 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-From-Line: 294c4acfdf0598ebebeece871be847b4058d84a0 Mon Sep 17 00:00:00 2001 Message-Id: <294c4acfdf0598ebebeece871be847b4058d84a0.1618460450.git.mtg@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. --- gnu/packages/java.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index fe75404e9c..b0e67b2f6e 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7547,6 +7547,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 + #: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") From patchwork Thu Apr 15 04:26:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Gerwitz X-Patchwork-Id: 28565 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6BA2827BC77; Thu, 15 Apr 2021 05:29:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DF06627BC76 for ; Thu, 15 Apr 2021 05:29:32 +0100 (BST) Received: from localhost ([::1]:54244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtdE-0000z9-3r for patchwork@mira.cbaines.net; Thu, 15 Apr 2021 00:29:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWtcl-0000ZA-FN for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWtcl-0001lP-8N for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWtcl-0007iP-3D for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47789] [PATCH 3/6] gnu: Add java-eclipse-lsp4j packages. Resent-From: Mike Gerwitz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 04:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47789@debbugs.gnu.org Received: via spool by 47789-submit@debbugs.gnu.org id=B47789.161846093729607 (code B ref 47789); Thu, 15 Apr 2021 04:29:03 +0000 Received: (at 47789) by debbugs.gnu.org; 15 Apr 2021 04:28:57 +0000 Received: from localhost ([127.0.0.1]:36219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtce-0007hS-Vk for submit@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcb-0007gj-Vo for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57383) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcW-0001YP-QE for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:48 -0400 Received: from localhost ([::1]:48857 helo=mikegerwitz-pc) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWtcV-0006Fa-8x for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:47 -0400 From: Mike Gerwitz In-Reply-To: Date: Thu, 15 Apr 2021 00:26:41 -0400 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-From-Line: ac4dc52a97826de964853097feb19599ad630199 Mon Sep 17 00:00:00 2001 Message-Id: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. --- gnu/packages/java.scm | 104 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b0e67b2f6e..e82e828df0 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -7547,6 +7547,110 @@ means for generating files and compiling new Java classes based on annotations found in your source code.") (license license:epl2.0))) +(define 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 obscurely + #: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") + #t))))) + (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") From patchwork Thu Apr 15 04:26:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Gerwitz X-Patchwork-Id: 28562 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 537D327BC76; Thu, 15 Apr 2021 05:29:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AEBC327BC79 for ; Thu, 15 Apr 2021 05:29:16 +0100 (BST) Received: from localhost ([::1]:53380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcx-0000bP-T0 for patchwork@mira.cbaines.net; Thu, 15 Apr 2021 00:29:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWtcl-0000ZG-PJ for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52917) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWtcl-0001lU-ID for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWtcl-0007iX-Fi for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47789] [PATCH 4/6] gnu: Add java-jline-terminal. Resent-From: Mike Gerwitz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 04:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47789@debbugs.gnu.org Received: via spool by 47789-submit@debbugs.gnu.org id=B47789.161846093729615 (code B ref 47789); Thu, 15 Apr 2021 04:29:03 +0000 Received: (at 47789) by debbugs.gnu.org; 15 Apr 2021 04:28:57 +0000 Received: from localhost ([127.0.0.1]:36221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcf-0007hU-DG for submit@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtce-0007gr-0h for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57385) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcY-0001Zy-RV for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:50 -0400 Received: from localhost ([::1]:48860 helo=mikegerwitz-pc) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWtcX-0006Gz-Sg for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:50 -0400 From: Mike Gerwitz In-Reply-To: Date: Thu, 15 Apr 2021 00:26:55 -0400 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-From-Line: 392710e13edd524ecac953dcecee73be459ea852 Mon Sep 17 00:00:00 2001 Message-Id: <392710e13edd524ecac953dcecee73be459ea852.1618460450.git.mtg@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. --- gnu/packages/java.scm | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e82e828df0..aef857661d 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) @@ -12477,6 +12478,62 @@ 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") + #t)) + (add-after 'unpack 'patch-paths + (lambda _ + (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java" + (("= \"(s?tty|infocmp)\"" _ cmd) + (string-append "= \"" (which cmd) "\""))) + #t)) + ;; 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 ".")))) + #t))))) + (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") From patchwork Thu Apr 15 04:27:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Gerwitz X-Patchwork-Id: 28561 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B8C6927BC76; Thu, 15 Apr 2021 05:29:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4B8F727BC76 for ; Thu, 15 Apr 2021 05:29:16 +0100 (BST) Received: from localhost ([::1]:53384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcx-0000ba-HU for patchwork@mira.cbaines.net; Thu, 15 Apr 2021 00:29:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWtcm-0000Zp-AE for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWtcm-0001lh-2j for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWtcl-0007ik-VA for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47789] [PATCH 5/6] gnu: Add java-jline-reader. Resent-From: Mike Gerwitz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 04:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47789@debbugs.gnu.org Received: via spool by 47789-submit@debbugs.gnu.org id=B47789.161846094129630 (code B ref 47789); Thu, 15 Apr 2021 04:29:03 +0000 Received: (at 47789) by debbugs.gnu.org; 15 Apr 2021 04:29:01 +0000 Received: from localhost ([127.0.0.1]:36224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtch-0007hp-Qy for submit@debbugs.gnu.org; Thu, 15 Apr 2021 00:29:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtcg-0007h6-Ah for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57387) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcb-0001bW-5j for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:53 -0400 Received: from localhost ([::1]:48862 helo=mikegerwitz-pc) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWtca-0006Lh-96 for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:52 -0400 From: Mike Gerwitz In-Reply-To: Date: Thu, 15 Apr 2021 00:27:11 -0400 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-From-Line: b10b57e88872629e09e5a3e30839380a450104f7 Mon Sep 17 00:00:00 2001 Message-Id: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This package is part of JLine 3. * gnu/packages/java.scm (java-jline-reader): New variable. --- gnu/packages/java.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index aef857661d..4d6befe511 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -12534,6 +12534,48 @@ 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") + #t))))) + (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") From patchwork Thu Apr 15 04:27:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Gerwitz X-Patchwork-Id: 28563 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9AA0527BC76; Thu, 15 Apr 2021 05:29:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9EA8F27BC77 for ; Thu, 15 Apr 2021 05:29:18 +0100 (BST) Received: from localhost ([::1]:53414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcz-0000cW-RO for patchwork@mira.cbaines.net; Thu, 15 Apr 2021 00:29:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWtcm-0000aP-Lc for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWtcm-0001mB-ES for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWtcm-0007is-As for guix-patches@gnu.org; Thu, 15 Apr 2021 00:29:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47789] [PATCH 6/6] gnu: Add tla2tools. Resent-From: Mike Gerwitz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 04:29:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47789 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47789@debbugs.gnu.org Received: via spool by 47789-submit@debbugs.gnu.org id=B47789.161846094329679 (code B ref 47789); Thu, 15 Apr 2021 04:29:04 +0000 Received: (at 47789) by debbugs.gnu.org; 15 Apr 2021 04:29:03 +0000 Received: from localhost ([127.0.0.1]:36229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtck-0007iO-Va for submit@debbugs.gnu.org; Thu, 15 Apr 2021 00:29:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWtci-0007hL-Oj for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:29:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57389) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWtcd-0001e4-Jl for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:55 -0400 Received: from localhost ([::1]:48864 helo=mikegerwitz-pc) by fencepost.gnu.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWtcc-0006Q3-FO for 47789@debbugs.gnu.org; Thu, 15 Apr 2021 00:28:55 -0400 From: Mike Gerwitz In-Reply-To: Date: Thu, 15 Apr 2021 00:27:27 -0400 References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) X-From-Line: fc94440ebc83044f49813f58633ccaa6b1becc65 Mon Sep 17 00:00:00 2001 Message-Id: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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/packages/java.scm | 134 ++++++++++++++++++ .../patches/tla2tools-build-xml.patch | 109 ++++++++++++++ 2 files changed, 243 insertions(+) create mode 100644 gnu/packages/patches/tla2tools-build-xml.patch diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4d6befe511..087f411258 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -14040,3 +14040,137 @@ 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 + "1503ljw32mbgw1mzkyk31sxdyggli9jf5sa31chfy5g5ccaphz9b")) + (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$")) + #t)))) + (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)) + #t)) + (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$")) + #t)) + (replace 'install + (lambda _ + (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"))) + (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 + "#!" (which "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")))) + #t)))))) + (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 @@ + + + +- + +- + +- +- +- +- + + +