mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-22 23:17:15 +03:00
24 lines
484 B
Nix
24 lines
484 B
Nix
{ clippy
|
|
, mkCargoDerivation
|
|
}:
|
|
|
|
{ cargoArtifacts
|
|
, cargoClippyExtraArgs ? "--all-targets"
|
|
, cargoExtraArgs ? ""
|
|
, ...
|
|
}@origArgs:
|
|
let
|
|
args = builtins.removeAttrs origArgs [
|
|
"cargoClippyExtraArgs"
|
|
"cargoExtraArgs"
|
|
];
|
|
in
|
|
mkCargoDerivation (args // {
|
|
inherit cargoArtifacts;
|
|
pnameSuffix = "-clippy";
|
|
|
|
buildPhaseCargoCommand = "cargoWithProfile clippy ${cargoExtraArgs} ${cargoClippyExtraArgs}";
|
|
|
|
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ clippy ];
|
|
})
|