From 450ef3730cf64ee583e849a387dd834e08df366c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 9 Apr 2011 14:24:25 +0000 Subject: [PATCH] Adding ldap support to apache (true by default). I imagine noone would mind this 'addon' in their nixos apache installations. svn path=/nixpkgs/trunk/; revision=26763 --- pkgs/development/libraries/apr-util/default.nix | 5 +++++ pkgs/servers/http/apache-httpd/default.nix | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index c59184007e5..fc417b2b58a 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, apr, expat , bdbSupport ? false, db4 ? null +, ldapSupport ? true, openldap }: assert bdbSupport -> db4 != null; @@ -15,10 +16,14 @@ stdenv.mkDerivation rec { configureFlags = '' --with-apr=${apr} --with-expat=${expat} ${if bdbSupport then "--with-berkeley-db=${db4}" else ""} + ${if ldapSupport then "--with-ldap" else ""} ''; + + buildInputs = if ldapSupport then [ openldap ] else []; passthru = { inherit bdbSupport; + inherit ldapSupport; }; meta = { diff --git a/pkgs/servers/http/apache-httpd/default.nix b/pkgs/servers/http/apache-httpd/default.nix index ab3f6233185..73dd676e3fb 100644 --- a/pkgs/servers/http/apache-httpd/default.nix +++ b/pkgs/servers/http/apache-httpd/default.nix @@ -1,9 +1,11 @@ { stdenv, fetchurl, openssl, perl, zlib , sslSupport, proxySupport ? true , apr, aprutil, pcre +, ldapSupport ? true, openldap }: assert sslSupport -> openssl != null; +assert ldapSupport -> aprutil.ldapSupport && openldap != null; stdenv.mkDerivation rec { version = "2.2.17"; @@ -15,7 +17,8 @@ stdenv.mkDerivation rec { }; buildInputs = [perl apr aprutil pcre] ++ - stdenv.lib.optional sslSupport openssl; + stdenv.lib.optional sslSupport openssl ++ + stdenv.lib.optional ldapSupport openldap; # An apr-util header file includes an apr header file # through #include "" (quotes) @@ -29,6 +32,7 @@ stdenv.mkDerivation rec { --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 ""} ''; postInstall = ''