depot/third_party/nixpkgs/pkgs/servers/sql/postgresql/ext/repmgr.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

40 lines
906 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}";
hash = "sha256-1CshcutjgwWCRxBfjlNGDLKMT5BYqb+sh4i+/E/YN38=";
};
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 ];
};
}