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-09-13 10:20:00 +01:00
|
|
|
version = "1.0.4";
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-09-13 10:20:00 +01:00
|
|
|
sha256 = "0v4fj83zifcqhihc5myh0qv2396n5kw4sa8ix6jljmp6wh036z9j";
|
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
|
|
|
};
|
|
|
|
}
|