mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, testers, runitor }:
|
|
|
|
buildGoModule rec {
|
|
pname = "runitor";
|
|
version = "1.3.0";
|
|
vendorHash = null;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdd";
|
|
repo = "runitor";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-9sg+ku3Qh/X/EZ2VCrvIc0pq5iyn4O8RZrO4KpkciAI=";
|
|
};
|
|
|
|
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 = "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 ];
|
|
mainProgram = "runitor";
|
|
};
|
|
}
|