diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-08-24 17:10:55 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-08-24 17:10:55 +0200 |
commit | 7bfc2b2564febd1c7c360833734dc3477c40d90f (patch) | |
tree | 64808b3267ef142237973680e2c9c19514834780 /pkgs/build-support | |
parent | 2e602c5a7561f834f30aef4ab18d2c8f9a6a93c0 (diff) | |
parent | 0e304ff0d9db453a4b230e9386418fd974d5804a (diff) |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchurl/default.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 7ec831c61ac70..a85d53adb8292 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -117,6 +117,9 @@ let else throw "fetchurl requires either `url` or `urls` to be set"; hash_ = + # Many other combinations don't make sense, but this is the most common one: + if hash != "" && sha256 != "" then throw "multiple hashes passed to fetchurl" else + if hash != "" then { outputHashAlgo = null; outputHash = hash; } else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512" else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; } |