2022-10-24 02:20:22 +03:00
|
|
|
{ mkCargoDerivation
|
2022-01-17 05:16:21 +03:00
|
|
|
, cargo-tarpaulin
|
|
|
|
}:
|
|
|
|
|
2022-10-24 02:20:22 +03:00
|
|
|
{ cargoExtraArgs ? ""
|
2022-01-17 05:16:21 +03:00
|
|
|
, cargoTarpaulinExtraArgs ? "--skip-clean --out Xml --output-dir $out"
|
|
|
|
, ...
|
|
|
|
}@origArgs:
|
|
|
|
let
|
2022-10-09 21:58:21 +03:00
|
|
|
args = builtins.removeAttrs origArgs [
|
|
|
|
"cargoExtraArgs"
|
|
|
|
"cargoTarpaulinExtraArgs"
|
|
|
|
];
|
2022-01-17 05:16:21 +03:00
|
|
|
in
|
2022-10-09 21:58:21 +03:00
|
|
|
mkCargoDerivation (args // {
|
|
|
|
buildPhaseCargoCommand = "cargoWithProfile tarpaulin ${cargoExtraArgs} ${cargoTarpaulinExtraArgs}";
|
2022-01-17 05:16:21 +03:00
|
|
|
|
|
|
|
pnameSuffix = "-tarpaulin";
|
|
|
|
|
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cargo-tarpaulin ];
|
|
|
|
})
|