Commit 49ec48c3 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

fetchhg: fix hash assertion; make overridable when sha256 set

Fix commit ef2f8315 ("fetchhg: make argument hash overridable")
parent 07f4a23c
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -30,9 +30,7 @@ lib.extendMkDerivation {

      outputHashAlgo = if finalAttrs.hash != null && finalAttrs.hash != "" then null else "sha256";
      outputHashMode = "recursive";
      outputHash =
        lib.throwIf (finalAttrs.hash != null && sha256 != null) "Only one of sha256 or hash can be set"
          (
      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