2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, postgresql
|
|
|
|
, openssl
|
2022-10-30 15:09:59 +00:00
|
|
|
, libxcrypt
|
2022-09-09 14:08:57 +00:00
|
|
|
, withPam ? stdenv.isLinux
|
|
|
|
, pam
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pgpool-II";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.4.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-09-09 14:08:57 +00:00
|
|
|
url = "https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-${version}.tar.gz";
|
|
|
|
name = "pgpool-II-${version}.tar.gz";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-zNSSLIaUmRECor72TdQ/M/U59qGFvULyGDIrqwo4imA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
postgresql
|
|
|
|
openssl
|
2022-10-30 15:09:59 +00:00
|
|
|
libxcrypt
|
2022-09-09 14:08:57 +00:00
|
|
|
] ++ lib.optional withPam pam;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-openssl"
|
2022-09-09 14:08:57 +00:00
|
|
|
] ++ lib.optional withPam "--with-pam";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = lib.optionals (stdenv.isDarwin) [
|
|
|
|
# Build checks for strlcpy being available in the system, but doesn't
|
|
|
|
# actually exclude its own copy from being built
|
|
|
|
./darwin-strlcpy.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://www.pgpool.net/mediawiki/index.php/Main_Page";
|
|
|
|
description = "A middleware that works between PostgreSQL servers and PostgreSQL clients";
|
|
|
|
changelog = "https://www.pgpool.net/docs/latest/en/html/release-${builtins.replaceStrings ["."] ["-"] version}.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.free;
|
2022-09-09 14:08:57 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|