diff options
author | Aleksana <me@aleksana.moe> | 2024-07-01 01:30:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 01:30:23 +0800 |
commit | b1ef6b37e8462a4bb9215b71320a0da31e2caa25 (patch) | |
tree | fa1efc80fde45f60f187f7f87c24ea5ed858b754 | |
parent | e149d2b8c0788654a4ede2b68a4ba23351ba1083 (diff) | |
parent | df628c5b017dbe5e80ad43164314dc33d161f5d3 (diff) |
Merge pull request #321149 from Guanran928/fcitx5-pinyin-dictionary
fcitx5-pinyin-{minecraft,moegirl,zhwiki}: init
-rw-r--r-- | pkgs/by-name/fc/fcitx5-pinyin-minecraft/package.nix | 35 | ||||
-rw-r--r-- | pkgs/by-name/fc/fcitx5-pinyin-moegirl/package.nix | 35 | ||||
-rw-r--r-- | pkgs/by-name/fc/fcitx5-pinyin-zhwiki/package.nix | 33 |
3 files changed, 103 insertions, 0 deletions
diff --git a/pkgs/by-name/fc/fcitx5-pinyin-minecraft/package.nix b/pkgs/by-name/fc/fcitx5-pinyin-minecraft/package.nix new file mode 100644 index 0000000000000..dba53dbe887fc --- /dev/null +++ b/pkgs/by-name/fc/fcitx5-pinyin-minecraft/package.nix @@ -0,0 +1,35 @@ +{ + lib, + fetchurl, + nix-update-script, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "fcitx5-pinyin-minecraft"; + version = "0.1.20240629"; + + src = fetchurl { + url = "https://github.com/oldherl/fcitx5-pinyin-minecraft/releases/download/${finalAttrs.version}/minecraft-cn.dict"; + hash = "sha256-uD/ADL+JGdSYiNz6XIqJB0Y0IU6Jf56q5g7xG2o3a+E="; + }; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + + install -Dm644 $src $out/share/fcitx5/pinyin/dictionaries/minecraft.dict + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Fcitx 5 pinyin dictionary from zh.minecraft.wiki"; + homepage = "https://github.com/oldherl/fcitx5-pinyin-minecraft"; + license = with lib.licenses; [ unlicense cc-by-nc-sa-30 ]; + maintainers = with lib.maintainers; [ Guanran928 ]; + platforms = lib.platforms.all; + }; +}) 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 0000000000000..624e00913428c --- /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; + }; +}) diff --git a/pkgs/by-name/fc/fcitx5-pinyin-zhwiki/package.nix b/pkgs/by-name/fc/fcitx5-pinyin-zhwiki/package.nix new file mode 100644 index 0000000000000..c28c18ae63c57 --- /dev/null +++ b/pkgs/by-name/fc/fcitx5-pinyin-zhwiki/package.nix @@ -0,0 +1,33 @@ +{ + lib, + fetchurl, + stdenvNoCC, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "fcitx5-pinyin-zhwiki"; + version = "0.2.5"; + date = "20240509"; + + src = fetchurl { + url = "https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/${finalAttrs.version}/zhwiki-${finalAttrs.date}.dict"; + hash = "sha256-uRpKPq+/xJ8akKB8ol/JRF79VfDIQ8L4SxLDXzpfPxg="; + }; + + dontUnpack = true; + + installPhase = '' + runHook preInstall + + install -Dm644 $src $out/share/fcitx5/pinyin/dictionaries/zhwiki.dict + + runHook postInstall + ''; + + meta = { + description = "Fcitx 5 pinyin dictionary from zh.wikipedia.org"; + homepage = "https://github.com/felixonmars/fcitx5-pinyin-zhwiki"; + license = with lib.licenses; [ unlicense cc-by-sa-40 ]; + maintainers = with lib.maintainers; [ Guanran928 ]; + platforms = lib.platforms.all; + }; +}) |