From 4b2b576b0efd28e9f8535119760cbd8dc9bac5bd Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Thu, 12 Jun 2025 17:47:03 +0800 Subject: [PATCH] fcitx5-rime: ensure 'default.yaml' exists to prevent startup issues Some Rime schemas, such as `rime-wanxiang`, avoid conflicts with `rime-data` by renaming their own `default.yaml` to a different name (e.g., `*_suggestion.yaml`) during packaging. This enables users to selectively import them via patches. However, if a user installs only this package without `rime-data`, Rime fails to start because `default.yaml` is missing. To prevent this issue, we ensure `default.yaml` is present in `postBuild` of `symlinkJoin`. --- pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix index d6c7eda599a4..323cf54a0ff4 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix @@ -43,7 +43,12 @@ stdenv.mkDerivation rec { rimeDataDrv = symlinkJoin { name = "fcitx5-rime-data"; paths = rimeDataPkgs; - postBuild = "mkdir -p $out/share/rime-data"; + postBuild = '' + mkdir -p $out/share/rime-data + + # Ensure default.yaml exists + [ -e "$out/share/rime-data/default.yaml" ] || touch "$out/share/rime-data/default.yaml" + ''; }; postInstall = ''