2019-08-02 10:20:00 +01:00
|
|
|
{ stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg_auto_failover";
|
2020-03-18 09:20:00 +00:00
|
|
|
version = "1.2";
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-03-18 09:20:00 +00:00
|
|
|
sha256 = "128bfxy7aabyvlcrzdi20f51k9xxgynd76f01v6w1314wrjg2r8f";
|
2019-05-24 10:20:00 +01:00
|
|
|
};
|
|
|
|
|
2019-08-02 10:20:00 +01:00
|
|
|
buildInputs = [ postgresql openssl zlib readline ];
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
|
|
|
|
install -D -t $out/lib src/monitor/pgautofailover.so
|
2019-07-01 15:18:03 +01:00
|
|
|
install -D -t $out/share/postgresql/extension src/monitor/*.sql
|
|
|
|
install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control
|
2019-05-24 10:20:00 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "PostgreSQL extension and service for automated failover and high-availability";
|
|
|
|
homepage = "https://github.com/citusdata/pg_auto_failover";
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.postgresql;
|
2019-08-15 00:27:29 +01:00
|
|
|
broken = versionOlder postgresql.version "10";
|
2019-05-24 10:20:00 +01:00
|
|
|
};
|
|
|
|
}
|