Skip to content

Commit

Permalink
postgresql: Respect dontDisableStatic
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Jan 11, 2018
1 parent 1276a3b commit 0578f07
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pkgs/servers/sql/postgresql/default.nix
Expand Up @@ -58,13 +58,15 @@ let
# Prevent a retained dependency on gcc-wrapper.
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
# Remove static libraries in case dynamic are available.
for i in $out/lib/*.a; do
name="$(basename "$i")"
if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
rm "$i"
fi
done
if [ -z "''${dontDisableStatic:-}" ]; then
# Remove static libraries in case dynamic are available.
for i in $out/lib/*.a; do
name="$(basename "$i")"
if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
rm "$i"
fi
done
fi
'';

postFixup = lib.optionalString (!stdenv.isDarwin)
Expand Down

0 comments on commit 0578f07

Please sign in to comment.