Subject: [PATCH 22/31] gnu: Add tree-sitter-rust.

From: Pierre Langlois <[email-masked]>
Date: Mon, 9 Aug 2021 00:43:49 +0100

* gnu/packages/tree-sitter.scm (tree-sitter-rust): 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 d7c3468035..6c2b2e7577 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -23,6 +23,7 @@
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages crates-graphics)
   #:use-module (gnu packages node-xyz))
@@ -417,3 +418,27 @@ library.")
     (description
       "This package provides a Python grammar for the Tree-sitter library.")
     (license license:expat)))
+
+(define-public tree-sitter-rust
+  (package (inherit tree-sitter-c)
+    (name "tree-sitter-rust")
+    (version "0.19.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/tree-sitter/tree-sitter-rust")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "118vkhv7n3sw8y9pi0987cgdcd74sjqwviijw01mhnk3bkyczi3l"))))
+    (native-inputs
+     `(("bc" ,bc)
+       ("tree-sitter" ,tree-sitter)
+       ("node-nan" ,node-nan)))
+    (home-page "https://github.com/tree-sitter/tree-sitter-rust")
+    (synopsis "Tree-sitter Rust grammar")
+    (description
+      "This package provides a Rust grammar for the Tree-sitter library.")
+    (license license:expat)))
--
2.32.0