crane/lib/cargoBuild.nix

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

19 lines
311 B
Nix
Raw Normal View History

2022-10-10 01:17:25 +03:00
{ mkCargoDerivation
}:
2022-10-10 01:17:25 +03:00
{ cargoArtifacts
, cargoExtraArgs ? ""
2021-12-27 05:06:19 +03:00
, ...
2022-10-10 01:17:25 +03:00
}@origArgs:
let
2022-10-10 01:17:25 +03:00
args = builtins.removeAttrs origArgs [
"cargoExtraArgs"
];
in
2022-10-10 01:17:25 +03:00
mkCargoDerivation (args // {
inherit cargoArtifacts;
2022-10-10 01:17:25 +03:00
pnameSuffix = "-build";
buildPhaseCargoCommand = "cargoWithProfile build ${cargoExtraArgs}";
})