2013-12-31 18:00:21 +04:00
|
|
|
{ stdenv, fetchurl, makeWrapper, apr, expat, gnused
|
2012-07-02 23:38:50 +04:00
|
|
|
, sslSupport ? true, openssl
|
2014-02-01 00:05:37 +04:00
|
|
|
, bdbSupport ? false, db
|
2015-06-05 16:50:14 +03:00
|
|
|
, ldapSupport ? !stdenv.isCygwin, openldap
|
2014-11-27 02:16:50 +03:00
|
|
|
, libiconv
|
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
2015-11-28 03:46:00 +03:00
|
|
|
, cyrus_sasl, autoreconfHook
|
2006-09-11 13:17:28 +04:00
|
|
|
}:
|
|
|
|
|
2012-07-02 23:38:50 +04:00
|
|
|
assert sslSupport -> openssl != null;
|
2014-02-01 00:05:37 +04:00
|
|
|
assert bdbSupport -> db != null;
|
2012-07-02 23:38:50 +04:00
|
|
|
assert ldapSupport -> openldap != null;
|
2006-09-11 13:17:28 +04:00
|
|
|
|
2015-06-15 14:16:27 +03:00
|
|
|
with stdenv.lib;
|
2013-12-31 18:00:21 +04:00
|
|
|
|
2009-08-07 19:26:13 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2014-09-24 23:03:40 +04:00
|
|
|
name = "apr-util-1.5.4";
|
2012-07-02 23:38:50 +04:00
|
|
|
|
2006-09-11 13:17:28 +04:00
|
|
|
src = fetchurl {
|
2009-08-07 19:26:13 +04:00
|
|
|
url = "mirror://apache/apr/${name}.tar.bz2";
|
2014-09-24 23:03:40 +04:00
|
|
|
sha256 = "0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6";
|
2006-09-11 13:17:28 +04:00
|
|
|
};
|
2012-07-02 23:38:50 +04:00
|
|
|
|
2016-01-05 11:42:56 +03:00
|
|
|
patches = optional stdenv.isFreeBSD ./include-static-dependencies.patch;
|
|
|
|
|
2015-10-18 14:29:23 +03:00
|
|
|
outputs = [ "dev" "out" ];
|
|
|
|
outputBin = "dev";
|
|
|
|
|
2016-01-05 11:42:56 +03:00
|
|
|
buildInputs = optional stdenv.isFreeBSD autoreconfHook;
|
2011-04-09 18:24:25 +04:00
|
|
|
|
2016-04-16 19:49:30 +03:00
|
|
|
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
|
2016-01-05 11:42:56 +03:00
|
|
|
++ optional (!stdenv.isCygwin) "--with-crypto"
|
2016-04-16 20:44:32 +03:00
|
|
|
++ optional sslSupport "--with-openssl=${openssl.dev}"
|
2016-01-05 11:42:56 +03:00
|
|
|
++ optional bdbSupport "--with-berkeley-db=${db}"
|
|
|
|
++ optional ldapSupport "--with-ldap=ldap"
|
|
|
|
++ optionals stdenv.isCygwin
|
|
|
|
[ "--without-pgsql" "--without-sqlite2" "--without-sqlite3"
|
|
|
|
"--without-freetds" "--without-berkeley-db" "--without-crypto" ]
|
|
|
|
;
|
2013-06-13 13:32:55 +04:00
|
|
|
|
2014-11-27 02:16:50 +03:00
|
|
|
propagatedBuildInputs = [ makeWrapper apr expat libiconv ]
|
2013-12-31 18:00:21 +04:00
|
|
|
++ optional sslSupport openssl
|
2014-02-01 00:05:37 +04:00
|
|
|
++ optional bdbSupport db
|
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
2015-11-28 03:46:00 +03:00
|
|
|
++ optional ldapSupport openldap
|
|
|
|
++ optional stdenv.isFreeBSD cyrus_sasl;
|
2013-12-31 18:00:21 +04:00
|
|
|
|
|
|
|
# Give apr1 access to sed for runtime invocations
|
|
|
|
postInstall = ''
|
2015-10-18 14:29:23 +03:00
|
|
|
for f in $out/lib/*.la $out/lib/apr-util-1/*.la; do
|
|
|
|
substituteInPlace $f --replace "${expat.dev}/lib" "${expat.out}/lib"
|
|
|
|
done
|
|
|
|
wrapProgram $dev/bin/apu-1-config --prefix PATH : "${gnused}/bin"
|
2013-12-31 18:00:21 +04:00
|
|
|
'';
|
2012-07-02 23:38:50 +04:00
|
|
|
|
2013-01-14 17:38:00 +04:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-02-05 14:41:49 +03:00
|
|
|
passthru = {
|
2012-07-02 23:38:50 +04:00
|
|
|
inherit sslSupport bdbSupport ldapSupport;
|
2008-02-05 14:41:49 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://apr.apache.org/;
|
|
|
|
description = "A companion library to APR, the Apache Portable Runtime";
|
2014-09-24 23:03:40 +04:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
2016-08-02 20:50:55 +03:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-02-05 14:41:49 +03:00
|
|
|
};
|
|
|
|
}
|