Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions pkgs/development/libraries/apr-util/default.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
{ 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 = {
homepage = http://apr.apache.org/;
description = "A companion library to APR, the Apache Portable Runtime";
};
}

2 changes: 1 addition & 1 deletion pkgs/development/libraries/apr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
20 changes: 8 additions & 12 deletions pkgs/development/libraries/openldap/default.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}
48 changes: 27 additions & 21 deletions pkgs/servers/http/apache-httpd/default.nix
Original file line number Diff line number Diff line change
@@ -1,53 +1,59 @@
{ 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 = ''
echo "removing manual"
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 ];
};
Expand Down