2015-11-16 08:05:49 -08:00
|
|
|
{ stdenv, pkgs, fetchurl, openssl, zlib }:
|
2012-05-18 00:50:10 -07:00
|
|
|
|
2013-07-02 18:36:15 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2017-01-26 00:37:51 -08:00
|
|
|
pname = "haproxy";
|
|
|
|
majorVersion = "1.7";
|
|
|
|
minorVersion = "2";
|
|
|
|
version = "${majorVersion}.${minorVersion}";
|
|
|
|
name = "${pname}-${version}";
|
2013-10-29 07:55:25 -07:00
|
|
|
|
2012-05-18 00:50:10 -07:00
|
|
|
src = fetchurl {
|
2017-01-26 00:37:51 -08:00
|
|
|
url = "http://www.haproxy.org/download/${majorVersion}/src/${name}.tar.gz";
|
|
|
|
sha256 = "0bsb5q3s1k5gqybv5p8zyvl6zh8iyidv3jb3wfmgwqad5bsl0nzr";
|
2012-05-18 00:50:10 -07:00
|
|
|
};
|
|
|
|
|
2015-11-16 08:05:49 -08:00
|
|
|
buildInputs = [ openssl zlib ];
|
2012-05-18 00:50:10 -07:00
|
|
|
|
2017-03-07 09:50:45 -08:00
|
|
|
# TODO: make it work on bsd as well
|
2012-05-18 00:50:10 -07:00
|
|
|
preConfigure = ''
|
2017-03-07 09:50:45 -08:00
|
|
|
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"}"
|
2012-05-18 00:50:10 -07:00
|
|
|
'';
|
2013-07-02 18:36:15 -07:00
|
|
|
|
2012-05-18 00:50:10 -07:00
|
|
|
meta = {
|
2013-10-06 02:49:53 -07:00
|
|
|
description = "Reliable, high performance TCP/HTTP load balancer";
|
|
|
|
longDescription = ''
|
|
|
|
HAProxy is a free, very fast and reliable solution offering high
|
|
|
|
availability, load balancing, and proxying for TCP and HTTP-based
|
|
|
|
applications. It is particularly suited for web sites crawling under very
|
|
|
|
high loads while needing persistence or Layer7 processing. Supporting
|
|
|
|
tens of thousands of connections is clearly realistic with todays
|
|
|
|
hardware.
|
|
|
|
'';
|
2013-07-03 03:41:27 -07:00
|
|
|
homepage = http://haproxy.1wt.eu;
|
2013-07-02 18:36:15 -07:00
|
|
|
maintainers = [ stdenv.lib.maintainers.garbas ];
|
2017-03-07 09:50:45 -08:00
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
2015-03-26 11:32:37 -07:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2012-05-18 00:50:10 -07:00
|
|
|
};
|
|
|
|
}
|