crane/lib/cargoBuild.nix
2022-10-09 12:56:21 -10:00

19 lines
311 B
Nix

{ mkCargoDerivation
}:
{ cargoArtifacts
, cargoExtraArgs ? ""
, ...
}@origArgs:
let
args = builtins.removeAttrs origArgs [
"cargoExtraArgs"
];
in
mkCargoDerivation (args // {
inherit cargoArtifacts;
pnameSuffix = "-build";
buildPhaseCargoCommand = "cargoWithProfile build ${cargoExtraArgs}";
})