2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
2018-04-02 12:04:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-14 20:36:39 +00:00
|
|
|
pname = "pg_cron";
|
2021-09-30 04:20:00 +00:00
|
|
|
version = "1.4.1";
|
2018-04-02 12:04:53 +00:00
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
2019-04-14 20:36:39 +00:00
|
|
|
repo = pname;
|
2021-03-29 04:20:00 +00:00
|
|
|
rev = "v${version}";
|
2021-09-30 04:20:00 +00:00
|
|
|
sha256 = "1fknr7z1m24dpp4hm5s6y5phdns7yvvj88cl481wjhw8bigz6kns";
|
2018-04-02 12:04:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-08-14 22:36:59 +00:00
|
|
|
mkdir -p $out/{lib,share/postgresql/extension}
|
2018-04-02 12:04:53 +00:00
|
|
|
|
|
|
|
cp *.so $out/lib
|
2019-07-01 14:18:03 +00:00
|
|
|
cp *.sql $out/share/postgresql/extension
|
|
|
|
cp *.control $out/share/postgresql/extension
|
2018-04-02 12:04:53 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-02 12:04:53 +00:00
|
|
|
description = "Run Cron jobs through PostgreSQL";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/citusdata/pg_cron";
|
2021-03-29 04:20:00 +00:00
|
|
|
changelog = "https://github.com/citusdata/pg_cron/raw/v${version}/CHANGELOG.md";
|
2018-04-02 12:04:53 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2019-04-14 20:36:39 +00:00
|
|
|
platforms = postgresql.meta.platforms;
|
2018-04-02 12:04:53 +00:00
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|