mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
build-support/hg: remove throwIf usage
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user