summary refs log tree commit diff
path: root/pkgs/development/libraries/openldap/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-01 11:31:39 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-01 11:43:30 +0200
commitc861feee180e061dd9b45ecf7341acd50246bce9 (patch)
treeecd89c5cc680d9e685e9bd557752c19bfee753ca /pkgs/development/libraries/openldap/default.nix
parentf1035132f31c8b5f3478f4654d5a4d1768117440 (diff)
downloadnixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.tar
nixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.tar.gz
nixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.tar.bz2
nixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.tar.lz
nixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.tar.xz
nixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.tar.zst
nixpkgs-c861feee180e061dd9b45ecf7341acd50246bce9.zip
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.
Diffstat (limited to 'pkgs/development/libraries/openldap/default.nix')
-rw-r--r--pkgs/development/libraries/openldap/default.nix9
1 files changed, 8 insertions, 1 deletions
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; {