about summary refs log tree commit diff
path: root/pkgs/build-support/dotnet
diff options
context:
space:
mode:
authorGuillaume Maudoux <layus.on@gmail.com>2023-05-17 09:53:06 +0200
committerGitHub <noreply@github.com>2023-05-17 09:53:06 +0200
commit33399c9de880f2dcd5cc3915c5b86108c9ccb2d5 (patch)
tree09e44afc0dbae9835b3bb3ff336103b13c703030 /pkgs/build-support/dotnet
parent8446674a89778e5b52fe3ea38631dc1faa47aa9a (diff)
parentc0c08de5b438f77698debfec757115cc3e13a5cc (diff)
Merge pull request #229008 from whonore/dafny-4
dafny: 2.3.0 -> 4.0.0
Diffstat (limited to 'pkgs/build-support/dotnet')
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/default.nix3
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh2
2 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
index bae7148283663..07e62835956fa 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix
+++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
@@ -261,6 +261,9 @@ stdenvNoCC.mkDerivation (args // {
         cd "$src"
         echo "Restoring project..."
 
+        ${dotnet-sdk}/bin/dotnet tool restore
+        mv $HOME/.nuget/packages/* $tmp/nuget_pkgs || true
+
         for rid in "${lib.concatStringsSep "\" \"" runtimeIds}"; do
             (( ''${#projectFiles[@]} == 0 )) && dotnetRestore "" "$rid"
 
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
index 1e33ebbaef714..0e502fe6a14d0 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
@@ -39,6 +39,8 @@ cat <<EOF > "./NuGet.config"
 </configuration>
 EOF
 
+    env dotnet tool restore --add-source "@nugetSource@/lib"
+
     for project in ${projectFile[@]} ${testProjectFile[@]-}; do
         dotnetRestore "$project"
     done