refactor(overlay): Move addon code to seperate file to allow regeneration

Also cleaned up the arguments a bit.
This commit is contained in:
punkfairie 2025-01-11 20:18:09 -08:00
parent 421d788631
commit cae6ef50d1
No known key found for this signature in database
GPG key ID: B3C5488E9A1A7CA6
3 changed files with 141 additions and 118 deletions

View file

@ -38,5 +38,8 @@
"tag": "predefined", "tag": "predefined",
"shortName": "mit" "shortName": "mit"
} }
},
{
"slug": "rose-pine-color-port"
} }
] ]

View file

@ -0,0 +1,136 @@
{
buildFirefoxXpiAddon,
lib,
}: {
"axe-devtools" = buildFirefoxXpiAddon {
pname = "axe-devtools";
version = "4.94.1";
addonId = "@axe-firefox-devtools";
url = "https://addons.mozilla.org/firefox/downloads/file/4374713/axe_devtools-4.94.1.xpi";
sha256 = "92e8152da2b07303b1efd87c5a5b45e3ec847bf4760016809b5f5714a478f50b";
meta = with lib; {
homepage = "https://www.deque.com/";
description = "Add accessibility auditing to the Firefox Developer Tools";
license = {
shortName = "axe-devtools";
fullName = "Custom License for axe DevTools";
url = "https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/license/";
free = false;
};
mozPermissions = [
"tabs"
"storage"
"activeTab"
"devtools"
"<all_urls>"
];
platforms = platforms.all;
};
};
"clockwork-dev-tools" = buildFirefoxXpiAddon {
pname = "clockwork-dev-tools";
version = "5.3.1";
addonId = "{c9b5d073-47b4-40df-b9b9-d80601a5ab76}";
url = "https://addons.mozilla.org/firefox/downloads/file/4391092/clockwork_dev_tools-5.3.1.xpi";
sha256 = "56b372b0e3fe1c8aa6ec0e82e882ab7b922e1bdd04f4435a1c7812ae674776f0";
meta = with lib; {
homepage = "https://underground.works/clockwork";
description = "php dev tools integrated to your browser";
license = licenses.mit;
mozPermissions = [
"cookies"
"storage"
"tabs"
"webNavigation"
"webRequest"
"http://*/"
"https://*/"
"devtools"
];
platforms = platforms.all;
};
};
"medium-parser" = buildFirefoxXpiAddon {
pname = "medium-parser";
version = "1.5.5";
addonId = "medium-parser@example.com";
url = "https://addons.mozilla.org/firefox/downloads/file/4283826/medium_parser-1.5.5.xpi";
sha256 = "4aa61952269c2eb48c53d8355f94c17abc27d358c20738970d96d8d9f14b07b6";
meta = with lib; {
homepage = "https://github.com/Xatta-Trone/medium-parser-extension";
description = "Unlocks the whole medium article on the go.";
license = licenses.mpl20;
mozPermissions = ["storage" "contextMenus" "<all_urls>"];
platforms = platforms.all;
};
};
"readwise" = buildFirefoxXpiAddon {
pname = "readwise";
version = "2.8.0";
addonId = "{f7619bc3-ed22-44a3-83ad-e79a78416737}";
url = "https://addons.mozilla.org/firefox/downloads/file/3732256/readwise-2.8.0.xpi";
sha256 = "a1bb894e3af1ed0d80c80af6bdafca930ecd0fbc95e409d20f74943b7076d106";
meta = with lib; {
homepage = "https://readwise.io";
description = "Don't let your kindle highlights disappear. Sync them with Readwise and then review them daily.";
license = {
shortName = "allrightsreserved";
fullName = "All Rights Reserved";
url = "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186";
free = false;
};
mozPermissions = [
"notifications"
"cookies"
"storage"
"alarms"
"contextMenus"
"*://read.amazon.com/*"
"*://*.readwise.io/*"
];
platforms = platforms.all;
};
};
"readwise-highlighter" = buildFirefoxXpiAddon {
pname = "readwise-highlighter";
version = "0.15.23";
addonId = "team@readwise.io";
url = "https://addons.mozilla.org/firefox/downloads/file/4222692/readwise_highlighter-0.15.23.xpi";
sha256 = "260eb678acbbb37b5bb34211ff31ce4b32e94158fefb04d46323d4e0c5018a94";
meta = with lib; {
homepage = "https://read.readwise.io";
description = "The Readwise Highlighter is the official browser extension made by and maintained by the Readwise team that saves articles to your Reader account and enables you to optionally highlight the open web.";
license = {
shortName = "allrightsreserved";
fullName = "All Rights Reserved";
url = "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186";
free = false;
};
mozPermissions = [
"<all_urls>"
"activeTab"
"background"
"contextMenus"
"notifications"
"storage"
"tabs"
"unlimitedStorage"
];
platforms = platforms.all;
};
};
"rose-pine-color-port" = buildFirefoxXpiAddon {
pname = "rose-pine-color-port";
version = "1.1";
addonId = "{3c9f3c5d-ec80-455f-bd7c-4f2b51a1a4d9}";
url = "https://addons.mozilla.org/firefox/downloads/file/4219203/rose_pine_color_port-1.1.xpi";
sha256 = "d8304fdc0179a22b3769279c176e4973c1078f5be08dfdcfbabb50129cac9641";
meta = with lib; {
description = "Port of Rose Pine from Firefox Color";
license = licenses.cc-by-30;
mozPermissions = [];
platforms = platforms.all;
};
};
}

