2013-12-31 15:00:21 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, apr, expat, gnused
|
2012-07-02 21:38:50 +02:00
|
|
|
, sslSupport ? true, openssl
|
2014-01-31 21:05:37 +01:00
|
|
|
, bdbSupport ? false, db
|
2013-01-07 16:58:09 +01:00
|
|
|
, ldapSupport ? true, openldap
|
2006-09-11 11:17:28 +02:00
|
|
|
}:
|
|
|
|
|
2012-07-02 21:38:50 +02:00
|
|
|
assert sslSupport -> openssl != null;
|
2014-01-31 21:05:37 +01:00
|
|
|
assert bdbSupport -> db != null;
|
2012-07-02 21:38:50 +02:00
|
|
|
assert ldapSupport -> openldap != null;
|
2006-09-11 11:17:28 +02:00
|
|
|
|
2013-12-31 15:00:21 +01:00
|
|
|
let
|
|
|
|
optional = stdenv.lib.optional;
|
|
|
|
in
|
|
|
|
|
2009-08-07 17:26:13 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2014-09-24 21:03:40 +02:00
|
|
|
name = "apr-util-1.5.4";
|
2012-07-02 21:38:50 +02:00
|
|
|
|
2006-09-11 11:17:28 +02:00
|
|
|
src = fetchurl {
|
2009-08-07 17:26:13 +02:00
|
|
|
url = "mirror://apache/apr/${name}.tar.bz2";
|
2014-09-24 21:03:40 +02:00
|
|
|
sha256 = "0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6";
|
2006-09-11 11:17:28 +02:00
|
|
|
};
|
2012-07-02 21:38:50 +02:00
|
|
|
|
2008-02-05 12:41:49 +01:00
|
|
|
configureFlags = ''
|
2006-09-11 11:17:28 +02:00
|
|
|
--with-apr=${apr} --with-expat=${expat}
|
2012-07-02 21:38:50 +02:00
|
|
|
--with-crypto
|
|
|
|
${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"}
|
2014-01-31 21:05:37 +01:00
|
|
|
${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db}"}
|
2012-07-02 21:38:50 +02:00
|
|
|
${stdenv.lib.optionalString ldapSupport "--with-ldap"}
|
2008-02-05 12:41:49 +01:00
|
|
|
'';
|
2011-04-09 16:24:25 +02:00
|
|
|
|
2013-12-31 15:00:21 +01:00
|
|
|
propagatedBuildInputs = [ makeWrapper apr expat ]
|
|
|
|
++ optional sslSupport openssl
|
2014-01-31 21:05:37 +01:00
|
|
|
++ optional bdbSupport db
|
2013-12-31 15:00:21 +01:00
|
|
|
++ 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 21:38:50 +02:00
|
|
|
|
2013-01-14 14:38:00 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-02-05 12:41:49 +01:00
|
|
|
passthru = {
|
2012-07-02 21:38:50 +02:00
|
|
|
inherit sslSupport bdbSupport ldapSupport;
|
2008-02-05 12:41:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://apr.apache.org/;
|
|
|
|
description = "A companion library to APR, the Apache Portable Runtime";
|
2014-09-24 21:03:40 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
2008-02-05 12:41:49 +01:00
|
|
|
};
|
|
|
|
}
|