summary refs log tree commit diff
path: root/pkgs/tools/system/supercronic/default.nix
blob: 3b3f285a086561d602669d68b56653a83b8d7f22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 ];
  };
}