2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-03-15 21:05:27 +00:00
|
|
|
, postgresql
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
, readline
|
|
|
|
, flex
|
|
|
|
}:
|
2019-09-10 19:16:03 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "repmgr";
|
2021-10-29 13:44:06 +00:00
|
|
|
version = "5.3.0";
|
2019-09-10 19:16:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "2ndQuadrant";
|
|
|
|
repo = "repmgr";
|
|
|
|
rev = "v${version}";
|
2021-10-29 13:44:06 +00:00
|
|
|
sha256 = "sha256-hDBdtp6wPjvtc0MO8aG0Tdx5JiQJf8KS0f778R5xCZc=";
|
2019-09-10 19:16:03 +00:00
|
|
|
};
|
|
|
|
|
2020-03-15 21:05:27 +00:00
|
|
|
nativeBuildInputs = [ flex ];
|
|
|
|
|
|
|
|
buildInputs = [ postgresql openssl zlib readline ];
|
|
|
|
|
2019-09-10 19:16:03 +00:00
|
|
|
installPhase = ''
|
2020-03-15 21:05:27 +00:00
|
|
|
mkdir -p $out/{bin,lib,share/postgresql/extension}
|
2019-09-10 19:16:03 +00:00
|
|
|
|
2020-03-15 21:05:27 +00:00
|
|
|
cp repmgr{,d} $out/bin
|
|
|
|
cp *.so $out/lib
|
|
|
|
cp *.sql $out/share/postgresql/extension
|
|
|
|
cp *.control $out/share/postgresql/extension
|
2019-09-10 19:16:03 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-10 19:16:03 +00:00
|
|
|
homepage = "https://repmgr.org/";
|
|
|
|
description = "Replication manager for PostgreSQL cluster";
|
|
|
|
license = licenses.postgresql;
|
2019-09-13 09:21:00 +00:00
|
|
|
platforms = postgresql.meta.platforms;
|
2019-09-10 19:16:03 +00:00
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
|
|
|
};
|
|
|
|
}
|