diff options
author | Daniël de Kok <me@danieldk.eu> | 2021-02-15 10:26:40 +0100 |
---|---|---|
committer | Daniël de Kok <me@danieldk.eu> | 2021-02-16 08:09:15 +0100 |
commit | 05e40e79a8559cdbe323ab05e003d56033000ee8 (patch) | |
tree | c4a1ff0bca75bc2689c33a04708678b6a551cdb2 /doc/languages-frameworks | |
parent | 9757c7101a0527c001fa9e9832764d5dc106ff25 (diff) | |
download | nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.tar nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.tar.gz nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.tar.bz2 nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.tar.lz nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.tar.xz nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.tar.zst nixpkgs-05e40e79a8559cdbe323ab05e003d56033000ee8.zip |
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`.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/rust.section.md | 6 |
1 files changed, 5 insertions, 1 deletions
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`. |