nixpkgs/pkgs/servers/http/apache-httpd/default.nix
Lluís Batlle i Rossell 6dc839d344 Merging from trunk. I resolved some conflicts; I hope that well.
svn path=/nixpkgs/branches/stdenv-updates/; revision=24429
2010-10-23 14:52:21 +00:00

51 lines
1.2 KiB
Nix

{ stdenv, fetchurl, openssl, perl, zlib
, sslSupport, proxySupport ? true
, apr, aprutil, pcre
}:
assert sslSupport -> openssl != null;
stdenv.mkDerivation rec {
version = "2.2.16";
name = "apache-httpd-${version}";
src = fetchurl {
url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
sha1 = "ef92f5b3124fe5e9ba6121ea7f4bab8c014068f9";
};
#inherit sslSupport;
buildInputs = [perl apr aprutil pcre] ++
stdenv.lib.optional sslSupport openssl;
# 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";
configureFlags = ''
--with-z=${zlib}
--with-pcre=${pcre}
--enable-mods-shared=all
--enable-authn-alias
${if proxySupport then "--enable-proxy" else ""}
${if sslSupport then "--enable-ssl --with-ssl=${openssl}" else ""}
'';
postInstall = ''
echo "removing manual"
rm -rf $out/manual
'';
passthru = {
inherit apr aprutil sslSupport proxySupport;
};
meta = {
description = "Apache HTTPD, the world's most popular web server";
homepage = http://httpd.apache.org/;
license = "ASL2.0";
};
}