Skip to content

Commit 0578f07

Browse files
committedJan 11, 2018
postgresql: Respect dontDisableStatic
1 parent 1276a3b commit 0578f07

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed
 

‎pkgs/servers/sql/postgresql/default.nix

+9-7
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ let
5858
# Prevent a retained dependency on gcc-wrapper.
5959
substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv.cc}/bin/ld ld
6060
61-
# Remove static libraries in case dynamic are available.
62-
for i in $out/lib/*.a; do
63-
name="$(basename "$i")"
64-
if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
65-
rm "$i"
66-
fi
67-
done
61+
if [ -z "''${dontDisableStatic:-}" ]; then
62+
# Remove static libraries in case dynamic are available.
63+
for i in $out/lib/*.a; do
64+
name="$(basename "$i")"
65+
if [ -e "$lib/lib/''${name%.a}.so" ] || [ -e "''${i%.a}.so" ]; then
66+
rm "$i"
67+
fi
68+
done
69+
fi
6870
'';
6971

7072
postFixup = lib.optionalString (!stdenv.isDarwin)

0 commit comments

Comments
 (0)
Please sign in to comment.