From dc54b90302eb6bfaa53c576949e3251ba07d47c9 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sun, 13 Oct 2024 01:28:44 -0400 Subject: [PATCH] packages(yomitan): use github as source Fixes an issue where updates didn't actually work due to the Firefox extension url returning the incorrect version. --- packages/yomitan.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/yomitan.nix b/packages/yomitan.nix index 7223b589..35b503c6 100644 --- a/packages/yomitan.nix +++ b/packages/yomitan.nix @@ -2,15 +2,16 @@ lib, stdenvNoCC, fetchurl, + gitUpdater, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "yomitan"; - version = "24.8.19.0"; + version = "24.10.7.0"; src = fetchurl { - url = "https://addons.mozilla.org/firefox/downloads/file/4343062/yomitan-${finalAttrs.version}.xpi"; - hash = "sha256-Ki6AbZeaW28tAYZWTIOU2HLq/9zlGyrms3z3LANsc5U="; + url = "https://github.com/yomidevs/yomitan/releases/download/${finalAttrs.version}/yomitan-firefox.zip"; + hash = "sha256-d2PmqLm3uYVc2S5hUFe9zOnbih7N7f2mQKc5O8qqPs8="; }; dontUnpack = true; @@ -23,6 +24,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { runHook postInstall ''; + passthru.updateScript = gitUpdater { + url = "https://github.com/yomidevs/yomitan"; + }; + meta = { homepage = "https://addons.mozilla.org/en-US/firefox/addon/yomitan/"; description = "Japanese dictionary with Anki integration";