mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib.fetchers: reuse default hash names between calls
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user