···120 else throw "fetchurl requires either `url` or `urls` to be set";
121122 hash_ =
123- # Many other combinations don't make sense, but this is the most common one:
124- if hash != "" && sha256 != "" then throw "multiple hashes passed to fetchurl" else
125126 if hash != "" then { outputHashAlgo = null; outputHash = hash; }
127 else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }
···120 else throw "fetchurl requires either `url` or `urls` to be set";
121122 hash_ =
123+ if with lib.lists; length (filter (s: s != "") [ hash outputHash sha1 sha256 sha512 ]) > 1
124+ then throw "multiple hashes passed to fetchurl" else
125126 if hash != "" then { outputHashAlgo = null; outputHash = hash; }
127 else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }