From 8b1325bc4695ac02165e715b6d629f279ebad8d5 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 1 Nov 2023 19:46:51 +0000 Subject: [PATCH 1/2] maintainers: add nasageek --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6e9e3faf60e6..d32bf172d6a9 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10310,6 +10310,11 @@ githubId = 6709831; name = "Jake Hill"; }; + nasageek = { + github = "NasaGeek"; + githubId = 474937; + name = "Chris Roberts"; + }; nasirhm = { email = "nasirhussainm14@gmail.com"; github = "nasirhm"; From 4a6ce1efede1f89a857e0cc514d5d11e56621527 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Fri, 17 Feb 2023 05:00:54 +0000 Subject: [PATCH 2/2] supercronic: init at 0.2.27 A handy cron-alike that is well-suited for running in a container for the following reasons: * Does not daemonize by default * Preserves container environment for crontab * Runs as non-root * Logs crontab output to stdout --- pkgs/tools/system/supercronic/default.nix | 38 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/tools/system/supercronic/default.nix diff --git a/pkgs/tools/system/supercronic/default.nix b/pkgs/tools/system/supercronic/default.nix new file mode 100644 index 000000000000..3b3f285a0865 --- /dev/null +++ b/pkgs/tools/system/supercronic/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, python3 +, bash +, coreutils +}: + +buildGoModule rec { + pname = "supercronic"; + version = "0.2.27"; + + src = fetchFromGitHub { + owner = "aptible"; + repo = pname; + rev = "v${version}"; + hash = "sha256-sgKvE8Ze2qKPgdaAwN1sB0wX7k5VRx8+llkT54xXvrM="; + }; + + vendorHash = "sha256-j1iduvu+dKmhvPN8pe50fGQU5cC9N3gfoMh9gSQDbf8="; + + excludedPackages = [ "cronexpr/cronexpr" ]; + + nativeCheckInputs = [ python3 bash coreutils ]; + + postConfigure = '' + # There are tests that set the shell to various paths + substituteInPlace cron/cron_test.go --replace /bin/sh ${bash}/bin/sh + substituteInPlace cron/cron_test.go --replace /bin/false ${coreutils}/bin/false + ''; + + meta = with lib; { + description = "Cron tool designed for use in containers"; + homepage = "https://github.com/aptible/supercronic"; + license = licenses.mit; + maintainers = with maintainers; [ nasageek ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5ce382334eff..da0bbed15f31 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1566,6 +1566,8 @@ with pkgs; steamtinkerlaunch = callPackage ../tools/games/steamtinkerlaunch {}; + supercronic = callPackage ../tools/system/supercronic { }; + supermin = callPackage ../tools/virtualization/supermin { }; sx-go = callPackage ../tools/security/sx-go { };