mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib.fetchers: share default hash types between functions
This commit is contained in:
@@ -16,6 +16,8 @@ let
|
||||
sha512 = lib.fakeSha512;
|
||||
};
|
||||
|
||||
defaultHashTypes = [ "sha256" ];
|
||||
|
||||
inherit (lib)
|
||||
concatMapStringsSep
|
||||
head
|
||||
@@ -110,7 +112,7 @@ rec {
|
||||
*/
|
||||
normalizeHash =
|
||||
{
|
||||
hashTypes ? [ "sha256" ],
|
||||
hashTypes ? defaultHashTypes,
|
||||
required ? true,
|
||||
}:
|
||||
let
|
||||
@@ -198,7 +200,7 @@ rec {
|
||||
*/
|
||||
withNormalizedHash =
|
||||
{
|
||||
hashTypes ? [ "sha256" ],
|
||||
hashTypes ? defaultHashTypes,
|
||||
}:
|
||||
fetcher:
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user