Author: viric
Date: Sat Apr  9 14:24:25 2011
New Revision: 26763
URL: https://svn.nixos.org/websvn/nix/?rev=26763&sc=1

Log:
Adding ldap support to apache (true by default).
I imagine noone would mind this 'addon' in their nixos apache installations.

Modified:
   nixpkgs/trunk/pkgs/development/libraries/apr-util/default.nix
   nixpkgs/trunk/pkgs/servers/http/apache-httpd/default.nix

Modified: nixpkgs/trunk/pkgs/development/libraries/apr-util/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/apr-util/default.nix       Sat Apr 
 9 13:37:11 2011        (r26762)
+++ nixpkgs/trunk/pkgs/development/libraries/apr-util/default.nix       Sat Apr 
 9 14:24:25 2011        (r26763)
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, apr, expat
 , bdbSupport ? false, db4 ? null
+, ldapSupport ? true, openldap
 }:
 
 assert bdbSupport -> db4 != null;
@@ -15,10 +16,14 @@
   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 = {

Modified: nixpkgs/trunk/pkgs/servers/http/apache-httpd/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/servers/http/apache-httpd/default.nix    Sat Apr  9 
13:37:11 2011        (r26762)
+++ nixpkgs/trunk/pkgs/servers/http/apache-httpd/default.nix    Sat Apr  9 
14:24:25 2011        (r26763)
@@ -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 @@
   };
 
   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 @@
     --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 = ''
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to