mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 04:24:28 +03:00
buildRustPackage: use checkType argument
The `checkType` argument of buildRustPackage was not used anymore since the refactoring of `buildRustPackage` into hooks. This was an oversight that is fixed by this change. The check type can also be passed directly to cargoCheckHook using the `cargoCheckType` environment variable.
This commit is contained in:
parent
10f6849376
commit
c50a347cb5
@ -320,9 +320,10 @@ attributes can also be used:
|
|||||||
variable `buildAndTestSubdir` can be used to build a crate in a
|
variable `buildAndTestSubdir` can be used to build a crate in a
|
||||||
Cargo workspace. Additional maturin flags can be passed through
|
Cargo workspace. Additional maturin flags can be passed through
|
||||||
`maturinBuildFlags`.
|
`maturinBuildFlags`.
|
||||||
* `cargoCheckHook`: run tests using Cargo. Additional flags can be
|
* `cargoCheckHook`: run tests using Cargo. The build type for checks
|
||||||
passed to Cargo using `checkFlags` and `checkFlagsArray`. By
|
can be set using `cargoCheckType`. Additional flags can be passed to
|
||||||
default, tests are run in parallel. This can be disabled by setting
|
the tests using `checkFlags` and `checkFlagsArray`. By default,
|
||||||
|
tests are run in parallel. This can be disabled by setting
|
||||||
`dontUseCargoParallelTests`.
|
`dontUseCargoParallelTests`.
|
||||||
* `cargoInstallHook`: install binaries and static/shared libraries
|
* `cargoInstallHook`: install binaries and static/shared libraries
|
||||||
that were built using `cargoBuildHook`.
|
that were built using `cargoBuildHook`.
|
||||||
|
@ -103,6 +103,8 @@ stdenv.mkDerivation ((removeAttrs args ["depsExtraArgs"]) // lib.optionalAttrs u
|
|||||||
|
|
||||||
cargoBuildType = buildType;
|
cargoBuildType = buildType;
|
||||||
|
|
||||||
|
cargoCheckType = checkType;
|
||||||
|
|
||||||
patchRegistryDeps = ./patch-registry-deps;
|
patchRegistryDeps = ./patch-registry-deps;
|
||||||
|
|
||||||
nativeBuildInputs = nativeBuildInputs ++ [
|
nativeBuildInputs = nativeBuildInputs ++ [
|
||||||
|
@ -15,7 +15,7 @@ cargoCheckHook() {
|
|||||||
threads=1
|
threads=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
argstr="--${cargoBuildType} --target @rustTargetPlatformSpec@ --frozen";
|
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen";
|
||||||
|
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
|
Loading…
Reference in New Issue
Block a user