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

In particular, when static linking pkgconfig expects libpq.a in $lib
wip/yesman
Shea Levy 5 years ago
parent 266315c91d
commit bb52ff3df8
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
  1. 5
      pkgs/servers/sql/postgresql/default.nix

@ -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

Loading…
Cancel
Save