From 05e40e79a8559cdbe323ab05e003d56033000ee8 Mon Sep 17 00:00:00 2001 From: Daniƫl de Kok Date: Mon, 15 Feb 2021 10:26:40 +0100 Subject: buildRustPackage: factor out check phase to cargoCheckHook API change: `cargoParallelTestThreads` suggests that this attribute sets the number of threads used during tests, while it is actually a boolean option (use 1 thread or NIX_BUILD_CORES threads). In the hook, this is replaced by a more canonical name `dontUseCargoParallelTests`. --- doc/languages-frameworks/rust.section.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 8451c126410..2290d92f7ad 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -196,7 +196,7 @@ sometimes it may be necessary to disable this so the tests run consecutively. ```nix rustPlatform.buildRustPackage { /* ... */ - cargoParallelTestThreads = false; + dontUseCargoParallelTests = true; } ``` @@ -293,6 +293,10 @@ attributes can also be used: variable `buildAndTestSubdir` can be used to build a crate in a Cargo workspace. Additional maturin flags can be passed through `maturinBuildFlags`. +* `cargoCheckHook`: run tests using Cargo. Additional flags can be + passed to Cargo using `checkFlags` and `checkFlagsArray`. By + default, tests are run in parallel. This can be disabled by setting + `dontUseCargoParallelTests`. * `cargoInstallHook`: install binaries and static/shared libraries that were built using `cargoBuildHook`. -- cgit 1.4.1