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.

690 lines
27 KiB

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