From 6cc57be289c32fb6a8b5859a9d46ed2d1c5e9c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 5 Dec 2015 13:15:41 +0100 Subject: [PATCH] apache modules: fix build problems pkgs.mod_evasive was removed, because that combination isn't supported (according to an assertion). --- pkgs/servers/http/apache-httpd/2.2.nix | 7 +++++-- pkgs/servers/http/apache-httpd/2.4.nix | 4 +++- pkgs/servers/http/apache-modules/mod_fastcgi/default.nix | 2 +- pkgs/top-level/all-packages.nix | 1 - 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/http/apache-httpd/2.2.nix b/pkgs/servers/http/apache-httpd/2.2.nix index 5ae4cfdaaf1f..bb4fa9782d6a 100644 --- a/pkgs/servers/http/apache-httpd/2.2.nix +++ b/pkgs/servers/http/apache-httpd/2.2.nix @@ -24,7 +24,8 @@ stdenv.mkDerivation rec { outputs = [ "dev" "out" "doc" ]; setOutputFlags = false; # it would move $out/modules, etc. - buildInputs = [ pkgconfig perl apr aprutil pcre zlib ] ++ + propagatedBuildInputs = [ apr ]; # otherwise mod_* fail to find includes often + buildInputs = [ pkgconfig perl aprutil pcre zlib ] ++ stdenv.lib.optional sslSupport openssl; # Required for ‘pthread_cancel’. @@ -34,6 +35,9 @@ stdenv.mkDerivation rec { sed -i config.layout -e "s|installbuilddir:.*|installbuilddir: $dev/share/build|" ''; + preConfigure = '' + configureFlags="$configureFlags --includedir=$dev/include" + ''; configureFlags = '' --with-z=${zlib} --with-pcre=${pcre} @@ -47,7 +51,6 @@ stdenv.mkDerivation rec { --enable-disk-cache --enable-file-cache --enable-mem-cache - --includedir=$(dev)/include --docdir=$(doc)/share/doc ''; diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index 9049b0122fd7..fe60fe2c87dc 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -39,6 +39,9 @@ stdenv.mkDerivation rec { # Required for ‘pthread_cancel’. NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + preConfigure = '' + configureFlags="$configureFlags --includedir=$dev/include" + ''; configureFlags = '' --with-apr=${apr} --with-apr-util=${aprutil} @@ -55,7 +58,6 @@ stdenv.mkDerivation rec { ${optionalString sslSupport "--enable-ssl"} ${optionalString luaSupport "--enable-lua --with-lua=${lua5}"} ${optionalString libxml2Support "--with-libxml2=${libxml2.dev}/include/libxml2"} - --includedir=$(dev)/include --docdir=$(doc)/share/doc ''; diff --git a/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix b/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix index e70c3105408f..178900570d07 100644 --- a/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix +++ b/pkgs/servers/http/apache-modules/mod_fastcgi/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { preBuild = '' cp Makefile.AP2 Makefile - makeFlags="top_dir=${apacheHttpd} prefix=$out" + makeFlags="top_dir=${apacheHttpd}/share prefix=$out" ''; meta = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac04a3af5d2d..03c384e1e87d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9239,7 +9239,6 @@ let # Backwards compatibility. mod_dnssd = pkgs.apacheHttpdPackages.mod_dnssd; - mod_evasive = pkgs.apacheHttpdPackages.mod_evasive; mod_fastcgi = pkgs.apacheHttpdPackages.mod_fastcgi; mod_python = pkgs.apacheHttpdPackages.mod_python; mod_wsgi = pkgs.apacheHttpdPackages.mod_wsgi;