Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

67 lines
2.0 KiB
Nix

{
lib,
fetchFromGitHub,
stdenvNoCC,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "rime-wanxiang";
version = "13.0.6";
src = fetchFromGitHub {
owner = "amzxyz";
repo = "rime_wanxiang";
tag = "v" + finalAttrs.version;
hash = "sha256-ThO4bXxp55cOivFo9eq9XEKpEvX9O5LiE6WsMGoq3gA=";
};
installPhase = ''
runHook preInstall
rm -rf README.md .git* custom LICENSE
mv default.yaml wanxiang_suggested_default.yaml
mkdir -p $out/share
cp -r . $out/share/rime-data
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Feature-rich pinyin schema for Rime, basic edition";
longDescription = ''
is a basic quanpin and shuangpin input schema for Rime based on
[ dictionaries and grammar models](https://github.com/amzxyz/RIME-LMDG),
supporting traditional shuangpin as well as tonal schemata such as and
.
The schema requires to work the grammar model `wanxiang-lts-zh-hans.gram`.
However, this file is
[released](https://github.com/amzxyz/RIME-LMDG/releases/tag/LTS) by
carelessly overriding the old versions
(see the [discussion](https://github.com/amzxyz/RIME-LMDG/issues/22)). So
we can't pack it into Nixpkgs, which demands reproducibility. You have to
download it yourself and place it in the user directory of Rime.
The upstream `default.yaml` is included as
`wanxiang_suggested_default.yaml`. To enable it, please modify your
`default.custom.yaml` as such:
```yaml
patch:
__include: wanxiang_suggested_default:/
```
'';
homepage = "https://github.com/amzxyz/rime_wanxiang";
downloadPage = "https://github.com/amzxyz/rime_wanxiang/releases";
changelog = "https://github.com/amzxyz/rime_wanxiang/releases/tag/v${finalAttrs.version}";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ rc-zb ];
platforms = lib.platforms.all;
};
})