@@ -4,6 +4,7 @@
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
;;; Copyright © 2023 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,12 +30,32 @@ (define-module (gnu packages tree-sitter)
#:use-module (gnu packages node)
#:use-module (guix build-system cargo)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system pyproject)
+ #:use-module ((guix build-system python) #:select (pypi-uri))
#:use-module (guix build-system tree-sitter)
#:use-module (guix gexp)
#:use-module (guix git-download)
+ #:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix utils))
+(define-public python-tree-sitter
+ (package
+ (name "python-tree-sitter")
+ (version "0.20.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "tree_sitter" version))
+ (sha256
+ (base32
+ "03f6xqpnjh4g28d9g219w9n4l07bap91ws2xzfy4jrjxahn0hgz9"))))
+ (build-system pyproject-build-system)
+ (home-page "https://github.com/tree-sitter/py-tree-sitter")
+ (synopsis "Python bindings to the Tree-sitter parsing library")
+ (description "This package provides Python bindings to the
+Tree-sitter parsing library.")
+ (license license:expat)))
+
(define-public tree-sitter
(package
(name "tree-sitter")