mirror of
https://github.com/nix-community/noogle.git
synced 2024-09-19 05:07:19 +03:00
34 lines
945 B
Nix
34 lines
945 B
Nix
|
{ inputs, ... }: {
|
||
|
perSystem = { self', inputs', pkgs, system, ... }:
|
||
|
let
|
||
|
craneLib = inputs.crane.lib.${system};
|
||
|
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
||
|
|
||
|
commonArgs = {
|
||
|
inherit src;
|
||
|
strictDeps = true;
|
||
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||
|
};
|
||
|
|
||
|
pesto = craneLib.buildPackage commonArgs;
|
||
|
checks = {
|
||
|
inherit pesto;
|
||
|
pestoClippy = craneLib.cargoClippy (commonArgs // {
|
||
|
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||
|
});
|
||
|
pestoFmt = craneLib.cargoFmt { inherit src; };
|
||
|
pesto-nextest = craneLib.cargoNextest (commonArgs // {
|
||
|
partitions = 1;
|
||
|
partitionType = "count";
|
||
|
});
|
||
|
};
|
||
|
in {
|
||
|
packages = { inherit pesto; };
|
||
|
inherit checks;
|
||
|
devShells.pesto = craneLib.devShell {
|
||
|
# Inherit inputs from checks.
|
||
|
inherit checks;
|
||
|
};
|
||
|
};
|
||
|
}
|