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";
|
2019-11-18 03:22:22 +00:00
|
|
|
version = "1.0.5";
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-11-18 03:22:22 +00:00
|
|
|
sha256 = "1idlgqazr2qra5x702f2yjcl99zwm1i5fi84paplfy98i5jjmxm1";
|
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
|
|
|
};
|
|
|
|
}
|