diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index f967a7aaa2a8..61070ef22b6e 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, pcre, libxml2, zlib, attr, bzip2, which, file, openssl }: +{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file +, openssl, enableMagnet ? false, lua5 ? null +}: + +assert enableMagnet -> lua5 != null; stdenv.mkDerivation { name = "lighttpd-1.4.32"; @@ -8,9 +12,11 @@ stdenv.mkDerivation { sha256 = "1hgd9bi4mrak732h57na89lqg58b1kkchnddij9gawffd40ghs0k"; }; - buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ]; + buildInputs = [ pkgconfig pcre libxml2 zlib attr bzip2 which file openssl ] + ++ stdenv.lib.optional enableMagnet lua5; - configureFlags = "--with-openssl --with-openssl-libs=${openssl}"; + configureFlags = [ "--with-openssl" ] + ++ stdenv.lib.optional enableMagnet "--with-lua"; preConfigure = '' sed -i "s:/usr/bin/file:${file}/bin/file:g" configure