From d0d4af2c40aacb0186ae9cc11c914aea9d59c773 Mon Sep 17 00:00:00 2001 From: gfrascadorio Date: Sun, 16 May 2021 22:04:35 -0600 Subject: retry: init at v1.04 Add package for 'retry' tool that allows a script to repeat a command until it succeeds or hits a repetition threshold. 'Retry' supports replaying stdin, emitting the final stdout, and backoff delays. Applied fixes for PR comments --- pkgs/tools/system/retry/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pkgs/tools/system/retry/default.nix (limited to 'pkgs/tools/system') diff --git a/pkgs/tools/system/retry/default.nix b/pkgs/tools/system/retry/default.nix new file mode 100644 index 00000000000..3dc4bdb1a19 --- /dev/null +++ b/pkgs/tools/system/retry/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, which, txt2man }: +stdenv.mkDerivation rec { + pname = "retry"; + version = "1.0.4"; + + nativeBuildInputs = [ autoreconfHook which txt2man ]; + + src = fetchFromGitHub { + owner = "minfrin"; + repo = "retry"; + rev = "${pname}-${version}"; + sha256 = "sha256:0jrx4yrwlf4fn3309kxraj7zgwk7gq6rz5ibswq3w3b3jfvxi8qb"; + }; + + meta = with lib; { + homepage = "https://github.com/minfrin/retry"; + description = "Retry a command until the command succeeds"; + platforms = platforms.all; + license = licenses.asl20; + # maintainers = with maintainers; [ gfrascadorio ]; + }; +} + -- cgit 1.4.1