Skip to content

Commit

Permalink
postgresql: remove redundant static libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
abbradar committed Mar 1, 2017
1 parent 9a2b234 commit 5e074f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/servers/sql/postgresql/default.nix
Expand Up @@ -56,6 +56,14 @@ 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
'';

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

0 comments on commit 5e074f1

Please sign in to comment.