mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-23 08:22:41 +03:00
23 lines
576 B
Nix
23 lines
576 B
Nix
{ 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);
|
|
cargoBuildCommand = "cargoWithProfile tarpaulin";
|
|
cargoExtraArgs = "${cargoExtraArgs} ${cargoTarpaulinExtraArgs}";
|
|
|
|
doCheck = false;
|
|
pnameSuffix = "-tarpaulin";
|
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cargo-tarpaulin ];
|
|
})
|