Unverified Commit 4b2b576b authored by Moraxyc's avatar Moraxyc
Browse files

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`.
parent 14ba837d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 = ''