3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/rust/make-rust-platform.nix
Daniël de Kok 05e40e79a8 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`.
2021-02-16 08:09:15 +01:00

32 lines
719 B
Nix

{ buildPackages, callPackage }:
{ rustc, cargo, ... }:
rec {
rust = {
inherit rustc cargo;
};
fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
inherit cargo;
};
buildRustPackage = callPackage ../../../build-support/rust {
inherit cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook
fetchCargoTarball rustc;
};
rustcSrc = callPackage ./rust-src.nix {
inherit rustc;
};
rustLibSrc = callPackage ./rust-lib-src.nix {
inherit rustc;
};
# Hooks
inherit (callPackage ../../../build-support/rust/hooks {
inherit cargo;
}) cargoBuildHook cargoCheckHook cargoInstallHook cargoSetupHook maturinBuildHook;
}