2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, postgresql
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
, readline
|
|
|
|
, flex
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "repmgr";
|
2022-02-21 08:47:16 +00:00
|
|
|
version = "5.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "2ndQuadrant";
|
|
|
|
repo = "repmgr";
|
|
|
|
rev = "v${version}";
|
2022-02-21 08:47:16 +00:00
|
|
|
sha256 = "sha256-fHoXbFOF3xj/eNHgQIghF15vbDObnuwl2DAH+zRVGZQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flex ];
|
|
|
|
|
|
|
|
buildInputs = [ postgresql openssl zlib readline ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,lib,share/postgresql/extension}
|
|
|
|
|
|
|
|
cp repmgr{,d} $out/bin
|
|
|
|
cp *.so $out/lib
|
|
|
|
cp *.sql $out/share/postgresql/extension
|
|
|
|
cp *.control $out/share/postgresql/extension
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://repmgr.org/";
|
|
|
|
description = "Replication manager for PostgreSQL cluster";
|
|
|
|
license = licenses.postgresql;
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
|
|
|
};
|
|
|
|
}
|