diff mbox series

[bug#49946,v2,18/33] gnu: Add tree-sitter-java.

Message ID 20210829104608.3103-18-pierre.langlois@gmx.com
State New
Headers show
Series gnu: Add tree-sitter. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Pierre Langlois Aug. 29, 2021, 10:45 a.m. UTC
* gnu/packages/tree-sitter.scm (tree-sitter-java): New variable.
---
 gnu/packages/tree-sitter.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

--
2.33.0
diff mbox series

Patch

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index e2a0757e30..174f0923f8 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -325,3 +325,32 @@  This package includes the @command{tree-sitter} command-line tool.")
     (description
       "This package provides a HTML grammar for the Tree-sitter library.")
     (license license:expat)))
+
+(define-public tree-sitter-java
+  (package (inherit tree-sitter-c)
+    (name "tree-sitter-java")
+    (version "0.19.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/tree-sitter/tree-sitter-java")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "07zw9ygb45hnvlx9qlz7rlz8hc3byjy03d24v72i5iyhpiiwlhvl"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments tree-sitter-c)
+      ((#:phases phases)
+       `(modify-phases ,phases
+         ;; The parse-example script tries to clone git repositories.
+         (add-after 'unpack 'remove-parse-example
+           (lambda _
+             (substitute* "package.json"
+               ((" && script\\/parse-examples") ""))))))))
+    (home-page "https://github.com/tree-sitter/tree-sitter-java")
+    (synopsis "Tree-sitter Java grammar")
+    (description
+      "This package provides a Java grammar for the Tree-sitter library.")
+    (license license:expat)))