From 9a6915a0ed7e1d262759eedec5f0be11a765be51 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 27 Sep 2023 22:30:28 +0000 Subject: [PATCH] firefox-extensions: deprecate "fetchAddon" --- pkgs/additional/firefox-extensions/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/additional/firefox-extensions/default.nix b/pkgs/additional/firefox-extensions/default.nix index 03094bf6..b29029c1 100644 --- a/pkgs/additional/firefox-extensions/default.nix +++ b/pkgs/additional/firefox-extensions/default.nix @@ -75,12 +75,17 @@ let }; }); - fetchAddon = name: extid: hash: fetchurl { - inherit name hash; - url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi"; - # extid can be found by unar'ing the above xpi, and copying browser_specific_settings.gecko.id field - passthru = { inherit extid; }; - }; + # fetchAddon: fetch an addon directly from the mozilla store. + # prefer NOT to use this, because moz store doesn't offer versioned release access + # which breaks caching/reproducibility and such. + # (maybe the `latest.xpi` URL redirects to a versioned URI visible if i used curl?) + # fetchAddon = name: extid: hash: fetchurl { + # inherit name hash; + # url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi"; + # # extid can be found by unar'ing the above xpi, and copying browser_specific_settings.gecko.id field + # passthru = { inherit extid; }; + # }; + fetchVersionedAddon = { extid, version, url, hash ? "", pname ? extid }: stdenv.mkDerivation { inherit pname version; src = fetchurl {