postgresql: Respect dontDisableStatic
This commit is contained in:
parent
1276a3b12a
commit
0578f07b91
|
@ -58,13 +58,15 @@ let
|
||||||
# Prevent a retained dependency on gcc-wrapper.
|
# Prevent a retained dependency on gcc-wrapper.
|
||||||
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
|
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
|
||||||
|
|
||||||
# Remove static libraries in case dynamic are available.
|
if [ -z "''${dontDisableStatic:-}" ]; then
|
||||||
for i in $out/lib/*.a; do
|
# Remove static libraries in case dynamic are available.
|
||||||
name="$(basename "$i")"
|
for i in $out/lib/*.a; do
|
||||||
if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
|
name="$(basename "$i")"
|
||||||
rm "$i"
|
if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
|
||||||
fi
|
rm "$i"
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = lib.optionalString (!stdenv.isDarwin)
|
postFixup = lib.optionalString (!stdenv.isDarwin)
|
||||||
|
|
Loading…
Reference in New Issue