[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49946] [PATCH v7 27/32] gnu: Add tree-sitter-typescript.
From: |
Pierre Langlois |
Subject: |
[bug#49946] [PATCH v7 27/32] gnu: Add tree-sitter-typescript. |
Date: |
Fri, 25 Nov 2022 01:21:37 +0000 |
* gnu/packages/tree-sitter.scm (tree-sitter-typescript): New variable.
---
gnu/packages/tree-sitter.scm | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 54f2affff2..7cf9a41105 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -648,3 +648,41 @@ (define-public tree-sitter-rust
(description
"This package provides a Rust grammar for the Tree-sitter library.")
(license license:expat)))
+
+(define-public tree-sitter-typescript
+ (package
+ (name "tree-sitter-typescript")
+ (version "0.20.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
"https://github.com/tree-sitter/tree-sitter-typescript")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "07fl9d968lal0aqj4f0n16p3n94cjkgfp54wynfr8gbdkjss5v5x"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file "binding.gyp")
+ (delete-file-recursively "bindings")
+ (for-each
+ (lambda (lang)
+ (with-directory-excursion lang
+ (delete-file "src/grammar.json")
+ (delete-file "src/node-types.json")
+ (delete-file "src/parser.c")
+ (delete-file-recursively "src/tree_sitter")))
+ '("typescript" "tsx"))
+ #t))))
+ (build-system tree-sitter-build-system)
+ (inputs (list tree-sitter-javascript))
+ (arguments
+ (list
+ #:grammar-directories '("typescript" "tsx")))
+ (home-page "https://github.com/tree-sitter/tree-sitter-typescript")
+ (synopsis "Tree-sitter Typescript grammar")
+ (description
+ "This package provides Typescript and TSX grammars for the Tree-sitter
+library.")
+ (license license:expat)))
--
2.38.1
- [bug#49946] [PATCH v7 26/32] gnu: Add tree-sitter-rust., (continued)
- [bug#49946] [PATCH v7 26/32] gnu: Add tree-sitter-rust., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 20/32] gnu: Add tree-sitter-julia., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 24/32] gnu: Add tree-sitter-r., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 22/32] gnu: Add tree-sitter-php., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 23/32] gnu: Add tree-sitter-python., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 27/32] gnu: Add tree-sitter-typescript.,
Pierre Langlois <=
- [bug#49946] [PATCH v7 29/32] gnu: Add rust-tree-sitter-for-emacs., Pierre Langlois, 2022/11/24
- Message not available