Subject: [PATCH v7 08/32] gnu: Add tree-sitter-cpp.

From: Pierre Langlois <[email-masked]>
Date: Fri, 25 Nov 2022 01:21:18 +0000

* gnu/packages/tree-sitter.scm (tree-sitter-cpp): New variable.
---
 gnu/packages/tree-sitter.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 4f75b0251a..63dc990475 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -189,3 +189,28 @@ (define-public tree-sitter-c
     (description
      "This package provides a C grammar for the Tree-sitter library.")
     (license license:expat)))
+
+(define-public tree-sitter-cpp
+  (let ((commit "5ead1e26c6ab71919db0f1880c46a278a93bc5ea")
+        (revision "1"))
+    (package
+      (name "tree-sitter-cpp")
+      (version (git-version "0.20.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/tree-sitter/tree-sitter-cpp")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1572qhfw1jjkm1q6c110lnnj2n384a97fgn645c5q9ikciv8kac7"))
+                (modules '((guix build utils)))
+                (snippet tree-sitter-delete-generated-files)))
+      (build-system tree-sitter-build-system)
+      (inputs (list tree-sitter-c))
+      (home-page "https://github.com/tree-sitter/tree-sitter-cpp")
+      (synopsis "Tree-sitter C++ grammar")
+      (description
+       "This package provides a C++ grammar for the Tree-sitter library.")
+      (license license:expat))))
-- 
2.38.1