diff --git a/flake.lock b/flake.lock index aea5a22e..4478ec63 100644 --- a/flake.lock +++ b/flake.lock @@ -224,6 +224,29 @@ "type": "github" } }, + "firefox-addons": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "dir": "pkgs/firefox-addons", + "lastModified": 1688567410, + "narHash": "sha256-iwBGqOWphziACDX8MHuXRYhuXojJ8yOvX4T9fM0WmsY=", + "owner": "rycee", + "repo": "nur-expressions", + "rev": "385ae07d9d05666a06da7d19dcf11f14bc772a47", + "type": "gitlab" + }, + "original": { + "dir": "pkgs/firefox-addons", + "owner": "rycee", + "repo": "nur-expressions", + "type": "gitlab" + } + }, "flake-compat": { "flake": false, "locked": { @@ -352,6 +375,21 @@ } }, "flake-utils_2": { + "locked": { + "lastModified": 1629284811, + "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c5d161cc0af116a2e17f54316f0bf43f0819785c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { "inputs": { "systems": "systems_3" }, @@ -369,7 +407,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "inputs": { "systems": "systems_4" }, @@ -387,7 +425,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "inputs": { "systems": "systems_5" }, @@ -405,7 +443,7 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "inputs": { "systems": "systems_6" }, @@ -586,7 +624,7 @@ }, "neovim-flake": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "neovim-nightly-overlay", "nixpkgs" @@ -978,7 +1016,8 @@ "devshell": "devshell", "disko": "disko", "emacs-overlay": "emacs-overlay", - "flake-utils": "flake-utils_2", + "firefox-addons": "firefox-addons", + "flake-utils": "flake-utils_3", "guix-overlay": "guix-overlay", "helix-editor": "helix-editor", "home-manager": "home-manager", @@ -997,7 +1036,7 @@ }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "nixpkgs": [ "helix-editor", "nixpkgs" @@ -1019,7 +1058,7 @@ }, "rust-overlay_2": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index 3176946b..6bb0e9b1 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,10 @@ # need and I'm liking it. deploy.url = "github:serokell/deploy-rs"; deploy.inputs.nixpkgs.follows = "nixpkgs"; + + # Someone has already solved downloading Firefox addons so we'll use it. + firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; + firefox-addons.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs@{ self, nixpkgs, ... }: @@ -94,6 +98,10 @@ # Put my custom packages to be available. self.overlays.default + (final: prev: { + inherit (inputs.firefox-addons.lib.${defaultSystem}) buildFirefoxXpiAddon; + }) + # Neovim nightly! inputs.neovim-nightly-overlay.overlays.default diff --git a/pkgs/default.nix b/pkgs/default.nix index baf6cc41..600e3226 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -14,6 +14,7 @@ let clidle = callPackage ./clidle.nix { }; domterm = callPackage ./domterm { }; freerct = callPackage ./freerct.nix { }; + firefox-addons = callPackage ./firefox-addons { }; distant = callPackage ./distant.nix { }; gol-c = callPackage ./gol-c.nix { }; gnome-search-provider-recoll = diff --git a/pkgs/firefox-addons/default.nix b/pkgs/firefox-addons/default.nix new file mode 100644 index 00000000..3fe94ce0 --- /dev/null +++ b/pkgs/firefox-addons/default.nix @@ -0,0 +1,86 @@ +{ buildFirefoxXpiAddon, fetchurl, lib, stdenv }: + { + "get-rss-feed-url" = buildFirefoxXpiAddon { + pname = "get-rss-feed-url"; + version = "2.2"; + addonId = "{15bdb1ce-fa9d-4a00-b859-66c214263ac0}"; + url = "https://addons.mozilla.org/firefox/downloads/file/3990496/get_rss_feed_url-2.2.xpi"; + sha256 = "c332726405c6e976b19fc41bfb3ce70fa4380aaf33f179f324b67cb6fc13b7d0"; + meta = with lib; + { + homepage = "https://github.com/shevabam/get-rss-feed-url-extension"; + description = "Retrieve RSS feeds URLs from a WebSite. Now in Firefox!"; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "regretsreporter" = buildFirefoxXpiAddon { + pname = "regretsreporter"; + version = "2.1.2"; + addonId = "regrets-reporter@mozillafoundation.org"; + url = "https://addons.mozilla.org/firefox/downloads/file/4049907/regretsreporter-2.1.2.xpi"; + sha256 = "6916bcba2c479b209510509aca304f35cf68bafbdde852511a98e501c99e77e0"; + meta = with lib; + { + homepage = "https://foundation.mozilla.org/regrets-reporter"; + description = "The RegretsReporter browser extension, built by the nonprofit Mozilla, helps you take control of your YouTube recommendations."; + license = licenses.mpl20; + platforms = platforms.all; + }; + }; + "simple-translate" = buildFirefoxXpiAddon { + pname = "simple-translate"; + version = "2.8.1"; + addonId = "simple-translate@sienori"; + url = "https://addons.mozilla.org/firefox/downloads/file/4072586/simple_translate-2.8.1.xpi"; + sha256 = "23f1953d588d5d9943ab43845407b84a51bbcc1824b8c010ed56caa119711a27"; + meta = with lib; + { + homepage = "https://simple-translate.sienori.com"; + description = "Quickly translate selected or typed text on web pages. Supports Google Translate and DeepL API."; + license = licenses.mpl20; + platforms = platforms.all; + }; + }; + "tineye-reverse-image-search" = buildFirefoxXpiAddon { + pname = "tineye-reverse-image-search"; + version = "2.0.4"; + addonId = "tineye@ideeinc.com"; + url = "https://addons.mozilla.org/firefox/downloads/file/4074627/tineye_reverse_image_search-2.0.4.xpi"; + sha256 = "cece89c89f4480c6b69336b43c0dd2970058f2658e6cfd0160d05ba3c0cfc1b0"; + meta = with lib; + { + homepage = "https://tineye.com/"; + description = "Click on any image on the web to search for it on TinEye. Recommended by Firefox! \nDiscover where an image came from, see how it is being used, check if modified versions exist or locate high resolution versions. Made with love by the TinEye team."; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "updateswh" = buildFirefoxXpiAddon { + pname = "updateswh"; + version = "0.6.6"; + addonId = "{157eb9f0-9814-4fcc-b0b7-586b3093c641}"; + url = "https://addons.mozilla.org/firefox/downloads/file/4058285/updateswh-0.6.6.xpi"; + sha256 = "281f866eedec730859f65ed43ae913f140feb423dfe3c303c0a5cb7def872eaa"; + meta = with lib; + { + description = "Check archival state of a source code repository and propose to update it if needed."; + license = licenses.mit; + platforms = platforms.all; + }; + }; + "zhongwen" = buildFirefoxXpiAddon { + pname = "zhongwen"; + version = "5.14.1"; + addonId = "{dedb3663-6f13-4c6c-bf0f-5bd111cb2c79}"; + url = "https://addons.mozilla.org/firefox/downloads/file/4060172/zhongwen-5.14.1.xpi"; + sha256 = "108a358040bfb096b600337f6699d46ce7f48f2f88f51be7e8bd3d308c59c70b"; + meta = with lib; + { + homepage = "https://github.com/cschiller/zhongwen"; + description = "Official Firefox port of the Zhongwen Chrome extension (http://github.com/cschiller/zhongwen). Translate Chinese characters by hovering over them with the mouse. Includes internal word list, links to Chinese Grammar Wiki, tone colors, and more."; + license = licenses.gpl2; + platforms = platforms.all; + }; + }; + } \ No newline at end of file diff --git a/pkgs/firefox-addons/firefox-addons.json b/pkgs/firefox-addons/firefox-addons.json new file mode 100644 index 00000000..e54ebefd --- /dev/null +++ b/pkgs/firefox-addons/firefox-addons.json @@ -0,0 +1,23 @@ +[ + { + "slug": "updateswh" + }, + + { + "slug": "zhongwen" + }, + + { + "slug": "get-rss-feed-url" + }, + + { + "slug": "regretsreporter" + }, + { + "slug": "simple-translate" + }, + { + "slug": "tineye-reverse-image-search" + } +]