summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Bernat <vincent@bernat.im>2018-08-05 18:17:27 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-08-05 18:17:27 +0200
commitbf1473f5e099b57b2363e97e680b36988a5de4f8 (patch)
treec527259b3096ba864f7bc3ca063624b8981ba242
parent653b97689f1ce4c0d0e33903894b98f66e5d2b18 (diff)
downloadnixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.tar
nixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.tar.gz
nixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.tar.bz2
nixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.tar.lz
nixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.tar.xz
nixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.tar.zst
nixpkgs-bf1473f5e099b57b2363e97e680b36988a5de4f8.zip
haproxy: use getaddrinfo() on Linux (#44489)
As per project's README:

> Recent systems can resolve IPv6 host names using getaddrinfo(). This
> primitive is not present in all libcs and does not work in all of
> them either. Support in glibc was broken before 2.3. Some embedded
> libs may not properly work either, thus, support is disabled by
> default, meaning that some host names which only resolve as IPv6
> addresses will not resolve and configs might emit an error during
> parsing. If you know that your OS libc has reliable support for
> getaddrinfo(), you can add USE_GETADDRINFO=1 on the make command
> line to enable it. This is the recommended option for most Linux
> distro packagers since it's working fine on all recent mainstream
> distros. It is automatically enabled on Solaris 8 and above, as it's
> known to work.

Without this option, it is not possible for HAProxy to solve IPv6-only
names. This option is enabled in Debian builds without any notable
adverse effect.
-rw-r--r--pkgs/tools/networking/haproxy/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix
index aa19fdb04de..8f72976d7dc 100644
--- a/pkgs/tools/networking/haproxy/default.nix
+++ b/pkgs/tools/networking/haproxy/default.nix
@@ -39,7 +39,8 @@ stdenv.mkDerivation rec {
     "USE_LUA=yes"
     "LUA_LIB=${lua5_3}/lib"
     "LUA_INC=${lua5_3}/include"
-  ] ++ stdenv.lib.optional stdenv.isDarwin "CC=cc";
+  ] ++ stdenv.lib.optional stdenv.isDarwin "CC=cc"
+    ++ stdenv.lib.optional stdenv.isLinux "USE_GETADDRINFO=1";
 
   meta = {
     description = "Reliable, high performance TCP/HTTP load balancer";