Commit 4c9d4bd

HPCesia <me@hpcesia.com>
2026-01-05 16:16:06
fix: wechat input method
1 parent e576d6f
Changed files (1)
modules
desktop
modules/desktop/apps/packages.nix
@@ -21,6 +21,21 @@
     cherry-studio = pkgs.cherry-studio.override {commandLineArgs = chromiumCLA;};
     qq = pkgs.qq.override {commandLineArgs = chromiumCLA;};
 
+    wechat = pkgs.wechat.overrideAttrs (oldAttrs: {
+      buildInputs = (oldAttrs.buildInputs or []) ++ [pkgs.makeWrapper];
+      # Fix desktop entry because $out/bin/wechat is a syslink
+      postFixup =
+        (oldAttrs.postFixup or "")
+        + ''
+          sed -i "s|^Exec=.*|Exec=env \
+            GTK_IM_MODULE=fcitx \
+            QT_IM_MODULE=fcitx \
+            XMODIFIERS=@im=fcitx \
+            $out/bin/wechat %F|" \
+            $out/share/applications/wechat.desktop
+        '';
+    });
+
     wpsoffice-cn = pkgs.wpsoffice-cn.overrideAttrs (oldAttrs: {
       buildInputs = (oldAttrs.buildInputs or []) ++ [pkgs.makeWrapper];
       postFixup =