Subject: [bug#49946] [WIP PATCH v3 18/26] gnu: Add tree-sitter-rust.

From: Pierre Langlois <[email-masked]>
Date: Thu, 10 Feb 2022 22:55:19 +0000

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

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 05d6ade77d..63e558f50f 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages tree-sitter)
   #:use-module (guix git-download)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages crates-graphics)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages node-xyz)
@@ -470,3 +471,20 @@ (define-public tree-sitter-python
     (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.20.1")
+    (source (tree-sitter-origin
+             name
+             version
+             "174j5pxwf80c4xniri39l3a6bb7nq96g2s8hh5sgv4i7xvbpfsmg"))
+    (native-inputs
+     (modify-inputs (package-native-inputs tree-sitter-c)
+       (prepend bc)))
+    (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.34.0