2008-10-06 06:38:45 -07:00
|
|
|
{ stdenv, fetchurl, openssl, perl, zlib
|
|
|
|
, sslSupport, proxySupport ? true
|
|
|
|
, apr, aprutil, pcre
|
2011-04-09 07:24:25 -07:00
|
|
|
, ldapSupport ? true, openldap
|
2003-11-05 04:17:48 -08:00
|
|
|
}:
|
2003-12-21 13:25:38 -08:00
|
|
|
|
2004-03-27 07:47:48 -08:00
|
|
|
assert sslSupport -> openssl != null;
|
2011-04-09 07:24:25 -07:00
|
|
|
assert ldapSupport -> aprutil.ldapSupport && openldap != null;
|
2003-12-21 13:25:38 -08:00
|
|
|
|
2009-08-07 08:26:13 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2012-02-15 08:21:44 -08:00
|
|
|
version = "2.2.22";
|
2009-08-07 08:26:13 -07:00
|
|
|
name = "apache-httpd-${version}";
|
2003-11-05 04:17:48 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-08-07 08:26:13 -07:00
|
|
|
url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
|
2012-02-15 08:21:44 -08:00
|
|
|
sha1 = "766cd0843050a8dfb781e48b976f3ba6ebcf8696";
|
2003-11-05 08:28:26 -08:00
|
|
|
};
|
2003-11-05 04:17:48 -08:00
|
|
|
|
2008-10-06 06:38:45 -07:00
|
|
|
buildInputs = [perl apr aprutil pcre] ++
|
2011-04-09 07:59:06 -07:00
|
|
|
stdenv.lib.optional sslSupport openssl;
|
2008-02-18 06:59:48 -08:00
|
|
|
|
2010-10-03 02:18:03 -07: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 06:59:48 -08:00
|
|
|
configureFlags = ''
|
|
|
|
--with-z=${zlib}
|
2008-10-06 06:38:45 -07:00
|
|
|
--with-pcre=${pcre}
|
2008-02-18 06:59:48 -08: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 07:24:25 -07:00
|
|
|
${if ldapSupport then "--enable-ldap --enable-authnz-ldap" else ""}
|
2008-02-18 06:59:48 -08:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
echo "removing manual"
|
|
|
|
rm -rf $out/manual
|
|
|
|
'';
|
2006-10-11 09:45:55 -07:00
|
|
|
|
2008-02-18 06:59:48 -08:00
|
|
|
passthru = {
|
2008-10-06 06:38:45 -07:00
|
|
|
inherit apr aprutil sslSupport proxySupport;
|
2008-02-18 06:59:48 -08:00
|
|
|
};
|
2010-10-21 08:39:53 -07:00
|
|
|
|
2006-10-11 09:45:55 -07:00
|
|
|
meta = {
|
|
|
|
description = "Apache HTTPD, the world's most popular web server";
|
2008-02-18 06:59:48 -08:00
|
|
|
homepage = http://httpd.apache.org/;
|
2010-10-21 08:39:53 -07:00
|
|
|
license = "ASL2.0";
|
2010-10-25 06:12:57 -07:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.simons ];
|
2006-10-11 09:45:55 -07:00
|
|
|
};
|
2003-11-05 04:17:48 -08:00
|
|
|
}
|