From 3c89c82ced5d353f02bcbec1be10c513400c42a0 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 30 Aug 2024 13:35:48 -0400 Subject: [PATCH] librewolf: Add redlib extension --- home/librewolf.nix | 1 + packages/redlib.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 packages/redlib.nix diff --git a/home/librewolf.nix b/home/librewolf.nix index 47b38627..5617c3e9 100644 --- a/home/librewolf.nix +++ b/home/librewolf.nix @@ -23,6 +23,7 @@ in extensions = with nix-config.packages.${pkgs.system}; [ ublock-origin yomitan + redlib ]; search = { diff --git a/packages/redlib.nix b/packages/redlib.nix new file mode 100644 index 00000000..16648154 --- /dev/null +++ b/packages/redlib.nix @@ -0,0 +1,26 @@ +{ + lib, + stdenvNoCC, + fetchurl, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "redlib"; + version = "3.2"; + + src = fetchurl { + url = "https://addons.mozilla.org/firefox/downloads/file/4330244/redlib-${finalAttrs.version}.xpi"; + hash = "sha256-j6A/CQ56hKOLgaDcmJBVE9lThn8js4xDkj88wqIzBE8="; + }; + + buildCommand = '' + install -Dm644 "$src" "$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{5003e502-f361-4bf6-b09e-41a844d36d33}.xpi" + ''; + + meta = { + homepage = "https://addons.mozilla.org/en-US/firefox/addon/redlib/"; + description = "Redirect to Redlib with Farside"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + }; +})