gnu: ruby-tzinfo-data: Don't use unstable tarball.
[jackhill/guix/guix.git] / gnu / packages / ibus.scm
CommitLineData
aad6f5bc 1;;; GNU Guix --- Functional package management for GNU
dbac4833 2;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
2e6ecc5c 3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
1c6ae418 4;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
66b266e6 5;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
510d819c 6;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
6072d511 7;;; Copyright © 2018, 2019 Meiyo Peng <meiyo@disroot.org>
aad6f5bc
RW
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
24(define-module (gnu packages ibus)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
1329f095 28 #:use-module (guix git-download)
78209a16 29 #:use-module (guix build-system cmake)
aad6f5bc
RW
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system glib-or-gtk)
dbac4833 32 #:use-module (guix utils)
aad6f5bc 33 #:use-module (gnu packages)
1c6ae418 34 #:use-module (gnu packages anthy)
12edffe4
RW
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages base)
78209a16 37 #:use-module (gnu packages boost)
950ebfd1 38 #:use-module (gnu packages check)
d5b23d2b 39 #:use-module (gnu packages cmake)
5fbbd29f 40 #:use-module (gnu packages databases)
78209a16 41 #:use-module (gnu packages datastructures)
255d1bbe 42 #:use-module (gnu packages dbm)
5fbbd29f 43 #:use-module (gnu packages freedesktop)
1c6ae418 44 #:use-module (gnu packages gettext)
aad6f5bc
RW
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages iso-codes)
78209a16 49 #:use-module (gnu packages logging)
aad6f5bc 50 #:use-module (gnu packages pkg-config)
d37f00b9 51 #:use-module (gnu packages python)
78209a16 52 #:use-module (gnu packages serialization)
cd0322a3 53 #:use-module (gnu packages sqlite)
78209a16 54 #:use-module (gnu packages textutils)
d37f00b9 55 #:use-module (gnu packages xorg))
aad6f5bc
RW
56
57(define-public ibus
58 (package
2f968763 59 (name "ibus")
b2c6b467 60 (version "1.5.20")
2f968763
MP
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "https://github.com/ibus/ibus/"
64 "releases/download/"
65 version "/ibus-" version ".tar.gz"))
66 (sha256
67 (base32
b2c6b467 68 "0d6hcbw6ai91jl87lqnyn8bxi5y5kba5i9nz7knknyh69g5fbwac"))))
2f968763
MP
69 (build-system glib-or-gtk-build-system)
70 (arguments
71 `(#:tests? #f ; tests fail because there's no connection to dbus
72 #:configure-flags `("--disable-emoji-dict" ; cannot find emoji.json path
2f968763
MP
73 "--enable-python-library"
74 ,(string-append "--with-ucd-dir="
75 (getcwd) "/ucd")
76 "--enable-wayland")
2f968763
MP
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))
b2c6b467
RW
85 (add-after 'unpack 'patch-python-target-directories
86 (lambda* (#:key outputs #:allow-other-keys)
87 (let ((root (string-append (assoc-ref outputs "out")
88 "/lib/python"
89 ,(version-major+minor (package-version python))
90 "/site-packages")))
91 (substitute* "configure"
92 (("(py2?overridesdir)=.*" _ var)
93 (string-append var "=" root "/gi/overrides/"))
94 (("(pkgpython2dir=).*" _ var)
95 (string-append var root "/ibus"))))
96 #t))
2f968763
MP
97 (add-before 'configure 'disable-dconf-update
98 (lambda _
99 (substitute* "data/dconf/Makefile.in"
100 (("dconf update") "echo dconf update"))
101 #t))
102 (add-after 'unpack 'delete-generated-files
103 (lambda _
104 (for-each (lambda (file)
105 (let ((c (string-append (string-drop-right file 4) "c")))
106 (when (file-exists? c)
107 (format #t "deleting ~a\n" c)
108 (delete-file c))))
109 (find-files "." "\\.vala"))
110 #t))
111 (add-after 'unpack 'fix-paths
112 (lambda* (#:key inputs #:allow-other-keys)
113 (substitute* "src/ibusenginesimple.c"
114 (("/usr/share/X11/locale")
115 (string-append (assoc-ref inputs "libx11")
116 "/share/X11/locale")))
117 (substitute* "ui/gtk3/xkblayout.vala"
118 (("\"(setxkbmap|xmodmap)\"" _ prog)
119 (string-append "\"" (assoc-ref inputs prog) "\"")))
120 #t))
121 (add-after 'wrap-program 'wrap-with-additional-paths
122 (lambda* (#:key outputs #:allow-other-keys)
123 ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
124 ;; GI_TYPELIB_PATH.
125 (let ((out (assoc-ref outputs "out")))
126 (wrap-program (string-append out "/bin/ibus-setup")
127 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
128 `("GI_TYPELIB_PATH" ":" prefix
129 (,(getenv "GI_TYPELIB_PATH")
130 ,(string-append out "/lib/girepository-1.0")))))
131 #t)))))
132 (inputs
133 `(("dbus" ,dbus)
134 ("dconf" ,dconf)
135 ("gconf" ,gconf)
136 ("gtk2" ,gtk+-2)
137 ("gtk+" ,gtk+)
b2c6b467 138 ("gettext" ,gnu-gettext)
2f968763
MP
139 ("json-glib" ,json-glib)
140 ("libnotify" ,libnotify)
141 ("libx11" ,libx11)
142 ("setxkbmap" ,setxkbmap)
143 ("wayland" ,wayland)
144 ("xmodmap" ,xmodmap)
145 ("iso-codes" ,iso-codes)
146 ("pygobject2" ,python-pygobject)
147 ("python" ,python)))
148 (native-inputs
149 `(("glib" ,glib "bin") ; for glib-genmarshal
150 ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
380384e4
TGR
151
152 ;; XXX TODO: Move Unicode data to its own (versioned) package.
2f968763
MP
153 ("unicode-nameslist"
154 ,(origin
155 (method url-fetch)
380384e4 156 (uri "https://www.unicode.org/Public/12.0.0/ucd/NamesList.txt")
2f968763 157 (sha256
380384e4 158 (base32 "0vsq8gx7hws8mvxy3nlglpwxw7ky57q0fs09d7w9xgb2ylk7fz61"))))
2f968763
MP
159 ("unicode-blocks"
160 ,(origin
161 (method url-fetch)
380384e4 162 (uri "https://www.unicode.org/Public/12.0.0/ucd/Blocks.txt")
2f968763 163 (sha256
380384e4 164 (base32 "041sk54v6rjzb23b9x7yjdwzdp2wc7gvfz7ybavgg4gbh51wm8x1"))))
2f968763
MP
165 ("vala" ,vala)
166 ("pkg-config" ,pkg-config)))
167 (native-search-paths
168 (list (search-path-specification
169 (variable "IBUS_COMPONENT_PATH")
170 (files '("share/ibus/component")))))
171 (synopsis "Input method framework")
172 (description
173 "IBus is an input framework providing a full-featured and user-friendly
aad6f5bc
RW
174input method user interface. It comes with multilingual input support. It
175may also simplify input method development.")
2f968763
MP
176 (home-page "https://github.com/ibus/ibus/wiki")
177 (license lgpl2.1+)))
12edffe4 178
5fbbd29f
RW
179(define-public ibus-libpinyin
180 (package
2f968763 181 (name "ibus-libpinyin")
510d819c 182 (version "1.11.1")
2f968763
MP
183 (source (origin
184 (method url-fetch)
185 (uri (string-append "https://github.com/libpinyin/ibus-libpinyin/"
186 "releases/download/" version
187 "/ibus-libpinyin-" version ".tar.gz"))
188 (sha256
189 (base32
510d819c 190 "1bl1cgicd2df797dx1x0q904438bsn8i23djzcfcai4dp3631xc0"))))
2f968763
MP
191 (build-system glib-or-gtk-build-system)
192 (arguments
193 `(#:phases
194 (modify-phases %standard-phases
195 (add-after 'wrap-program 'wrap-with-additional-paths
196 (lambda* (#:key inputs outputs #:allow-other-keys)
197 ;; Make sure 'ibus-setup-libpinyin' runs with the correct
198 ;; PYTHONPATH and GI_TYPELIB_PATH.
199 (let ((out (assoc-ref outputs "out")))
200 (wrap-program (string-append out "/libexec/ibus-setup-libpinyin")
201 `("PYTHONPATH" ":" prefix
202 (,(getenv "PYTHONPATH")
203 ,(string-append (assoc-ref inputs "ibus")
204 "/lib/girepository-1.0")))
205 `("GI_TYPELIB_PATH" ":" prefix
206 (,(string-append (assoc-ref inputs "ibus")
207 "/lib/girepository-1.0"))))
208 #t))))))
209 (inputs
210 `(("ibus" ,ibus)
211 ("libpinyin" ,libpinyin)
212 ("bdb" ,bdb)
213 ("sqlite" ,sqlite)
214 ("python" ,python)
215 ("pyxdg" ,python-pyxdg)
afabb9ec 216 ("pygobject2" ,python-pygobject)
2f968763
MP
217 ("gtk+" ,gtk+)))
218 (native-inputs
219 `(("pkg-config" ,pkg-config)
220 ("intltool" ,intltool)
221 ("glib" ,glib "bin")))
222 (synopsis "Chinese pinyin and ZhuYin input methods for IBus")
223 (description
224 "This package includes a Chinese pinyin input method and a Chinese
5fbbd29f 225ZhuYin (Bopomofo) input method based on libpinyin for IBus.")
2f968763
MP
226 (home-page "https://github.com/libpinyin/ibus-libpinyin")
227 (license gpl2+)))
5fbbd29f 228
12edffe4
RW
229(define-public libpinyin
230 (package
231 (name "libpinyin")
44613030 232 (version "2.3.0")
12edffe4
RW
233 (source (origin
234 (method url-fetch)
8738c2b3
RW
235 (uri (string-append "https://github.com/libpinyin/libpinyin/"
236 "releases/download/" version
44613030 237 "/libpinyin-" version ".tar.gz"))
12edffe4
RW
238 (sha256
239 (base32
44613030 240 "14969v6w8n1aiqphl2386dws7dmsdwbzyqnlz4kr8ppm39m9rp5k"))))
12edffe4 241 (build-system gnu-build-system)
12edffe4
RW
242 (inputs
243 `(("glib" ,glib)
8738c2b3 244 ("bdb" ,bdb)))
12edffe4 245 (native-inputs
8738c2b3 246 `(("pkg-config" ,pkg-config)))
1f7a84dc 247 (synopsis "Library to handle Chinese pinyin")
12edffe4
RW
248 (description
249 "The libpinyin C++ library provides algorithms needed for sentence-based
250Chinese pinyin input methods.")
251 (home-page "https://github.com/libpinyin/libpinyin")
252 (license gpl2+)))
1c6ae418
CM
253
254(define-public ibus-anthy
255 (package
256 (name "ibus-anthy")
ab84c13f 257 (version "1.5.9")
1c6ae418
CM
258 (source (origin
259 (method url-fetch)
260 (uri (string-append
261 "https://github.com/ibus/ibus-anthy/releases/download/"
262 version "/ibus-anthy-" version ".tar.gz"))
263 (sha256
264 (base32
ab84c13f 265 "1y8sf837rmp662bv6zakny0xcm7c9c5qda7f9kq9riv9ywpcbw6x"))))
1c6ae418
CM
266 (build-system gnu-build-system)
267 (arguments
268 '(#:configure-flags
269 ;; Use absolute exec path in the anthy.xml.
270 (list (string-append "--libexecdir=" %output "/libexec"))
271 #:phases
272 (modify-phases %standard-phases
273 (add-after 'install 'wrap-programs
274 (lambda* (#:key outputs #:allow-other-keys)
275 (let ((out (assoc-ref outputs "out")))
276 (for-each
277 (lambda (prog)
278 (wrap-program (string-append out "/libexec/" prog)
279 `("PYTHONPATH" ":" prefix
280 (,(getenv "PYTHONPATH")))
281 `("GI_TYPELIB_PATH" ":" prefix
282 (,(getenv "GI_TYPELIB_PATH")
283 ,(string-append out "/lib/girepository-1.0")))))
284 '("ibus-engine-anthy" "ibus-setup-anthy"))
285 #t))))))
286 (native-inputs
b94a6ca0 287 `(("gettext" ,gettext-minimal)
1c6ae418
CM
288 ("intltool" ,intltool)
289 ("pkg-config" ,pkg-config)
290 ("python" ,python)))
291 (inputs
292 `(("anthy" ,anthy)
293 ("gtk+" ,gtk+)
294 ("ibus" ,ibus)
295 ("gobject-introspection" ,gobject-introspection)
296 ("python-pygobject" ,python-pygobject)))
297 (synopsis "Anthy Japanese language input method for IBus")
298 (description "IBus-Anthy is an engine for the input bus \"IBus\"). It
299adds the Anthy Japanese language input method to IBus. Because most graphical
300applications allow text input via IBus, installing this package will enable
301Japanese language input in most graphical applications.")
302 (home-page "https://github.com/fujiwarat/ibus-anthy")
303 (license gpl2+)))
78209a16
MP
304
305(define-public librime
306 (package
307 (name "librime")
ca49d732 308 (version "1.5.3")
78209a16
MP
309 (source
310 (origin
86374285
RW
311 (method git-fetch)
312 (uri (git-reference
313 (url "https://github.com/rime/librime.git")
314 (commit version)))
315 (file-name (git-file-name name version))
78209a16 316 (sha256
950ebfd1 317 (base32
ca49d732 318 "0xskhdhk7dgpc71r39pfzxi5vrlzy90aqj1gzv8nnapq91p2awhv"))
950ebfd1
EF
319 (modules '((guix build utils)))
320 (snippet
321 '(begin
322 (delete-file-recursively "thirdparty/src")
323 (delete-file-recursively "thirdparty/bin")
324 (delete-file-recursively "thirdparty/include/X11")
325 #t))))
78209a16 326 (build-system cmake-build-system)
950ebfd1 327 (arguments
51d4c79d 328 '(#:phases
950ebfd1
EF
329 (modify-phases %standard-phases
330 (add-after 'unpack 'patch-source
331 (lambda _
332 (substitute* "CMakeLists.txt"
333 (("include_directories\\($\\{PROJECT_SOURCE_DIR\\}/thirdparty/include\\)") "")
334 (("link_directories\\($\\{PROJECT_SOURCE_DIR\\}/thirdparty/lib\\)") ""))
335 #t)))))
78209a16
MP
336 (inputs
337 `(("boost" ,boost)
338 ("glog" ,glog)
339 ("leveldb" ,leveldb)
340 ("marisa" ,marisa)
341 ("opencc" ,opencc)
342 ("yaml-cpp" ,yaml-cpp)))
950ebfd1
EF
343 (native-inputs
344 `(("googletest" ,googletest)
345 ("xorgproto" ,xorgproto))) ; keysym.h
78209a16
MP
346 (home-page "https://rime.im/")
347 (synopsis "The core library of Rime Input Method Engine")
348 (description "@dfn{librime} is the core library of Rime Input Method
349Engine, which is a lightweight, extensible input method engine supporting
350various input schemas including glyph-based input methods, romanization-based
351input methods as well as those for Chinese dialects. It has the ability to
352compose phrases and sentences intelligently and provide very accurate
353traditional Chinese output.")
354 (license bsd-3)))
1329f095
MP
355
356(define-public rime-data
357 (package
358 (name "rime-data")
775e81b5 359 (version "0.38.20190131")
1329f095
MP
360 (source
361 (origin
362 (method git-fetch)
363 (uri (git-reference
364 (url "https://github.com/rime/plum.git")
775e81b5 365 (commit "8b48688cd4610d0c9223eb68831a31b6134e4cc8")))
1329f095
MP
366 (file-name "plum-checkout")
367 (sha256
775e81b5 368 (base32 "0fv3hv4av9y7afxijh1n8idnyf82v9rxxi2ypmxd7lkj4naa22qh"))))
1329f095
MP
369 (build-system gnu-build-system)
370 (arguments
371 `(#:tests? #f ; no tests
372 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
373 "no_update=1")
374 #:phases
375 (modify-phases %standard-phases
376 (add-after 'unpack 'patch-source
377 (lambda _
378 ;; Set .DEFAULT_GOAL to `all'.
379 ;; Don't build binary schemas. The output is not deterministic.
380 (substitute* "Makefile"
381 (("^\\.DEFAULT_GOAL := preset")
382 ".DEFAULT_GOAL := all"))
383 #t))
384 ;; Add schema packages into "package/rime" directory.
385 (add-after 'unpack 'add-packages
386 (lambda* (#:key inputs #:allow-other-keys)
387 (let* ((dest-dir "package/rime"))
388 (mkdir-p dest-dir)
389 (for-each (lambda (pkg)
775e81b5
MP
390 (symlink (assoc-ref inputs
391 (string-append "rime-" pkg))
1329f095
MP
392 (string-append dest-dir "/" pkg)))
393 '("array"
394 "bopomofo"
395 "cangjie"
396 "combo-pinyin"
397 "double-pinyin"
398 "emoji"
399 "essay"
400 "ipa"
401 "jyutping"
402 "luna-pinyin"
403 "middle-chinese"
404 "pinyin-simp"
405 "prelude"
406 "quick"
407 "scj"
408 "soutzoe"
409 "stenotype"
410 "stroke"
411 "terra-pinyin"
412 "wubi"
413 "wugniu")))
414 #t))
415 (delete 'configure))))
416 (native-inputs
775e81b5 417 `(("rime-array"
1329f095
MP
418 ,(origin
419 (method git-fetch)
420 (uri (git-reference
421 (url "https://github.com/rime/rime-array.git")
775e81b5 422 (commit "93cc99238f120606a076220ec4ddcad164f6396a")))
1329f095
MP
423 (file-name "rime-array-checkout")
424 (sha256
425 (base32
775e81b5
MP
426 "06yxrv3x702751jvx46rfw3ix34jk7jh183rz6bllznzi7lxz7sz"))))
427 ("rime-bopomofo"
1329f095
MP
428 ,(origin
429 (method git-fetch)
430 (uri (git-reference
431 (url "https://github.com/rime/rime-bopomofo.git")
775e81b5 432 (commit "ed25098386f5efd3d70b08650f0d1b70c41c11a3")))
1329f095
MP
433 (file-name "rime-bopomofo-checkout")
434 (sha256
435 (base32
775e81b5
MP
436 "1ip1pbfb1hadf2mcymr5939iagf25ywfl67d9198jahzyr6rdyvc"))))
437 ("rime-cangjie"
1329f095
MP
438 ,(origin
439 (method git-fetch)
440 (uri (git-reference
441 (url "https://github.com/rime/rime-cangjie.git")
775e81b5 442 (commit "5fd8ce6f64039e505ca02655a621f2e830b97c19")))
1329f095
MP
443 (file-name "rime-cangjie-checkout")
444 (sha256
445 (base32
775e81b5
MP
446 "1gf6r0q593ixar6v0jyvs56cik2gjp7pf9v799rfd2yydyia3bfg"))))
447 ("rime-combo-pinyin"
1329f095
MP
448 ,(origin
449 (method git-fetch)
450 (uri (git-reference
451 (url "https://github.com/rime/rime-combo-pinyin.git")
775e81b5 452 (commit "9bd952b964e9744e5d18e9e31625b50f3585a2cb")))
1329f095
MP
453 (file-name "rime-combo-pinyin-checkout")
454 (sha256
455 (base32
775e81b5
MP
456 "0crafjs39x4j221gb34mxxh3cdpxfhhx3nfw6b6bgkzlrp35a02b"))))
457 ("rime-double-pinyin"
1329f095
MP
458 ,(origin
459 (method git-fetch)
460 (uri (git-reference
461 (url "https://github.com/rime/rime-double-pinyin.git")
775e81b5 462 (commit "69bf85d4dfe8bac139c36abbd68d530b8b6622ea")))
1329f095
MP
463 (file-name "rime-double-pinyin-checkout")
464 (sha256
465 (base32
775e81b5
MP
466 "093wif5avvvw45fqbwj5wkbxrychy4pagl4mwsmbrayc8jkp69ak"))))
467 ("rime-emoji"
1329f095
MP
468 ,(origin
469 (method git-fetch)
470 (uri (git-reference
471 (url "https://github.com/rime/rime-emoji.git")
775e81b5 472 (commit "c8d67f9b50bf89a10c57da646d2e6db8799aef38")))
1329f095
MP
473 (file-name "rime-emoji-checkout")
474 (sha256
475 (base32
775e81b5
MP
476 "0ngcm088iyyp3llxvv0m80i7n5928d6cgh256ikhn3ixallxxdxv"))))
477 ("rime-essay"
1329f095
MP
478 ,(origin
479 (method git-fetch)
480 (uri (git-reference
481 (url "https://github.com/rime/rime-essay.git")
775e81b5 482 (commit "71d0b1f3d4f3bfe61ae07581edf07579740c4421")))
1329f095
MP
483 (file-name "rime-essay-checkout")
484 (sha256
485 (base32
775e81b5
MP
486 "1iwz104k7zfk7lpa257kvpqdr6jhbg3p76n3644ywiz4l7kc678i"))))
487 ("rime-ipa"
1329f095
MP
488 ,(origin
489 (method git-fetch)
490 (uri (git-reference
491 (url "https://github.com/rime/rime-ipa.git")
775e81b5 492 (commit "e420c7bfb07153a2d2484eb2bdccdd719811abbb")))
1329f095
MP
493 (file-name "rime-ipa-checkout")
494 (sha256
495 (base32
775e81b5
MP
496 "1wfv7lb4y61b3qic5mhw92rn46cckldd9wrkcq03mg5512mbw63z"))))
497 ("rime-jyutping"
1329f095
MP
498 ,(origin
499 (method git-fetch)
500 (uri (git-reference
501 (url "https://github.com/rime/rime-jyutping.git")
775e81b5 502 (commit "04891a298319888e8c6b1a20e0fa81cfaea01264")))
1329f095
MP
503 (file-name "rime-jyutping-checkout")
504 (sha256
505 (base32
775e81b5
MP
506 "0wsj965khglz36cnvfm4fkv386xvxhmsxgcw88p5qi0b3wlbzzx6"))))
507 ("rime-luna-pinyin"
1329f095
MP
508 ,(origin
509 (method git-fetch)
510 (uri (git-reference
511 (url "https://github.com/rime/rime-luna-pinyin.git")
775e81b5 512 (commit "c9c405566177cb3898bdb82d7f4157587f2d9c01")))
1329f095
MP
513 (file-name "rime-luna-pinyin-checkout")
514 (sha256
515 (base32
775e81b5
MP
516 "0i7f2675lvj9pzwlm8550ifnr3xqi77xlyyvml1wpxpkfqhjr475"))))
517 ("rime-middle-chinese"
1329f095
MP
518 ,(origin
519 (method git-fetch)
520 (uri (git-reference
521 (url "https://github.com/rime/rime-middle-chinese.git")
775e81b5 522 (commit "ed6d44f8d0bedf6e0c1c3183a270f8f01a211a40")))
1329f095
MP
523 (file-name "rime-middle-chinese-checkout")
524 (sha256
525 (base32
775e81b5
MP
526 "09mql88lsrxa99pyllby5z22kaiwwa037ha8gwaxjnnlsjgvz7zx"))))
527 ("rime-pinyin-simp"
1329f095
MP
528 ,(origin
529 (method git-fetch)
530 (uri (git-reference
531 (url "https://github.com/rime/rime-pinyin-simp.git")
775e81b5 532 (commit "bb5a6dfa871669d2f451b477bfff6d131df6f6c6")))
1329f095
MP
533 (file-name "rime-pinyin-simp-checkout")
534 (sha256
535 (base32
775e81b5
MP
536 "0ss82042k833w5q72h72ghcfchkx00nx6l4z4fb861s2rxr0bkjd"))))
537 ("rime-prelude"
1329f095
MP
538 ,(origin
539 (method git-fetch)
540 (uri (git-reference
541 (url "https://github.com/rime/rime-prelude.git")
775e81b5 542 (commit "8a52b4f86a59f3eb602f9a4cf6a680a67c15df8c")))
1329f095
MP
543 (file-name "rime-prelude-checkout")
544 (sha256
545 (base32
775e81b5
MP
546 "039fr3996vfxzn2milaq1f5fw08f6zgjsxsql6cfhsc5b55fidm7"))))
547 ("rime-quick"
1329f095
MP
548 ,(origin
549 (method git-fetch)
550 (uri (git-reference
551 (url "https://github.com/rime/rime-quick.git")
775e81b5 552 (commit "3fe5911ba608cb2df1b6301b76ad1573bd482a76")))
1329f095
MP
553 (file-name "rime-quick-checkout")
554 (sha256
555 (base32
775e81b5
MP
556 "08bh87ym5qvw55lyw20l3m7jd4c2z5rvil8h5q8790r7z6j6ijy9"))))
557 ("rime-scj"
1329f095
MP
558 ,(origin
559 (method git-fetch)
560 (uri (git-reference
561 (url "https://github.com/rime/rime-scj.git")
775e81b5 562 (commit "cab5a0858765eff0553dd685a2d61d5536e9149c")))
1329f095
MP
563 (file-name "rime-scj-checkout")
564 (sha256
565 (base32
775e81b5
MP
566 "0ard2bjp4896a8dimmcwyjwgmp9kl4rz92yc92jnd3y4rgwl6fvk"))))
567 ("rime-soutzoe"
1329f095
MP
568 ,(origin
569 (method git-fetch)
570 (uri (git-reference
571 (url "https://github.com/rime/rime-soutzoe.git")
775e81b5 572 (commit "beeaeca72d8e17dfd1e9af58680439e9012987dc")))
1329f095
MP
573 (file-name "rime-soutzoe-checkout")
574 (sha256
575 (base32
775e81b5
MP
576 "0jyqx0q9s0qxn168l5n8zav8jcl2g5ppr7pa8jm1vwrllf20slcc"))))
577 ("rime-stenotype"
1329f095
MP
578 ,(origin
579 (method git-fetch)
580 (uri (git-reference
581 (url "https://github.com/rime/rime-stenotype.git")
775e81b5 582 (commit "1d472097c32d943d1096644f4c31f28799a17bd8")))
1329f095
MP
583 (file-name "rime-stenotype-checkout")
584 (sha256
585 (base32
775e81b5
MP
586 "1dy9qlbyhnshq2k1vcvkqn2624r96iaixhyrx1z7v0vz84fjf6y4"))))
587 ("rime-stroke"
1329f095
MP
588 ,(origin
589 (method git-fetch)
590 (uri (git-reference
591 (url "https://github.com/rime/rime-stroke.git")
775e81b5 592 (commit "f802735392b378fb2a56a9b7b53b8ec96a30ccaf")))
1329f095
MP
593 (file-name "rime-stroke-checkout")
594 (sha256
595 (base32
775e81b5
MP
596 "1wlrsskxhldh8369n771gk7sxflzdx0c9qhq1mqm5hhkwc5ig1j0"))))
597 ("rime-terra-pinyin"
1329f095
MP
598 ,(origin
599 (method git-fetch)
600 (uri (git-reference
601 (url "https://github.com/rime/rime-terra-pinyin.git")
775e81b5 602 (commit "b9e0edd3182e74b26b03a278c038e669ca538a35")))
1329f095
MP
603 (file-name "rime-terra-pinyin-checkout")
604 (sha256
605 (base32
775e81b5
MP
606 "1vzrv2k178bii4ld9rvpdi8zmcwybd8bks0qzjx2v4kbjgwj28zk"))))
607 ("rime-wubi"
1329f095
MP
608 ,(origin
609 (method git-fetch)
610 (uri (git-reference
611 (url "https://github.com/rime/rime-wubi.git")
775e81b5 612 (commit "dd052ee158a38cb791755318b1aef9b4a3ed0316")))
1329f095
MP
613 (file-name "rime-wubi-checkout")
614 (sha256
615 (base32
775e81b5
MP
616 "00xzv3sbwqh2jz4i7s315h7rw17qa2dgj7kflyy3blxk0s2cqiqa"))))
617 ("rime-wugniu"
1329f095
MP
618 ,(origin
619 (method git-fetch)
620 (uri (git-reference
621 (url "https://github.com/rime/rime-wugniu.git")
775e81b5 622 (commit "abd1ee98efbf170258fcf43875c21a4259e00b61")))
1329f095
MP
623 (file-name "rime-wugniu-checkout")
624 (sha256
625 (base32
775e81b5 626 "0qn54d3cclny106ixdw08r5n6wn52ffs1hgrma3k0j4pv0kr9nlq"))))))
1329f095
MP
627 (home-page "https://rime.im/")
628 (synopsis "Schema data of Rime Input Method Engine")
629 (description "@dfn{rime-data} provides the schema data of Rime Input
630Method Engine.")
631 (license lgpl3+)))
d5b23d2b
MP
632
633(define-public ibus-rime
634 (package
635 (name "ibus-rime")
f7a25b50 636 (version "1.4.0")
d5b23d2b
MP
637 (source
638 (origin
487e3f5a
RW
639 (method git-fetch)
640 (uri (git-reference
641 (url "https://github.com/rime/ibus-rime.git")
642 (commit version)))
643 (file-name (git-file-name name version))
d5b23d2b 644 (sha256
f7a25b50 645 (base32 "12y6jdz1amhgrnqa7zjim63dfsz6zyxyahbirfan37wmcfp6gp1d"))))
d5b23d2b
MP
646 (build-system gnu-build-system)
647 (arguments
648 `(#:tests? #f ; no tests
649 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
650 #:phases
651 (modify-phases %standard-phases
652 (add-after 'unpack 'patch-source
653 (lambda* (#:key inputs outputs #:allow-other-keys)
654 ;; Define RIME_DATA_DIR. It's required but not used by the code.
655 (substitute* "Makefile"
656 (("cmake")
657 (string-append "cmake -DRIME_DATA_DIR="
658 (assoc-ref inputs "rime-data")
659 "/share/rime-data")))
660 ;; rime_config.h defines the actual data directory.
661 (substitute* "rime_config.h"
662 (("^#define IBUS_RIME_INSTALL_PREFIX .*$")
663 (string-append "#define IBUS_RIME_INSTALL_PREFIX \""
664 (assoc-ref outputs "out")
665 "\"\n"))
666 (("^#define IBUS_RIME_SHARED_DATA_DIR .*$")
667 (string-append "#define IBUS_RIME_SHARED_DATA_DIR \""
668 (assoc-ref inputs "rime-data")
669 "/share/rime-data\"\n")))
670 #t))
671 (delete 'configure))))
672 (inputs
673 `(("gdk-pixbuf" ,gdk-pixbuf)
674 ("glib" ,glib)
675 ("ibus" ,ibus)
676 ("libnotify" ,libnotify)
677 ("librime" ,librime)
678 ("rime-data" ,rime-data)))
679 (native-inputs
c69959f0 680 `(("cmake" ,cmake-minimal)
d5b23d2b
MP
681 ("pkg-config" ,pkg-config)))
682 (home-page "https://rime.im/")
683 (synopsis "Rime Input Method Engine for IBus")
684 (description "@dfn{ibus-rime} provides the Rime input method engine for
685IBus. Rime is a lightweight, extensible input method engine supporting
686various input schemas including glyph-based input methods, romanization-based
687input methods as well as those for Chinese dialects. It has the ability to
688compose phrases and sentences intelligently and provide very accurate
689traditional Chinese output.")
690 (license gpl3+)))