git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #170566 from bdd/pkg/new/runitor
dc99b0dGraham Christensen
maintainers/maintainer-list.nix+6
@@ -1409,6 +1409,12 @@
1409 githubId = 164148;
1409 githubId = 164148;
1410 name = "Ben Darwin";
1410 name = "Ben Darwin";
1411 };
1411 };
1412+ bdd = {
1413+ email = "bdd@mindcast.org";
1414+ github = "bdd";
1415+ githubId = 11135;
1416+ name = "Berk D. Demir";
1417+ };
1412 bdesham = {
1418 bdesham = {
1413 email = "benjamin@esham.io";
1419 email = "benjamin@esham.io";
1414 github = "bdesham";
1420 github = "bdesham";
pkgs/tools/system/runitor/default.nixnew file+52
@@ -0,0 +1,52 @@
1+{ lib, buildGoModule, fetchFromGitHub, testers, runitor }:
2+
3+buildGoModule rec {
4+ pname = "runitor";
5+ version = "0.9.2";
6+ vendorSha256 = null;
7+
8+ src = fetchFromGitHub {
9+ owner = "bdd";
10+ repo = "runitor";
11+ rev = "v${version}";
12+ sha256 = "sha256-LuCxn4j0MlnJjSh3d18YNzNrtbqtMPxgkZttqKUGJd4";
13+ };
14+
15+ ldflags = [
16+ "-s" "-w" "-X main.Version=v${version}"
17+ ];
18+
19+ # TODO(cole-h):
20+ # End-to-end tests requiring localhost networking currently under
21+ # OfBorg's Linux builders, while passing under Darwin.
22+ #
23+ # Ref: https://github.com/NixOS/nixpkgs/pull/170566#issuecomment-1114034891
24+ #
25+ # Temporarily disable tests.
26+ doCheck = false;
27+
28+ passthru.tests.version = testers.testVersion {
29+ package = runitor;
30+ command = "runitor -version";
31+ version = "v${version}";
32+ };
33+
34+ # Unit tests require binding to local addresses for listening sockets.
35+ __darwinAllowLocalNetworking = true;
36+
37+ meta = with lib; {
38+ homepage = "https://bdd.fi/x/runitor";
39+ description = "A command runner with healthchecks.io integration";
40+ longDescription = ''
41+ Runitor runs the supplied command, captures its output, and based on its exit
42+ code reports successful or failed execution to https://healthchecks.io or your
43+ private instance.
44+
45+ Healthchecks.io is a web service for monitoring periodic tasks. It's like a
46+ dead man's switch for your cron jobs. You get alerted if they don't run on time
47+ or terminate with a failure.
48+ '';
49+ license = licenses.bsd0;
50+ maintainers = with maintainers; [ bdd ];
51+ };
52+}
pkgs/top-level/all-packages.nix+2
@@ -34473,6 +34473,8 @@ with pkgs;
34473
34473
34474 runit = callPackage ../tools/system/runit { };
34474 runit = callPackage ../tools/system/runit { };
34475
34475
34476+ runitor = callPackage ../tools/system/runitor { };
34477+
34476 refind = callPackage ../tools/bootloaders/refind { };
34478 refind = callPackage ../tools/bootloaders/refind { };
34477
34479
34478 spectrojack = callPackage ../applications/audio/spectrojack { };
34480 spectrojack = callPackage ../applications/audio/spectrojack { };