postgresql: Respect dontDisableStatic

This commit is contained in:
Shea Levy 2018-01-11 09:19:46 -05:00
parent 1276a3b12a
commit 0578f07b91
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
1 changed files with 9 additions and 7 deletions

View File

@ -58,6 +58,7 @@ let
# Prevent a retained dependency on gcc-wrapper.
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
if [ -z "''${dontDisableStatic:-}" ]; then
# Remove static libraries in case dynamic are available.
for i in $out/lib/*.a; do
name="$(basename "$i")"
@ -65,6 +66,7 @@ let
rm "$i"
fi
done
fi
'';
postFixup = lib.optionalString (!stdenv.isDarwin)