From cb3f3435bbc4ee6a2068487f9911571b5b85a8ba Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Tue, 19 May 2026 21:56:30 -0400 Subject: [PATCH] lib.fetchers: reuse default hash names between calls --- lib/fetchers.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/fetchers.nix b/lib/fetchers.nix index 2ce5483e86e2..d4ae5f7dd996 100644 --- a/lib/fetchers.nix +++ b/lib/fetchers.nix @@ -1,10 +1,14 @@ # snippets that can be shared by multiple fetchers (pkgs/build-support) { lib }: let - commonH = hashTypes: rec { - hashNames = [ "hash" ] ++ hashTypes; - hashSet = genAttrs hashNames (const { }); - }; + commonH = + let + defaultHashNames = [ "hash" ]; + in + hashTypes: rec { + hashNames = defaultHashNames ++ hashTypes; + hashSet = genAttrs hashNames (const { }); + }; fakeH = { hash = lib.fakeHash;