btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / su / supercronic / package.nix
blob16c4117b08d4adecd31883b98139e01e80b80ed6
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , python3
5 , bash
6 , coreutils
7 }:
9 buildGoModule rec {
10   pname = "supercronic";
11   version = "0.2.30";
13   src = fetchFromGitHub {
14     owner = "aptible";
15     repo = pname;
16     rev = "v${version}";
17     hash = "sha256-gey5d+Dxmk7TS0miWRjeWMxW+qYrAPVYGHcHNYrYwK4=";
18   };
20   vendorHash = "sha256-ebUsnPpvQ/AK3C7MbGnXWSiuoXrjhQ2uZhj1OtRGeWU=";
22   excludedPackages = [ "cronexpr/cronexpr" ];
24   nativeCheckInputs = [ python3 bash coreutils ];
26   postConfigure = ''
27     # There are tests that set the shell to various paths
28     substituteInPlace cron/cron_test.go --replace /bin/sh ${bash}/bin/sh
29     substituteInPlace cron/cron_test.go --replace /bin/false ${coreutils}/bin/false
30   '';
32   meta = with lib; {
33     description = "Cron tool designed for use in containers";
34     homepage = "https://github.com/aptible/supercronic";
35     license = licenses.mit;
36     maintainers = with maintainers; [ nasageek ];
37     mainProgram = "supercronic";
38   };