add-nuget-deps: use NUGET_HTTP_CACHE_PATH from user's HOME

This commit is contained in:
David McFarland 2024-09-09 02:01:47 -03:00
parent a4189437a3
commit 0e5b1ff245

View File

@ -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}"
'';
};
}