From 0e5b1ff245cd4b03363a7bf093a094de0de1fc13 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Mon, 9 Sep 2024 02:01:47 -0300 Subject: [PATCH] add-nuget-deps: use NUGET_HTTP_CACHE_PATH from user's HOME --- pkgs/build-support/dotnet/add-nuget-deps/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/dotnet/add-nuget-deps/default.nix b/pkgs/build-support/dotnet/add-nuget-deps/default.nix index d4cd48de9fe6..2b5e28e2f6b1 100644 --- a/pkgs/build-support/dotnet/add-nuget-deps/default.nix +++ b/pkgs/build-support/dotnet/add-nuget-deps/default.nix @@ -87,12 +87,15 @@ attrs TMPDIR=$(mktemp -d -t fetch-deps-${finalPackage.name}.XXXXXX) trap 'chmod -R +w "$TMPDIR" && rm -fr "$TMPDIR"' EXIT + export NUGET_HTTP_CACHE_PATH=''${NUGET_HTTP_CACHE_PATH-~/.local/share/NuGet/v3-cache} + HOME=$TMPDIR/home mkdir "$HOME" cd "$TMPDIR" + NIX_BUILD_SHELL="${runtimeShell}" ${nix}/bin/nix-shell \ - --pure --run 'source "${innerScript}"' "${drv}" + --pure --keep NUGET_HTTP_CACHE_PATH --run 'source "${innerScript}"' "${drv}" ''; }; }