2022-06-29 21:40:11 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, testers, runitor }:
|
2022-04-27 01:33:53 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "runitor";
|
2024-05-11 14:57:42 +00:00
|
|
|
version = "1.3.0";
|
2023-09-21 17:11:11 +00:00
|
|
|
vendorHash = null;
|
2022-04-27 01:33:53 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdd";
|
|
|
|
repo = "runitor";
|
|
|
|
rev = "v${version}";
|
2024-05-11 14:57:42 +00:00
|
|
|
sha256 = "sha256-9sg+ku3Qh/X/EZ2VCrvIc0pq5iyn4O8RZrO4KpkciAI=";
|
2022-04-27 01:33:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ldflags = [
|
2022-06-07 00:57:47 +00:00
|
|
|
"-s" "-w" "-X main.Version=v${version}"
|
2022-06-02 18:14:30 +00:00
|
|
|
];
|
2022-04-27 01:33:53 +00:00
|
|
|
|
|
|
|
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 ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "runitor";
|
2022-04-27 01:33:53 +00:00
|
|
|
};
|
|
|
|
}
|