@@ -447,3 +447,26 @@ (define-public tree-sitter-php
(description
"This package provides a PHP grammar for the Tree-sitter library.")
(license license:expat)))
+
+(define-public tree-sitter-python
+ (package (inherit tree-sitter-c)
+ (name "tree-sitter-python")
+ (version "0.19.1")
+ (source (tree-sitter-origin
+ name
+ version
+ "16i5mcpz4ld0rybffb0nxim4crb9fhnnq20b4bkjs7jjr3zcx7vq"))
+ (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-python")
+ (synopsis "Tree-sitter Python grammar")
+ (description
+ "This package provides a Python grammar for the Tree-sitter library.")
+ (license license:expat)))