Files
nix-config/overlays/fcitx5/default.nix
T
Ryan Yin d463760e4a refactor(fcitx5): ship flypy rime data from NUR
Move the flypy schema data to the rime-data-flypy package in
ryan4yin/nur-packages and keep only the personal user dictionary
(flypy_user.txt) here. The overlay merges the NUR data with that file
and exposes the result as pkgs.rime-data, fcitx5-rime's rimeDataPkgs,
and pkgs.flypy-squirrel.
2026-10-04 13:29:56 +08:00

26 lines
971 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 为了不使用默认的 rime-data,改用小鹤音形数据,这里需要 override
# 参考 https://github.com/NixOS/nixpkgs/blob/e4246ae1e7f78b7087dce9c9da10d28d3725025f/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
{ inputs, ... }:
(
_: super:
let
# 小鹤音形 schema 数据,来自 nur-ryan4yin 的 rime-data-flypy,
# 再叠加我自己的用户词库 flypy_user.txt。
rime-data-flypy = inputs.nur-ryan4yin.packages.${super.stdenv.hostPlatform.system}.rime-data-flypy;
rime-data = super.runCommandLocal "rime-data-flypy-custom" { } ''
mkdir -p $out/share/rime-data
cp -r ${rime-data-flypy}/share/rime-data/. $out/share/rime-data/
chmod -R u+w $out/share/rime-data
cp ${./flypy_user.txt} $out/share/rime-data/flypy_user.txt
'';
in
{
inherit rime-data;
fcitx5-rime = super.fcitx5-rime.override { rimeDataPkgs = [ rime-data ]; };
# used by macOS Squirrel
flypy-squirrel = rime-data;
}
)