Merge pull request #114455 from danieldk/cargo-check-flags

buildRustPackage: use checkType argument
This commit is contained in:
Jörg Thalheim 2021-02-28 23:12:24 +00:00 committed by GitHub
commit 58aa8e36e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -320,9 +320,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
* `cargoCheckHook`: run tests using Cargo. The build type for checks
can be set using `cargoCheckType`. Additional flags can be passed to
the tests 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`.

View File

@ -103,6 +103,8 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // lib.optionalAttrs u
cargoBuildType = buildType;
cargoCheckType = checkType;
patchRegistryDeps = ./patch-registry-deps;
nativeBuildInputs = nativeBuildInputs ++ [

View File

@ -15,7 +15,7 @@ cargoCheckHook() {
threads=1
fi
argstr="--${cargoBuildType} --target @rustTargetPlatformSpec@ --frozen";
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen";
(
set -x