2006-02-28 13:01:39 +01:00
|
|
|
{ stdenv, fetchurl, openssl, db4, expat, perl, zlib
|
2008-02-18 15:59:48 +01:00
|
|
|
, sslSupport, db4Support, proxySupport ? true
|
2003-11-05 13:17:48 +01:00
|
|
|
}:
|
2003-12-21 22:25:38 +01:00
|
|
|
|
2004-03-27 16:47:48 +01:00
|
|
|
assert sslSupport -> openssl != null;
|
|
|
|
assert db4Support -> db4 != null;
|
|
|
|
assert expat != null && perl != null;
|
2003-12-21 22:25:38 +01:00
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2008-10-06 14:35:05 +02:00
|
|
|
name = "apache-httpd-2.2.9";
|
2003-11-05 13:17:48 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2008-10-06 14:58:21 +02:00
|
|
|
url = mirror://apache/httpd/httpd-2.2.9.tar.bz2;
|
2008-10-06 14:35:05 +02:00
|
|
|
md5 = "3afa8137dc1999be695a20b62fdf032b";
|
2003-11-05 17:28:26 +01:00
|
|
|
};
|
2003-11-05 13:17:48 +01:00
|
|
|
|
2008-02-18 15:59:48 +01:00
|
|
|
#inherit sslSupport db4Support;
|
2003-12-21 22:25:38 +01:00
|
|
|
|
2008-02-18 15:59:48 +01:00
|
|
|
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
|
|
|
|
'';
|
2006-10-11 18:45:55 +02:00
|
|
|
|
2007-11-23 14:09:22 +01:00
|
|
|
# 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
|
|
|
|
# Nixpkgs, this can go. In general, it's a problem that APR
|
|
|
|
# detects characteristics of the build system's kernel to decide
|
|
|
|
# what to use at runtime, since it's impure.
|
|
|
|
apr_cv_epoll = "no";
|
2008-02-18 15:59:48 +01:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit expat sslSupport db4Support proxySupport;
|
|
|
|
};
|
2007-11-23 14:09:22 +01:00
|
|
|
|
2006-10-11 18:45:55 +02:00
|
|
|
meta = {
|
|
|
|
description = "Apache HTTPD, the world's most popular web server";
|
2008-02-18 15:59:48 +01:00
|
|
|
homepage = http://httpd.apache.org/;
|
2006-10-11 18:45:55 +02:00
|
|
|
};
|
2003-11-05 13:17:48 +01:00
|
|
|
}
|