ghcWithPackages: more robust searching for dylib to link on macOS (#411741)

authored by Nick Cao and committed by GitHub 1c7b92be 81da63ba

+2 -2
+2 -2
pkgs/development/haskell-modules/with-packages-wrapper.nix
··· 156 156 157 157 # Boot libraries are located differently than other libraries since GHC 9.6, so handle them separately. 158 158 if [[ -x "${bootLibDir}" ]]; then 159 - ln -s "${bootLibDir}"/*.dylib $dynamicLinksDir 159 + find "${bootLibDir}" -name '*.dylib' -exec ln -s {} "$dynamicLinksDir" \; 160 160 fi 161 161 162 162 for d in $(grep -Poz "dynamic-library-dirs:\s*\K .+\n" $packageConfDir/*|awk '{print $2}'|sort -u); do 163 - ln -s $d/*.dylib $dynamicLinksDir 163 + find "$d" -name '*.dylib' -exec ln -s {} "$dynamicLinksDir" \; 164 164 done 165 165 for f in $packageConfDir/*.conf; do 166 166 # Initially, $f is a symlink to a read-only file in one of the inputs