diff --git a/flake.lock b/flake.lock index 592eb271..178da282 100644 --- a/flake.lock +++ b/flake.lock @@ -114,29 +114,6 @@ "type": "github" } }, - "firefox-addons": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "dir": "pkgs/firefox-addons", - "lastModified": 1721458684, - "narHash": "sha256-qATZkwG7oWObKqAJUJh1jj5KwTYcPUjLoONhXXXwgAY=", - "ref": "refs/heads/master", - "rev": "9cb92b3f92598f77aa8b95b54e5d72ad23745d64", - "revCount": 3694, - "type": "git", - "url": "https://git.sr.ht/~rycee/nur-expressions?dir=pkgs/firefox-addons" - }, - "original": { - "dir": "pkgs/firefox-addons", - "type": "git", - "url": "https://git.sr.ht/~rycee/nur-expressions?dir=pkgs/firefox-addons" - } - }, "flake-compat": { "flake": false, "locked": { @@ -154,21 +131,6 @@ } }, "flake-utils": { - "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_2": { "inputs": { "systems": [ "stylix", @@ -276,7 +238,6 @@ }, "root": { "inputs": { - "firefox-addons": "firefox-addons", "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", "nixpkgs": "nixpkgs", @@ -314,7 +275,7 @@ "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager" diff --git a/flake.nix b/flake.nix index 948119a9..2dc8df9a 100644 --- a/flake.nix +++ b/flake.nix @@ -24,11 +24,6 @@ url = "github:donovanglover/mobile-nixos"; flake = false; }; - - firefox-addons = { - url = "git+https://git.sr.ht/~rycee/nur-expressions?dir=pkgs/firefox-addons"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = diff --git a/home/librewolf.nix b/home/librewolf.nix index a0978dcf..47b38627 100644 --- a/home/librewolf.nix +++ b/home/librewolf.nix @@ -1,7 +1,7 @@ { pkgs, lib, - firefox-addons, + nix-config, phone, ... }: @@ -20,7 +20,7 @@ in }; profiles.default = { - extensions = with firefox-addons.packages.${pkgs.system}; [ + extensions = with nix-config.packages.${pkgs.system}; [ ublock-origin yomitan ]; diff --git a/modules/system.nix b/modules/system.nix index 195b67d9..caa300df 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -190,8 +190,7 @@ in }; extraSpecialArgs = { - inherit (nix-config.inputs) firefox-addons; - inherit phone; + inherit nix-config phone; }; }; diff --git a/packages/ublock-origin.nix b/packages/ublock-origin.nix new file mode 100644 index 00000000..a2501998 --- /dev/null +++ b/packages/ublock-origin.nix @@ -0,0 +1,26 @@ +{ + lib, + stdenvNoCC, + fetchurl, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "ublock-origin"; + version = "1.59.0"; + + src = fetchurl { + url = "https://addons.mozilla.org/firefox/downloads/file/4328681/ublock_origin-${finalAttrs.version}.xpi"; + hash = "sha256-HbnGdqB9FB+NNtu8JPnj1kpswjQNv8bISLxDlfls+xQ="; + }; + + buildCommand = '' + install -Dm644 "$src" "$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/uBlock0@raymondhill.net.xpi" + ''; + + meta = { + homepage = "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/"; + description = "Efficient wide-spectrum content blocker"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.all; + }; +}) diff --git a/packages/yomitan.nix b/packages/yomitan.nix new file mode 100644 index 00000000..ad308df2 --- /dev/null +++ b/packages/yomitan.nix @@ -0,0 +1,26 @@ +{ + lib, + stdenvNoCC, + fetchurl, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "yomitan"; + version = "24.8.19.0"; + + src = fetchurl { + url = "https://addons.mozilla.org/firefox/downloads/file/4343062/yomitan-${finalAttrs.version}.xpi"; + hash = "sha256-Ki6AbZeaW28tAYZWTIOU2HLq/9zlGyrms3z3LANsc5U="; + }; + + buildCommand = '' + install -Dm644 "$src" "$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{6b733b82-9261-47ee-a595-2dda294a4d08}.xpi" + ''; + + meta = { + homepage = "https://addons.mozilla.org/en-US/firefox/addon/yomitan/"; + description = "Japanese dictionary with Anki integration"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.all; + }; +})