aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/tree-sitter.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/tree-sitter.scm')
-rw-r--r--gnu/packages/tree-sitter.scm24
1 files changed, 21 insertions, 3 deletions
diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index dcb3d5506e..51afe91631 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -317,11 +317,29 @@ which will be used as a snippet in origin."
"0.19.0"))
(define-public tree-sitter-javascript
+ ;; Commit required by tree-sitter-typescript 0.20.3.
+ (let ((commit "f772967f7b7bc7c28f845be2420a38472b16a8ee")
+ (revision "22"))
(tree-sitter-grammar
"javascript" "JavaScript(JSX)"
- "175yrk382n2di0c2xn4gpv8y4n83x1lg4hqn04vabf0yqynlkq67"
- "0.20.0"
- #:commit "rust-0.20.0"))
+ "0vp7z57scpbcvyxpya06lnpz9f5kjdb66wjlkrp684xwjjgq1wxd"
+ (git-version "0.20.0" revision commit)
+ #:commit commit
+ #:get-cleanup-snippet
+ (lambda (grammar-directories)
+ #~(begin
+ (use-modules (guix build utils))
+ (delete-file "tree-sitter-javascript.wasm")
+ (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")))
+ '#$grammar-directories))))))
(define-public tree-sitter-typescript
(tree-sitter-grammar