mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-23 08:22:41 +03:00
23 lines
449 B
Nix
23 lines
449 B
Nix
|
{ mkCargoDerivation
|
||
|
}:
|
||
|
|
||
|
{ cargoArtifacts
|
||
|
, cargoExtraArgs ? ""
|
||
|
, cargoTestExtraArgs ? ""
|
||
|
, ...
|
||
|
}@origArgs:
|
||
|
let
|
||
|
args = (builtins.removeAttrs origArgs [
|
||
|
"cargoExtraArgs"
|
||
|
"cargoTestExtraArgs"
|
||
|
]);
|
||
|
in
|
||
|
mkCargoDerivation (args // {
|
||
|
inherit cargoArtifacts;
|
||
|
doCheck = args.doCheck or true;
|
||
|
|
||
|
pnameSuffix = "-test";
|
||
|
buildPhaseCargoCommand = "";
|
||
|
checkPhaseCargoCommand = "cargoWithProfile test ${cargoExtraArgs} ${cargoTestExtraArgs}";
|
||
|
})
|