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";
|
2023-09-01 02:12:46 +00:00
|
|
|
version = "1.6.0";
|
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}";
|
2023-09-01 02:12:46 +00:00
|
|
|
hash = "sha256-s1wjBx84Z12fRlaT1y3CPEFHK8tzMKp7wF+t7suRNL4=";
|
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
|
|
|
|
2023-09-22 04:20:00 +00:00
|
|
|
cp *${postgresql.dlSuffix} $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;
|
|
|
|
};
|
|
|
|
}
|