rustPlatform: make it possible to override the profile for `cargo test`

wip/yesman
Maximilian Bosch 4 years ago
parent 5eaabaf089
commit 736462d995
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
  1. 3
      pkgs/build-support/rust/default.nix

@ -28,6 +28,7 @@
, meta ? {}
, target ? null
, cargoVendorDir ? null
, checkType ? buildType
, ... } @ args:
assert cargoVendorDir == null -> cargoSha256 != "unset";
@ -191,7 +192,7 @@ stdenv.mkDerivation (args // {
'';
checkPhase = args.checkPhase or (let
argstr = "${stdenv.lib.optionalString (buildType == "release") "--release"} --target ${rustTarget} --frozen";
argstr = "${stdenv.lib.optionalString (checkType == "release") "--release"} --target ${rustTarget} --frozen";
in ''
runHook preCheck
echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"

Loading…
Cancel
Save