rustPlatform: make it possible to override the profile for cargo test
This commit is contained in:
parent
5eaabaf089
commit
736462d995
@ -28,6 +28,7 @@
|
|||||||
, meta ? {}
|
, meta ? {}
|
||||||
, target ? null
|
, target ? null
|
||||||
, cargoVendorDir ? null
|
, cargoVendorDir ? null
|
||||||
|
, checkType ? buildType
|
||||||
, ... } @ args:
|
, ... } @ args:
|
||||||
|
|
||||||
assert cargoVendorDir == null -> cargoSha256 != "unset";
|
assert cargoVendorDir == null -> cargoSha256 != "unset";
|
||||||
@ -191,7 +192,7 @@ stdenv.mkDerivation (args // {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = args.checkPhase or (let
|
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 ''
|
in ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
|
echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user