3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix

33 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
stdenv.mkDerivation rec {
pname = "pg_auto_failover";
version = "1.5.1";
src = fetchFromGitHub {
owner = "citusdata";
repo = pname;
rev = "v${version}";
sha256 = "14bh3cqkdd1z16iy0lmv8a3f8gmmink1nzhf5jhkd0n6g7r65p6d";
};
buildInputs = [ postgresql openssl zlib readline ];
installPhase = ''
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
install -D -t $out/lib src/monitor/pgautofailover.so
install -D -t $out/share/postgresql/extension src/monitor/*.sql
install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control
'';
meta = with lib; {
description = "PostgreSQL extension and service for automated failover and high-availability";
homepage = "https://github.com/citusdata/pg_auto_failover";
changelog = "https://github.com/citusdata/pg_auto_failover/raw/v${version}/CHANGELOG.md";
maintainers = [ maintainers.marsam ];
platforms = postgresql.meta.platforms;
license = licenses.postgresql;
broken = versionOlder postgresql.version "10";
};
}