Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
testers,
|
|
runitor,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "runitor";
|
|
version = "1.4.1";
|
|
vendorHash = "sha256-SYYAAtuWt/mTmZPBilYxf2uZ6OcgeTnobYiye47i8mI=";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdd";
|
|
repo = "runitor";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-y4wIfal8aiVD5ZoRF6GnYUGRssBLMOPSWa40+3OU4y0=";
|
|
};
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=v${version}"
|
|
];
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = runitor;
|
|
command = "runitor -version";
|
|
version = "v${version}";
|
|
};
|
|
|
|
# Unit tests require binding to local addresses for listening sockets.
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://bdd.fi/x/runitor";
|
|
description = "Command runner with healthchecks.io integration";
|
|
longDescription = ''
|
|
Runitor runs the supplied command, captures its output, and based on its exit
|
|
code reports successful or failed execution to https://healthchecks.io or your
|
|
private instance.
|
|
|
|
Healthchecks.io is a web service for monitoring periodic tasks. It's like a
|
|
dead man's switch for your cron jobs. You get alerted if they don't run on time
|
|
or terminate with a failure.
|
|
'';
|
|
license = licenses.bsd0;
|
|
maintainers = with maintainers; [ bdd ];
|
|
mainProgram = "runitor";
|
|
};
|
|
}
|