diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index ce6337b3b6ad8..ad02f9b84ccee 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -1,29 +1,33 @@ { stdenv, fetchurl, apr, expat -, bdbSupport ? false, db4 ? null -, ldapSupport ? !stdenv.isDarwin, openldap +, sslSupport ? true, openssl +, bdbSupport ? false, db4 +, ldapSupport ? true, openldap }: +assert sslSupport -> openssl != null; assert bdbSupport -> db4 != null; +assert ldapSupport -> openldap != null; stdenv.mkDerivation rec { name = "apr-util-1.4.1"; - + src = fetchurl { url = "mirror://apache/apr/${name}.tar.bz2"; md5 = "52b31b33fb1aa16e65ddaefc76e41151"; }; - + configureFlags = '' --with-apr=${apr} --with-expat=${expat} - ${if bdbSupport then "--with-berkeley-db=${db4}" else ""} - ${if ldapSupport then "--with-ldap" else ""} + --with-crypto + ${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"} + ${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db4}"} + ${stdenv.lib.optionalString ldapSupport "--with-ldap"} ''; propagatedBuildInputs = stdenv.lib.optional ldapSupport openldap; - + passthru = { - inherit bdbSupport; - inherit ldapSupport; + inherit sslSupport bdbSupport ldapSupport; }; meta = { @@ -31,4 +35,3 @@ stdenv.mkDerivation rec { description = "A companion library to APR, the Apache Portable Runtime"; }; } - diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index 8c3d5c03496e9..07a565596bbcb 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # Including the Windows headers breaks unistd.h. # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 ++ stdenv.lib.optional (stdenv.system == "i686-cygwin") "ac_cv_header_windows_h=no"; - + meta = { homepage = http://apr.apache.org/; description = "The Apache Portable Runtime library"; diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index 22f98535803c7..5c9fedb7fc553 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -1,23 +1,19 @@ {stdenv, fetchurl, openssl, cyrus_sasl, db4, groff}: -stdenv.mkDerivation { - name = "openldap-2.4.13"; - +stdenv.mkDerivation rec { + name = "openldap-2.4.31"; + src = fetchurl { - url = ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/openldap-2.4.13.tgz; - sha256 = "18l06v8z5wnr92m28bwxd27l6kw3i0gi00yivv603da6m76cm0ic"; + url = "ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/${name}.tgz"; + sha256 = "bde845840df4794b869a6efd6a6b1086f80989038e4844b2e4d7d6b57b39c5b6"; }; - + buildInputs = [openssl cyrus_sasl db4 groff]; - - dontPatchELF = 1; # !!! - # Build on Glibc 2.9. - # http://www.openldap.org/lists/openldap-bugs/200808/msg00130.html - NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE"; + dontPatchELF = 1; # !!! meta = { - homepage = http://www.openldap.org/; + homepage = "http://www.openldap.org/"; description = "An open source implementation of the Lightweight Directory Access Protocol"; }; } diff --git a/pkgs/servers/http/apache-httpd/default.nix b/pkgs/servers/http/apache-httpd/default.nix index 1f5e1ae69bcef..043a15a984b4b 100644 --- a/pkgs/servers/http/apache-httpd/default.nix +++ b/pkgs/servers/http/apache-httpd/default.nix @@ -1,37 +1,42 @@ -{ stdenv, fetchurl, openssl, perl, zlib -, sslSupport, proxySupport ? true -, apr, aprutil, pcre +{ stdenv, fetchurl, perl, zlib, apr, aprutil, pcre +, proxySupport ? true +, sslSupport ? true, openssl , ldapSupport ? true, openldap +, libxml2Support ? true, libxml2 +, luaSupport ? false, lua5 }: -assert sslSupport -> openssl != null; +let optional = stdenv.lib.optional; + optionalString = stdenv.lib.optionalString; +in + +assert sslSupport -> aprutil.sslSupport && openssl != null; assert ldapSupport -> aprutil.ldapSupport && openldap != null; stdenv.mkDerivation rec { - version = "2.2.22"; + version = "2.4.2"; name = "apache-httpd-${version}"; src = fetchurl { url = "mirror://apache/httpd/httpd-${version}.tar.bz2"; - sha1 = "766cd0843050a8dfb781e48b976f3ba6ebcf8696"; + sha1 = "8d391db515edfb6623c0c7c6ce5c1b2e1f7c64c2"; }; - 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"; + buildInputs = [perl] ++ + optional ldapSupport openldap ++ # there is no --with-ldap flag + optional libxml2Support libxml2; # there is --with-libxml2, but it doesn't work configureFlags = '' + --with-apr=${apr} + --with-apr-util=${aprutil} --with-z=${zlib} --with-pcre=${pcre} + --disable-maintainer-mode + --disable-debugger-mode --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 ""} + ${optionalString proxySupport "--enable-proxy"} + ${optionalString sslSupport "--enable-ssl --with-ssl=${openssl}"} + ${optionalString luaSupport "--enable-lua --with-lua=${lua5}"} ''; postInstall = '' @@ -39,15 +44,16 @@ stdenv.mkDerivation rec { rm -rf $out/manual ''; + enableParallelBuilding = true; + passthru = { - inherit apr aprutil sslSupport proxySupport; + inherit apr aprutil sslSupport proxySupport ldapSupport; }; meta = { description = "Apache HTTPD, the world's most popular web server"; - homepage = http://httpd.apache.org/; - license = "ASL2.0"; - + homepage = "http://httpd.apache.org/"; + license = stdenv.lib.licenses.asl20; platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.simons ]; };