rustPlatform: cargo test is now called with the same environment variables as cargo build

this means that cargo dependancies will no longer be built twice.
This commit is contained in:
binarycat 2024-03-08 22:12:51 -05:00 committed by Alyssa Ross
parent 4b2bd47103
commit 683f97e378
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ cargoCheckHook() {
concatTo flagsArray cargoTestFlags checkFlags checkFlagsArray
echoCmd 'cargoCheckHook flags' "${flagsArray[@]}"
cargo test "${flagsArray[@]}"
@setEnv@ cargo test "${flagsArray[@]}"
if [[ -n "${buildAndTestSubdir-}" ]]; then
popd

View File

@ -31,7 +31,7 @@
name = "cargo-check-hook.sh";
propagatedBuildInputs = [ cargo ];
substitutions = {
inherit (rust.envVars) rustHostPlatformSpec;
inherit (rust.envVars) rustHostPlatformSpec setEnv;
};
} ./cargo-check-hook.sh) {};