mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 23:17:15 +03:00
22 lines
501 B
Nix
22 lines
501 B
Nix
{ mkCargoDerivation
|
|
, cargo-tarpaulin
|
|
}:
|
|
|
|
{ cargoExtraArgs ? ""
|
|
, cargoTarpaulinExtraArgs ? "--skip-clean --out Xml --output-dir $out"
|
|
, ...
|
|
}@origArgs:
|
|
let
|
|
args = builtins.removeAttrs origArgs [
|
|
"cargoExtraArgs"
|
|
"cargoTarpaulinExtraArgs"
|
|
];
|
|
in
|
|
mkCargoDerivation (args // {
|
|
buildPhaseCargoCommand = "cargoWithProfile tarpaulin ${cargoExtraArgs} ${cargoTarpaulinExtraArgs}";
|
|
|
|
pnameSuffix = "-tarpaulin";
|
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cargo-tarpaulin ];
|
|
})
|