efraim pushed a commit to branch rust-team
in repository guix.
commit faee56da6fe69f3c3b1fb45daa8b56d7272bfc64
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Nov 28 13:43:09 2024 +0900
gnu: Add rust-libcst-1.
* gnu/packages/crates-io.scm (rust-libcst-1): New variable.
Change-Id: Ief66cbaf06a00ada6c2b497352c6143dd874cc32
Signed-off-by: Efraim Flashner <[email protected]>
---
gnu/packages/crates-io.scm | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 374f67a3ba..26dbcdf68e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -12,7 +12,7 @@
;;; Copyright © 2020 André Batista <[email protected]>
;;; Copyright © 2020 Arun Isaac <[email protected]>
;;; Copyright © 2020 Antoine Côté <[email protected]>
-;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
+;;; Copyright © 2021-2024 Maxim Cournoyer <[email protected]>
;;; Copyright © 2021 aecepoglu <[email protected]>
;;; Copyright © 2021, 2022 Zheng Junjie <[email protected]>
;;; Copyright © 2021 Alexandru-Sergiu Marton <[email protected]>
@@ -39802,6 +39802,47 @@ values of all the exported APIs match the platform
that libc is compiled for.")
macros on libc without stdlib.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-libcst-1
+ (package
+ (name "rust-libcst")
+ (version "1.5.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "libcst" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0xdh02bz1gm9hlpz02r7mk90zk3ki74pypsama33vflck9bn0gps"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-test-flags
+ (list "--release" "--"
+ ;; The roundtrip_fixtures fail due to a missing file in the crate
+ ;; (see: https://github.com/Instagram/LibCST/issues/1249).
+ "--skip=roundtrip_fixtures")
+ #:cargo-inputs (("rust-chic" ,rust-chic-1)
+ ("rust-libcst-derive" ,rust-libcst-derive-1)
+ ("rust-memchr" ,rust-memchr-2)
+ ("rust-paste" ,rust-paste-1)
+ ("rust-peg" ,rust-peg-0.8)
+ ("rust-pyo3" ,rust-pyo3-0.20)
+ ("rust-regex" ,rust-regex-1)
+ ("rust-thiserror" ,rust-thiserror-1))
+ #:cargo-development-inputs (("rust-criterion" ,rust-criterion-0.5)
+ ("rust-difference" ,rust-difference-2)
+ ("rust-itertools" ,rust-itertools-0.13)
+ ("rust-rayon" ,rust-rayon-1))
+ #:phases (modify-phases %standard-phases
+ ;; Avoid keeping a reference to python-minimal in a test
+ ;; file installed as source.
+ (delete 'patch-source-shebangs))))
+ (native-inputs (list python-minimal))
+ (home-page "https://github.com/Instagram/LibCST")
+ (synopsis "Python parser and Concrete Syntax Tree library.")
+ (description
+ "This package provides a Python parser and Concrete Syntax Tree library.")
+ (license (list license:expat license:psfl))))
+
(define-public rust-libcst-derive-1
(package
(name "rust-libcst-derive")