fcitx.scm 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages fcitx)
  19. #:use-module ((guix licenses) #:select (gpl2+))
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system cmake)
  23. #:use-module (gnu packages documentation)
  24. #:use-module (gnu packages enchant)
  25. #:use-module (gnu packages gettext)
  26. #:use-module (gnu packages glib)
  27. #:use-module (gnu packages gtk)
  28. #:use-module (gnu packages icu4c)
  29. #:use-module (gnu packages iso-codes)
  30. #:use-module (gnu packages pkg-config)
  31. #:use-module (gnu packages xml)
  32. #:use-module (gnu packages xorg))
  33. (define-public fcitx
  34. (package
  35. (name "fcitx")
  36. (version "4.2.8.6")
  37. (source (origin
  38. (method url-fetch)
  39. (uri (string-append "http://download.fcitx-im.org/fcitx/"
  40. name "-" version "_dict.tar.xz"))
  41. (sha256
  42. (base32
  43. "15ymd42kg920ri0f8fymq3i68g8k1kgpmdlnk9jf5fvnz6g4w0wi"))))
  44. (build-system cmake-build-system)
  45. (outputs '("out" "gtk2" "gtk3"))
  46. (arguments
  47. `(#:configure-flags
  48. (list "-DENABLE_TEST=ON"
  49. (string-append "-DXKB_RULES_XML_FILE="
  50. (assoc-ref %build-inputs "xkeyboard-config")
  51. "/share/X11/xkb/rules/evdev.xml")
  52. "-DENABLE_GTK2_IM_MODULE=ON"
  53. "-DENABLE_GTK3_IM_MODULE=ON"
  54. (string-append "-DGTK2_IM_MODULEDIR="
  55. (assoc-ref %outputs "gtk2")
  56. "/lib/gtk-2.0/2.10.0/immodules")
  57. (string-append "-DGTK3_IM_MODULEDIR="
  58. (assoc-ref %outputs "gtk3")
  59. "/lib/gtk-3.0/3.0.0/immodules")
  60. ;; XXX: Enable GObject Introspection and Qt4 support.
  61. "-DENABLE_GIR=OFF"
  62. "-DENABLE_QT=OFF"
  63. "-DENABLE_QT_IM_MODULE=OFF")))
  64. (native-inputs
  65. `(("doxygen" ,doxygen)
  66. ("glib:bin" ,glib "bin") ; for glib-genmarshal
  67. ("pkg-config" ,pkg-config)))
  68. (inputs
  69. `(("dbus" ,dbus)
  70. ("enchant" ,enchant)
  71. ("gettext" ,gettext-minimal)
  72. ("gtk2" ,gtk+-2)
  73. ("gtk3" ,gtk+)
  74. ("icu4c" ,icu4c)
  75. ("iso-codes" ,iso-codes)
  76. ("libxkbfile" ,libxkbfile)
  77. ("libxml2" ,libxml2)
  78. ("xkeyboard-config" ,xkeyboard-config)))
  79. (home-page "http://fcitx-im.org")
  80. (synopsis "Input method framework")
  81. (description
  82. "Fcitx is an input method framework with extension support. It has
  83. Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
  84. built-in.")
  85. (license gpl2+)))
  86. (define-public fcitx-configtool
  87. (package
  88. (name "fcitx-configtool")
  89. (version "0.4.8")
  90. (source (origin
  91. (method url-fetch)
  92. (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
  93. name "-" version ".tar.xz"))
  94. (sha256
  95. (base32
  96. "1vaim0namw58bfafbvws1vgd4010p19zwqfbx6bd1zi5sgchdg0f"))))
  97. (build-system cmake-build-system)
  98. (arguments
  99. `(#:configure-flags
  100. (list "-DENABLE_GTK2=ON"
  101. "-DENABLE_GTK3=ON")
  102. #:tests? #f)) ; No tests.
  103. (native-inputs
  104. `(("glib:bin" ,glib "bin")
  105. ("pkg-config" ,pkg-config)))
  106. (inputs
  107. `(("fcitx" ,fcitx)
  108. ("dbus-glib" ,dbus-glib)
  109. ("gettext" ,gettext-minimal)
  110. ("gtk2" ,gtk+-2)
  111. ("gtk3" ,gtk+)
  112. ("iso-codes" ,iso-codes)))
  113. (home-page "https://fcitx-im.org/wiki/Configtool")
  114. (synopsis "Graphic Fcitx configuration tool")
  115. (description
  116. "Fcitx is an input method framework with extension support. It has
  117. Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
  118. built-in. This package provides GTK version of the graphic configuration
  119. tool of Fcitx.")
  120. (license gpl2+)))