From 74597434a750761be346f415cb8e7fdb19126e4f Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 4 Jul 2024 17:52:24 +0800 Subject: [PATCH] buildDotNetGlobalTool: add SRI hash support --- .../build-support/dotnet/build-dotnet-global-tool/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix b/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix index 7ae9cfc9f661..48e6e8ea470a 100644 --- a/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix +++ b/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix @@ -5,6 +5,8 @@ # Name of the nuget package to install, if different from pname , nugetName ? pname # Hash of the nuget package to install, will be given on first build + # nugetHash uses SRI hash and should be preferred +, nugetHash ? "" , nugetSha256 ? "" # Additional nuget deps needed by the tool package , nugetDeps ? (_: []) @@ -24,7 +26,7 @@ buildDotnetModule (args // { nugetDeps = mkNugetDeps { name = pname; nugetDeps = { fetchNuGet }: [ - (fetchNuGet { pname = nugetName; inherit version; sha256 = nugetSha256; }) + (fetchNuGet { pname = nugetName; inherit version; sha256 = nugetSha256; hash = nugetHash; }) ] ++ (nugetDeps fetchNuGet); };