Merge #182953: fetchurl: disallow specifying both `sha256` and `hash`

+21 -13
+1
pkgs/applications/networking/powerdns-admin/default.nix
··· 19 src = oldAttrs.src.override { 20 inherit version; 21 hash = "sha256-yKhbKNN3zHc35G4tnytPRO48Dh3qxr9G3e/HGH0weXo="; 22 }; 23 24 SETUPTOOLS_SCM_PRETEND_VERSION = version;
··· 19 src = oldAttrs.src.override { 20 inherit version; 21 hash = "sha256-yKhbKNN3zHc35G4tnytPRO48Dh3qxr9G3e/HGH0weXo="; 22 + sha256 = ""; 23 }; 24 25 SETUPTOOLS_SCM_PRETEND_VERSION = version;
+3
pkgs/build-support/fetchurl/default.nix
··· 117 else throw "fetchurl requires either `url` or `urls` to be set"; 118 119 hash_ = 120 if hash != "" then { outputHashAlgo = null; outputHash = hash; } 121 else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512" 122 else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }
··· 117 else throw "fetchurl requires either `url` or `urls` to be set"; 118 119 hash_ = 120 + # Many other combinations don't make sense, but this is the most common one: 121 + if hash != "" && sha256 != "" then throw "multiple hashes passed to fetchurl" else 122 + 123 if hash != "" then { outputHashAlgo = null; outputHash = hash; } 124 else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512" 125 else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; }
+12 -12
pkgs/servers/home-assistant/default.nix
··· 95 (self: super: { 96 pytest-aiohttp = super.pytest-aiohttp.overridePythonAttrs (oldAttrs: rec { 97 version = "0.3.0"; 98 - src = oldAttrs.src.override { 99 inherit version; 100 hash = "sha256-ySmFQzljeXc3WDhwO2L+9jUoWYvAqdRRY566lfSqpE8="; 101 }; 102 propagatedBuildInputs = with python3.pkgs; [ aiohttp pytest ]; ··· 142 }) 143 144 # Pinned due to API changes in 0.1.0 145 - (mkOverride "poolsense" "0.0.8" "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc=") 146 147 # Pinned due to API changes >0.3.5.3 148 (self: super: { ··· 273 home-assistant-frontend = self.callPackage ./frontend.nix { }; 274 }) 275 ]; 276 - 277 - mkOverride = attrName: version: hash: 278 - self: super: { 279 - ${attrName} = super.${attrName}.overridePythonAttrs (oldAttrs: { 280 - inherit version; 281 - src = oldAttrs.src.override { 282 - inherit version hash; 283 - }; 284 - }); 285 - }; 286 287 python = python3.override { 288 # Put packageOverrides at the start so they are applied after defaultOverrides
··· 95 (self: super: { 96 pytest-aiohttp = super.pytest-aiohttp.overridePythonAttrs (oldAttrs: rec { 97 version = "0.3.0"; 98 + src = self.fetchPypi { 99 inherit version; 100 + pname = "pytest-aiohttp"; 101 hash = "sha256-ySmFQzljeXc3WDhwO2L+9jUoWYvAqdRRY566lfSqpE8="; 102 }; 103 propagatedBuildInputs = with python3.pkgs; [ aiohttp pytest ]; ··· 143 }) 144 145 # Pinned due to API changes in 0.1.0 146 + (self: super: { 147 + poolsense = super.poolsense.overridePythonAttrs (oldAttrs: rec { 148 + version = "0.0.8"; 149 + src = super.fetchPypi { 150 + pname = "poolsense"; 151 + inherit version; 152 + hash = "sha256-17MHrYRmqkH+1QLtgq2d6zaRtqvb9ju9dvPt9gB2xCc="; 153 + }; 154 + }); 155 + }) 156 157 # Pinned due to API changes >0.3.5.3 158 (self: super: { ··· 283 home-assistant-frontend = self.callPackage ./frontend.nix { }; 284 }) 285 ]; 286 287 python = python3.override { 288 # Put packageOverrides at the start so they are applied after defaultOverrides
+2
pkgs/tools/admin/oci-cli/default.nix
··· 13 src = oldAttrs.src.override { 14 inherit version; 15 hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo="; 16 }; 17 }); 18 ··· 21 src = oldAttrs.src.override { 22 inherit version; 23 sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9"; 24 }; 25 doCheck = false; 26 });
··· 13 src = oldAttrs.src.override { 14 inherit version; 15 hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo="; 16 + sha256 = ""; 17 }; 18 }); 19 ··· 22 src = oldAttrs.src.override { 23 inherit version; 24 sha256 = "b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9"; 25 + hash = ""; 26 }; 27 doCheck = false; 28 });
+2 -1
pkgs/tools/audio/tts/default.nix
··· 21 # TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given 22 librosa = super.librosa.overridePythonAttrs (oldAttrs: rec { 23 version = "0.8.1"; 24 - src = oldAttrs.src.override { 25 inherit version; 26 sha256 = "c53d05e768ae4a3e553ae21c2e5015293e5efbfd5c12d497f1104cb519cca6b3"; 27 };
··· 21 # TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given 22 librosa = super.librosa.overridePythonAttrs (oldAttrs: rec { 23 version = "0.8.1"; 24 + src = super.fetchPypi { 25 + pname = "librosa"; 26 inherit version; 27 sha256 = "c53d05e768ae4a3e553ae21c2e5015293e5efbfd5c12d497f1104cb519cca6b3"; 28 };
+1
pkgs/top-level/all-packages.nix
··· 15475 src = oldAttrs.src.override { 15476 inherit version; 15477 hash = "sha256-XzZuhRFZ2Pcs5o0yuMDt2lbuU3wB6faOyjgr0VEK9l0="; 15478 }; 15479 meta.changelog = "https://github.com/ansible/ansible/blob/v${version}/changelogs/CHANGELOG-v${lib.versions.majorMinor version}.rst"; 15480 }));
··· 15475 src = oldAttrs.src.override { 15476 inherit version; 15477 hash = "sha256-XzZuhRFZ2Pcs5o0yuMDt2lbuU3wB6faOyjgr0VEK9l0="; 15478 + sha256 = ""; 15479 }; 15480 meta.changelog = "https://github.com/ansible/ansible/blob/v${version}/changelogs/CHANGELOG-v${lib.versions.majorMinor version}.rst"; 15481 }));