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