diff mbox series

[bug#49946,v4,12/31] gnu: Add tree-sitter-elm.

Message ID 20220218143948.28989-12-pierre.langlois@gmx.com
State New
Headers show
Series gnu: Add tree-sitter for emacs. | expand

Commit Message

Pierre Langlois Feb. 18, 2022, 2:39 p.m. UTC
* gnu/packages/tree-sitter.scm (tree-sitter-elm): New variable.
---
 gnu/packages/tree-sitter.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

--
2.34.0
diff mbox series

Patch

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 134d2768cf..5ade030283 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -376,3 +376,36 @@  (define-public tree-sitter-elixir
       (license (list license:asl2.0
                      ;; Files in tests/corpus are under MIT license.
                      license:expat)))))
+
+(define-public tree-sitter-elm
+  (package (inherit tree-sitter-c)
+    (name "tree-sitter-elm")
+    (version "5.5.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/elm-tooling/tree-sitter-elm")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "10hbi4vyj4hjixqswdcbvzl60prldczz29mlp02if61wvwiwvqrw"))
+              (modules '((guix build utils)))
+              (snippet tree-sitter-delete-generated-files)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments tree-sitter-c)
+      ((#:phases phases)
+       `(modify-phases ,phases
+          (replace 'delete-dependencies
+           (lambda _
+             (delete-dependencies '("tree-sitter-cli"
+                                    "nan"
+                                    "node-gyp"
+                                    "@asgerf/dts-tree-sitter"
+                                    "prebuild"
+                                    "prebuild-install"))))))))
+    (home-page "https://elm-tooling.github.io/tree-sitter-elm/")
+    (synopsis "Tree-sitter Elm grammar")
+    (description
+      "This package provides an Elm grammar for the Tree-sitter library.")
+    (license license:expat)))