depot/third_party/nixpkgs/pkgs/tools/system/supercronic/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

39 lines
975 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, python3
, bash
, coreutils
}:
buildGoModule rec {
pname = "supercronic";
version = "0.2.29";
src = fetchFromGitHub {
owner = "aptible";
repo = pname;
rev = "v${version}";
hash = "sha256-cYKVeWZEjWV5j68aTpBOE/z+5QcMBh5ovyXoV/u80o4=";
};
vendorHash = "sha256-uQFceysbRdcSaFvdfdFcJX6yzPWE26YYiVzAEISQeCc=";
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 ];
mainProgram = "supercronic";
};
}