nixpkgs/pkgs/servers/http/lighttpd/default.nix
2013-11-17 23:06:25 +01:00

33 lines
955 B
Nix

{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file
, openssl, enableMagnet ? false, lua5 ? null
}:
assert enableMagnet -> lua5 != null;
stdenv.mkDerivation rec {
name = "lighttpd-1.4.33";
src = fetchurl {
url = "http://download.lighttpd.net/lighttpd/releases-1.4.x/${name}.tar.xz";
sha256 = "0331671snhhf48qb43mfb6l85v2rc3ryd3qvz56s8z454gfax1i8";
};
buildInputs = [ pkgconfig pcre libxml2 zlib attr bzip2 which file openssl ]
++ stdenv.lib.optional enableMagnet lua5;
configureFlags = [ "--with-openssl" ]
++ stdenv.lib.optional enableMagnet "--with-lua";
preConfigure = ''
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
'';
meta = with stdenv.lib; {
description = "Lightweight high-performance web server";
homepage = http://www.lighttpd.net/;
license = "BSD";
platforms = platforms.linux;
maintainers = [ maintainers.bjornfor ];
};
}