2013-12-31 14:00:21 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, apr, expat, gnused
|
2012-07-02 19:38:50 +00:00
|
|
|
, sslSupport ? true, openssl
|
|
|
|
, bdbSupport ? false, db4
|
2013-01-07 15:58:09 +00:00
|
|
|
, ldapSupport ? true, openldap
|
2006-09-11 09:17:28 +00:00
|
|
|
}:
|
|
|
|
|
2012-07-02 19:38:50 +00:00
|
|
|
assert sslSupport -> openssl != null;
|
2006-09-11 09:47:58 +00:00
|
|
|
assert bdbSupport -> db4 != null;
|
2012-07-02 19:38:50 +00:00
|
|
|
assert ldapSupport -> openldap != null;
|
2006-09-11 09:17:28 +00:00
|
|
|
|
2013-12-31 14:00:21 +00:00
|
|
|
let
|
|
|
|
optional = stdenv.lib.optional;
|
|
|
|
in
|
|
|
|
|
2009-08-07 15:26:13 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-12-09 08:48:41 +00:00
|
|
|
name = "apr-util-1.5.3";
|
2012-07-02 19:38:50 +00:00
|
|
|
|
2006-09-11 09:17:28 +00:00
|
|
|
src = fetchurl {
|
2009-08-07 15:26:13 +00:00
|
|
|
url = "mirror://apache/apr/${name}.tar.bz2";
|
2013-12-09 08:48:41 +00:00
|
|
|
sha256 = "0s1rpqjy5xr03k9s4xrsm5wvhj5286vlkf6jvqayw99yy5sb3vbq";
|
2006-09-11 09:17:28 +00:00
|
|
|
};
|
2012-07-02 19:38:50 +00:00
|
|
|
|
2008-02-05 11:41:49 +00:00
|
|
|
configureFlags = ''
|
2006-09-11 09:17:28 +00:00
|
|
|
--with-apr=${apr} --with-expat=${expat}
|
2012-07-02 19:38:50 +00:00
|
|
|
--with-crypto
|
|
|
|
${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"}
|
|
|
|
${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db4}"}
|
|
|
|
${stdenv.lib.optionalString ldapSupport "--with-ldap"}
|
2008-02-05 11:41:49 +00:00
|
|
|
'';
|
2011-04-09 14:24:25 +00:00
|
|
|
|
2013-12-31 14:00:21 +00:00
|
|
|
propagatedBuildInputs = [ makeWrapper apr expat ]
|
|
|
|
++ optional sslSupport openssl
|
|
|
|
++ optional bdbSupport db4
|
|
|
|
++ optional ldapSupport openldap;
|
|
|
|
|
|
|
|
# Give apr1 access to sed for runtime invocations
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/apu-1-config --prefix PATH : "${gnused}/bin"
|
|
|
|
'';
|
2012-07-02 19:38:50 +00:00
|
|
|
|
2013-01-14 13:38:00 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-02-05 11:41:49 +00:00
|
|
|
passthru = {
|
2012-07-02 19:38:50 +00:00
|
|
|
inherit sslSupport bdbSupport ldapSupport;
|
2008-02-05 11:41:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://apr.apache.org/;
|
|
|
|
description = "A companion library to APR, the Apache Portable Runtime";
|
|
|
|
};
|
|
|
|
}
|