1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 06:05:13 +00:00
nixpkgs/pkgs/servers/http/apache-httpd/2.2.nix

65 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, openssl, perl, zlib
, sslSupport, proxySupport ? true
, apr, aprutil, pcre
, ldapSupport ? true, openldap
, # Multi-processing module to use. This is built into the server and
# cannot be selected at runtime.
mpm ? "prefork"
}:
assert sslSupport -> openssl != null;
assert ldapSupport -> aprutil.ldapSupport && openldap != null;
assert mpm == "prefork" || mpm == "worker" || mpm == "event";
stdenv.mkDerivation rec {
version = "2.2.27";
name = "apache-httpd-${version}";
src = fetchurl {
url = "mirror://apache/httpd/httpd-${version}.tar.bz2";
sha256 = "0iw19y6knijinqwvv4q16fgq5xq8nwxdg14wrrbc0mfasvg76n90";
};
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";
# Required for pthread_cancel.
NIX_LDFLAGS = (if stdenv.isDarwin then "" else "-lgcc_s");
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 ""}
${if ldapSupport then "--enable-ldap --enable-authnz-ldap" else ""}
--with-mpm=${mpm}
'';
enableParallelBuilding = true;
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";
2014-02-18 02:13:45 +00:00
branch = "2.2";
homepage = http://httpd.apache.org/;
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ eelco simons lovek323 ];
};
}