depot/third_party/nixpkgs/pkgs/servers/sql/postgresql/ext/repmgr.nix
Default email e7f069c37c Project import generated by Copybara.
GitOrigin-RevId: 467ce5a9f45aaf96110b41eb863a56866e1c2c3c
2020-06-02 20:00:15 +02:00

40 lines
909 B
Nix

{ stdenv, fetchFromGitHub
, postgresql
, openssl
, zlib
, readline
, flex
}:
stdenv.mkDerivation rec {
pname = "repmgr";
version = "5.0.0";
src = fetchFromGitHub {
owner = "2ndQuadrant";
repo = "repmgr";
rev = "v${version}";
sha256 = "0zrpv17zrgl8hynbzaaqj17qrchc8r9qwpqh8y10b0v3xdr22ayl";
};
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
'';
meta = with stdenv.lib; {
homepage = "https://repmgr.org/";
description = "Replication manager for PostgreSQL cluster";
license = licenses.postgresql;
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [ zimbatm ];
};
}