summary refs log tree commit diff
path: root/manifest.scm
blob: 4ce920db91af5999dbbaeb277c2bf3dba297526b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;;; Guix shell manifest
;;; SPDX-FileCopyrightText: 2025 Nguyễn Gia Phong
;;; SPDX-License-Identifier: GPL-3.0-or-later

(use-modules (ice-9 textual-ports))

(define (read-file path)
  (call-with-input-file path
    (lambda (port) (get-string-all port))))

(define (read-lines path)
  (filter (compose not string-null?)
          (string-split (read-file path)
                        #\newline)))

(define (_->- char)
  (if (eqv? char #\_)
      #\-
      char))

(let ((tree-sitter-grammars
       (map (lambda (language)
              (string-append "tree-sitter-" (string-map _->- language)))
            (read-lines "src/supported-languages"))))
  (specifications->manifest (cons* "zig" "janet" tree-sitter-grammars)))