From c861feee180e061dd9b45ecf7341acd50246bce9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Sep 2016 11:31:39 +0200 Subject: openldap: Get rid of runtime dependency on gcc The problem here was that the openldap binaries had /tmp/... in their RPATH *before* $out/lib, so patchelf --shrink-rpath considered the $out/lib entry unused. As a workaround, use NIX_LDFLAGS_BEFORE to ensure a proper order. --- pkgs/development/libraries/openldap/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index 00b4139dc7c..aa55d03568e 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { # TODO: separate "out" and "bin" outputs = [ "dev" "out" "man" "docdev" ]; + enableParallelBuilding = true; + buildInputs = [ openssl cyrus_sasl db groff ]; configureFlags = @@ -20,13 +22,18 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl" ++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic"; - dontPatchELF = 1; # !!! + # Workaround for the issue described in https://github.com/NixOS/patchelf/pull/98. + preConfigure = '' + export NIX_LDFLAGS_BEFORE+=" -rpath $out/lib" + ''; # Fixup broken libtool preFixup = '' sed -e 's,-lsasl2,-L${cyrus_sasl.out}/lib -lsasl2,' \ -e 's,-lssl,-L${openssl.out}/lib -lssl,' \ -i $out/lib/libldap.la -i $out/lib/libldap_r.la + + rm -rf $out/var ''; meta = with stdenv.lib; { -- cgit 1.4.1