about summary refs log tree commit diff stats
path: root/pkgs/sources/generate_moz_extension/res
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/sources/generate_moz_extension/res')
-rw-r--r--pkgs/sources/generate_moz_extension/res/generate_extensions.py44
-rw-r--r--pkgs/sources/generate_moz_extension/res/reference.json30
-rw-r--r--pkgs/sources/generate_moz_extension/res/test.json30
3 files changed, 0 insertions, 104 deletions
diff --git a/pkgs/sources/generate_moz_extension/res/generate_extensions.py b/pkgs/sources/generate_moz_extension/res/generate_extensions.py
deleted file mode 100644
index ee8cc966..00000000
--- a/pkgs/sources/generate_moz_extension/res/generate_extensions.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-# source: https://github.com/etu/nixconfig/blob/ba47d577c8bfb4a1c06927c34ece34118f4a0460/modules/graphical/firefox/generate.py
-
-from concurrent.futures import ThreadPoolExecutor
-import json
-import requests
-
-EXTENSIONS = sorted(
-    [
-        "darkreader",
-        "firenvim",
-        "keepassxc-browser",
-        "simple-tab-groups",
-    ]
-)
-
-
-def index_ext(ext: str):
-    # print(f"Indexing {ext}...")
-
-    resp = requests.get(f"https://addons.mozilla.org/api/v5/addons/addon/{ext}/").json()
-    rel = resp["current_version"]
-
-    if not rel["file"]["hash"].startswith("sha256:"):
-        raise ValueError("Unhandled hash type")
-
-    return {
-        "pname": ext,
-        "version": rel["version"],
-        "addonId": resp["guid"],
-        "url": rel["file"]["url"],
-        "sha256": rel["file"]["hash"],
-    }
-
-
-if __name__ == "__main__":
-    # outfile = os.path.dirname(os.path.realpath(__file__)) + "/extensions.json"
-
-    with ThreadPoolExecutor() as e:
-        extensions = {ext: e.submit(index_ext, ext) for ext in EXTENSIONS}
-        extensions = {k: v.result() for k, v in extensions.items()}
-
-    # with open(outfile, "w") as f:
-    print(json.dumps(extensions, indent=2))
diff --git a/pkgs/sources/generate_moz_extension/res/reference.json b/pkgs/sources/generate_moz_extension/res/reference.json
deleted file mode 100644
index f46ea8ec..00000000
--- a/pkgs/sources/generate_moz_extension/res/reference.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "darkreader": {
-    "pname": "darkreader",
-    "version": "4.9.62",
-    "addonId": "addon@darkreader.org",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi",
-    "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc"
-  },
-  "firenvim": {
-    "pname": "firenvim",
-    "version": "0.2.14",
-    "addonId": "firenvim@lacamb.re",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi",
-    "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6"
-  },
-  "keepassxc-browser": {
-    "pname": "keepassxc-browser",
-    "version": "1.8.4",
-    "addonId": "keepassxc-browser@keepassxc.org",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi",
-    "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719"
-  },
-  "simple-tab-groups": {
-    "pname": "simple-tab-groups",
-    "version": "4.7.2.1",
-    "addonId": "simple-tab-groups@drive4ik",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi",
-    "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4"
-  }
-}
diff --git a/pkgs/sources/generate_moz_extension/res/test.json b/pkgs/sources/generate_moz_extension/res/test.json
deleted file mode 100644
index daa1d19a..00000000
--- a/pkgs/sources/generate_moz_extension/res/test.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "darkreader": {
-    "addon_id": "addon@darkreader.org",
-    "pname": "darkreader",
-    "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi",
-    "version": "4.9.62"
-  },
-  "firenvim": {
-    "addon_id": "firenvim@lacamb.re",
-    "pname": "firenvim",
-    "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi",
-    "version": "0.2.14"
-  },
-  "keepassxc-browser": {
-    "addon_id": "keepassxc-browser@keepassxc.org",
-    "pname": "keepassxc-browser",
-    "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi",
-    "version": "1.8.4"
-  },
-  "simple-tab-groups": {
-    "addon_id": "simple-tab-groups@drive4ik",
-    "pname": "simple-tab-groups",
-    "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4",
-    "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi",
-    "version": "4.7.2.1"
-  }
-}