nixpkgs-suyu/pkgs/servers/sql/pgpool/default.nix
2021-01-15 14:24:03 +07:00

36 lines
1,005 B
Nix

{ lib, stdenv, fetchurl, postgresql, openssl, pam ? null, libmemcached ? null }:
stdenv.mkDerivation rec {
pname = "pgpool-II";
version = "4.0.6";
src = fetchurl {
name = "${pname}-${version}.tar.gz";
url = "http://www.pgpool.net/download.php?f=${pname}-${version}.tar.gz";
sha256 = "0blmbqczyrgzykby2z3xzmhzd8kgij9izxv50n5cjn5azf7dn8g5";
};
patches = [ ./pgpool.patch ];
buildInputs = [ postgresql openssl pam libmemcached ];
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-openssl"
] ++ lib.optional (pam != null) "--with-pam"
++ lib.optional (libmemcached != null) "--with-memcached=${libmemcached}";
installFlags = [
"sysconfdir=\${out}/etc"
];
enableParallelBuilding = true;
meta = with lib; {
homepage = "http://pgpool.net/mediawiki/index.php";
description = "A middleware that works between postgresql servers and postgresql clients";
license = licenses.free;
platforms = platforms.linux;
};
}