fetchnuget: improve "multiple hashes" error message

Changed files
+5 -2
pkgs
build-support
dotnet
fetchnuget
+5 -2
pkgs/build-support/dotnet/fetchnuget/default.nix
···
{
+
lib,
fetchurl,
buildDotnetPackage,
unzip,
···
...
}:
if md5 != "" then
-
throw "fetchnuget does not support md5 anymore, please use 'hash' attribute with SRI hash"
+
throw "fetchnuget does not support md5 anymore, please use 'hash' attribute with SRI hash: ${
+
lib.generators.toPretty { } attrs
+
}"
# This is also detected in fetchurl, but we just throw here to avoid confusion
else if (sha256 != "" && hash != "") then
-
throw "multiple hashes passed to fetchNuGet"
+
throw "multiple hashes passed to fetchNuGet: ${lib.generators.toPretty { } url}"
else
buildDotnetPackage (
{