Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub, testers, runitor }:
2
3buildGoModule rec {
4 pname = "runitor";
5 version = "1.2.0";
6 vendorSha256 = null;
7
8 src = fetchFromGitHub {
9 owner = "bdd";
10 repo = "runitor";
11 rev = "v${version}";
12 sha256 = "sha256-lL9yfiqPIIfEvjiWcG6e1NrURHJFdk4x/od/w7/i2DE=";
13 };
14
15 ldflags = [
16 "-s" "-w" "-X main.Version=v${version}"
17 ];
18
19 passthru.tests.version = testers.testVersion {
20 package = runitor;
21 command = "runitor -version";
22 version = "v${version}";
23 };
24
25 # Unit tests require binding to local addresses for listening sockets.
26 __darwinAllowLocalNetworking = true;
27
28 meta = with lib; {
29 homepage = "https://bdd.fi/x/runitor";
30 description = "A command runner with healthchecks.io integration";
31 longDescription = ''
32 Runitor runs the supplied command, captures its output, and based on its exit
33 code reports successful or failed execution to https://healthchecks.io or your
34 private instance.
35
36 Healthchecks.io is a web service for monitoring periodic tasks. It's like a
37 dead man's switch for your cron jobs. You get alerted if they don't run on time
38 or terminate with a failure.
39 '';
40 license = licenses.bsd0;
41 maintainers = with maintainers; [ bdd ];
42 };
43}