diff --git a/pkgs/build-support/rust/hooks/cargo-check-hook.sh b/pkgs/build-support/rust/hooks/cargo-check-hook.sh index 07eae85d13ee..965e2b451447 100644 --- a/pkgs/build-support/rust/hooks/cargo-check-hook.sh +++ b/pkgs/build-support/rust/hooks/cargo-check-hook.sh @@ -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 diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix index 874f23fe7ed3..01c7ef81cb56 100644 --- a/pkgs/build-support/rust/hooks/default.nix +++ b/pkgs/build-support/rust/hooks/default.nix @@ -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) {};