From d94cbd418820a2a9c28b91de1efc427489038278 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Sun, 6 Jan 2019 12:58:27 +0300 Subject: [PATCH 1/3] lighttpd: Disable WebDAV by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * It is disabled by default in lighttpd itself * Darwin doesn’t seem to have a function in libuiid that it needs --- pkgs/servers/http/lighttpd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index cdebbf739e6..13bf0f518c5 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -2,7 +2,7 @@ , openssl, enableMagnet ? false, lua5_1 ? null , enableMysql ? false, mysql ? null , enableLdap ? false, openldap ? null -, enableWebDAV ? true, sqlite ? null, libuuid ? null +, enableWebDAV ? false, sqlite ? null, libuuid ? null , perl }: From bd141e9af10f2705ef03054758903b98e771eb47 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Sun, 6 Jan 2019 13:03:49 +0300 Subject: [PATCH 2/3] lighttpd: Hide attr dependency behind an option * Unbreak darwin * It was unused anyway, as it is disabled by default * Now there is an feature-argument to enable it --- pkgs/servers/http/lighttpd/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index 13bf0f518c5..4023265b49b 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file +{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, bzip2, which, file , openssl, enableMagnet ? false, lua5_1 ? null , enableMysql ? false, mysql ? null , enableLdap ? false, openldap ? null , enableWebDAV ? false, sqlite ? null, libuuid ? null +, enableExtendedAttrs ? false, attr ? null , perl }: @@ -11,6 +12,7 @@ assert enableMysql -> mysql != null; assert enableLdap -> openldap != null; assert enableWebDAV -> sqlite != null; assert enableWebDAV -> libuuid != null; +assert enableExtendedAttrs -> attr != null; stdenv.mkDerivation rec { name = "lighttpd-1.4.52"; @@ -25,7 +27,7 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ pcre libxml2 zlib attr bzip2 which file openssl ] + buildInputs = [ pcre libxml2 zlib bzip2 which file openssl ] ++ stdenv.lib.optional enableMagnet lua5_1 ++ stdenv.lib.optional enableMysql mysql.connector-c ++ stdenv.lib.optional enableLdap openldap @@ -37,7 +39,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableMysql "--with-mysql" ++ stdenv.lib.optional enableLdap "--with-ldap" ++ stdenv.lib.optional enableWebDAV "--with-webdav-props" - ++ stdenv.lib.optional enableWebDAV "--with-webdav-locks"; + ++ stdenv.lib.optional enableWebDAV "--with-webdav-locks" + ++ stdenv.lib.optional enableExtendedAttrs "--with-attr"; preConfigure = '' sed -i "s:/usr/bin/file:${file}/bin/file:g" configure @@ -59,7 +62,7 @@ stdenv.mkDerivation rec { description = "Lightweight high-performance web server"; homepage = http://www.lighttpd.net/; license = stdenv.lib.licenses.bsd3; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = [ maintainers.bjornfor ]; }; } From a162a562bd78a7d3587347fab5b8c6cfdc48b248 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Sun, 6 Jan 2019 13:05:30 +0300 Subject: [PATCH 3/3] lighttpd: Enable tests They seem to pass now, so why not. --- pkgs/servers/http/lighttpd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index 4023265b49b..a7e9c1447f1 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { ''; checkInputs = [ perl ]; - doCheck = false; # fails 2 tests + doCheck = true; postInstall = '' mkdir -p "$out/share/lighttpd/doc/config"