2025-01-10 23:39:46 +01:00
|
|
|
{ inputs, ... }:
|
2024-10-26 13:23:22 +02:00
|
|
|
{
|
2025-01-10 23:39:46 +01:00
|
|
|
flake.overlays.default = final: prev: {
|
|
|
|
webnsupdate = prev.callPackage ../default.nix {
|
|
|
|
inherit (inputs) crane;
|
|
|
|
pkgSrc = inputs.self;
|
|
|
|
};
|
|
|
|
};
|
2024-10-28 22:37:24 +01:00
|
|
|
|
2024-10-26 13:23:22 +02:00
|
|
|
perSystem =
|
2024-10-28 22:37:24 +01:00
|
|
|
{ pkgs, lib, ... }:
|
2024-10-28 21:50:33 +01:00
|
|
|
let
|
|
|
|
craneLib = inputs.crane.mkLib pkgs;
|
|
|
|
src = craneLib.cleanCargoSource inputs.self;
|
|
|
|
|
|
|
|
commonArgs = {
|
|
|
|
inherit src;
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
doCheck = false; # tests will be run in the `checks` derivation
|
|
|
|
NEXTEST_HIDE_PROGRESS_BAR = 1;
|
|
|
|
NEXTEST_FAILURE_OUTPUT = "immediate-final";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgs.mold ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
homepage = "https://github.com/jalil-salame/webnsupdate";
|
|
|
|
mainProgram = "webnsupdate";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
2025-01-10 23:39:46 +01:00
|
|
|
withArtifacts = lib.mergeAttrsList [
|
|
|
|
commonArgs
|
|
|
|
{ inherit cargoArtifacts; }
|
|
|
|
];
|
|
|
|
webnsupdate = pkgs.callPackage ../default.nix {
|
|
|
|
inherit (inputs) crane;
|
|
|
|
pkgSrc = inputs.self;
|
|
|
|
};
|
2024-10-28 21:50:33 +01:00
|
|
|
in
|
2024-10-26 13:23:22 +02:00
|
|
|
{
|
2024-10-28 21:50:33 +01:00
|
|
|
checks = {
|
2025-01-10 23:39:46 +01:00
|
|
|
nextest = craneLib.cargoNextest withArtifacts;
|
2024-10-28 21:50:33 +01:00
|
|
|
clippy = craneLib.cargoClippy (
|
|
|
|
lib.mergeAttrsList [
|
2025-01-10 23:39:46 +01:00
|
|
|
withArtifacts
|
|
|
|
{ cargoClippyExtraArgs = "--all-targets -- --deny warnings"; }
|
2024-10-28 21:50:33 +01:00
|
|
|
]
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
packages = {
|
|
|
|
inherit webnsupdate;
|
2024-12-22 12:47:55 +01:00
|
|
|
inherit (pkgs) git-cliff;
|
2024-10-28 21:50:33 +01:00
|
|
|
default = webnsupdate;
|
|
|
|
};
|
2024-10-26 13:23:22 +02:00
|
|
|
};
|
|
|
|
}
|