2018-04-02 13:04:53 +01:00
|
|
|
{ stdenv, fetchFromGitHub, postgresql }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-14 21:36:39 +01:00
|
|
|
pname = "pg_cron";
|
2020-10-07 00:00:00 +01:00
|
|
|
version = "1.3.0";
|
2018-04-02 13:04:53 +01:00
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
2019-04-14 21:36:39 +01:00
|
|
|
repo = pname;
|
2018-04-02 13:04:53 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2020-10-07 00:00:00 +01:00
|
|
|
sha256 = "1hvd0nfaq5q9yfxfcb0fbrjbdal06adjplvmaag88a0msdlirl7z";
|
2018-04-02 13:04:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-08-14 23:36:59 +01:00
|
|
|
mkdir -p $out/{lib,share/postgresql/extension}
|
2018-04-02 13:04:53 +01:00
|
|
|
|
|
|
|
cp *.so $out/lib
|
2019-07-01 15:18:03 +01:00
|
|
|
cp *.sql $out/share/postgresql/extension
|
|
|
|
cp *.control $out/share/postgresql/extension
|
2018-04-02 13:04:53 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Run Cron jobs through PostgreSQL";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/citusdata/pg_cron";
|
2018-04-02 13:04:53 +01:00
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2019-04-14 21:36:39 +01:00
|
|
|
platforms = postgresql.meta.platforms;
|
2018-04-02 13:04:53 +01:00
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|