From aff997917095e5e006624eaf8de3f1cd3c52f256 Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 11 May 2020 23:04:41 +0100 Subject: [PATCH] lib.fake{Sri => Hash}: fix and rename The previous hash was too short and caused evaluation-time errors like: invalid SRI hash 'sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' Additionally, since the fact that this is broken implies that nobody could have been using it, "SRI" is a bit of a vague and obscure term, `fakeSriHash` would be somewhat of a mouthful, and the relevant fetcher parameters are just called `hash`, rename it to `fakeHash`. --- lib/default.nix | 2 +- lib/deprecated.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index d00c4abec0a..e7f59a67abb 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -141,7 +141,7 @@ let mergeAttrsWithFunc mergeAttrsConcatenateValues mergeAttrsNoOverride mergeAttrByFunc mergeAttrsByFuncDefaults mergeAttrsByFuncDefaultsClean mergeAttrBy - fakeSri fakeSha256 fakeSha512 + fakeHash fakeSha256 fakeSha512 nixType imap; inherit (versions) splitVersion; diff --git a/lib/deprecated.nix b/lib/deprecated.nix index 8c4fe9c390c..be0ef904c66 100644 --- a/lib/deprecated.nix +++ b/lib/deprecated.nix @@ -272,7 +272,7 @@ rec { imap = imap1; # Fake hashes. Can be used as hash placeholders, when computing hash ahead isn't trivial - fakeSri = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; + fakeHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; fakeSha256 = "0000000000000000000000000000000000000000000000000000000000000000"; fakeSha512 = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; }