[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/18: gnu: Add java-jline-terminal.
From: |
guix-commits |
Subject: |
16/18: gnu: Add java-jline-terminal. |
Date: |
Wed, 5 May 2021 11:00:25 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 1700dfefbe17efd759569e3907f7739ee71b0e8d
Author: Mike Gerwitz <mtg@gnu.org>
AuthorDate: Thu Apr 15 21:24:15 2021 -0400
gnu: Add java-jline-terminal.
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 <ludo@gnu.org>
---
gnu/packages/java.scm | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index b2a5cf0..68ab868 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")
- 07/18: gnu: Add libcerf., (continued)
- 07/18: gnu: Add libcerf., guix-commits, 2021/05/05
- 11/18: gnu: racket: Racket inherits racket-minimal, not vice versa., guix-commits, 2021/05/05
- 13/18: gnu: Add java-gson-2.8.6., guix-commits, 2021/05/05
- 12/18: gnu: racket: Add aditional mirrors., guix-commits, 2021/05/05
- 17/18: gnu: Add java-jline-reader., guix-commits, 2021/05/05
- 06/18: gnu: Add castget., guix-commits, 2021/05/05
- 01/18: swh: Adjust for compatibility with Guile 2.2's (web client)., guix-commits, 2021/05/05
- 09/18: gnu: racket: Move to (gnu packages racket)., guix-commits, 2021/05/05
- 18/18: gnu: Add tla2tools., guix-commits, 2021/05/05
- 14/18: gnu: Add java-eclipse-xtext-xbase-lib., guix-commits, 2021/05/05
- 16/18: gnu: Add java-jline-terminal.,
guix-commits <=
- 03/18: cvs-download: Fix module exports, guix-commits, 2021/05/05
- 04/18: gnu: xboard: Set default engine to gnuchess., guix-commits, 2021/05/05
- 08/18: gnu: Add labplot., guix-commits, 2021/05/05
- 05/18: gnu: Add xmlsec-openssl., guix-commits, 2021/05/05
- 10/18: gnu: racket: Remove obsolete patch., guix-commits, 2021/05/05
- 15/18: gnu: Add java-eclipse-lsp4j packages., guix-commits, 2021/05/05