summary refs log tree commit diff
diff options
context:
space:
mode:
authorJack Kelly <jack.kelly@data61.csiro.au>2018-11-28 12:33:57 +1100
committerAustin Seipp <aseipp@pobox.com>2018-11-28 10:49:13 -0600
commit5987c5c694f3910e308beda967192cccf9a63610 (patch)
treee3bf467f48752009a03d2531b26c28f93b67ab65
parent8e97e8009f88380ec4975fb162969757d5037bdc (diff)
downloadnixpkgs-5987c5c694f3910e308beda967192cccf9a63610.tar
nixpkgs-5987c5c694f3910e308beda967192cccf9a63610.tar.gz
nixpkgs-5987c5c694f3910e308beda967192cccf9a63610.tar.bz2
nixpkgs-5987c5c694f3910e308beda967192cccf9a63610.tar.lz
nixpkgs-5987c5c694f3910e308beda967192cccf9a63610.tar.xz
nixpkgs-5987c5c694f3910e308beda967192cccf9a63610.tar.zst
nixpkgs-5987c5c694f3910e308beda967192cccf9a63610.zip
postgresql: Remove static libs using host platform extension
-rw-r--r--pkgs/servers/sql/postgresql/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index ee302b48ee4..ff365beb301 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -67,7 +67,8 @@ let
           # 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
+            ext="${stdenv.hostPlatform.extensions.sharedLibrary}"
+            if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then
               rm "$i"
             fi
           done