···5151 dotnetRestore "$project"
5252 done
53535454+ echo "Fixing up native binaries..."
5555+ # Find all native binaries and nuget libraries, and fix them up,
5656+ # by setting the proper interpreter and rpath to some commonly used libraries
5757+ for binary in $(find "$HOME/.nuget/packages/" -type f -executable); do
5858+ if patchelf --print-interpreter "$binary" >/dev/null 2>/dev/null; then
5959+ echo "Found binary: $binary, fixing it up..."
6060+ patchelf --set-interpreter "$(cat "@dynamicLinker@")" "$binary"
6161+6262+ # This makes sure that if the binary requires some specific runtime dependencies, it can find it.
6363+ # This fixes dotnet-built binaries like crossgen2
6464+ patchelf \
6565+ --add-needed libicui18n.so \
6666+ --add-needed libicuuc.so \
6767+ --add-needed libz.so \
6868+ --add-needed libssl.so \
6969+ "$binary"
7070+7171+ patchelf --set-rpath "@libPath@" "$binary"
7272+ fi
7373+ done
7474+5475 runHook postConfigure
55765677 echo "Finished dotnetConfigureHook"