[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/276: gnu: rust: Build more tools.
From: |
guix-commits |
Subject: |
08/276: gnu: rust: Build more tools. |
Date: |
Wed, 18 Oct 2023 04:48:48 -0400 (EDT) |
efraim pushed a commit to branch rust-team
in repository guix.
commit df93d8a9f85be9ad4902711afca432ae6396087c
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Oct 1 10:49:07 2023 +0300
gnu: rust: Build more tools.
* gnu/packages/rust.scm (rust)[outputs]: Rename 'rustfmt' output to
'tools'.
[arguments]: Adjust 'build, 'check and 'install phases to also provide
clippy and rust-analyzer.
---
gnu/packages/rust.scm | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 6ee57ac21f..34511f283e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -760,7 +760,7 @@ safety and thread safety guarantees.")
(let ((base-rust rust-1.70))
(package
(inherit base-rust)
- (outputs (cons "rustfmt" (package-outputs base-rust)))
+ (outputs (cons "tools" (package-outputs base-rust)))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:tests? _ #f)
@@ -878,18 +878,20 @@ safety and thread safety guarantees.")
(string-append all
"gdb = \"" gdb "/bin/gdb\"\n"))))))
(replace 'build
- ;; Phase overridden to also build rustfmt.
+ ;; Phase overridden to also build more tools.
(lambda* (#:key parallel-build? #:allow-other-keys)
(let ((job-spec (string-append
"-j" (if parallel-build?
(number->string
(parallel-job-count))
"1"))))
(invoke "./x.py" job-spec "build"
- "library/std" ;rustc
+ "library/std" ;rustc
"src/tools/cargo"
+ "src/tools/clippy"
+ "src/tools/rust-analyzer"
"src/tools/rustfmt"))))
(replace 'check
- ;; Phase overridden to also test rustfmt.
+ ;; Phase overridden to also test more tools.
(lambda* (#:key tests? parallel-build? #:allow-other-keys)
(when tests?
(let ((job-spec (string-append
@@ -899,9 +901,11 @@ safety and thread safety guarantees.")
(invoke "./x.py" job-spec "test" "-vv"
"library/std"
"src/tools/cargo"
+ "src/tools/clippy"
+ "src/tools/rust-analyzer"
"src/tools/rustfmt")))))
(replace 'install
- ;; Phase overridden to also install rustfmt.
+ ;; Phase overridden to also install more tools.
(lambda* (#:key outputs #:allow-other-keys)
(invoke "./x.py" "install")
(substitute* "config.toml"
@@ -910,9 +914,11 @@ safety and thread safety guarantees.")
(format #f "prefix = ~s" (assoc-ref outputs "cargo"))))
(invoke "./x.py" "install" "cargo")
(substitute* "config.toml"
- ;; Adjust the prefix to the 'rustfmt' output.
+ ;; Adjust the prefix to the 'tools' output.
(("prefix = \"[^\"]*\"")
- (format #f "prefix = ~s" (assoc-ref outputs "rustfmt"))))
+ (format #f "prefix = ~s" (assoc-ref outputs "tools"))))
+ (invoke "./x.py" "install" "clippy")
+ (invoke "./x.py" "install" "rust-analyzer")
(invoke "./x.py" "install" "rustfmt")))))))
;; Add test inputs.
(native-inputs (cons* `("gdb" ,gdb/pinned)
- branch rust-team created (now 003dc790fd), guix-commits, 2023/10/18
- 05/276: gnu: rust-rustix-0.37: Remove precompiled files., guix-commits, 2023/10/18
- 08/276: gnu: rust: Build more tools.,
guix-commits <=
- 10/276: gnu: Add rust-cairo-sys-rs-0.17., guix-commits, 2023/10/18
- 12/276: gnu: Add rust-gdk-pixbuf-sys-0.17., guix-commits, 2023/10/18
- 01/276: gnu: Add rust-1.69., guix-commits, 2023/10/18
- 04/276: gnu: rust: Update to 1.70.0., guix-commits, 2023/10/18
- 18/276: gnu: Add rust-cssparser-0.29., guix-commits, 2023/10/18
- 20/276: gnu: Add rust-cuda-std-0.2., guix-commits, 2023/10/18
- 21/276: gnu: Add rust-cust-derive-0.2., guix-commits, 2023/10/18
- 11/276: gnu: Add rust-gdk-pixbuf-0.17., guix-commits, 2023/10/18
- 03/276: gnu: rust: Add make-ignore-test-list function., guix-commits, 2023/10/18
- 06/276: build: cargo-build-system: Check for pregenerated files., guix-commits, 2023/10/18