# make sure to use a guix-installed ldd if not running this script on GuixSD for p in /gnu/store/*/; do matches=no if [ "$(find "$p" -type f -exec \ sh -c 'for f; do ldd "$f" 2>/dev/null \ | grep -Evq "/gnu/store/|linux-vdso\.so|not a dynamic exec|statically linked" && exit; done; exit 1' \ -- {} \; -print -quit)" \ != "" ]; then matches=yes fi if [ $matches = yes ]; then echo "$p"; echo; find "$p" -type f -exec \ sh -c 'for f; do if ldd "$f" 2>/dev/null \ | grep -Evq "/gnu/store/|linux-vdso\.so|not a dynamic exec|statically linked"; then printf " %s\n" "$f" ldd "$f" 2>/dev/null \ | grep -Ev "/gnu/store/|linux-vdso\.so|not a dynamic exec|statically linked" fi done' \ -- {} + echo; echo; fi done