Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

656 lines
26 KiB

gnu: Add and use gettext-minimal. * gnu/packages/gettext.scm (gnu-gettext): Rename to... (gettext-minimal): ... this. Adjust synopsis and description. (gnu-gettext): Inherit from it. (po4a): Use 'gettext-minimal' instead of 'gnu-gettext'. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/apl.scm: Likewise. * gnu/packages/attr.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/commencement.scm: Likewise. * gnu/packages/crypto.scm: Likewise. * gnu/packages/databases.scm: Likewise. * gnu/packages/disk.scm: Likewise. * gnu/packages/documentation.scm: Likewise. * gnu/packages/education.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/enlightenment.scm: Likewise. * gnu/packages/fcitx.scm: Likewise. * gnu/packages/fontutils.scm: Likewise. * gnu/packages/freedesktop.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gkrellm.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/ibus.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/iso-codes.scm: Likewise. * gnu/packages/kde-frameworks.scm: Likewise. * gnu/packages/kodi.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/man.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mono.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/nano.scm: Likewise. * gnu/packages/networking.scm: Likewise. * gnu/packages/package-management.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/sawfish.scm: Likewise. * gnu/packages/statistics.scm: Likewise. * gnu/packages/terminals.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/webkit.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wine.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xorg.scm: Likewise.
6 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
  3. ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
  5. ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  7. ;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
  8. ;;;
  9. ;;; This file is part of GNU Guix.
  10. ;;;
  11. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  12. ;;; under the terms of the GNU General Public License as published by
  13. ;;; the Free Software Foundation; either version 3 of the License, or (at
  14. ;;; your option) any later version.
  15. ;;;
  16. ;;; GNU Guix is distributed in the hope that it will be useful, but
  17. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  18. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. ;;; GNU General Public License for more details.
  20. ;;;
  21. ;;; You should have received a copy of the GNU General Public License
  22. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  23. (define-module (gnu packages ibus)
  24. #:use-module (guix licenses)
  25. #:use-module (guix packages)
  26. #:use-module (guix download)
  27. #:use-module (guix git-download)
  28. #:use-module (guix build-system cmake)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (guix build-system glib-or-gtk)
  31. #:use-module (gnu packages)
  32. #:use-module (gnu packages anthy)
  33. #:use-module (gnu packages autotools)
  34. #:use-module (gnu packages base)
  35. #:use-module (gnu packages boost)
  36. #:use-module (gnu packages cmake)
  37. #:use-module (gnu packages databases)
  38. #:use-module (gnu packages datastructures)
  39. #:use-module (gnu packages freedesktop)
  40. #:use-module (gnu packages gettext)
  41. #:use-module (gnu packages glib)
  42. #:use-module (gnu packages gnome)
  43. #:use-module (gnu packages gtk)
  44. #:use-module (gnu packages iso-codes)
  45. #:use-module (gnu packages logging)
  46. #:use-module (gnu packages pkg-config)
  47. #:use-module (gnu packages python)
  48. #:use-module (gnu packages serialization)
  49. #:use-module (gnu packages textutils)
  50. #:use-module (gnu packages xorg))
  51. (define-public ibus
  52. (package
  53. (name "ibus")
  54. (version "1.5.19")
  55. (source (origin
  56. (method url-fetch)
  57. (uri (string-append "https://github.com/ibus/ibus/"
  58. "releases/download/"
  59. version "/ibus-" version ".tar.gz"))
  60. (sha256
  61. (base32
  62. "0a94bnpm24581317hdnihwr4cniriml10p4ffgxg14xhvaccfrjb"))))
  63. (build-system glib-or-gtk-build-system)
  64. (arguments
  65. `(#:tests? #f ; tests fail because there's no connection to dbus
  66. #:configure-flags `("--disable-emoji-dict" ; cannot find emoji.json path
  67. "--disable-python2"
  68. "--enable-python-library"
  69. ,(string-append "--with-ucd-dir="
  70. (getcwd) "/ucd")
  71. "--enable-wayland")
  72. #:make-flags
  73. (list "CC=gcc"
  74. (string-append "pyoverridesdir="
  75. (assoc-ref %outputs "out")
  76. "/lib/python3.6/site-packages/gi/overrides/"))
  77. #:phases
  78. (modify-phases %standard-phases
  79. (add-after 'unpack 'prepare-ucd-dir
  80. (lambda* (#:key inputs #:allow-other-keys)
  81. (mkdir-p "../ucd")
  82. (symlink (assoc-ref inputs "unicode-blocks") "../ucd/Blocks.txt")
  83. (symlink (assoc-ref inputs "unicode-nameslist") "../ucd/NamesList.txt")
  84. #t))
  85. (add-before 'configure 'disable-dconf-update
  86. (lambda _
  87. (substitute* "data/dconf/Makefile.in"
  88. (("dconf update") "echo dconf update"))
  89. #t))
  90. (add-after 'unpack 'delete-generated-files
  91. (lambda _
  92. (for-each (lambda (file)
  93. (let ((c (string-append (string-drop-right file 4) "c")))
  94. (when (file-exists? c)
  95. (format #t "deleting ~a\n" c)
  96. (delete-file c))))
  97. (find-files "." "\\.vala"))
  98. #t))
  99. (add-after 'unpack 'fix-paths
  100. (lambda* (#:key inputs #:allow-other-keys)
  101. (substitute* "src/ibusenginesimple.c"
  102. (("/usr/share/X11/locale")
  103. (string-append (assoc-ref inputs "libx11")
  104. "/share/X11/locale")))
  105. (substitute* "ui/gtk3/xkblayout.vala"
  106. (("\"(setxkbmap|xmodmap)\"" _ prog)
  107. (string-append "\"" (assoc-ref inputs prog) "\"")))
  108. #t))
  109. (add-after 'wrap-program 'wrap-with-additional-paths
  110. (lambda* (#:key outputs #:allow-other-keys)
  111. ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
  112. ;; GI_TYPELIB_PATH.
  113. (let ((out (assoc-ref outputs "out")))
  114. (wrap-program (string-append out "/bin/ibus-setup")
  115. `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
  116. `("GI_TYPELIB_PATH" ":" prefix
  117. (,(getenv "GI_TYPELIB_PATH")
  118. ,(string-append out "/lib/girepository-1.0")))))
  119. #t)))))
  120. (inputs
  121. `(("dbus" ,dbus)
  122. ("dconf" ,dconf)
  123. ("gconf" ,gconf)
  124. ("gtk2" ,gtk+-2)
  125. ("gtk+" ,gtk+)
  126. ("intltool" ,intltool)
  127. ("json-glib" ,json-glib)
  128. ("libnotify" ,libnotify)
  129. ("libx11" ,libx11)
  130. ("setxkbmap" ,setxkbmap)
  131. ("wayland" ,wayland)
  132. ("xmodmap" ,xmodmap)
  133. ("iso-codes" ,iso-codes)
  134. ("pygobject2" ,python-pygobject)
  135. ("python" ,python)))
  136. (native-inputs
  137. `(("glib" ,glib "bin") ; for glib-genmarshal
  138. ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
  139. ("unicode-nameslist"
  140. ,(origin
  141. (method url-fetch)
  142. (uri "https://www.unicode.org/Public/UNIDATA/NamesList.txt")
  143. (sha256
  144. (base32 "0yr2h0nfqhirfi3bxl33z6cc94qqshlpgi06c25xh9754irqsgv8"))))
  145. ("unicode-blocks"
  146. ,(origin
  147. (method url-fetch)
  148. (uri "https://www.unicode.org/Public/UNIDATA/Blocks.txt")
  149. (sha256
  150. (base32 "0lnh9iazikpr548bd7nkaq9r3vfljfvz0rg2462prac8qxk7ni8b"))))
  151. ("vala" ,vala)
  152. ("pkg-config" ,pkg-config)))
  153. (native-search-paths
  154. (list (search-path-specification
  155. (variable "IBUS_COMPONENT_PATH")
  156. (files '("share/ibus/component")))))
  157. (synopsis "Input method framework")
  158. (description
  159. "IBus is an input framework providing a full-featured and user-friendly
  160. input method user interface. It comes with multilingual input support. It
  161. may also simplify input method development.")
  162. (home-page "https://github.com/ibus/ibus/wiki")
  163. (license lgpl2.1+)))
  164. (define-public ibus-libpinyin
  165. (package
  166. (name "ibus-libpinyin")
  167. (version "1.10.0")
  168. (source (origin
  169. (method url-fetch)
  170. (uri (string-append "https://github.com/libpinyin/ibus-libpinyin/"
  171. "releases/download/" version
  172. "/ibus-libpinyin-" version ".tar.gz"))
  173. (sha256
  174. (base32
  175. "0yq8aw4lddiviag8cnik6fp52vvk8lxv6bym13a3xya84c6zii3c"))))
  176. (build-system glib-or-gtk-build-system)
  177. (arguments
  178. `(#:phases
  179. (modify-phases %standard-phases
  180. (add-after 'wrap-program 'wrap-with-additional-paths
  181. (lambda* (#:key inputs outputs #:allow-other-keys)
  182. ;; Make sure 'ibus-setup-libpinyin' runs with the correct
  183. ;; PYTHONPATH and GI_TYPELIB_PATH.
  184. (let ((out (assoc-ref outputs "out")))
  185. (wrap-program (string-append out "/libexec/ibus-setup-libpinyin")
  186. `("PYTHONPATH" ":" prefix
  187. (,(getenv "PYTHONPATH")
  188. ,(string-append (assoc-ref inputs "ibus")
  189. "/lib/girepository-1.0")))
  190. `("GI_TYPELIB_PATH" ":" prefix
  191. (,(string-append (assoc-ref inputs "ibus")
  192. "/lib/girepository-1.0"))))
  193. #t))))))
  194. (inputs
  195. `(("ibus" ,ibus)
  196. ("libpinyin" ,libpinyin)
  197. ("bdb" ,bdb)
  198. ("sqlite" ,sqlite)
  199. ("python" ,python)
  200. ("pyxdg" ,python-pyxdg)
  201. ("gtk+" ,gtk+)))
  202. (native-inputs
  203. `(("pkg-config" ,pkg-config)
  204. ("intltool" ,intltool)
  205. ("glib" ,glib "bin")))
  206. (synopsis "Chinese pinyin and ZhuYin input methods for IBus")
  207. (description
  208. "This package includes a Chinese pinyin input method and a Chinese
  209. ZhuYin (Bopomofo) input method based on libpinyin for IBus.")
  210. (home-page "https://github.com/libpinyin/ibus-libpinyin")
  211. (license gpl2+)))
  212. (define-public libpinyin
  213. (package
  214. (name "libpinyin")
  215. (version "2.2.0")
  216. (source (origin
  217. (method url-fetch)
  218. (uri (string-append "https://github.com/libpinyin/libpinyin/"
  219. "releases/download/" version
  220. "/libpinyin-2.2.0.tar.gz"))
  221. (sha256
  222. (base32
  223. "1c4wxvcvjxvk23mcwqvsfsv4nhimx4kpjhabxa28gx1ih10l88gj"))))
  224. (build-system gnu-build-system)
  225. (inputs
  226. `(("glib" ,glib)
  227. ("bdb" ,bdb)))
  228. (native-inputs
  229. `(("pkg-config" ,pkg-config)))
  230. (synopsis "Library to handle Chinese pinyin")
  231. (description
  232. "The libpinyin C++ library provides algorithms needed for sentence-based
  233. Chinese pinyin input methods.")
  234. (home-page "https://github.com/libpinyin/libpinyin")
  235. (license gpl2+)))
  236. (define-public ibus-anthy
  237. (package
  238. (name "ibus-anthy")
  239. (version "1.5.9")
  240. (source (origin
  241. (method url-fetch)
  242. (uri (string-append
  243. "https://github.com/ibus/ibus-anthy/releases/download/"
  244. version "/ibus-anthy-" version ".tar.gz"))
  245. (sha256
  246. (base32
  247. "1y8sf837rmp662bv6zakny0xcm7c9c5qda7f9kq9riv9ywpcbw6x"))))
  248. (build-system gnu-build-system)
  249. (arguments
  250. '(#:configure-flags
  251. ;; Use absolute exec path in the anthy.xml.
  252. (list (string-append "--libexecdir=" %output "/libexec"))
  253. #:phases
  254. (modify-phases %standard-phases
  255. (add-after 'install 'wrap-programs
  256. (lambda* (#:key outputs #:allow-other-keys)
  257. (let ((out (assoc-ref outputs "out")))
  258. (for-each
  259. (lambda (prog)
  260. (wrap-program (string-append out "/libexec/" prog)
  261. `("PYTHONPATH" ":" prefix
  262. (,(getenv "PYTHONPATH")))
  263. `("GI_TYPELIB_PATH" ":" prefix
  264. (,(getenv "GI_TYPELIB_PATH")
  265. ,(string-append out "/lib/girepository-1.0")))))
  266. '("ibus-engine-anthy" "ibus-setup-anthy"))
  267. #t))))))
  268. (native-inputs
  269. `(("gettext" ,gettext-minimal)
  270. ("intltool" ,intltool)
  271. ("pkg-config" ,pkg-config)
  272. ("python" ,python)))
  273. (inputs
  274. `(("anthy" ,anthy)
  275. ("gtk+" ,gtk+)
  276. ("ibus" ,ibus)
  277. ("gobject-introspection" ,gobject-introspection)
  278. ("python-pygobject" ,python-pygobject)))
  279. (synopsis "Anthy Japanese language input method for IBus")
  280. (description "IBus-Anthy is an engine for the input bus \"IBus\"). It
  281. adds the Anthy Japanese language input method to IBus. Because most graphical
  282. applications allow text input via IBus, installing this package will enable
  283. Japanese language input in most graphical applications.")
  284. (home-page "https://github.com/fujiwarat/ibus-anthy")
  285. (license gpl2+)))
  286. (define-public librime
  287. (package
  288. (name "librime")
  289. (version "1.3.2")
  290. (source
  291. (origin
  292. (method git-fetch)
  293. (uri (git-reference
  294. (url "https://github.com/rime/librime.git")
  295. (commit version)))
  296. (file-name (git-file-name name version))
  297. (sha256
  298. (base32 "06q10cv7a3i6d8l3sq79nasw3p1njvmjgh4jq2hqw9abcx351m1r"))))
  299. (build-system cmake-build-system)
  300. (inputs
  301. `(("boost" ,boost)
  302. ("glog" ,glog)
  303. ("leveldb" ,leveldb)
  304. ("marisa" ,marisa)
  305. ("opencc" ,opencc)
  306. ("yaml-cpp" ,yaml-cpp)))
  307. (home-page "https://rime.im/")
  308. (synopsis "The core library of Rime Input Method Engine")
  309. (description "@dfn{librime} is the core library of Rime Input Method
  310. Engine, which is a lightweight, extensible input method engine supporting
  311. various input schemas including glyph-based input methods, romanization-based
  312. input methods as well as those for Chinese dialects. It has the ability to
  313. compose phrases and sentences intelligently and provide very accurate
  314. traditional Chinese output.")
  315. (license bsd-3)))
  316. (define-public rime-data
  317. (package
  318. (name "rime-data")
  319. (version "0.38.20181029")
  320. (source
  321. (origin
  322. (method git-fetch)
  323. (uri (git-reference
  324. (url "https://github.com/rime/plum.git")
  325. (commit "fb4f829da2007f2dbb37d60a79bc67c25ea16568")))
  326. (file-name "plum-checkout")
  327. (sha256
  328. (base32 "1m1wiv9j5bay4saga58c7dj4h8gqivsbyp16y245ifvxvp9czj67"))))
  329. (build-system gnu-build-system)
  330. (arguments
  331. `(#:tests? #f ; no tests
  332. #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
  333. "no_update=1")
  334. #:phases
  335. (modify-phases %standard-phases
  336. (add-after 'unpack 'patch-source
  337. (lambda _
  338. ;; Set .DEFAULT_GOAL to `all'.
  339. ;; Don't build binary schemas. The output is not deterministic.
  340. (substitute* "Makefile"
  341. (("^\\.DEFAULT_GOAL := preset")
  342. ".DEFAULT_GOAL := all"))
  343. #t))
  344. ;; Add schema packages into "package/rime" directory.
  345. (add-after 'unpack 'add-packages
  346. (lambda* (#:key inputs #:allow-other-keys)
  347. (let* ((dest-dir "package/rime"))
  348. (mkdir-p dest-dir)
  349. (for-each (lambda (pkg)
  350. (symlink (assoc-ref inputs pkg)
  351. (string-append dest-dir "/" pkg)))
  352. '("array"
  353. "bopomofo"
  354. "cangjie"
  355. "combo-pinyin"
  356. "double-pinyin"
  357. "emoji"
  358. "essay"
  359. "ipa"
  360. "jyutping"
  361. "luna-pinyin"
  362. "middle-chinese"
  363. "pinyin-simp"
  364. "prelude"
  365. "quick"
  366. "scj"
  367. "soutzoe"
  368. "stenotype"
  369. "stroke"
  370. "terra-pinyin"
  371. "wubi"
  372. "wugniu")))
  373. #t))
  374. (delete 'configure))))
  375. (native-inputs
  376. `(("array"
  377. ,(origin
  378. (method git-fetch)
  379. (uri (git-reference
  380. (url "https://github.com/rime/rime-array.git")
  381. (commit "906e923902147584b0b0247028a782abbfbfd8a0")))
  382. (file-name "rime-array-checkout")
  383. (sha256
  384. (base32
  385. "1alk6ghn4ji4kvp7lfm57bwm2gjh99i79r0w9naz6wkdim8idvb1"))))
  386. ("bopomofo"
  387. ,(origin
  388. (method git-fetch)
  389. (uri (git-reference
  390. (url "https://github.com/rime/rime-bopomofo.git")
  391. (commit "8dc44ca1b6ef4e45b452e070b9da737f5da165e3")))
  392. (file-name "rime-bopomofo-checkout")
  393. (sha256
  394. (base32
  395. "16k6wfhcrw3a77rmbrp21ca0gmsmb3f68s193c1cfwr8i68k46nf"))))
  396. ("cangjie"
  397. ,(origin
  398. (method git-fetch)
  399. (uri (git-reference
  400. (url "https://github.com/rime/rime-cangjie.git")
  401. (commit "ab085e90856b3399b374dc3c8b4cb40d11f307a8")))
  402. (file-name "rime-cangjie-checkout")
  403. (sha256
  404. (base32
  405. "11fgj0rbv9nyzfijwm2l8pm8fznhif4h27ndrrcaaylkp7p5zsx2"))))
  406. ("combo-pinyin"
  407. ,(origin
  408. (method git-fetch)
  409. (uri (git-reference
  410. (url "https://github.com/rime/rime-combo-pinyin.git")
  411. (commit "f1bae63f20504f2b8113c5cbdf2700e858aa91eb")))
  412. (file-name "rime-combo-pinyin-checkout")
  413. (sha256
  414. (base32
  415. "1l1079akwm1hw4kkn0q6x9fpylnl2ka6z2fn7lmdpfpsr0xgn0n7"))))
  416. ("double-pinyin"
  417. ,(origin
  418. (method git-fetch)
  419. (uri (git-reference
  420. (url "https://github.com/rime/rime-double-pinyin.git")
  421. (commit "2101a5cd40e511ec38835769aa66d2dddf059c2e")))
  422. (file-name "rime-double-pinyin-checkout")
  423. (sha256
  424. (base32
  425. "19hh2qm0njbfk2js678hfm2hw9b796s43vs11yy3m1v9m0gk2vi7"))))
  426. ("emoji"
  427. ,(origin
  428. (method git-fetch)
  429. (uri (git-reference
  430. (url "https://github.com/rime/rime-emoji.git")
  431. (commit "6e6611b315f03ee4c33f958f9dbe960b13a0ed19")))
  432. (file-name "rime-emoji-checkout")
  433. (sha256
  434. (base32
  435. "1brfs3214w36j3345di9ygp468hbvbqdqpkjxxs1dbp437rayhyy"))))
  436. ("essay"
  437. ,(origin
  438. (method git-fetch)
  439. (uri (git-reference
  440. (url "https://github.com/rime/rime-essay.git")
  441. (commit "5e5c7a0ef41c9b030abdad81a9df07b56b1661e9")))
  442. (file-name "rime-essay-checkout")
  443. (sha256
  444. (base32
  445. "0ana9is0zhh79m4gjshvmaxbrg3jiqysydx5bpm151i7i6vw5y1i"))))
  446. ("ipa"
  447. ,(origin
  448. (method git-fetch)
  449. (uri (git-reference
  450. (url "https://github.com/rime/rime-ipa.git")
  451. (commit "02a9e2c181921a2e95e1a81f88188c41132755c3")))
  452. (file-name "rime-ipa-checkout")
  453. (sha256
  454. (base32
  455. "1szrxgvqlgmxapj2aflw2cvbv0p6pl0sw0gyxa13dvdhhf7s9rvr"))))
  456. ("jyutping"
  457. ,(origin
  458. (method git-fetch)
  459. (uri (git-reference
  460. (url "https://github.com/rime/rime-jyutping.git")
  461. (commit "1402ec3d6cc0973f952fe3f9ef531294e4ffe9e0")))
  462. (file-name "rime-jyutping-checkout")
  463. (sha256
  464. (base32
  465. "17g03dy4gw6vyc9da1wjn3iy9hx64dfnwiwsfc7bkzan22x2m4dv"))))
  466. ("luna-pinyin"
  467. ,(origin
  468. (method git-fetch)
  469. (uri (git-reference
  470. (url "https://github.com/rime/rime-luna-pinyin.git")
  471. (commit "3b05132576f5c347ff8a70857d2dae080936ac3b")))
  472. (file-name "rime-luna-pinyin-checkout")
  473. (sha256
  474. (base32
  475. "0kgnpxjn10dm2d9718r12rdjlwqd2s2h84jvkhxhh5v0dkv1anl2"))))
  476. ("middle-chinese"
  477. ,(origin
  478. (method git-fetch)
  479. (uri (git-reference
  480. (url "https://github.com/rime/rime-middle-chinese.git")
  481. (commit "9ba8d70330654b9a730f882d35cfad7dbeddfd75")))
  482. (file-name "rime-middle-chinese-checkout")
  483. (sha256
  484. (base32
  485. "0hwg5zby5kphh0bcfay8mfxwr5bwqhamiw3cmmmf7kp9fbns5s23"))))
  486. ("pinyin-simp"
  487. ,(origin
  488. (method git-fetch)
  489. (uri (git-reference
  490. (url "https://github.com/rime/rime-pinyin-simp.git")
  491. (commit "74357ffd62c05fb60edf6eab5b86bc8c8c1907d0")))
  492. (file-name "rime-pinyin-simp-checkout")
  493. (sha256
  494. (base32
  495. "1paw3c7pv5bl54abnp9pidfxrkchdacyxy5m9zb311p5sgm7fhxh"))))
  496. ("prelude"
  497. ,(origin
  498. (method git-fetch)
  499. (uri (git-reference
  500. (url "https://github.com/rime/rime-prelude.git")
  501. (commit "33040568c3ddb2ee6340c9b669494317db21b77c")))
  502. (file-name "rime-prelude-checkout")
  503. (sha256
  504. (base32
  505. "1gwcasyyg6f0ib6s4qsrrjcqr1lcs7j3xqxl65rznsw44nhnbwwq"))))
  506. ("quick"
  507. ,(origin
  508. (method git-fetch)
  509. (uri (git-reference
  510. (url "https://github.com/rime/rime-quick.git")
  511. (commit "910a97d403ad8e72f322488da146da79c19d623f")))
  512. (file-name "rime-quick-checkout")
  513. (sha256
  514. (base32
  515. "0yrq3gbfmm29xlr52rmxc41mqfrb0295q7sdhbc3ax71677mpr0y"))))
  516. ("scj"
  517. ,(origin
  518. (method git-fetch)
  519. (uri (git-reference
  520. (url "https://github.com/rime/rime-scj.git")
  521. (commit "e0eae889f4376d2a434ac3b38523e0da7400db68")))
  522. (file-name "rime-scj-checkout")
  523. (sha256
  524. (base32
  525. "1whnv9zs349kvy0zi7dnmpqwil8i6gqwrzvhy3qdrjzy58y6gwxn"))))
  526. ("soutzoe"
  527. ,(origin
  528. (method git-fetch)
  529. (uri (git-reference
  530. (url "https://github.com/rime/rime-soutzoe.git")
  531. (commit "e47841a8ad6341731c41cdb814b7a25c837603c4")))
  532. (file-name "rime-soutzoe-checkout")
  533. (sha256
  534. (base32
  535. "1rgpmkxa72jy6gyy44fn8azpk3amk9s9lrdf7za03nv95d0fvm0p"))))
  536. ("stenotype"
  537. ,(origin
  538. (method git-fetch)
  539. (uri (git-reference
  540. (url "https://github.com/rime/rime-stenotype.git")
  541. (commit "d4ff379314fd95283853d1734854979cf3cbd287")))
  542. (file-name "rime-stenotype-checkout")
  543. (sha256
  544. (base32
  545. "1kckpi4l4884hvydr3d6vid3v7rsc1app29kmk7v8jf8vn16afhl"))))
  546. ("stroke"
  547. ,(origin
  548. (method git-fetch)
  549. (uri (git-reference
  550. (url "https://github.com/rime/rime-stroke.git")
  551. (commit "cfd29c675c46cf70b7a7f0a3836a913059316a0a")))
  552. (file-name "rime-stroke-checkout")
  553. (sha256
  554. (base32
  555. "135is9c1p4lm98fd9l1gxyflkm69cv5an129ka7sk614bq84m08d"))))
  556. ("terra-pinyin"
  557. ,(origin
  558. (method git-fetch)
  559. (uri (git-reference
  560. (url "https://github.com/rime/rime-terra-pinyin.git")
  561. (commit "15b5c73a796571cd6f9ef6c89f96656cb9df86f9")))
  562. (file-name "rime-terra-pinyin-checkout")
  563. (sha256
  564. (base32
  565. "1xsd84h1zw417h5hr4dbgyk5009zi7q2p9774w3ccr5sxgc3i3cm"))))
  566. ("wubi"
  567. ,(origin
  568. (method git-fetch)
  569. (uri (git-reference
  570. (url "https://github.com/rime/rime-wubi.git")
  571. (commit "d44403728a0b1cd8b47cb1f81b83f58e5f790b74")))
  572. (file-name "rime-wubi-checkout")
  573. (sha256
  574. (base32
  575. "0ld31bdn94lncxd1ka44w4sbl03skh08mc927dhdmwq5bpvrgn36"))))
  576. ("wugniu"
  577. ,(origin
  578. (method git-fetch)
  579. (uri (git-reference
  580. (url "https://github.com/rime/rime-wugniu.git")
  581. (commit "65bcc354ada3839591d7546a64c71dbdd0592b02")))
  582. (file-name "rime-wugniu-checkout")
  583. (sha256
  584. (base32
  585. "0g31awp40s778sp5c290x40s8np86n8aw011s17sslxrqhhb0bkx"))))))
  586. (home-page "https://rime.im/")
  587. (synopsis "Schema data of Rime Input Method Engine")
  588. (description "@dfn{rime-data} provides the schema data of Rime Input
  589. Method Engine.")
  590. (license lgpl3+)))
  591. (define-public ibus-rime
  592. (package
  593. (name "ibus-rime")
  594. (version "1.3.0")
  595. (source
  596. (origin
  597. (method git-fetch)
  598. (uri (git-reference
  599. (url "https://github.com/rime/ibus-rime.git")
  600. (commit version)))
  601. (file-name (git-file-name name version))
  602. (sha256
  603. (base32 "1nqi7ymv34a9kx24say3xj98lkrs9nkpv1n2ijb91wdz3cr012ly"))))
  604. (build-system gnu-build-system)
  605. (arguments
  606. `(#:tests? #f ; no tests
  607. #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  608. #:phases
  609. (modify-phases %standard-phases
  610. (add-after 'unpack 'patch-source
  611. (lambda* (#:key inputs outputs #:allow-other-keys)
  612. ;; Define RIME_DATA_DIR. It's required but not used by the code.
  613. (substitute* "Makefile"
  614. (("cmake")
  615. (string-append "cmake -DRIME_DATA_DIR="
  616. (assoc-ref inputs "rime-data")
  617. "/share/rime-data")))
  618. ;; rime_config.h defines the actual data directory.
  619. (substitute* "rime_config.h"
  620. (("^#define IBUS_RIME_INSTALL_PREFIX .*$")
  621. (string-append "#define IBUS_RIME_INSTALL_PREFIX \""
  622. (assoc-ref outputs "out")
  623. "\"\n"))
  624. (("^#define IBUS_RIME_SHARED_DATA_DIR .*$")
  625. (string-append "#define IBUS_RIME_SHARED_DATA_DIR \""
  626. (assoc-ref inputs "rime-data")
  627. "/share/rime-data\"\n")))
  628. #t))
  629. (delete 'configure))))
  630. (inputs
  631. `(("gdk-pixbuf" ,gdk-pixbuf)
  632. ("glib" ,glib)
  633. ("ibus" ,ibus)
  634. ("libnotify" ,libnotify)
  635. ("librime" ,librime)
  636. ("rime-data" ,rime-data)))
  637. (native-inputs
  638. `(("cmake" ,cmake)
  639. ("pkg-config" ,pkg-config)))
  640. (home-page "https://rime.im/")
  641. (synopsis "Rime Input Method Engine for IBus")
  642. (description "@dfn{ibus-rime} provides the Rime input method engine for
  643. IBus. Rime is a lightweight, extensible input method engine supporting
  644. various input schemas including glyph-based input methods, romanization-based
  645. input methods as well as those for Chinese dialects. It has the ability to
  646. compose phrases and sentences intelligently and provide very accurate
  647. traditional Chinese output.")
  648. (license gpl3+)))