depot/third_party/nixpkgs/pkgs/tools/system/runitor/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

43 lines
1.2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, runitor }:
buildGoModule rec {
pname = "runitor";
version = "1.2.0";
vendorHash = null;
src = fetchFromGitHub {
owner = "bdd";
repo = "runitor";
rev = "v${version}";
sha256 = "sha256-lL9yfiqPIIfEvjiWcG6e1NrURHJFdk4x/od/w7/i2DE=";
};
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 = "A 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 ];
};
}