diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix index 3b7a68fb972f..88c750525b26 100644 --- a/pkgs/tools/networking/haproxy/default.nix +++ b/pkgs/tools/networking/haproxy/default.nix @@ -15,9 +15,17 @@ stdenv.mkDerivation rec { buildInputs = [ openssl zlib ]; # TODO: make it work on bsd as well - preConfigure = '' - export makeFlags="TARGET=${if stdenv.isSunOS then "solaris" else if stdenv.isLinux then "linux2628" else "generic"} PREFIX=$out USE_OPENSSL=yes USE_ZLIB=yes ${stdenv.lib.optionalString stdenv.isDarwin "CC=cc USE_KQUEUE=1"}" - ''; + makeFlags = [ + "PREFIX=\${out}" + ("TARGET=" + (if stdenv.isSunOS then "solaris" + else if stdenv.isLinux then "linux2628" + else if stdenv.isDarwin then "osx" + else "generic")) + ]; + buildFlags = [ + "USE_OPENSSL=yes" + "USE_ZLIB=yes" + ] ++ stdenv.lib.optional stdenv.isDarwin "CC=cc"; meta = { description = "Reliable, high performance TCP/HTTP load balancer";