firefox-extensions: ublacklist: port to github release fetcher

This commit is contained in:
Colin 2023-09-27 22:13:43 +00:00
parent 71b70712f8
commit 2992d0db6b

View File

@ -81,7 +81,7 @@ let
# extid can be found by unar'ing the above xpi, and copying browser_specific_settings.gecko.id field
passthru = { inherit extid; };
};
fetchVersionedAddon = { version, url, hash, extid, pname ? extid }: stdenv.mkDerivation {
fetchVersionedAddon = { extid, version, url, hash ? "", pname ? extid }: stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
inherit url hash;
@ -110,18 +110,23 @@ in lib.makeScope newScope (self: with self; {
"sha256-aS8Alj/UNgcTp/TDWPN69wSn0GxDsQx44dtxrybdPXo=";
sidebery = fetchAddon "sidebery" "{3c078156-979c-498b-8990-85f7987dd929}"
"sha256-9ZJCehxo0+Ua7iCNBViPOXAklpV3cf2Et2qT42QTi/U=";
ublacklist = fetchAddon "ublacklist" "@ublacklist"
"sha256-diKkwxe1C35wsGNQd0yHh9BenPRSmGiRmCdmnW8sTD4=";
ublock-origin = fetchAddon "ublock-origin" "uBlock0@raymondhill.net"
"sha256-OTJQbOTfMG5Np1J9k9YP4EIc8VBFwvTqc1idmgkCJms=";
sponsorblock = fetchVersionedAddon rec {
extid = "sponsorBlocker@ajay.app";
pname = "sponsorblock";
version = "5.4.21";
url = "https://github.com/ajayyy/SponsorBlock/releases/download/${version}/FirefoxSignedInstaller.xpi";
version = "5.4.21";
hash = "sha256-mfCHD46FgmCQ8ugg58ML19zIllBQEJthfheTrEObs7M=";
};
ublacklist = fetchVersionedAddon rec {
extid = "@ublacklist";
pname = "ublacklist";
url = "https://github.com/iorate/ublacklist/releases/download/v${version}/ublacklist-v${version}-firefox.zip";
version = "8.3.5";
hash = "sha256-NAUkRXzFgwnIyP+uPAccQZUuHHxYFZakxrfMvp2yftg=";
};
};
browserpass-extension = (wrapAddon unwrapped.browserpass-extension {})