From 17b7c38e7b9e546a9fb7d379c03f182cef2cfa05 Mon Sep 17 00:00:00 2001 From: Evgenii Lepikhin Date: Thu, 28 Sep 2023 06:24:48 +0300 Subject: feat: [WIP] add clippy --- johnlepikhin/devel/rust.scm | 2 +- johnlepikhin/packages/rust.scm | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/johnlepikhin/devel/rust.scm b/johnlepikhin/devel/rust.scm index 8de8b9b..efd81cd 100644 --- a/johnlepikhin/devel/rust.scm +++ b/johnlepikhin/devel/rust.scm @@ -40,7 +40,7 @@ (list clang openssl-1.1 - (rust-cargo-0.69 "rustfmt" "cargo") + (list rust-cargo-0.69 "rustfmt" "cargo") (home-devel-rust-configuration-package config))) (define (add-env-variables config) diff --git a/johnlepikhin/packages/rust.scm b/johnlepikhin/packages/rust.scm index 7df1a03..0267569 100644 --- a/johnlepikhin/packages/rust.scm +++ b/johnlepikhin/packages/rust.scm @@ -787,7 +787,7 @@ safety and thread safety guarantees.") (package (inherit base-rust) (name "rust-next") - (outputs (cons "rustfmt" (package-outputs base-rust))) + (outputs (append (list "rustfmt" "cargo" "clippy") (package-outputs base-rust))) (arguments (substitute-keyword-arguments (package-arguments base-rust) ((#:tests? _ #f) @@ -955,6 +955,7 @@ safety and thread safety guarantees.") (invoke "./x.py" job-spec "build" "library/std" ;rustc "src/tools/cargo" + "src/tools/clippy" "src/tools/rustfmt")))) (replace 'check ;; Phase overridden to also test rustfmt. @@ -967,6 +968,7 @@ safety and thread safety guarantees.") (invoke "./x.py" job-spec "test" "-vv" "library/std" "src/tools/cargo" + "src/tools/clippy" "src/tools/rustfmt"))))) (replace 'install ;; Phase overridden to also install rustfmt. @@ -977,6 +979,11 @@ safety and thread safety guarantees.") (("prefix = \"[^\"]*\"") (format #f "prefix = ~s" (assoc-ref outputs "cargo")))) (invoke "./x.py" "install" "cargo") + (substitute* "config.toml" + ;; Adjust the prefix to the 'clippy' output. + (("prefix = \"[^\"]*\"") + (format #f "prefix = ~s" (assoc-ref outputs "clippy")))) + (invoke "./x.py" "install" "clippy") (substitute* "config.toml" ;; Adjust the prefix to the 'rustfmt' output. (("prefix = \"[^\"]*\"") -- cgit v1.3