From 88c725ad84924e4df2a8d57ceb52ed059c05879d Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 18 Feb 2008 20:07:32 +0000 Subject: [PATCH] Forward port of Apache changes. svn path=/nixpkgs/branches/stdenv-updates/; revision=10736 --- pkgs/servers/http/apache-httpd/builder.sh | 29 ----------------- pkgs/servers/http/apache-httpd/default.nix | 36 +++++++++++++++++----- 2 files changed, 29 insertions(+), 36 deletions(-) delete mode 100644 pkgs/servers/http/apache-httpd/builder.sh diff --git a/pkgs/servers/http/apache-httpd/builder.sh b/pkgs/servers/http/apache-httpd/builder.sh deleted file mode 100644 index 3a5ccd846ee..00000000000 --- a/pkgs/servers/http/apache-httpd/builder.sh +++ /dev/null @@ -1,29 +0,0 @@ -buildInputs="$openssl $db4 $expat $perl" -source $stdenv/setup - -configureFlags="\ - --with-expat=$expat \ - --with-z=$zlib \ - --enable-mods-shared=all \ - --enable-authn-alias \ - --without-gdbm \ - --enable-threads \ - --with-devrandom=/dev/urandom" - -if test $db4Support; then - configureFlags="--with-berkeley-db=$db4 $configureFlags" -fi - -if test $sslSupport; then - configureFlags="--enable-ssl --with-ssl=$openssl $configureFlags" -fi - - -postInstall() { - echo "removing manual" - rm -rf $out/manual -} -postInstall=postInstall - - -genericBuild diff --git a/pkgs/servers/http/apache-httpd/default.nix b/pkgs/servers/http/apache-httpd/default.nix index 76865cf3426..4e2af7ff900 100644 --- a/pkgs/servers/http/apache-httpd/default.nix +++ b/pkgs/servers/http/apache-httpd/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, openssl, db4, expat, perl, zlib -, sslSupport, db4Support +, sslSupport, db4Support, proxySupport ? true }: assert sslSupport -> openssl != null; @@ -7,19 +7,36 @@ assert db4Support -> db4 != null; assert expat != null && perl != null; stdenv.mkDerivation { - name = "apache-httpd-2.2.8"; + name = "apache-httpd-2.2.8x"; - builder = ./builder.sh; src = fetchurl { url = http://archive.apache.org/dist/httpd/httpd-2.2.8.tar.bz2; md5 = "76d2598a4797163d07cd50e5304aa7cd"; }; - inherit sslSupport db4Support; + #inherit sslSupport db4Support; - inherit perl expat zlib; - openssl = if sslSupport then openssl else null; - db4 = if db4Support then db4 else null; + buildInputs = [expat perl] ++ + stdenv.lib.optional sslSupport openssl ++ + stdenv.lib.optional db4Support db4; + + configureFlags = '' + --with-expat=${expat} + --with-z=${zlib} + --enable-mods-shared=all + --enable-authn-alias + ${if proxySupport then "--enable-proxy" else ""} + --without-gdbm + --enable-threads + --with-devrandom=/dev/urandom + ${if sslSupport then "--enable-ssl --with-ssl=${openssl}" else ""} + ${if db4Support then "--with-berkeley-db=${db4}" else ""} + ''; + + postInstall = '' + echo "removing manual" + rm -rf $out/manual + ''; # For now, disable detection of epoll to ensure that Apache still # runs on Linux 2.4 kernels. Once we've dropped support for 2.4 in @@ -27,8 +44,13 @@ stdenv.mkDerivation { # detects characteristics of the build system's kernel to decide # what to use at runtime, since it's impure. apr_cv_epoll = "no"; + + passthru = { + inherit expat sslSupport db4Support proxySupport; + }; meta = { description = "Apache HTTPD, the world's most popular web server"; + homepage = http://httpd.apache.org/; }; }