Rosenthal/rosenthal/packages/tree-sitter.scm
Hilton Chain dd5d17c654
rosenthal: License compliance with REUSE.
$ reuse lint
 # SUMMARY

 * Bad licenses: 0
 * Deprecated licenses: 0
 * Licenses without file extension: 0
 * Missing licenses: 0
 * Unused licenses: 0
 * Used licenses: GPL-3.0-or-later, CC0-1.0
 * Read errors: 0
 * Files with copyright information: 25 / 25
 * Files with license information: 25 / 25

 Congratulations! Your project is compliant with version 3.3 of the REUSE Specification :-)
2025-01-19 15:36:03 +08:00

39 lines
1.3 KiB
Scheme

;; SPDX-FileCopyrightText: 2023 Hilton Chain <hako@ultrarare.space>
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
(define-module (rosenthal packages tree-sitter)
#:use-module (guix gexp)
#:use-module (guix packages))
(define tree-sitter-grammar
(@@ (gnu packages tree-sitter) tree-sitter-grammar))
(define-public tree-sitter-yaml
(let ((base
(tree-sitter-grammar
"yaml" "YAML"
"1bimf5fq85wn8dwlk665w15n2bj37fma5rsfxrph3i9yb0lvzi3q"
"0.5.0"
#:repository-url "https://github.com/ikatyang/tree-sitter-yaml"
#:get-cleanup-snippet
(lambda (grammar-directories)
#~(begin
(use-modules (guix build utils))
(delete-file-recursively "docs")
(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))))))
(package
(inherit base)
(arguments
(append '(#:tests? #f) ;FIXME
(package-arguments base))))))