diff --git a/pkgs/build-support/dotnet/fetchnuget/default.nix b/pkgs/build-support/dotnet/fetchnuget/default.nix index eca601a746cf..99b70ee4a133 100644 --- a/pkgs/build-support/dotnet/fetchnuget/default.nix +++ b/pkgs/build-support/dotnet/fetchnuget/default.nix @@ -1,4 +1,5 @@ { + lib, fetchurl, buildDotnetPackage, unzip, @@ -14,10 +15,12 @@ attrs@{ ... }: 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 ( {