[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49946] [PATCH v7 05/32] gnu: Add tree-sitter-cli.
From: |
( |
Subject: |
[bug#49946] [PATCH v7 05/32] gnu: Add tree-sitter-cli. |
Date: |
Fri, 25 Nov 2022 06:52:59 +0000 |
On Fri Nov 25, 2022 at 1:21 AM GMT, Pierre Langlois wrote:
> * gnu/packages/tree-sitter.scm (tree-sitter-cli): New variable.
> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm
> @@ -76,3 +79,80 @@ (define-public tree-sitter
> + (snippet
> + '(begin
Please use a gexp here.
> + (with-output-to-file "lib/binding_rust/build.rs"
> + (lambda _
> + (format #t "fn main() {~@
> +
> println!(\"cargo:rustc-link-lib=tree-sitter\");~@
> + }~%")))
> + #t))))
The #T is redundant.
> + (arguments
> + `(;; Running test requires downloading fixtures, see the
Please use LIST.
> + ;; script/fetch-fixtures script.
> + #:tests? #f
Couldn't we fetch the fixtures ourselves with a secondary origin,
like I did here?
<https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/golang.scm#n10561>
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'delete-cargo.lock
> + (lambda _ (delete-file "Cargo.lock")))
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (lib (string-append out "/lib")))
> + (mkdir-p bin)
> + (install-file "target/release/tree-sitter" bin)))))))
Update this to modern Guix style, please:
#~(modify-phases %standard-phases
(add-after 'unpack 'delete-cargo-lock
(lambda _
(delete-file "Cargo.lock")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append #$output "/bin")))
(mkdir-p bin)
(install-file "target/release/tree-sitter" bin)))))
-- (
- [bug#49946] [PATCH v7 03/32] gnu: Add rust-html-escape., (continued)
- [bug#49946] [PATCH v7 08/32] gnu: Add tree-sitter-cpp., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 10/32] gnu: Add tree-sitter-css., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 07/32] gnu: Add tree-sitter-c., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 05/32] gnu: Add tree-sitter-cli., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 05/32] gnu: Add tree-sitter-cli.,
( <=
- [bug#49946] [PATCH v7 13/32] gnu: Add tree-sitter-elm., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 14/32] gnu: Add tree-sitter-go., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 15/32] gnu: Add tree-sitter-haskell., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 11/32] gnu: Add tree-sitter-c-sharp., Pierre Langlois, 2022/11/24
- [bug#49946] [PATCH v7 12/32] gnu: Add tree-sitter-elixir., Pierre Langlois, 2022/11/24