From d7726df8c0cf5a8ef5ffe51cec5507818bbfeb57 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 30 Dec 2022 00:24:28 +0000 Subject: [PATCH] minizip-ng: fix compat-mode findability for darwin, dynamic and static mode --- pkgs/development/libraries/minizip-ng/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/minizip-ng/default.nix b/pkgs/development/libraries/minizip-ng/default.nix index 8f12dc29784e..19cd07fc1601 100644 --- a/pkgs/development/libraries/minizip-ng/default.nix +++ b/pkgs/development/libraries/minizip-ng/default.nix @@ -51,13 +51,13 @@ stdenv.mkDerivation (finalAttrs: { "-DMZ_LIBCOMP=OFF" ]; - postInstall = let - libext = if stdenv.hostPlatform.isStatic then ".a" else ".so"; - in '' + postInstall = '' # make lib findable as libminizip-ng even if compat is enabled - if [ ! -e $out/lib/libminizip-ng${libext} ]; then - ln -s $out/lib/libminizip${libext} $out/lib/libminizip-ng${libext} - fi + for ext in so dylib a ; do + if [ -e $out/lib/libminizip.$ext ] && [ ! -e $out/lib/libminizip-ng.$ext ]; then + ln -s $out/lib/libminizip.$ext $out/lib/libminizip-ng.$ext + fi + done if [ ! -e $out/include/minizip-ng ]; then ln -s $out/include $out/include/minizip-ng fi