2013-09-25 07:18:27 -04:00
|
|
|
{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file
|
|
|
|
, openssl, enableMagnet ? false, lua5 ? null
|
2014-03-12 18:02:30 -04:00
|
|
|
, enableMysql ? false, mysql ? null
|
2013-09-25 07:18:27 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableMagnet -> lua5 != null;
|
2014-03-12 18:02:30 -04:00
|
|
|
assert enableMysql -> mysql != null;
|
2010-07-28 07:55:54 -04:00
|
|
|
|
2013-11-17 17:06:25 -05:00
|
|
|
stdenv.mkDerivation rec {
|
2014-03-12 17:49:20 -04:00
|
|
|
name = "lighttpd-1.4.35";
|
2008-09-23 20:42:50 -04:00
|
|
|
|
2010-07-28 07:55:54 -04:00
|
|
|
src = fetchurl {
|
2013-11-17 17:06:25 -05:00
|
|
|
url = "http://download.lighttpd.net/lighttpd/releases-1.4.x/${name}.tar.xz";
|
2014-03-12 17:49:20 -04:00
|
|
|
sha256 = "18rh7xyx69xbwl20znnjma1dq5fay0ygjjvpn3gaa7dxrir9nghi";
|
2008-09-23 20:42:50 -04:00
|
|
|
};
|
|
|
|
|
2013-09-25 07:18:27 -04:00
|
|
|
buildInputs = [ pkgconfig pcre libxml2 zlib attr bzip2 which file openssl ]
|
2014-03-12 18:02:30 -04:00
|
|
|
++ stdenv.lib.optional enableMagnet lua5
|
|
|
|
++ stdenv.lib.optional enableMysql mysql;
|
2013-04-23 07:30:57 -04:00
|
|
|
|
2013-09-25 07:18:27 -04:00
|
|
|
configureFlags = [ "--with-openssl" ]
|
2014-03-12 18:02:30 -04:00
|
|
|
++ stdenv.lib.optional enableMagnet "--with-lua"
|
|
|
|
++ stdenv.lib.optional enableMysql "--with-mysql";
|
2013-04-01 09:28:05 -04:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
|
|
|
|
'';
|
2008-09-23 20:42:50 -04:00
|
|
|
|
2013-05-20 13:33:18 -04:00
|
|
|
meta = with stdenv.lib; {
|
2010-07-28 07:55:54 -04:00
|
|
|
description = "Lightweight high-performance web server";
|
|
|
|
homepage = http://www.lighttpd.net/;
|
2014-12-20 18:00:35 -05:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2013-05-20 13:33:18 -04:00
|
|
|
platforms = platforms.linux;
|
2013-11-17 17:06:25 -05:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
2008-09-23 20:42:50 -04:00
|
|
|
};
|
|
|
|
}
|