nixpkgs/pkgs/tools/networking/haproxy/default.nix

60 lines
1.9 KiB
Nix
Raw Normal View History

{ useLua ? !stdenv.isDarwin
, usePcre ? true
haproxy: 1.8.9 -> 1.8.13 (#44487) The patches previously applied have been included upstream. Upstream changelog (only MAJOR/MEDIUM): 2018/07/30 : 1.8.13 - BUG/MEDIUM: h2: don't accept new streams if conn_streams are still in excess - BUG/MEDIUM: h2: never leave pending data in the output buffer on close - BUG/MEDIUM: h2: make sure the last stream closes the connection after a timeout - BUG/MEDIUM: threads: Fix the exit condition of the thread barrier - BUG/MEDIUM: stream-int: don't immediately enable reading when the buffer was reportedly full - BUG/MEDIUM: stats: don't ask for more data as long as we're responding - BUG/MEDIUM: threads/sync: use sched_yield when available - BUG/MEDIUM: h2: prevent orphaned streams from blocking a connection forever - BUG/MEDIUM: threads: properly fix nbthreads == MAX_THREADS - BUG/MEDIUM: threads: unbreak "bind" referencing an incorrect thread number - MEDIUM: proxy_protocol: Convert IPs to v6 when protocols are mixed 2018/06/27 : 1.8.12 - BUG/MAJOR: stick_table: Complete incomplete SEGV fix 2018/06/26 : 1.8.11 - BUG/MAJOR: Stick-tables crash with segfault when the key is not in the stick-table 2018/06/22 : 1.8.10 - BUG/MEDIUM: spoe: Flags are not encoded in network order - BUG/MEDIUM: contrib/mod_defender: Use network order to encode/decode flags - BUG/MEDIUM: contrib/modsecurity: Use network order to encode/decode flags - BUG/MEDIUM: cache: don't cache when an Authorization header is present - BUG/MEDIUM: dns: Delay the attempt to run a DNS resolution on check failure. - BUG/MEDIUM: fd: Only check update_mask against all_threads_mask. - BUG/MEDIUM: servers: Add srv_addr default placeholder to the state file - BUG/MEDIUM: lua/socket: Length required read doesn't work - BUG/MEDIUM: stick-tables: Decrement ref_cnt in table_* converters - BUG/MEDIUM: spoe: Return an error when the wrong ACK is received in sync mode - BUG/MEDIUM: lua/socket: wrong scheduling for sockets - BUG/MAJOR: lua: Dead lock with sockets - BUG/MEDIUM: lua/socket: Notification error - BUG/MEDIUM: lua/socket: Sheduling error on write: may dead-lock - BUG/MEDIUM: lua/socket: Buffer error, may segfault - MAJOR: spoe: upgrade the SPOP version to 2.0 and remove the support for 1.0 - BUG/MEDIUM: threads: handle signal queue only in thread 0 - BUG/MAJOR: map: fix a segfault when using http-request set-map - BUG/MAJOR: ssl: Random crash with cipherlist capture - BUG/MAJOR: ssl: OpenSSL context is stored in non-reserved memory slot - BUG/MEDIUM: fd: Don't modify the update_mask in fd_dodelete(). - BUG/MEDIUM: threads: Use the sync point to check active jobs and exit
2018-08-05 14:48:22 +00:00
, stdenv, fetchurl
, openssl, zlib, lua5_3 ? null, pcre ? null
}:
assert useLua -> lua5_3 != null;
assert usePcre -> pcre != null;
stdenv.mkDerivation rec {
2017-01-26 08:37:51 +00:00
pname = "haproxy";
version = "1.9.8";
2013-10-29 14:55:25 +00:00
src = fetchurl {
url = "https://www.haproxy.org/download/${stdenv.lib.versions.majorMinor version}/src/${pname}-${version}.tar.gz";
sha256 = "1via9k84ycrdr8qh4qchcbqgpv0gynm3ra23nwsvqwfqvc0376id";
};
buildInputs = [ openssl zlib ]
++ stdenv.lib.optional useLua lua5_3
++ stdenv.lib.optional usePcre pcre;
2017-03-07 17:50:45 +00:00
# TODO: make it work on bsd as well
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.optionals usePcre [
"USE_PCRE=yes"
"USE_PCRE_JIT=yes"
] ++ stdenv.lib.optionals useLua [
"USE_LUA=yes"
"LUA_LIB=${lua5_3}/lib"
"LUA_INC=${lua5_3}/include"
] ++ stdenv.lib.optional stdenv.isDarwin "CC=cc"
++ stdenv.lib.optional stdenv.isLinux "USE_GETADDRINFO=1";
meta = {
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.
'';
homepage = http://haproxy.1wt.eu;
maintainers = with stdenv.lib.maintainers; [ fuzzy-id ];
2017-03-07 17:50:45 +00:00
platforms = with stdenv.lib.platforms; linux ++ darwin;
2015-03-26 18:32:37 +00:00
license = stdenv.lib.licenses.gpl2;
};
}