diff options
Diffstat (limited to 'pkgs/servers/http/lighttpd/default.nix')
-rw-r--r-- | pkgs/servers/http/lighttpd/default.nix | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/servers/http/lighttpd/default.nix b/pkgs/servers/http/lighttpd/default.nix index 4f98e3c7dab32..d0b11d9b7c169 100644 --- a/pkgs/servers/http/lighttpd/default.nix +++ b/pkgs/servers/http/lighttpd/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, buildPackages, fetchurl, pkg-config, pcre, libxml2, zlib, bzip2, which, file +{ lib, stdenv, buildPackages, fetchurl, pkg-config, pcre2, libxml2, zlib, bzip2, which, file +, fetchpatch , openssl , enableDbi ? false, libdbi , enableMagnet ? false, lua5_1 @@ -13,23 +14,35 @@ stdenv.mkDerivation rec { pname = "lighttpd"; - version = "1.4.59"; + version = "1.4.64"; src = fetchurl { url = "https://download.lighttpd.net/lighttpd/releases-${lib.versions.majorMinor version}.x/${pname}-${version}.tar.xz"; - sha256 = "sha256-+5U9snPa7wjttuICVWyuij0H7tYIHJa9mQPblX0QhNU="; + sha256 = "sha256-4Uidn6dJb78uBxwzi1k7IwDTjCPx5ZZ+UsnvSC4bDiY="; }; + patches = [ + (fetchpatch { + name = "macos-10.12-avoid-ccrandomgeneratebytes.patch"; + url = "https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/6791f71b20a127b5b0091020dd065f4f9c7cafb6/diff?format=diff"; + sha256 = "1x5ybkvxwinl7s1nv3rrc57m4mj38q0gbyjp1ijr4w5lhabw4vzs"; + }) + ]; + postPatch = '' patchShebangs tests # Linux sandbox has an empty hostname and not /etc/hosts, which fails some tests sed -ire '/[$]self->{HOSTNAME} *=/i if(length($name)==0) { $name = "127.0.0.1" }' tests/LightyTest.pm + # it's difficult to prevent this test from trying to use /var/tmp (which + # the sandbox doesn't have) so until libredirect has support for mkstemp + # calls it's easiest to disable it + sed -i '/test_mod_ssi/d' src/t/test_mod.c ''; depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ pcre pcre.dev libxml2 zlib bzip2 which file openssl ] + buildInputs = [ pcre2 pcre2.dev libxml2 zlib bzip2 which file openssl ] ++ lib.optional enableDbi libdbi ++ lib.optional enableMagnet lua5_1 ++ lib.optional enableMysql libmysqlclient @@ -51,7 +64,7 @@ stdenv.mkDerivation rec { ++ lib.optional enableExtendedAttrs "--with-attr"; preConfigure = '' - export PATH=$PATH:${pcre.dev}/bin + export PATH=$PATH:${pcre2.dev}/bin sed -i "s:/usr/bin/file:${file}/bin/file:g" configure ''; |