From 25e529028dc345ec792f76373171ba199dcc1acd Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 29 Mar 2023 13:36:07 +0900 Subject: [PATCH 1/2] fcitx5-mozc: wrapQtApp for mozc_tool (cherry picked from commit e2e0a48ada75b052722fa1233f876f6a543f3e7b) --- pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix index ac85bb2c40e9..9a3860ec2b57 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix @@ -103,6 +103,10 @@ in clangStdenv.mkDerivation rec { ../scripts/install_fcitx5 ''; + preFixup = '' + wrapQtApp $out/lib/mozc/mozc_tool + ''; + meta = with lib; { description = "Fcitx5 Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)"; homepage = "https://github.com/fcitx/mozc"; From ad223ddc68aa30df847f424f27df0b084e59b882 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 1 Apr 2023 09:44:00 +0900 Subject: [PATCH 2/2] fcitx5-mozc: add missing runHooks (cherry picked from commit 6459c1eaa0741492a46a70c0c38ba5d3b6094cd3) --- pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix index 9a3860ec2b57..92a0474ef199 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix @@ -84,13 +84,19 @@ in clangStdenv.mkDerivation rec { ''; buildPhase = '' + runHook preBuild + python build_mozc.py build -c Release \ server/server.gyp:mozc_server \ gui/gui.gyp:mozc_tool \ unix/fcitx5/fcitx5.gyp:fcitx5-mozc + + runHook postBuild ''; installPhase = '' + runHook preInstall + export PREFIX=$out export _bldtype=Release ../scripts/install_server @@ -101,6 +107,8 @@ in clangStdenv.mkDerivation rec { install -d $out/share/fcitx5/inputmethod install -d $out/lib/fcitx5 ../scripts/install_fcitx5 + + runHook postInstall ''; preFixup = ''