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`.
This commit is contained in:
Daniël de Kok
2021-02-15 10:26:40 +01:00
parent 9757c7101a
commit 05e40e79a8
7 changed files with 66 additions and 21 deletions

View File

@@ -12,7 +12,8 @@ rec {
};
buildRustPackage = callPackage ../../../build-support/rust {
inherit rustc cargo cargoBuildHook cargoInstallHook cargoSetupHook fetchCargoTarball;
inherit cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
fetchCargoTarball rustc;
};
rustcSrc = callPackage ./rust-src.nix {
@@ -26,5 +27,5 @@ rec {
# Hooks
inherit (callPackage ../../../build-support/rust/hooks {
inherit cargo;
}) cargoBuildHook cargoInstallHook cargoSetupHook maturinBuildHook;
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
}