2022-08-22 13:12:40 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, postgresql
|
|
|
|
, openssl
|
2022-09-29 16:20:56 +01:00
|
|
|
, libxcrypt
|
2022-08-22 13:12:40 +01:00
|
|
|
, withPam ? stdenv.isLinux
|
|
|
|
, pam
|
|
|
|
}:
|
2014-11-15 09:23:07 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-07 12:15:10 +01:00
|
|
|
pname = "pgpool-II";
|
2023-09-12 05:20:00 +01:00
|
|
|
version = "4.4.4";
|
2014-11-15 09:23:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-08-22 13:12:40 +01:00
|
|
|
url = "https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-${version}.tar.gz";
|
|
|
|
name = "pgpool-II-${version}.tar.gz";
|
2023-09-12 05:20:00 +01:00
|
|
|
sha256 = "sha256-EL7Wb4GXx03LAKDnP2GAZtXV4K3IeIZcL8+hyUXmj08=";
|
2014-11-15 09:23:07 +00:00
|
|
|
};
|
|
|
|
|
2022-08-22 13:12:40 +01:00
|
|
|
buildInputs = [
|
|
|
|
postgresql
|
|
|
|
openssl
|
2022-09-29 16:20:56 +01:00
|
|
|
libxcrypt
|
2022-08-22 13:12:40 +01:00
|
|
|
] ++ lib.optional withPam pam;
|
2015-04-08 20:10:31 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--with-openssl"
|
2022-08-22 13:12:40 +01:00
|
|
|
] ++ lib.optional withPam "--with-pam";
|
2015-04-08 20:10:31 +01:00
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=\${out}/etc"
|
|
|
|
];
|
2014-11-15 09:23:07 +00:00
|
|
|
|
2023-05-20 11:48:49 +01: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
|
|
|
|
];
|
|
|
|
|
2017-11-16 02:17:45 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-09-12 05:20:00 +01: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";
|
2014-11-15 09:23:07 +00:00
|
|
|
license = licenses.free;
|
2022-08-21 05:20:00 +01:00
|
|
|
platforms = platforms.unix;
|
2022-08-22 13:12:40 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2014-11-15 09:23:07 +00:00
|
|
|
};
|
|
|
|
}
|