crane/lib/cargoDoc.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
353 B
Nix
Raw Normal View History

{ mkCargoDerivation
}:
2022-10-24 02:20:22 +03:00
{ cargoDocExtraArgs ? "--no-deps"
, cargoExtraArgs ? "--locked"
, ...
}@origArgs:
let
args = (builtins.removeAttrs origArgs [
"cargoDocExtraArgs"
"cargoExtraArgs"
]);
in
mkCargoDerivation (args // {
pnameSuffix = "-doc";
buildPhaseCargoCommand = "cargoWithProfile doc ${cargoExtraArgs} ${cargoDocExtraArgs}";
})