1{ stdenv, pkgs, fetchurl, openssl }:
2
3stdenv.mkDerivation rec {
4 majorVersion = "1.5";
5 version = "${majorVersion}.14";
6 name = "haproxy-${version}";
7
8 src = fetchurl {
9 url = "http://haproxy.1wt.eu/download/${majorVersion}/src/${name}.tar.gz";
10 sha256 = "16cg1jmy2d8mq2ypwifsvhbyp4pyrj0zm0r818sx0r4hchwdsrcm";
11 };
12
13 buildInputs = [ openssl ];
14
15 # TODO: make it work on darwin/bsd as well
16 preConfigure = ''
17 export makeFlags="TARGET=linux2628 PREFIX=$out USE_OPENSSL=yes"
18 '';
19
20 meta = {
21 description = "Reliable, high performance TCP/HTTP load balancer";
22 longDescription = ''
23 HAProxy is a free, very fast and reliable solution offering high
24 availability, load balancing, and proxying for TCP and HTTP-based
25 applications. It is particularly suited for web sites crawling under very
26 high loads while needing persistence or Layer7 processing. Supporting
27 tens of thousands of connections is clearly realistic with todays
28 hardware.
29 '';
30 homepage = http://haproxy.1wt.eu;
31 maintainers = [ stdenv.lib.maintainers.garbas ];
32 platforms = stdenv.lib.platforms.linux;
33 license = stdenv.lib.licenses.gpl2;
34 };
35}