lib.fetchers: reuse default hash names between calls

This commit is contained in:
Eman Resu
2026-05-19 21:56:30 -04:00
parent a64ab557a0
commit cb3f3435bb

View File

@@ -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;