webnsupdate/default.nix
Jalil David Salamé Messina 5cef18f07e
Some checks failed
/ build (push) Failing after 1s
/ check-integration-tests (push) Has been skipped
/ report-size (push) Has been skipped
refactor(package): share more stuff
This should hopefully speed up the nix evals
2025-07-13 19:03:37 +02:00

39 lines
903 B
Nix

let
inherit (builtins.getFlake (builtins.toString ./.)) inputs;
in
{
pkgs ? inputs.nixpkgs.legacyPackages.${builtins.currentSystem},
lib ? pkgs.lib,
crane ? inputs.crane,
craneLib ? crane.mkLib pkgs,
cargoArtifacts ? null,
src ? craneLib.cleanCargoSource ./.,
mold ? pkgs.mold,
}:
let
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 = [ mold ];
meta = {
license = lib.licenses.mit;
homepage = "https://github.com/jalil-salame/webnsupdate";
mainProgram = "webnsupdate";
};
};
in
craneLib.buildPackage (
lib.mergeAttrsList [
commonArgs
{
cargoArtifacts =
if cargoArtifacts == nul then craneLib.buildDepsOnly commonArgs else cargoArtifacts;
}
]
)