From 9d8e24e85485e263440c3a84a0f639d3425d7668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Sun, 7 Nov 2021 00:18:07 +0100 Subject: [PATCH] samba4: Fix all libraries This also fixes versioned so files that don't match *.so --- pkgs/servers/samba/4.x.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 8248becd3e42..6b49c0127fe4 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -159,7 +159,7 @@ stdenv.mkDerivation rec { # Use find -type f -executable -exec echo {} \; -exec sh -c 'ldd {} | grep "not found"' \; # Looks like a bug in installer scripts. postFixup = '' - export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)" + export SAMBA_LIBS="$(find $out -type f -regex '.*\.so\(\..*\)?' -exec dirname {} \; | sort | uniq)" read -r -d "" SCRIPT << EOF || true [ -z "\$SAMBA_LIBS" ] && exit 1; BIN='{}'; @@ -168,7 +168,7 @@ stdenv.mkDerivation rec { patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?; patchelf --shrink-rpath "\$BIN"; EOF - find $out -type f -name \*.so -exec $SHELL -c "$SCRIPT" \; + find $out -type f -regex '.*\.so\(\..*\)?' -exec $SHELL -c "$SCRIPT" \; # Samba does its own shebang patching, but uses build Python find "$out/bin" -type f -executable -exec \