Unverified Commit b6ababfa authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

fetchhg: fix hash assertion; make overridable when sha256 set (#423877)

parents f942f789 49ec48c3
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