1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00

haproxy: refactor

`preConfigure` line became too long to edit comfortably. Split up
flags into ones necessary during both build and install phase and
install phase only. Makefile defines a target for OS X/Darwin which
automatically sets the `KQUEUE` flag.
This commit is contained in:
Thomas Bach 2017-03-14 21:39:40 +01:00
parent 50cce50143
commit e58e681d9f

View file

@ -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";