lighttpd: add option to enable WebDAV (#40623)

This commit is contained in:
Roland Koebler 2018-05-18 01:35:31 +02:00 committed by xeji
parent 33fa7b3f5a
commit 285a90b714
1 changed files with 9 additions and 2 deletions

View File

@ -2,11 +2,14 @@
, openssl, enableMagnet ? false, lua5_1 ? null , openssl, enableMagnet ? false, lua5_1 ? null
, enableMysql ? false, mysql ? null , enableMysql ? false, mysql ? null
, enableLdap ? false, openldap ? null , enableLdap ? false, openldap ? null
, enableWebDAV ? true, sqlite ? null, libuuid ? null
}: }:
assert enableMagnet -> lua5_1 != null; assert enableMagnet -> lua5_1 != null;
assert enableMysql -> mysql != null; assert enableMysql -> mysql != null;
assert enableLdap -> openldap != null; assert enableLdap -> openldap != null;
assert enableWebDAV -> sqlite != null;
assert enableWebDAV -> libuuid != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "lighttpd-1.4.49"; name = "lighttpd-1.4.49";
@ -20,12 +23,16 @@ stdenv.mkDerivation rec {
buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ] buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ]
++ stdenv.lib.optional enableMagnet lua5_1 ++ stdenv.lib.optional enableMagnet lua5_1
++ stdenv.lib.optional enableMysql mysql.connector-c ++ stdenv.lib.optional enableMysql mysql.connector-c
++ stdenv.lib.optional enableLdap openldap; ++ stdenv.lib.optional enableLdap openldap
++ stdenv.lib.optional enableWebDAV sqlite
++ stdenv.lib.optional enableWebDAV libuuid;
configureFlags = [ "--with-openssl" ] configureFlags = [ "--with-openssl" ]
++ stdenv.lib.optional enableMagnet "--with-lua" ++ stdenv.lib.optional enableMagnet "--with-lua"
++ stdenv.lib.optional enableMysql "--with-mysql" ++ stdenv.lib.optional enableMysql "--with-mysql"
++ stdenv.lib.optional enableLdap "--with-ldap"; ++ stdenv.lib.optional enableLdap "--with-ldap"
++ stdenv.lib.optional enableWebDAV "--with-webdav-props"
++ stdenv.lib.optional enableWebDAV "--with-webdav-locks";
preConfigure = '' preConfigure = ''
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure sed -i "s:/usr/bin/file:${file}/bin/file:g" configure