1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages fcitx)
21 #:use-module ((guix licenses) #:select (gpl2+))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system cmake)
25 #:use-module (gnu packages documentation)
26 #:use-module (gnu packages enchant)
27 #:use-module (gnu packages gettext)
28 #:use-module (gnu packages glib)
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages icu4c)
31 #:use-module (gnu packages iso-codes)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages xml)
34 #:use-module (gnu packages xorg))
42 (uri (string-append "http://download.fcitx-im.org/fcitx/"
43 name "-" version "_dict.tar.xz"))
46 "0hyrh3v82a32ylnlvzrp6cmq56x4p1a42q5xc6njmmj2msxm34x5"))))
47 (build-system cmake-build-system)
48 (outputs '("out" "gtk2" "gtk3"))
51 (list "-DENABLE_TEST=ON"
52 (string-append "-DXKB_RULES_XML_FILE="
53 (assoc-ref %build-inputs "xkeyboard-config")
54 "/share/X11/xkb/rules/evdev.xml")
55 "-DENABLE_GTK2_IM_MODULE=ON"
56 "-DENABLE_GTK3_IM_MODULE=ON"
57 (string-append "-DGTK2_IM_MODULEDIR="
58 (assoc-ref %outputs "gtk2")
59 "/lib/gtk-2.0/2.10.0/immodules")
60 (string-append "-DGTK3_IM_MODULEDIR="
61 (assoc-ref %outputs "gtk3")
62 "/lib/gtk-3.0/3.0.0/immodules")
63 ;; XXX: Enable GObject Introspection and Qt4 support.
66 "-DENABLE_QT_IM_MODULE=OFF")))
68 `(("doxygen" ,doxygen)
69 ("extra-cmake-modules"
70 ;; XXX: We can't simply #:use-module due to a cycle somewhere.
72 (resolve-interface '(gnu packages kde-frameworks))
73 'extra-cmake-modules))
74 ("glib:bin" ,glib "bin") ; for glib-genmarshal
75 ("pkg-config" ,pkg-config)))
78 ("enchant" ,enchant-1.6)
79 ("gettext" ,gettext-minimal)
83 ("iso-codes" ,iso-codes)
84 ("libxkbfile" ,libxkbfile)
86 ("xkeyboard-config" ,xkeyboard-config)))
87 (home-page "https://fcitx-im.org")
88 (synopsis "Input method framework")
90 "Fcitx is an input method framework with extension support. It has
91 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
95 (define-public fcitx-configtool
97 (name "fcitx-configtool")
101 (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
102 name "-" version ".tar.xz"))
105 "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"))))
106 (build-system cmake-build-system)
109 (list "-DENABLE_GTK2=ON"
111 #:tests? #f)) ; No tests.
113 `(("glib:bin" ,glib "bin")
114 ("pkg-config" ,pkg-config)))
117 ("dbus-glib" ,dbus-glib)
118 ("gettext" ,gettext-minimal)
121 ("iso-codes" ,iso-codes)))
122 (home-page "https://fcitx-im.org/wiki/Configtool")
123 (synopsis "Graphic Fcitx configuration tool")
125 "Fcitx is an input method framework with extension support. It has
126 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
127 built-in. This package provides GTK version of the graphic configuration