summary refs log tree commit diff
path: root/pkgs/tools/system/supercronic/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:21 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:48 +0100
commit048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch)
treef8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/tools/system/supercronic/default.nix
parent030c5028b07afcedce7c5956015c629486cc79d9 (diff)
parent4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff)
downloadnixpkgs-rootfs.tar
nixpkgs-rootfs.tar.gz
nixpkgs-rootfs.tar.bz2
nixpkgs-rootfs.tar.lz
nixpkgs-rootfs.tar.xz
nixpkgs-rootfs.tar.zst
nixpkgs-rootfs.zip
Rebase onto e4ad989506ec7d71f7302cc3067abd82730a4beb HEAD rootfs
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/tools/system/supercronic/default.nix')
-rw-r--r--pkgs/tools/system/supercronic/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/system/supercronic/default.nix b/pkgs/tools/system/supercronic/default.nix
new file mode 100644
index 00000000000..3b3f285a086
--- /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 ];
+  };
+}