View file

@ -37,124 +37,8 @@ in
marleyos = marleyos =
prev.marleyos prev.marleyos
// { // {
firefox-addons = { firefox-addons = import ./addons.nix {
"axe-devtools" = buildFirefoxXpiAddon { inherit buildFirefoxXpiAddon lib;
pname = "axe-devtools";
version = "4.94.1";
addonId = "@axe-firefox-devtools";
url = "https://addons.mozilla.org/firefox/downloads/file/4374713/axe_devtools-4.94.1.xpi";
sha256 = "92e8152da2b07303b1efd87c5a5b45e3ec847bf4760016809b5f5714a478f50b";
meta = with lib; {
homepage = "https://www.deque.com/";
description = "Add accessibility auditing to the Firefox Developer Tools";
license = {
shortName = "axe-devtools";
fullName = "Custom License for axe DevTools";
url = "https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/license/";
free = false;
};
mozPermissions = [
"tabs"
"storage"
"activeTab"
"devtools"
"<all_urls>"
];
platforms = platforms.all;
};
};
"clockwork-dev-tools" = buildFirefoxXpiAddon {
pname = "clockwork-dev-tools";
version = "5.3.1";
addonId = "{c9b5d073-47b4-40df-b9b9-d80601a5ab76}";
url = "https://addons.mozilla.org/firefox/downloads/file/4391092/clockwork_dev_tools-5.3.1.xpi";
sha256 = "56b372b0e3fe1c8aa6ec0e82e882ab7b922e1bdd04f4435a1c7812ae674776f0";
meta = with lib; {
homepage = "https://underground.works/clockwork";
description = "php dev tools integrated to your browser";
license = licenses.mit;
mozPermissions = [
"cookies"
"storage"
"tabs"
"webNavigation"
"webRequest"
"http://*/"
"https://*/"
"devtools"
];
platforms = platforms.all;
};
};
"medium-parser" = buildFirefoxXpiAddon {
pname = "medium-parser";
version = "1.5.5";
addonId = "medium-parser@example.com";
url = "https://addons.mozilla.org/firefox/downloads/file/4283826/medium_parser-1.5.5.xpi";
sha256 = "4aa61952269c2eb48c53d8355f94c17abc27d358c20738970d96d8d9f14b07b6";
meta = with lib; {
homepage = "https://github.com/Xatta-Trone/medium-parser-extension";
description = "Unlocks the whole medium article on the go.";
license = licenses.mpl20;
mozPermissions = ["storage" "contextMenus" "<all_urls>"];
platforms = platforms.all;
};
};
"readwise" = buildFirefoxXpiAddon {
pname = "readwise";
version = "2.8.0";
addonId = "{f7619bc3-ed22-44a3-83ad-e79a78416737}";
url = "https://addons.mozilla.org/firefox/downloads/file/3732256/readwise-2.8.0.xpi";
sha256 = "a1bb894e3af1ed0d80c80af6bdafca930ecd0fbc95e409d20f74943b7076d106";
meta = with lib; {
homepage = "https://readwise.io";
description = "Don't let your kindle highlights disappear. Sync them with Readwise and then review them daily.";
license = {
shortName = "allrightsreserved";
fullName = "All Rights Reserved";
url = "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186";
free = false;
};
mozPermissions = [
"notifications"
"cookies"
"storage"
"alarms"
"contextMenus"
"*://read.amazon.com/*"
"*://*.readwise.io/*"
];
platforms = platforms.all;
};
};
"readwise-highlighter" = buildFirefoxXpiAddon {
pname = "readwise-highlighter";
version = "0.15.23";
addonId = "team@readwise.io";
url = "https://addons.mozilla.org/firefox/downloads/file/4222692/readwise_highlighter-0.15.23.xpi";
sha256 = "260eb678acbbb37b5bb34211ff31ce4b32e94158fefb04d46323d4e0c5018a94";
meta = with lib; {
homepage = "https://read.readwise.io";
description = "The Readwise Highlighter is the official browser extension made by and maintained by the Readwise team that saves articles to your Reader account and enables you to optionally highlight the open web.";
license = {
shortName = "allrightsreserved";
fullName = "All Rights Reserved";
url = "https://en.wikipedia.org/w/index.php?title=All_rights_reserved&oldid=1101263186";
free = false;
};
mozPermissions = [
"<all_urls>"
"activeTab"
"background"
"contextMenus"
"notifications"
"storage"
"tabs"
"unlimitedStorage"
];
platforms = platforms.all;
};
};
}; };
}; };
} }