build-support/hg: remove throwIf usage

This commit is contained in:
Eman Resu
2026-05-26 14:22:46 -04:00
parent f5c31ce008
commit dded3e398f

View File

@@ -30,14 +30,18 @@ lib.extendMkDerivation {
outputHashAlgo = if finalAttrs.hash != null && finalAttrs.hash != "" then null else "sha256";
outputHashMode = "recursive";
outputHash = lib.throwIf (hash != null && sha256 != null) "Only one of sha256 or hash can be set" (
if finalAttrs.hash != null then
finalAttrs.hash
else if sha256 != null then
sha256
outputHash =
if (hash != null && sha256 != null) then
throw "Only one of sha256 or hash can be set"
else
""
);
(
if finalAttrs.hash != null then
finalAttrs.hash
else if sha256 != null then
sha256
else
""
);
inherit url rev hash;
inherit preferLocalBuild;