@@ -340,3 +340,26 @@ (define-public tree-sitter-html
(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 (tree-sitter-origin
+ name
+ version
+ "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)))