From 74bc5097dd56009a06621a604084b236ee8d58e0 Mon Sep 17 00:00:00 2001 From: Guanran928 <68757440+Guanran928@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:16:33 +0800 Subject: [PATCH] fcitx5-pinyin-moegirl: init at 20240609 Co-authored-by: Aleksana --- .../fc/fcitx5-pinyin-moegirl/package.nix | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pkgs/by-name/fc/fcitx5-pinyin-moegirl/package.nix diff --git a/pkgs/by-name/fc/fcitx5-pinyin-moegirl/package.nix b/pkgs/by-name/fc/fcitx5-pinyin-moegirl/package.nix new file mode 100644 index 000000000000..624e00913428 --- /dev/null +++ b/pkgs/by-name/fc/fcitx5-pinyin-moegirl/package.nix @@ -0,0 +1,35 @@ +{ + lib, + fetchurl, + nix-update-script, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "fcitx5-pinyin-moegirl"; + version = "20240609"; + + src = fetchurl { + url = "https://github.com/outloudvi/mw2fcitx/releases/download/${finalAttrs.version}/moegirl.dict"; + hash = "sha256-dXFV0kVr8hgT17Jmr28PiYTiELm8kS/KM71igHXA6hs="; + }; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + + install -Dm644 $src $out/share/fcitx5/pinyin/dictionaries/moegirl.dict + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Fcitx 5 pinyin dictionary from zh.moegirl.org.cn"; + homepage = "https://github.com/outloudvi/mw2fcitx"; + license = with lib.licenses; [ unlicense cc-by-nc-sa-30 ]; + maintainers = with lib.maintainers; [ Guanran928 ]; + platforms = lib.platforms.all; + }; +})