summary refs log tree commit diff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2020-09-26 21:27:09 +0200
committerJulien Lepiller <julien@lepiller.eu>2020-10-14 03:30:53 +0200
commit77ae41457c55e2f1f9008faff384cf912782be7a (patch)
tree97cd04b52d7ddd5b7089c56830a87a77417e7f75 /gnu/packages/java.scm
parent57f6a915850692eeb9bd9685994358c007a50465 (diff)
downloadguix-77ae41457c55e2f1f9008faff384cf912782be7a.tar.gz
gnu: Add antlr4-4.1.
* gnu/packages/java.scm (antlr4-4.1): New variable.
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index c5abce7a71..bddf84d150 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -37,6 +37,7 @@
   #:use-module (guix hg-download)
   #:use-module (guix git-download)
   #:use-module (guix svn-download)
+  #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module (guix utils)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system gnu)
@@ -8484,6 +8485,38 @@ parse trees.")))
     (inputs
      `(("java-treelayout" ,java-treelayout)))))
 
+(define-public antlr4-4.1
+  (package
+    (inherit antlr4)
+    (version (package-version java-antlr4-runtime-4.1))
+    (source (package-source java-antlr4-runtime-4.1))
+    (arguments
+      (substitute-keyword-arguments (package-arguments antlr4)
+        ((#:test-dir _)
+         "tool/test")
+        ((#:test-exclude excludes)
+         `(list "**/TestParseErrors.java"
+                "**/TestTopologicalSort.java"
+                ,@excludes))
+        ((#:phases phases)
+         `(modify-phases ,phases
+            (delete 'generate-unicode)
+            (replace 'check
+              (lambda _
+                (invoke "ant" "check")
+                #t))
+            (add-before 'configure 'chmod
+              (lambda _
+                (chmod "build.xml" #o644)
+                #t))
+            (delete 'remove-graphemes)
+            (delete 'remove-unrelated-languages)
+            (delete 'generate-test-parsers)))))
+    (inputs
+      (alist-replace
+        "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
+        (package-inputs antlr4)))))
+
 (define-public java-commons-cli-1.2
   ;; This is a bootstrap dependency for Maven2.
   (package