2022-01-17 05:16:21 +03:00
|
|
|
{ buildDepsOnly
|
|
|
|
, cargoBuild
|
|
|
|
, cargo-tarpaulin
|
|
|
|
}:
|
|
|
|
|
|
|
|
{ cargoExtraArgs ? ""
|
|
|
|
, cargoTarpaulinExtraArgs ? "--skip-clean --out Xml --output-dir $out"
|
|
|
|
, ...
|
|
|
|
}@origArgs:
|
|
|
|
let
|
|
|
|
args = builtins.removeAttrs origArgs [ "cargoTarpaulinExtraArgs" ];
|
|
|
|
in
|
|
|
|
cargoBuild (args // {
|
|
|
|
cargoArtifacts = args.cargoArtifacts or (buildDepsOnly args);
|
2022-07-23 21:10:45 +03:00
|
|
|
cargoBuildCommand = "cargoWithProfile tarpaulin";
|
2022-01-17 05:16:21 +03:00
|
|
|
cargoExtraArgs = "${cargoExtraArgs} ${cargoTarpaulinExtraArgs}";
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
pnameSuffix = "-tarpaulin";
|
|
|
|
|
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cargo-tarpaulin ];
|
|
|
|
})
|