Commit 683f97e3 authored by binarycat's avatar binarycat Committed by Alyssa Ross
Browse files

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.
parent 4b2bd471
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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) {};