nixpkgs/pkgs/servers/sql/pgpool/default.nix
Stanisław Pitucha 927acf9a89 pgpool: fix darwin build
Fix the darwin build by removing the included copy from the Makefiles.
2023-05-20 20:51:48 +10:00

53 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchurl
, postgresql
, openssl
, libxcrypt
, withPam ? stdenv.isLinux
, pam
}:
stdenv.mkDerivation rec {
pname = "pgpool-II";
version = "4.4.2";
src = fetchurl {
url = "https://www.pgpool.net/mediawiki/download.php?f=pgpool-II-${version}.tar.gz";
name = "pgpool-II-${version}.tar.gz";
sha256 = "sha256-Pmx4jnDwZyx7OMiKbKdvMfN4axJWiZgMwGOrdSylgjQ=";
};
buildInputs = [
postgresql
openssl
libxcrypt
] ++ lib.optional withPam pam;
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-openssl"
] ++ lib.optional withPam "--with-pam";
installFlags = [
"sysconfdir=\${out}/etc"
];
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
];
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.unix;
maintainers = with maintainers; [ ];
};
}