postgresql: Don't move libs unnecessarily out of $lib.

In particular, when static linking pkgconfig expects libpq.a in $lib
This commit is contained in:
Shea Levy 2019-02-18 20:31:09 -05:00
parent 266315c91d
commit bb52ff3df8
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
1 changed files with 3 additions and 2 deletions

View File

@ -76,7 +76,8 @@ let
postInstall =
''
moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it
moveToOutput "lib/*.a" "$out"
moveToOutput "lib/libpgcommon.a" "$out"
moveToOutput "lib/libpgport.a" "$out"
moveToOutput "lib/libecpg*" "$out"
# Prevent a retained dependency on gcc-wrapper.
@ -84,7 +85,7 @@ let
if [ -z "''${dontDisableStatic:-}" ]; then
# Remove static libraries in case dynamic are available.
for i in $out/lib/*.a; do
for i in $out/lib/*.a $lib/lib/*.a; do
name="$(basename "$i")"
ext="${stdenv.hostPlatform.extensions.sharedLibrary}"
if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then