@@ -276,3 +276,32 @@ This package includes the @command{tree-sitter} command-line tool.")
(description
"This package provides a CSS grammar for the Tree-sitter library.")
(license license:expat)))
+
+(define-public tree-sitter-go
+ (package (inherit tree-sitter-c)
+ (name "tree-sitter-go")
+ (version "0.19.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tree-sitter/tree-sitter-go")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0nxs47vd2fc2fr0qlxq496y852rwg39flhg334s7dlyq7d3lcx4x"))))
+ (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-go")
+ (synopsis "Tree-sitter Go grammar")
+ (description
+ "This package provides a Golang grammar for the Tree-sitter library.")
+ (license license:expat)))