nixpkgs/pkgs/servers/sql/postgresql/ext/repmgr.nix

41 lines
906 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, postgresql
, openssl
, zlib
, readline
, flex
}:
2019-09-10 19:16:03 +00:00
stdenv.mkDerivation rec {
pname = "repmgr";
version = "5.3.1";
2019-09-10 19:16:03 +00:00
src = fetchFromGitHub {
owner = "2ndQuadrant";
repo = "repmgr";
rev = "v${version}";
sha256 = "sha256-fHoXbFOF3xj/eNHgQIghF15vbDObnuwl2DAH+zRVGZQ=";
2019-09-10 19:16:03 +00:00
};
nativeBuildInputs = [ flex ];
buildInputs = [ postgresql openssl zlib readline ];
2019-09-10 19:16:03 +00:00
installPhase = ''
mkdir -p $out/{bin,lib,share/postgresql/extension}
2019-09-10 19:16:03 +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
'';
meta = with lib; {
2019-09-10 19:16:03 +00:00
homepage = "https://repmgr.org/";
description = "Replication manager for PostgreSQL cluster";
license = licenses.postgresql;
platforms = postgresql.meta.platforms;
2019-09-10 19:16:03 +00:00
maintainers = with maintainers; [ zimbatm ];
};
}