From 31dca40168444043f52d6895eb7ce08f111a90e2 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 12 Jun 2025 15:45:26 +0200 Subject: [PATCH] ljdsaljkadslkj --- overlays.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/overlays.nix b/overlays.nix index edaeb67..6678942 100755 --- a/overlays.nix +++ b/overlays.nix @@ -268,17 +268,23 @@ let prev.runCommandLocal "${finalAttrs.finalPackage.name}-ldd" { nativeBuildInputs = [ + prev.glibc.bin prev.fd ]; } '' worker() ( local output - set +e - output="$(ldd "$1")" - if [[ $? -ne 0 ]] || grep <<<"$output" -q " not found"; then - echo "$1" + set -u +e + output="$(ldd "$1" 2>&1)" + retcode="$?" + if [[ "$retcode" -ne 0 && "$output" != $'$\tnot a dynamic executable' ]]; then + echo "error: ldd $1 (retcode=$retcode)" + cat <<<"$output" + touch any_error + elif grep <<<"$output" -q " not found"; then # TODO: show executable permission errors too + echo "error: ldd $1 (log detection)" grep <<<"$output" " not found" touch any_error fi @@ -295,7 +301,7 @@ let --hidden --no-ignore --follow # symlinks - -x bash -c "$(declare -f worker); worker \"\$@\"" + -x bash -c "$(declare -f worker); worker \"\$@\"" -- ) fd "''${fd_args[@]}"