From 691bec7b0e62f881cba1494e984db25b32e70bde Mon Sep 17 00:00:00 2001 From: David McFarland Date: Mon, 8 Jul 2024 11:47:16 -0300 Subject: [PATCH] nuget-to-nix: fix hash generation when resolving multiple sources Fixes: 2280d5c467ff7d95ce4e1233408eae8fe98ddff1 --- pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh b/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh index 8cfbf649ad96..92b0200ec034 100755 --- a/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh +++ b/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh @@ -70,6 +70,7 @@ for package in *; do break else if hash=$(nix-prefetch-url "$url" 2>"$tmp"/error); then + hash="$(nix-hash --to-sri --type sha256 "$hash")" # If multiple remote sources are enabled, nuget will try them all # concurrently and use the one that responds first. We always use the # first source that has the package.