2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg_auto_failover";
|
2021-03-25 04:20:00 +00:00
|
|
|
version = "1.5.1";
|
2019-05-24 10:20:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "citusdata";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-25 04:20:00 +00:00
|
|
|
sha256 = "14bh3cqkdd1z16iy0lmv8a3f8gmmink1nzhf5jhkd0n6g7r65p6d";
|
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
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-24 10:20:00 +01:00
|
|
|
description = "PostgreSQL extension and service for automated failover and high-availability";
|
|
|
|
homepage = "https://github.com/citusdata/pg_auto_failover";
|
2021-03-25 04:20:00 +00:00
|
|
|
changelog = "https://github.com/citusdata/pg_auto_failover/raw/v${version}/CHANGELOG.md";
|
2019-05-24 10:20:00 +01:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|