From c25b74970d2bb272e4616a65485f560602a788cc Mon Sep 17 00:00:00 2001 From: "Berk D. Demir" Date: Wed, 27 Apr 2022 01:33:53 +0000 Subject: [PATCH] runitor: init at 0.9.2 --- maintainers/maintainer-list.nix | 6 ++++ pkgs/tools/system/runitor/default.nix | 52 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 60 insertions(+) create mode 100644 pkgs/tools/system/runitor/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e8b3232fc75f..dd8fd48cd67c 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1396,6 +1396,12 @@ githubId = 164148; name = "Ben Darwin"; }; + bdd = { + email = "bdd@mindcast.org"; + github = "bdd"; + githubId = 11135; + name = "Berk D. Demir"; + }; bdesham = { email = "benjamin@esham.io"; github = "bdesham"; diff --git a/pkgs/tools/system/runitor/default.nix b/pkgs/tools/system/runitor/default.nix new file mode 100644 index 000000000000..5bb821afdaf1 --- /dev/null +++ b/pkgs/tools/system/runitor/default.nix @@ -0,0 +1,52 @@ +{ lib, buildGoModule, fetchFromGitHub, testers, runitor }: + +buildGoModule rec { + pname = "runitor"; + version = "0.9.2"; + vendorSha256 = null; + + src = fetchFromGitHub { + owner = "bdd"; + repo = "runitor"; + rev = "v${version}"; + sha256 = "sha256-LuCxn4j0MlnJjSh3d18YNzNrtbqtMPxgkZttqKUGJd4"; + }; + + ldflags = [ + "-s" "-w" "-X main.Version=v${version}" + ]; + + # TODO(cole-h): + # End-to-end tests requiring localhost networking currently under + # OfBorg's Linux builders, while passing under Darwin. + # + # Ref: https://github.com/NixOS/nixpkgs/pull/170566#issuecomment-1114034891 + # + # Temporarily disable tests. + doCheck = false; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e665d0bdc23d..1e02354e376a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34431,6 +34431,8 @@ with pkgs; runit = callPackage ../tools/system/runit { }; + runitor = callPackage ../tools/system/runitor { }; + refind = callPackage ../tools/bootloaders/refind { }; spectrojack = callPackage ../applications/audio/spectrojack { };