2008-10-06 15:38:45 +02:00
|
|
|
{ stdenv, fetchurl, openssl, perl, zlib
|
|
|
|
, sslSupport, proxySupport ? true
|
|
|
|
, apr, aprutil, pcre
|
2011-04-09 16:24:25 +02:00
|
|
|
, ldapSupport ? true, openldap
|
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;
|
2011-04-09 16:24:25 +02:00
|
|
|
assert ldapSupport -> aprutil.ldapSupport && openldap != null;
|
2003-12-21 22:25:38 +01:00
|
|
|
|
2009-08-07 17:26:13 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-10-25 15:13:15 +02:00
|
|
|
version = "2.2.17";
|
2009-08-07 17:26:13 +02:00
|
|
|
name = "apache-httpd-${version}";
|
2003-11-05 13:17:48 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-08-07 17:26:13 +02:00
|
|
|
url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
|
2010-10-25 15:13:15 +02:00
|
|
|
sha256 = "017vc5g0dwjycai2qa8427vkw6wpa57ylhajw6nrmynq7qgg32l6";
|
2003-11-05 17:28:26 +01:00
|
|
|
};
|
2003-11-05 13:17:48 +01:00
|
|
|
|
2008-10-06 15:38:45 +02:00
|
|
|
buildInputs = [perl apr aprutil pcre] ++
|
2011-04-09 16:59:06 +02:00
|
|
|
stdenv.lib.optional sslSupport openssl;
|
2008-02-18 15:59:48 +01:00
|
|
|
|
2010-10-03 11:18:03 +02:00
|
|
|
# An apr-util header file includes an apr header file
|
|
|
|
# through #include "" (quotes)
|
|
|
|
# passing simply CFLAGS did not help, then I go by NIX_CFLAGS_COMPILE
|
|
|
|
NIX_CFLAGS_COMPILE = "-iquote ${apr}/include/apr-1";
|
|
|
|
|
2008-02-18 15:59:48 +01:00
|
|
|
configureFlags = ''
|
|
|
|
--with-z=${zlib}
|
2008-10-06 15:38:45 +02:00
|
|
|
--with-pcre=${pcre}
|
2008-02-18 15:59:48 +01:00
|
|
|
--enable-mods-shared=all
|
|
|
|
--enable-authn-alias
|
|
|
|
${if proxySupport then "--enable-proxy" else ""}
|
|
|
|
${if sslSupport then "--enable-ssl --with-ssl=${openssl}" else ""}
|
2011-04-09 16:24:25 +02:00
|
|
|
${if ldapSupport then "--enable-ldap --enable-authnz-ldap" else ""}
|
2008-02-18 15:59:48 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
echo "removing manual"
|
|
|
|
rm -rf $out/manual
|
|
|
|
'';
|
2006-10-11 18:45:55 +02:00
|
|
|
|
2008-02-18 15:59:48 +01:00
|
|
|
passthru = {
|
2008-10-06 15:38:45 +02:00
|
|
|
inherit apr aprutil sslSupport proxySupport;
|
2008-02-18 15:59:48 +01:00
|
|
|
};
|
2010-10-21 17:39:53 +02: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/;
|
2010-10-21 17:39:53 +02:00
|
|
|
license = "ASL2.0";
|
2010-10-25 15:12:57 +02:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2006-10-11 18:45:55 +02:00
|
|
|
};
|
2003-11-05 13:17:48 +01:00
|
|
|
}
|