From 6c5a9e5a438cd5f50d41cf21cd05fc50cd427a7e Mon Sep 17 00:00:00 2001 From: David McFarland Date: Thu, 5 Sep 2024 09:56:14 -0300 Subject: [PATCH] dotnet-sdk-setup-hook: use temporary symlink dir for NUGET_FALLBACK_PACKAGES Restore operations get extremely slow when there are a lot of paths in NUGET_FALLBACK_PACKAGES. --- pkgs/development/compilers/dotnet/dotnet-sdk-setup-hook.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/dotnet/dotnet-sdk-setup-hook.sh b/pkgs/development/compilers/dotnet/dotnet-sdk-setup-hook.sh index 4af67889b28b..fccf6b02aaeb 100644 --- a/pkgs/development/compilers/dotnet/dotnet-sdk-setup-hook.sh +++ b/pkgs/development/compilers/dotnet/dotnet-sdk-setup-hook.sh @@ -28,8 +28,9 @@ _linkPackages() { createNugetDirs() { nugetTemp=$PWD/.nuget-temp export NUGET_PACKAGES=$nugetTemp/packages + export NUGET_FALLBACK_PACKAGES=$nugetTemp/fallback nugetSource=$nugetTemp/source - mkdir -p "$NUGET_PACKAGES" "$nugetSource" + mkdir -p "$NUGET_PACKAGES" "$NUGET_FALLBACK_PACKAGES" "$nugetSource" dotnet new nugetconfig if [[ -z ${keepNugetConfig-} ]]; then @@ -44,7 +45,7 @@ configureNuget() { for x in "${!_nugetInputs[@]}"; do if [[ -d $x/share/nuget/packages ]]; then - addToSearchPathWithCustomDelimiter ";" NUGET_FALLBACK_PACKAGES "$x/share/nuget/packages" + _linkPackages "$x/share/nuget/packages" "$NUGET_FALLBACK_PACKAGES" fi if [[ -d $x/share/nuget/source ]]; then