gnu: gf2x: Update to 1.3.0.
[jackhill/guix/guix.git] / gnu / packages / ibus.scm
CommitLineData
aad6f5bc 1;;; GNU Guix --- Functional package management for GNU
f9e016ba 2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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>
729cc111 7;;; Copyright © 2018, 2019, 2020, 2021 Peng Mei Yu <pengmeiyu@riseup.net>
94b8fe80 8;;; Copyright © 2020 kanichos <kanichos@yandex.ru>
e89986c8 9;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
d5a1206b 10;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
6972c4f2 11;;; Copyright © 2021 Songlin Jiang <hollowman@hollowman.ml>
2dc43d7d 12;;; Copyright © 2021 Taiju HIGASHI <higashi@taiju.info>
39b11877 13;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
aad6f5bc
RW
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages ibus)
31 #:use-module (guix licenses)
32 #:use-module (guix packages)
2533e7f8 33 #:use-module (guix gexp)
aad6f5bc 34 #:use-module (guix download)
1329f095 35 #:use-module (guix git-download)
78209a16 36 #:use-module (guix build-system cmake)
aad6f5bc
RW
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system glib-or-gtk)
6972c4f2 39 #:use-module (guix build-system python)
dbac4833 40 #:use-module (guix utils)
aad6f5bc 41 #:use-module (gnu packages)
1c6ae418 42 #:use-module (gnu packages anthy)
12edffe4 43 #:use-module (gnu packages autotools)
e631e122 44 #:use-module (gnu packages bash)
12edffe4 45 #:use-module (gnu packages base)
78209a16 46 #:use-module (gnu packages boost)
950ebfd1 47 #:use-module (gnu packages check)
d5b23d2b 48 #:use-module (gnu packages cmake)
5fbbd29f 49 #:use-module (gnu packages databases)
78209a16 50 #:use-module (gnu packages datastructures)
255d1bbe 51 #:use-module (gnu packages dbm)
8b47e61c 52 #:use-module (gnu packages docbook)
5fbbd29f 53 #:use-module (gnu packages freedesktop)
1c6ae418 54 #:use-module (gnu packages gettext)
aad6f5bc
RW
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages iso-codes)
78209a16 59 #:use-module (gnu packages logging)
5d96de60 60 #:use-module (gnu packages perl)
aad6f5bc 61 #:use-module (gnu packages pkg-config)
d37f00b9 62 #:use-module (gnu packages python)
5d96de60 63 #:use-module (gnu packages python-xyz)
6972c4f2 64 #:use-module (gnu packages python-web)
78209a16 65 #:use-module (gnu packages serialization)
cd0322a3 66 #:use-module (gnu packages sqlite)
78209a16 67 #:use-module (gnu packages textutils)
0873cce1 68 #:use-module (gnu packages unicode)
5d96de60
RG
69 #:use-module (gnu packages xorg)
70 #:use-module (gnu packages xdisorg))
aad6f5bc
RW
71
72(define-public ibus
73 (package
2f968763 74 (name "ibus")
e631e122 75 (version "1.5.27")
2f968763
MP
76 (source (origin
77 (method url-fetch)
78 (uri (string-append "https://github.com/ibus/ibus/"
79 "releases/download/"
80 version "/ibus-" version ".tar.gz"))
81 (sha256
82 (base32
e631e122 83 "1pwppcy0xpidxa7db9lykjjjj1rcjrqf5l88f77hgxlnvdddmyvf"))))
2f968763 84 (build-system glib-or-gtk-build-system)
8b47e61c 85 (outputs '("out" "doc"))
2f968763 86 (arguments
e631e122
MC
87 (list
88 #:configure-flags #~(list "--enable-python-library"
89 "--enable-gtk-doc"
90 "--enable-memconf"
91 (string-append
92 "--with-unicode-emoji-dir="
93 (search-input-directory %build-inputs
94 "share/unicode/emoji"))
95 (string-append
96 "--with-emoji-annotation-dir="
97 (search-input-directory
98 %build-inputs
99 "share/unicode/cldr/common/annotations"))
100 (string-append
101 "--with-ucd-dir="
102 (search-input-directory %build-inputs
103 "share/ucd"))
104 "--enable-wayland"
105 "--disable-systemd-services")
106 #:make-flags
107 ;; The GUI tests not only require a DISPLAY, but also a window manager
108 ;; since IBus needs to receive focus-in/out events to test IBus with GTK
109 ;; applications (see: https://github.com/ibus/ibus/issues/2307).
110 #~(list (string-append "DISABLE_GUI_TESTS=ibus-compose "
111 "ibus-inputcontext-create "
112 "xkb-latin-layouts "))
113 #:phases
114 #~(modify-phases %standard-phases
115 (add-after 'unpack 'disable-failing-tests
116 (lambda _
117 ;; These tests require /etc/machine-id.
118 (with-directory-excursion "src/tests"
119 (substitute* '("ibus-share.c" "ibus-compose.c"
120 "ibus-keypress.c")
121 (("[ \t]*return g_test_run \\(\\);") "")))))
122 (add-after 'unpack 'patch-docbook-xml
123 (lambda* (#:key inputs #:allow-other-keys)
124 (with-directory-excursion "docs/reference/ibus"
125 (substitute* "ibus-docs.sgml.in"
126 (("http://www.oasis-open.org/docbook/xml/4.1.2/")
127 (string-append #$(this-package-native-input "docbook-xml")
128 "/xml/dtd/docbook/"))))))
129 (add-after 'unpack 'patch-python-target-directories
130 (lambda _
131 (let ((root (string-append #$output
132 "/lib/python"
133 #$(version-major+minor
134 (package-version python))
135 "/site-packages")))
136 (substitute* "configure"
137 (("(py2?overridesdir)=.*" _ var)
138 (string-append var "=" root "/gi/overrides/"))
139 (("(pkgpython2dir=).*" _ var)
140 (string-append var root "/ibus"))))))
141 (add-before 'configure 'disable-dconf-update
142 (lambda _
143 (substitute* "data/dconf/Makefile.in"
144 (("dconf update") "echo dconf update"))))
145 (add-after 'unpack 'delete-generated-files
146 (lambda _
147 (for-each (lambda (file)
148 (let ((c (string-append (string-drop-right file 4) "c")))
149 (when (file-exists? c)
150 (format #t "deleting ~a\n" c)
151 (delete-file c))))
152 (find-files "." "\\.vala"))))
153 (add-after 'unpack 'fix-paths
154 (lambda* (#:key inputs #:allow-other-keys)
155 (substitute* "src/ibusenginesimple.c"
156 (("/usr/share/X11/locale")
157 (search-input-directory inputs "share/X11/locale")))
158 (substitute* "ui/gtk3/xkblayout.vala"
159 (("\"(setxkbmap|xmodmap)\"" _ prog)
160 (format #f "~s" (search-input-file
161 inputs (string-append "bin/" prog)))))))
162 (add-before 'check 'pre-check
163 (lambda _
164 ;; Tests write to $HOME.
165 (setenv "HOME" (getcwd))
166 ;; Tests look for $XDG_RUNTIME_DIR.
167 (setenv "XDG_RUNTIME_DIR" (getcwd))
168 ;; For missing '/etc/machine-id'.
169 (setenv "DBUS_FATAL_WARNINGS" "0")
170 ;; Tests require a running X server.
171 (system "Xvfb :1 +extension GLX &")
172 (setenv "DISPLAY" ":1")
173 ;; Tests require running iBus daemon.
174 (system "./bus/ibus-daemon --daemonize")))
175 (add-after 'install 'move-doc
176 (lambda _
177 (mkdir-p (string-append #$output:doc "/share"))
178 (rename-file
179 (string-append #$output "/share/gtk-doc")
180 (string-append #$output:doc "/share/gtk-doc"))))
181 (add-after 'wrap-program 'wrap-with-additional-paths
182 (lambda* (#:key outputs #:allow-other-keys)
183 ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
184 ;; GI_TYPELIB_PATH.
185 (wrap-program (search-input-file outputs "bin/ibus-setup")
186 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
187 `("GI_TYPELIB_PATH" ":" prefix
188 (,(getenv "GI_TYPELIB_PATH")
189 ,(string-append #$output "/lib/girepository-1.0")))))))))
2f968763 190 (inputs
e631e122
MC
191 (list bash-minimal
192 dbus
193 dconf
194 glib
195 gtk+-2
196 gtk+
197 iso-codes
198 json-glib
199 libnotify
200 libx11
201 libxkbcommon
202 libxtst
203 python-pygobject
204 python
205 python-dbus
206 setxkbmap
207 ucd
208 unicode-cldr-common
209 unicode-emoji
210 wayland
211 xmodmap))
2f968763 212 (native-inputs
e631e122
MC
213 (list docbook-xml-4.1.2
214 `(,glib "bin") ;for glib-genmarshal
215 gettext-minimal
216 gnome-common
217 gobject-introspection ;for g-ir-compiler
218 `(,gtk+ "bin")
219 gtk-doc
220 perl
221 pkg-config
222 python-wrapper
223 vala
224 which
225 xorg-server-for-tests))
2f968763
MP
226 (native-search-paths
227 (list (search-path-specification
228 (variable "IBUS_COMPONENT_PATH")
229 (files '("share/ibus/component")))))
230 (synopsis "Input method framework")
231 (description
232 "IBus is an input framework providing a full-featured and user-friendly
aad6f5bc
RW
233input method user interface. It comes with multilingual input support. It
234may also simplify input method development.")
2f968763
MP
235 (home-page "https://github.com/ibus/ibus/wiki")
236 (license lgpl2.1+)))
12edffe4 237
5fbbd29f
RW
238(define-public ibus-libpinyin
239 (package
2f968763 240 (name "ibus-libpinyin")
266d55dc 241 (version "1.12.0")
2f968763
MP
242 (source (origin
243 (method url-fetch)
244 (uri (string-append "https://github.com/libpinyin/ibus-libpinyin/"
245 "releases/download/" version
246 "/ibus-libpinyin-" version ".tar.gz"))
247 (sha256
248 (base32
266d55dc 249 "0xl2lmffy42f6h6za05z4vpazpza1a9gsrva65giwyv3kpf652dd"))))
2f968763
MP
250 (build-system glib-or-gtk-build-system)
251 (arguments
266d55dc
RW
252 `(#:configure-flags
253 '("--enable-opencc")
254 #:phases
2f968763
MP
255 (modify-phases %standard-phases
256 (add-after 'wrap-program 'wrap-with-additional-paths
257 (lambda* (#:key inputs outputs #:allow-other-keys)
258 ;; Make sure 'ibus-setup-libpinyin' runs with the correct
259 ;; PYTHONPATH and GI_TYPELIB_PATH.
260 (let ((out (assoc-ref outputs "out")))
261 (wrap-program (string-append out "/libexec/ibus-setup-libpinyin")
d42245d4
MC
262 `("GUIX_PYTHONPATH" ":" prefix
263 (,(getenv "GUIX_PYTHONPATH")
2f968763 264 ,(string-append (assoc-ref inputs "ibus")
266d55dc
RW
265 "/lib/girepository-1.0")
266 ,(string-append (assoc-ref outputs "out")
267 "/share/ibus-libpinyin/setup/")))
2f968763
MP
268 `("GI_TYPELIB_PATH" ":" prefix
269 (,(string-append (assoc-ref inputs "ibus")
266d55dc
RW
270 "/lib/girepository-1.0")
271 ,(string-append (assoc-ref outputs "out")
272 "/share/ibus-libpinyin/setup/"))))
2f968763
MP
273 #t))))))
274 (inputs
275 `(("ibus" ,ibus)
276 ("libpinyin" ,libpinyin)
277 ("bdb" ,bdb)
278 ("sqlite" ,sqlite)
266d55dc 279 ("opencc" ,opencc)
2f968763 280 ("python" ,python)
afabb9ec 281 ("pygobject2" ,python-pygobject)
2f968763
MP
282 ("gtk+" ,gtk+)))
283 (native-inputs
8394619b
LC
284 (list pkg-config intltool
285 `(,glib "bin")))
2f968763
MP
286 (synopsis "Chinese pinyin and ZhuYin input methods for IBus")
287 (description
288 "This package includes a Chinese pinyin input method and a Chinese
5fbbd29f 289ZhuYin (Bopomofo) input method based on libpinyin for IBus.")
2f968763 290 (home-page "https://github.com/libpinyin/ibus-libpinyin")
266d55dc 291 (license gpl3+)))
5fbbd29f 292
12edffe4
RW
293(define-public libpinyin
294 (package
295 (name "libpinyin")
f9e016ba 296 (version "2.6.0")
12edffe4
RW
297 (source (origin
298 (method url-fetch)
8738c2b3
RW
299 (uri (string-append "https://github.com/libpinyin/libpinyin/"
300 "releases/download/" version
44613030 301 "/libpinyin-" version ".tar.gz"))
12edffe4
RW
302 (sha256
303 (base32
f9e016ba 304 "10h5mjgv4ibhispvr3s1k36a4aclx4dcvcc2knd4sg1xibw0dp4w"))))
12edffe4 305 (build-system gnu-build-system)
12edffe4 306 (inputs
8394619b 307 (list glib bdb))
12edffe4 308 (native-inputs
8394619b 309 (list pkg-config))
1f7a84dc 310 (synopsis "Library to handle Chinese pinyin")
12edffe4
RW
311 (description
312 "The libpinyin C++ library provides algorithms needed for sentence-based
313Chinese pinyin input methods.")
314 (home-page "https://github.com/libpinyin/libpinyin")
315 (license gpl2+)))
1c6ae418
CM
316
317(define-public ibus-anthy
318 (package
319 (name "ibus-anthy")
2dc43d7d 320 (version "1.5.14")
1c6ae418
CM
321 (source (origin
322 (method url-fetch)
323 (uri (string-append
324 "https://github.com/ibus/ibus-anthy/releases/download/"
325 version "/ibus-anthy-" version ".tar.gz"))
326 (sha256
327 (base32
2dc43d7d 328 "16vd0k8wm13s38869jqs3dnwmjvywgn0snnpyi41m28binhlssf8"))))
1c6ae418
CM
329 (build-system gnu-build-system)
330 (arguments
2533e7f8
LMP
331 (list
332 #:configure-flags
333 ;; Use absolute exec path in the anthy.xml.
334 #~(list (string-append "--libexecdir=" #$output "/libexec"))
335 ;; The test suite fails (see:
336 ;; https://github.com/ibus/ibus-anthy/issues/28).
337 #:tests? #f
338 #:phases
339 #~(modify-phases %standard-phases
340 (add-after 'install 'wrap-programs
341 (lambda* (#:key inputs #:allow-other-keys)
342 (for-each
343 (lambda (prog)
344 (wrap-program (string-append #$output "/libexec/" prog)
345 `("GUIX_PYTHONPATH" ":" prefix
346 (,(getenv "GUIX_PYTHONPATH")))
347 `("GI_TYPELIB_PATH" ":" prefix
348 (,(getenv "GI_TYPELIB_PATH")
349 ,(string-append #$output "/lib/girepository-1.0")))))
350 '("ibus-engine-anthy" "ibus-setup-anthy")))))))
1c6ae418 351 (native-inputs
39b11877
MC
352 (list gettext-minimal
353 `(,glib "bin")
354 intltool
355 pkg-config
356 python))
1c6ae418 357 (inputs
39b11877
MC
358 (list anthy
359 gtk+
360 ibus
361 gobject-introspection
362 python-pygobject))
1c6ae418
CM
363 (synopsis "Anthy Japanese language input method for IBus")
364 (description "IBus-Anthy is an engine for the input bus \"IBus\"). It
365adds the Anthy Japanese language input method to IBus. Because most graphical
366applications allow text input via IBus, installing this package will enable
367Japanese language input in most graphical applications.")
368 (home-page "https://github.com/fujiwarat/ibus-anthy")
369 (license gpl2+)))
78209a16
MP
370
371(define-public librime
372 (package
373 (name "librime")
729cc111 374 (version "1.7.3")
78209a16
MP
375 (source
376 (origin
86374285
RW
377 (method git-fetch)
378 (uri (git-reference
b0e7b699 379 (url "https://github.com/rime/librime")
86374285
RW
380 (commit version)))
381 (file-name (git-file-name name version))
78209a16 382 (sha256
950ebfd1 383 (base32
729cc111 384 "0pqk0i3zcii3fx5laj9qzbgd58jvq6wn31j76w4zix2i4b1lqcqv"))
d5a1206b 385 (patches (search-patches "librime-fix-build-with-gcc10.patch"))
950ebfd1
EF
386 (modules '((guix build utils)))
387 (snippet
388 '(begin
389 (delete-file-recursively "thirdparty/src")
390 (delete-file-recursively "thirdparty/bin")
391 (delete-file-recursively "thirdparty/include/X11")
392 #t))))
78209a16 393 (build-system cmake-build-system)
950ebfd1 394 (arguments
51d4c79d 395 '(#:phases
950ebfd1
EF
396 (modify-phases %standard-phases
397 (add-after 'unpack 'patch-source
398 (lambda _
399 (substitute* "CMakeLists.txt"
400 (("include_directories\\($\\{PROJECT_SOURCE_DIR\\}/thirdparty/include\\)") "")
401 (("link_directories\\($\\{PROJECT_SOURCE_DIR\\}/thirdparty/lib\\)") ""))
402 #t)))))
78209a16 403 (inputs
8394619b
LC
404 (list boost
405 capnproto
406 glog
407 leveldb
408 marisa
409 opencc
410 yaml-cpp))
950ebfd1 411 (native-inputs
8394619b 412 (list googletest pkg-config xorgproto)) ; keysym.h
78209a16
MP
413 (home-page "https://rime.im/")
414 (synopsis "The core library of Rime Input Method Engine")
415 (description "@dfn{librime} is the core library of Rime Input Method
416Engine, which is a lightweight, extensible input method engine supporting
417various input schemas including glyph-based input methods, romanization-based
418input methods as well as those for Chinese dialects. It has the ability to
419compose phrases and sentences intelligently and provide very accurate
420traditional Chinese output.")
421 (license bsd-3)))
1329f095
MP
422
423(define-public rime-data
424 (package
425 (name "rime-data")
91778956 426 (version "0.38.20210802")
1329f095
MP
427 (source
428 (origin
429 (method git-fetch)
430 (uri (git-reference
b0e7b699 431 (url "https://github.com/rime/plum")
91778956 432 (commit "0b835e347cad9c2d7038cfe82df5b5d1fe1c0327")))
1329f095
MP
433 (file-name "plum-checkout")
434 (sha256
91778956 435 (base32 "0mja4wyazxdc6fr7pzij5ah4rzwxv4s12s64vfn5ikx1ias1f8ib"))))
1329f095
MP
436 (build-system gnu-build-system)
437 (arguments
fa7bd611
PMY
438 `(#:modules ((ice-9 match)
439 ,@%gnu-build-system-modules)
440 #:tests? #f ; no tests
91778956 441 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1329f095
MP
442 #:phases
443 (modify-phases %standard-phases
444 (add-after 'unpack 'patch-source
445 (lambda _
5fc75e85
PMY
446 ;; Disable git operations.
447 (substitute* "scripts/install-packages.sh"
91778956 448 (("^\\s*fetch_or_update_package\\s$") ""))
1329f095 449 #t))
fa7bd611
PMY
450 ;; Copy Rime schemas into the "package/rime" directory.
451 (add-after 'unpack 'copy-rime-schemas
1329f095 452 (lambda* (#:key inputs #:allow-other-keys)
fa7bd611 453 (let ((dest-dir "package/rime"))
1329f095 454 (mkdir-p dest-dir)
fa7bd611
PMY
455 (for-each
456 (match-lambda
457 ((name . path)
458 (if (string-prefix? "rime-" name)
459 (let ((schema (substring name (string-length "rime-"))))
460 (symlink path (string-append dest-dir "/" schema))))))
461 inputs))
1329f095 462 #t))
91778956
PMY
463 (replace 'build
464 ;; NOTE: Don't build binary Rime schema. Binary Rime schema files
465 ;; are platform dependent and contain timestamp information.
466 ;; Therefore they are not reproducible.
467 (lambda* (#:key make-flags #:allow-other-keys)
468 (apply invoke "make" "all" make-flags)))
1329f095 469 (delete 'configure))))
fa7bd611 470 (inputs
775e81b5 471 `(("rime-array"
1329f095
MP
472 ,(origin
473 (method git-fetch)
474 (uri (git-reference
b0e7b699 475 (url "https://github.com/rime/rime-array")
91778956 476 (commit "7a7bfafae966e5f949a23a82ee8594cacf492593")))
1329f095
MP
477 (file-name "rime-array-checkout")
478 (sha256
479 (base32
91778956 480 "0kw0wyc5f77bv06fixkfvqnibmm80pyifvrhz8f1h411926ny37r"))))
775e81b5 481 ("rime-bopomofo"
1329f095
MP
482 ,(origin
483 (method git-fetch)
484 (uri (git-reference
b0e7b699 485 (url "https://github.com/rime/rime-bopomofo")
91778956 486 (commit "c7618f4f5728e1634417e9d02ea50d82b71956ab")))
1329f095
MP
487 (file-name "rime-bopomofo-checkout")
488 (sha256
489 (base32
91778956 490 "0g77nv0jrwqnbqqna0ib0kqcy6l5zl62kh49ny67d6bjwnwz9186"))))
775e81b5 491 ("rime-cangjie"
1329f095
MP
492 ,(origin
493 (method git-fetch)
494 (uri (git-reference
b0e7b699 495 (url "https://github.com/rime/rime-cangjie")
91778956 496 (commit "8dfad9e537f18821b71ba28773315d9c670ae245")))
1329f095
MP
497 (file-name "rime-cangjie-checkout")
498 (sha256
499 (base32
91778956 500 "029kw9nx6x0acg4f0m8wj1ziqffffhy9yyj51nlx17cnia0qcrby"))))
387bc215
PMY
501 ("rime-cantonese"
502 ,(origin
503 (method git-fetch)
504 (uri (git-reference
b0e7b699 505 (url "https://github.com/rime/rime-cantonese")
91778956 506 (commit "fa7c8ad19d51143c1a470295d56feeb63e92113f")))
387bc215
PMY
507 (file-name "rime-cantonese-checkout")
508 (sha256
509 (base32
91778956 510 "0vy5vv6h4r4b2msdvdrsj0zr6wmrv0fxm5zyyvxq8f1ix7ignm4c"))))
775e81b5 511 ("rime-combo-pinyin"
1329f095
MP
512 ,(origin
513 (method git-fetch)
514 (uri (git-reference
b0e7b699 515 (url "https://github.com/rime/rime-combo-pinyin")
91778956 516 (commit "a84065a86b272c76215215bd6f03c506b6e7097c")))
1329f095
MP
517 (file-name "rime-combo-pinyin-checkout")
518 (sha256
519 (base32
91778956 520 "1f0b4kakw0x26gmx7xi4f94nbjlb8lvi9bks4f92jswa045vnd87"))))
775e81b5 521 ("rime-double-pinyin"
1329f095
MP
522 ,(origin
523 (method git-fetch)
524 (uri (git-reference
b0e7b699 525 (url "https://github.com/rime/rime-double-pinyin")
775e81b5 526 (commit "69bf85d4dfe8bac139c36abbd68d530b8b6622ea")))
1329f095
MP
527 (file-name "rime-double-pinyin-checkout")
528 (sha256
529 (base32
775e81b5
MP
530 "093wif5avvvw45fqbwj5wkbxrychy4pagl4mwsmbrayc8jkp69ak"))))
531 ("rime-emoji"
1329f095
MP
532 ,(origin
533 (method git-fetch)
534 (uri (git-reference
b0e7b699 535 (url "https://github.com/rime/rime-emoji")
91778956 536 (commit "4c8c51f4a3bc7298c99376eda9bbd86070fc4fa1")))
1329f095
MP
537 (file-name "rime-emoji-checkout")
538 (sha256
539 (base32
91778956 540 "0175jqh210fncafqckr9zzaw55qpswmqjrykwms1apmc68l43122"))))
775e81b5 541 ("rime-essay"
1329f095
MP
542 ,(origin
543 (method git-fetch)
544 (uri (git-reference
b0e7b699 545 (url "https://github.com/rime/rime-essay")
91778956 546 (commit "9db2e77305e75798baf3ec8dcf1f82785b5e1be9")))
1329f095
MP
547 (file-name "rime-essay-checkout")
548 (sha256
549 (base32
91778956 550 "03ypkkaadd5qmyg26n24a66cll90xvcimgbmiyv4d33jradiqg22"))))
775e81b5 551 ("rime-ipa"
1329f095
MP
552 ,(origin
553 (method git-fetch)
554 (uri (git-reference
b0e7b699 555 (url "https://github.com/rime/rime-ipa")
387bc215 556 (commit "22b71710e029bcb412e9197192a638ab11bc2abf")))
1329f095
MP
557 (file-name "rime-ipa-checkout")
558 (sha256
559 (base32
387bc215 560 "0zdk4f9qkfj3q5hmjnairj1lv6f6y27mic12k886n6sxywwbwr2k"))))
775e81b5 561 ("rime-jyutping"
1329f095
MP
562 ,(origin
563 (method git-fetch)
564 (uri (git-reference
b0e7b699 565 (url "https://github.com/rime/rime-jyutping")
91778956 566 (commit "1e24baa6998815c716c581effe8ec65ee87c4e8c")))
1329f095
MP
567 (file-name "rime-jyutping-checkout")
568 (sha256
569 (base32
91778956 570 "0s2rckpwlrm3n7w1csnqyi5p9mkpp3z87s7mrm2vc9sv06rpv7zl"))))
775e81b5 571 ("rime-luna-pinyin"
1329f095
MP
572 ,(origin
573 (method git-fetch)
574 (uri (git-reference
b0e7b699 575 (url "https://github.com/rime/rime-luna-pinyin")
91778956 576 (commit "623adb022b094d540218b287c2e601509eee3347")))
1329f095
MP
577 (file-name "rime-luna-pinyin-checkout")
578 (sha256
579 (base32
91778956 580 "06pcwp09l5wkqv7792gbsl31xnlb3gr9q6bgbp94vvq6m2ycahqz"))))
775e81b5 581 ("rime-middle-chinese"
1329f095
MP
582 ,(origin
583 (method git-fetch)
584 (uri (git-reference
b0e7b699 585 (url "https://github.com/rime/rime-middle-chinese")
91778956 586 (commit "9fad7a7c0c26167d5e6e85db8df48a15c7f7d4f0")))
1329f095
MP
587 (file-name "rime-middle-chinese-checkout")
588 (sha256
589 (base32
91778956 590 "0a0bqrlzg0k692xblqnh1rh1fwwqqb205xwxlihgji85n8ibcgph"))))
775e81b5 591 ("rime-pinyin-simp"
1329f095
MP
592 ,(origin
593 (method git-fetch)
594 (uri (git-reference
b0e7b699 595 (url "https://github.com/rime/rime-pinyin-simp")
91778956 596 (commit "b0e84cda02c613ebdedc127a26131b3800f45a8e")))
1329f095
MP
597 (file-name "rime-pinyin-simp-checkout")
598 (sha256
599 (base32
91778956 600 "05v804qr3a9xvjzp9yid7231fi2l2yrl47ybbvql61z9k36ab094"))))
775e81b5 601 ("rime-prelude"
1329f095
MP
602 ,(origin
603 (method git-fetch)
604 (uri (git-reference
b0e7b699 605 (url "https://github.com/rime/rime-prelude")
91778956 606 (commit "3de303ffaa731dba07b0462ce59f4767e1219ad2")))
1329f095
MP
607 (file-name "rime-prelude-checkout")
608 (sha256
609 (base32
91778956 610 "0g7a0bla58rh1v3md59k6adk185pilb4z8i2i0pqdl4nwqp40n2p"))))
775e81b5 611 ("rime-quick"
1329f095
MP
612 ,(origin
613 (method git-fetch)
614 (uri (git-reference
b0e7b699 615 (url "https://github.com/rime/rime-quick")
775e81b5 616 (commit "3fe5911ba608cb2df1b6301b76ad1573bd482a76")))
1329f095
MP
617 (file-name "rime-quick-checkout")
618 (sha256
619 (base32
775e81b5
MP
620 "08bh87ym5qvw55lyw20l3m7jd4c2z5rvil8h5q8790r7z6j6ijy9"))))
621 ("rime-scj"
1329f095
MP
622 ,(origin
623 (method git-fetch)
624 (uri (git-reference
b0e7b699 625 (url "https://github.com/rime/rime-scj")
775e81b5 626 (commit "cab5a0858765eff0553dd685a2d61d5536e9149c")))
1329f095
MP
627 (file-name "rime-scj-checkout")
628 (sha256
629 (base32
775e81b5
MP
630 "0ard2bjp4896a8dimmcwyjwgmp9kl4rz92yc92jnd3y4rgwl6fvk"))))
631 ("rime-soutzoe"
1329f095
MP
632 ,(origin
633 (method git-fetch)
634 (uri (git-reference
b0e7b699 635 (url "https://github.com/rime/rime-soutzoe")
775e81b5 636 (commit "beeaeca72d8e17dfd1e9af58680439e9012987dc")))
1329f095
MP
637 (file-name "rime-soutzoe-checkout")
638 (sha256
639 (base32
775e81b5
MP
640 "0jyqx0q9s0qxn168l5n8zav8jcl2g5ppr7pa8jm1vwrllf20slcc"))))
641 ("rime-stenotype"
1329f095
MP
642 ,(origin
643 (method git-fetch)
644 (uri (git-reference
b0e7b699 645 (url "https://github.com/rime/rime-stenotype")
387bc215 646 (commit "f3e9189d5ce33c55d3936cc58e39d0c88b3f0c88")))
1329f095
MP
647 (file-name "rime-stenotype-checkout")
648 (sha256
649 (base32
387bc215 650 "0dl6px7lrh3xa87knjzwzdcwjj1k1dg4l72q7lb48an4s9f1cy5d"))))
775e81b5 651 ("rime-stroke"
1329f095
MP
652 ,(origin
653 (method git-fetch)
654 (uri (git-reference
b0e7b699 655 (url "https://github.com/rime/rime-stroke")
387bc215 656 (commit "ea8576d1accd6fda339e96b415caadb56e2a07d1")))
1329f095
MP
657 (file-name "rime-stroke-checkout")
658 (sha256
659 (base32
387bc215 660 "07h6nq9867hjrd2v3h1pnr940sdrw4mqrzj43siz1rzjxz3s904r"))))
775e81b5 661 ("rime-terra-pinyin"
1329f095
MP
662 ,(origin
663 (method git-fetch)
664 (uri (git-reference
b0e7b699 665 (url "https://github.com/rime/rime-terra-pinyin")
91778956 666 (commit "ce7b9249612f575d2f43d51fcacd31d1b4e0ef1b")))
1329f095
MP
667 (file-name "rime-terra-pinyin-checkout")
668 (sha256
669 (base32
91778956 670 "0vm303f4lrdmdmif5klrp6w29vn9z2vzw33cw0y83pcnz39wiads"))))
775e81b5 671 ("rime-wubi"
1329f095
MP
672 ,(origin
673 (method git-fetch)
674 (uri (git-reference
b0e7b699 675 (url "https://github.com/rime/rime-wubi")
91778956 676 (commit "f1876f08f1d4a9696395be0070c0e8e4353c44cb")))
1329f095
MP
677 (file-name "rime-wubi-checkout")
678 (sha256
679 (base32
91778956 680 "1d9y9rqssacria9d0hla96czsqv2wkfm6z926m1x269ryv96zxvk"))))
775e81b5 681 ("rime-wugniu"
1329f095
MP
682 ,(origin
683 (method git-fetch)
684 (uri (git-reference
b0e7b699 685 (url "https://github.com/rime/rime-wugniu")
775e81b5 686 (commit "abd1ee98efbf170258fcf43875c21a4259e00b61")))
1329f095
MP
687 (file-name "rime-wugniu-checkout")
688 (sha256
689 (base32
775e81b5 690 "0qn54d3cclny106ixdw08r5n6wn52ffs1hgrma3k0j4pv0kr9nlq"))))))
1329f095
MP
691 (home-page "https://rime.im/")
692 (synopsis "Schema data of Rime Input Method Engine")
693 (description "@dfn{rime-data} provides the schema data of Rime Input
694Method Engine.")
91778956
PMY
695 (license (list
696 ;; rime-array
697 ;; rime-combo-pinyin
698 ;; rime-double-pinyin
699 ;; rime-middle-chinese
700 ;; rime-scj
701 ;; rime-soutzoe
702 ;; rime-stenotype
703 ;; rime-wugniu
704 gpl3
705
706 ;; plum
707 ;; rime-bopomofo
708 ;; rime-cangjie
709 ;; rime-emoji
710 ;; rime-essay
711 ;; rime-ipa
712 ;; rime-jyutping
713 ;; rime-luna-pinyin
714 ;; rime-prelude
715 ;; rime-quick
716 ;; rime-stroke
717 ;; rime-terra-pinyin
718 ;; rime-wubi
719 lgpl3
720
721 ;; rime-pinyin-simp
722 asl2.0
723
724 ;; rime-cantonese
725 cc-by4.0))))
d5b23d2b
MP
726
727(define-public ibus-rime
728 (package
729 (name "ibus-rime")
7aab590d 730 (version "1.5.0")
d5b23d2b
MP
731 (source
732 (origin
487e3f5a
RW
733 (method git-fetch)
734 (uri (git-reference
b0e7b699 735 (url "https://github.com/rime/ibus-rime")
487e3f5a
RW
736 (commit version)))
737 (file-name (git-file-name name version))
d5b23d2b 738 (sha256
7aab590d
PMY
739 (base32 "1vl3m6ydf7mvmalpdqqmrnnmqdi6l8yyac3bv19pp8a5q3qhkwlg"))))
740 (build-system cmake-build-system)
d5b23d2b
MP
741 (arguments
742 `(#:tests? #f ; no tests
7aab590d
PMY
743 #:configure-flags
744 (list (string-append "-DRIME_DATA_DIR="
745 (assoc-ref %build-inputs "rime-data")
746 "/share/rime-data"))
d5b23d2b
MP
747 #:phases
748 (modify-phases %standard-phases
749 (add-after 'unpack 'patch-source
7aab590d
PMY
750 (lambda _
751 (substitute* "CMakeLists.txt"
752 (("DESTINATION....RIME_DATA_DIR..")
753 "DESTINATION \"${CMAKE_INSTALL_DATADIR}/rime-data\""))
754 #t)))))
d5b23d2b 755 (inputs
8394619b
LC
756 (list gdk-pixbuf
757 glib
758 ibus
759 libnotify
760 librime
761 rime-data))
d5b23d2b 762 (native-inputs
c69959f0 763 `(("cmake" ,cmake-minimal)
d5b23d2b
MP
764 ("pkg-config" ,pkg-config)))
765 (home-page "https://rime.im/")
766 (synopsis "Rime Input Method Engine for IBus")
767 (description "@dfn{ibus-rime} provides the Rime input method engine for
768IBus. Rime is a lightweight, extensible input method engine supporting
769various input schemas including glyph-based input methods, romanization-based
770input methods as well as those for Chinese dialects. It has the ability to
771compose phrases and sentences intelligently and provide very accurate
772traditional Chinese output.")
560540f0 773 (license gpl3)))
94b8fe80 774
775(define-public libhangul
776 (package
777 (name "libhangul")
778 (version "0.1.0")
779 (source
780 (origin
781 (method url-fetch)
782 (uri (string-append "http://kldp.net/hangul/release/"
783 "3442-libhangul-" version ".tar.gz"))
784 (sha256
785 (base32
786 "0ni9b0v70wkm0116na7ghv03pgxsfpfszhgyj3hld3bxamfal1ar"))))
787 (build-system gnu-build-system)
788 (home-page "https://github.com/libhangul/libhangul")
789 (synopsis "Library to support hangul input method logic")
790 (description
791 "This package provides a library to support hangul input method logic,
792hanja dictionary and small hangul character classification.")
793 (license lgpl2.1+)))
30208c10 794
795(define-public ibus-libhangul
796 (package
797 (name "ibus-libhangul")
798 (version "1.5.3")
799 (source
800 (origin
801 (method url-fetch)
802 (uri (string-append "https://github.com/libhangul/ibus-hangul/"
803 "releases/download/" version
804 "/ibus-hangul-" version ".tar.gz"))
805 (sha256
806 (base32
807 "1400ba2p34vr9q285lqvjm73f6m677cgfdymmjpiwyrjgbbiqrjy"))))
808 (build-system gnu-build-system)
809 (arguments
810 `(#:phases
811 (modify-phases %standard-phases
812 (add-after 'install 'wrap
813 (lambda* (#:key inputs outputs #:allow-other-keys)
814 (wrap-program (string-append (assoc-ref outputs "out")
815 "/libexec/ibus-setup-hangul")
d42245d4 816 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
30208c10 817 `("LD_LIBRARY_PATH" ":" prefix
818 (,(string-append (assoc-ref inputs "libhangul") "/lib")))
819 `("GI_TYPELIB_PATH" ":" prefix
820 (,(getenv "GI_TYPELIB_PATH"))))
821 #t)))))
822 (native-inputs
823 `(("pkg-config" ,pkg-config)
824 ("gettext" ,gettext-minimal)
825 ("glib:bin" ,glib "bin")))
826 (inputs
8394619b
LC
827 (list ibus
828 glib
829 python-pygobject
830 gtk+
831 libhangul
832 python))
30208c10 833 (home-page "https://github.com/libhangul/ibus-hangul")
834 (synopsis "Hangul engine for IBus")
835 (description
836 "ibus-hangul is a Korean input method engine for IBus.")
837 (license gpl2+)))
6972c4f2
SJ
838
839(define-public ibus-theme-tools
840 (package
841 (name "ibus-theme-tools")
842 (version "4.2.0")
843 (source
844 (origin
845 (method git-fetch)
846 (uri (git-reference
847 (url "https://github.com/openSUSE/IBus-Theme-Tools")
848 (commit (string-append "v" version))))
849 (file-name (git-file-name name version))
850 (sha256
851 (base32
852 "0i8vwnikwd1bfpv4xlgzc51gn6s18q58nqhvcdiyjzcmy3z344c2"))))
853 (build-system python-build-system)
854 (arguments
f0a30bf8 855 `(#:tests? #f)) ; No tests
6972c4f2 856 (propagated-inputs
8394619b 857 (list python-tinycss2 python-pygobject))
6972c4f2
SJ
858 (native-inputs
859 `(("gettext" ,gettext-minimal)))
860 (home-page "https://github.com/openSUSE/IBus-Theme-Tools")
861 (synopsis "Tool for IBus Themes")
862 (description "IBus Theme Tools can extract IBus-specific settings from
863GTK themes to apply both within and without GNOME Shell.")
864 (license gpl3+)))