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:
parent
50cce50143
commit
e58e681d9f
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue