3
0
Fork 0
forked from mirrors/nixpkgs

lighttpd: add enableLdap option (default false)

This commit is contained in:
Bjørn Forsman 2017-12-19 22:00:19 +01:00
parent 7c481aa7c1
commit dc9ea840c1

View file

@ -1,10 +1,12 @@
{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file
, openssl, enableMagnet ? false, lua5_1 ? null
, enableMysql ? false, mysql ? null
, enableLdap ? false, openldap ? null
}:
assert enableMagnet -> lua5_1 != null;
assert enableMysql -> mysql != null;
assert enableLdap -> openldap != null;
stdenv.mkDerivation rec {
name = "lighttpd-1.4.48";
@ -17,11 +19,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ]
++ stdenv.lib.optional enableMagnet lua5_1
++ stdenv.lib.optional enableMysql mysql.lib;
++ stdenv.lib.optional enableMysql mysql.lib
++ stdenv.lib.optional enableLdap openldap;
configureFlags = [ "--with-openssl" ]
++ stdenv.lib.optional enableMagnet "--with-lua"
++ stdenv.lib.optional enableMysql "--with-mysql";
++ stdenv.lib.optional enableMysql "--with-mysql"
++ stdenv.lib.optional enableLdap "--with-ldap";
preConfigure = ''
sed -i "s:/usr/bin/file:${file}/bin/file:g" configure