firefox-extensions: deprecate "fetchAddon"

This commit is contained in:
Colin 2023-09-27 22:30:28 +00:00
parent d0feca0d57
commit 9a6915a0ed

View File

@ -75,12 +75,17 @@ let
}; };
}); });
fetchAddon = name: extid: hash: fetchurl { # fetchAddon: fetch an addon directly from the mozilla store.
inherit name hash; # prefer NOT to use this, because moz store doesn't offer versioned release access
url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi"; # which breaks caching/reproducibility and such.
# extid can be found by unar'ing the above xpi, and copying browser_specific_settings.gecko.id field # (maybe the `latest.xpi` URL redirects to a versioned URI visible if i used curl?)
passthru = { inherit extid; }; # 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 { fetchVersionedAddon = { extid, version, url, hash ? "", pname ? extid }: stdenv.mkDerivation {
inherit pname version; inherit pname version;
src = fetchurl { src = fetchurl {