about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/fcitx
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2014-05-04 21:49:37 +0800
committerVladimír Čunát <vcunat@gmail.com>2014-05-11 14:01:53 +0200
commite47172ce38da3afd215989ed22aaf19371d8c890 (patch)
treed6753da008d690322ac0115bd40363ffb0bd4205 /pkgs/tools/inputmethods/fcitx
parentc96d5fe1702430df15a3313cd46f7de7c924718f (diff)
downloadnixlib-e47172ce38da3afd215989ed22aaf19371d8c890.tar
nixlib-e47172ce38da3afd215989ed22aaf19371d8c890.tar.gz
nixlib-e47172ce38da3afd215989ed22aaf19371d8c890.tar.bz2
nixlib-e47172ce38da3afd215989ed22aaf19371d8c890.tar.lz
nixlib-e47172ce38da3afd215989ed22aaf19371d8c890.tar.xz
nixlib-e47172ce38da3afd215989ed22aaf19371d8c890.tar.zst
nixlib-e47172ce38da3afd215989ed22aaf19371d8c890.zip
fcitx: build im modules for gtk2, gtk3 and qt4
Close #2498.
Diffstat (limited to 'pkgs/tools/inputmethods/fcitx')
-rw-r--r--pkgs/tools/inputmethods/fcitx/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/tools/inputmethods/fcitx/default.nix b/pkgs/tools/inputmethods/fcitx/default.nix
index 94d819680ab1..747c4b44ac80 100644
--- a/pkgs/tools/inputmethods/fcitx/default.nix
+++ b/pkgs/tools/inputmethods/fcitx/default.nix
@@ -1,24 +1,33 @@
 { stdenv, fetchurl, pkgconfig, cmake, intltool, gettext
 , libxml2, enchant, isocodes, icu, libpthreadstubs
 , pango, cairo, libxkbfile, libXau, libXdmcp
+, dbus, gtk2, gtk3, qt4
 }:
 
 stdenv.mkDerivation rec {
   name = "fcitx-4.2.8.3";
+
   src = fetchurl {
     url = "http://download.fcitx-im.org/fcitx/${name}_dict.tar.xz";
     sha256 = "05dw6cbjh2jyjrkr4qx2bcq6nyhhrs0akf6fcjk5a72bgphhwqnb";
   };
 
-  buildInputs = [
+  patchPhase = ''
+    substituteInPlace src/frontend/qt/CMakeLists.txt \
+      --replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins
+  '';
+
+  buildInputs = with stdenv.lib; [
     cmake enchant pango gettext libxml2 isocodes pkgconfig libxkbfile
     intltool cairo icu libpthreadstubs libXau libXdmcp
+    dbus gtk2 gtk3 qt4
   ];
 
   cmakeFlags = ''
-    -DENABLE_DBUS=OFF
-    -DENABLE_QT=OFF
-    -DENABLE_QT_IM_MODULE=OFF
+    -DENABLE_QT_IM_MODULE=ON
+    -DENABLE_GTK2_IM_MODULE=ON
+    -DENABLE_GTK3_IM_MODULE=ON
+    -DENABLE_GIR=OFF
     -DENABLE_OPENCC=OFF
     -DENABLE_PRESAGE=OFF
     -DENABLE_XDGAUTOSTART=OFF