2019-08-02 11:20:00 +02:00
|
|
|
{ stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
|
2019-05-24 11:20:00 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg_auto_failover";
|
2019-09-13 11:20:00 +02:00
|
|
|
version = "1.0.4";
|
2019-05-24 11:20:00 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-09-13 11:20:00 +02:00
|
|
|
sha256 = "0v4fj83zifcqhihc5myh0qv2396n5kw4sa8ix6jljmp6wh036z9j";
|
2019-05-24 11:20:00 +02:00
|
|
|
};
|
|
|
|
|
2019-08-02 11:20:00 +02:00
|
|
|
buildInputs = [ postgresql openssl zlib readline ];
|
2019-05-24 11:20:00 +02: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 16:18:03 +02: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 11:20:00 +02: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 01:27:29 +02:00
|
|
|
broken = versionOlder postgresql.version "10";
|
2019-05-24 11:20:00 +02:00
|
|
|
};
|
|
|
|
}
|