apr-util: Cleanup

Add the required packages to buildInputs. Create a wrapper around
apr-1-config so that internal sed commands succeed.
This commit is contained in:
William A. Kennington III 2013-12-31 08:00:21 -06:00
parent 184dd198fb
commit 844ab16b90

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, apr, expat
{ stdenv, fetchurl, makeWrapper, apr, expat, gnused
, sslSupport ? true, openssl
, bdbSupport ? false, db4
, ldapSupport ? true, openldap
@ -8,6 +8,10 @@ assert sslSupport -> openssl != null;
assert bdbSupport -> db4 != null;
assert ldapSupport -> openldap != null;
let
optional = stdenv.lib.optional;
in
stdenv.mkDerivation rec {
name = "apr-util-1.5.3";
@ -24,7 +28,15 @@ stdenv.mkDerivation rec {
${stdenv.lib.optionalString ldapSupport "--with-ldap"}
'';
propagatedBuildInputs = stdenv.lib.optional ldapSupport openldap;
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"
'';
enableParallelBuilding = true;