summaryrefslogtreecommitdiffstats
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorMax Hausch <cheriimoya@googlemail.com>2021-02-24 09:32:22 +0100
committerMax Hausch <cheriimoya@googlemail.com>2021-03-02 09:45:26 +0100
commitebe3ae4d4d4668f3f47a30f10592714df1c9b803 (patch)
tree3281ce598e5b86c42310a5cecab7714c5800e2d9 /pkgs/build-support
parentfa62f3716077be3239765b041702ed401bc257e3 (diff)
buildRustPackage: Add cargoTestFlags
This makes it possible to pass flags to `cargo test`, which is needed if a crate is compiled with custom feature flags.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/rust/hooks/cargo-check-hook.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/rust/hooks/cargo-check-hook.sh b/pkgs/build-support/rust/hooks/cargo-check-hook.sh
index 82e669af3a08..bc913c6ab074 100644
--- a/pkgs/build-support/rust/hooks/cargo-check-hook.sh
+++ b/pkgs/build-support/rust/hooks/cargo-check-hook.sh
@@ -1,4 +1,5 @@
declare -a checkFlags
+declare -a cargoTestFlags
cargoCheckHook() {
echo "Executing cargoCheckHook"
@@ -15,7 +16,7 @@ cargoCheckHook() {
threads=1
fi
- argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen";
+ argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
(
set -x