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.
This commit is contained in:
parent
f1035132f3
commit
c861feee18
@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
|
|||||||
# TODO: separate "out" and "bin"
|
# TODO: separate "out" and "bin"
|
||||||
outputs = [ "dev" "out" "man" "docdev" ];
|
outputs = [ "dev" "out" "man" "docdev" ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [ openssl cyrus_sasl db groff ];
|
buildInputs = [ openssl cyrus_sasl db groff ];
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
@ -20,13 +22,18 @@ stdenv.mkDerivation rec {
|
|||||||
++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl"
|
++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl"
|
||||||
++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
|
++ 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
|
# Fixup broken libtool
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
sed -e 's,-lsasl2,-L${cyrus_sasl.out}/lib -lsasl2,' \
|
sed -e 's,-lsasl2,-L${cyrus_sasl.out}/lib -lsasl2,' \
|
||||||
-e 's,-lssl,-L${openssl.out}/lib -lssl,' \
|
-e 's,-lssl,-L${openssl.out}/lib -lssl,' \
|
||||||
-i $out/lib/libldap.la -i $out/lib/libldap_r.la
|
-i $out/lib/libldap.la -i $out/lib/libldap_r.la
|
||||||
|
|
||||||
|
rm -rf $out/var
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user