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.
This commit is contained in:
Donovan Glover 2024-10-13 01:28:44 -04:00
parent ec3d3899b9
commit dc54b90302
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -2,15 +2,16 @@
lib, lib,
stdenvNoCC, stdenvNoCC,
fetchurl, fetchurl,
gitUpdater,
}: }:
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "yomitan"; pname = "yomitan";
version = "24.8.19.0"; version = "24.10.7.0";
src = fetchurl { src = fetchurl {
url = "https://addons.mozilla.org/firefox/downloads/file/4343062/yomitan-${finalAttrs.version}.xpi"; url = "https://github.com/yomidevs/yomitan/releases/download/${finalAttrs.version}/yomitan-firefox.zip";
hash = "sha256-Ki6AbZeaW28tAYZWTIOU2HLq/9zlGyrms3z3LANsc5U="; hash = "sha256-d2PmqLm3uYVc2S5hUFe9zOnbih7N7f2mQKc5O8qqPs8=";
}; };
dontUnpack = true; dontUnpack = true;
@ -23,6 +24,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall runHook postInstall
''; '';
passthru.updateScript = gitUpdater {
url = "https://github.com/yomidevs/yomitan";
};
meta = { meta = {
homepage = "https://addons.mozilla.org/en-US/firefox/addon/yomitan/"; homepage = "https://addons.mozilla.org/en-US/firefox/addon/yomitan/";
description = "Japanese dictionary with Anki integration"; description = "Japanese dictionary with Anki integration";