;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Meiyo Peng <meiyo@disroot.org>
+;;; Copyright © 2020 kanichos <kanichos@yandex.ru>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages textutils)
+ #:use-module (gnu packages unicode)
#:use-module (gnu packages xorg))
(define-public ibus
(package
(name "ibus")
- (version "1.5.19")
+ (version "1.5.21")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ibus/ibus/"
version "/ibus-" version ".tar.gz"))
(sha256
(base32
- "0a94bnpm24581317hdnihwr4cniriml10p4ffgxg14xhvaccfrjb"))))
+ "1fd2d1jqpp1nn74x04zcilhhab0zar82n0kg614rma6n43kfbhdd"))))
(build-system glib-or-gtk-build-system)
(arguments
`(#:tests? #f ; tests fail because there's no connection to dbus
- #:configure-flags `("--disable-emoji-dict" ; cannot find emoji.json path
- "--disable-python2"
- "--enable-python-library"
- ,(string-append "--with-ucd-dir="
- (getcwd) "/ucd")
- "--enable-wayland")
- #:make-flags
- (list "CC=gcc"
- (string-append "pyoverridesdir="
- (assoc-ref %outputs "out")
- "/lib/python"
- ,(version-major+minor (package-version python))
- "/site-packages/gi/overrides/"))
+ #:parallel-build? #f ; race condition discovered with emoji support
+ #:configure-flags (list "--enable-python-library"
+ (string-append
+ "--with-unicode-emoji-dir="
+ (assoc-ref %build-inputs "unicode-emoji")
+ "/share/unicode/emoji")
+ (string-append
+ "--with-emoji-annotation-dir="
+ (assoc-ref %build-inputs "unicode-cldr-common")
+ "/share/unicode/cldr/common/annotations")
+ (string-append "--with-ucd-dir="
+ (assoc-ref %build-inputs "ucd")
+ "/share/ucd")
+ "--enable-wayland")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'prepare-ucd-dir
- (lambda* (#:key inputs #:allow-other-keys)
- (mkdir-p "../ucd")
- (symlink (assoc-ref inputs "unicode-blocks") "../ucd/Blocks.txt")
- (symlink (assoc-ref inputs "unicode-nameslist") "../ucd/NamesList.txt")
+ (add-after 'unpack 'patch-python-target-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((root (string-append (assoc-ref outputs "out")
+ "/lib/python"
+ ,(version-major+minor (package-version python))
+ "/site-packages")))
+ (substitute* "configure"
+ (("(py2?overridesdir)=.*" _ var)
+ (string-append var "=" root "/gi/overrides/"))
+ (("(pkgpython2dir=).*" _ var)
+ (string-append var root "/ibus"))))
#t))
(add-before 'configure 'disable-dconf-update
(lambda _
"/share/X11/locale")))
(substitute* "ui/gtk3/xkblayout.vala"
(("\"(setxkbmap|xmodmap)\"" _ prog)
- (string-append "\"" (assoc-ref inputs prog) "\"")))
+ (string-append "\"" (assoc-ref inputs prog) "/bin/" prog "\"")))
#t))
(add-after 'wrap-program 'wrap-with-additional-paths
(lambda* (#:key outputs #:allow-other-keys)
("gconf" ,gconf)
("gtk2" ,gtk+-2)
("gtk+" ,gtk+)
- ("intltool" ,intltool)
+ ("gettext" ,gnu-gettext)
("json-glib" ,json-glib)
("libnotify" ,libnotify)
("libx11" ,libx11)
(native-inputs
`(("glib" ,glib "bin") ; for glib-genmarshal
("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
- ("unicode-nameslist"
- ,(origin
- (method url-fetch)
- (uri "https://www.unicode.org/Public/UNIDATA/NamesList.txt")
- (sha256
- (base32 "0yr2h0nfqhirfi3bxl33z6cc94qqshlpgi06c25xh9754irqsgv8"))))
- ("unicode-blocks"
- ,(origin
- (method url-fetch)
- (uri "https://www.unicode.org/Public/UNIDATA/Blocks.txt")
- (sha256
- (base32 "0lnh9iazikpr548bd7nkaq9r3vfljfvz0rg2462prac8qxk7ni8b"))))
+ ("ucd" ,ucd)
+ ("unicode-emoji" ,unicode-emoji)
+ ("unicode-cldr-common" ,unicode-cldr-common)
("vala" ,vala)
("pkg-config" ,pkg-config)))
(native-search-paths
(define-public ibus-libpinyin
(package
(name "ibus-libpinyin")
- (version "1.10.0")
+ (version "1.11.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/libpinyin/ibus-libpinyin/"
"/ibus-libpinyin-" version ".tar.gz"))
(sha256
(base32
- "0yq8aw4lddiviag8cnik6fp52vvk8lxv6bym13a3xya84c6zii3c"))))
+ "1bl1cgicd2df797dx1x0q904438bsn8i23djzcfcai4dp3631xc0"))))
(build-system glib-or-gtk-build-system)
(arguments
`(#:phases
("sqlite" ,sqlite)
("python" ,python)
("pyxdg" ,python-pyxdg)
+ ("pygobject2" ,python-pygobject)
("gtk+" ,gtk+)))
(native-inputs
`(("pkg-config" ,pkg-config)
(define-public libpinyin
(package
(name "libpinyin")
- (version "2.2.0")
+ (version "2.3.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/libpinyin/libpinyin/"
"releases/download/" version
- "/libpinyin-2.2.0.tar.gz"))
+ "/libpinyin-" version ".tar.gz"))
(sha256
(base32
- "1c4wxvcvjxvk23mcwqvsfsv4nhimx4kpjhabxa28gx1ih10l88gj"))))
+ "14969v6w8n1aiqphl2386dws7dmsdwbzyqnlz4kr8ppm39m9rp5k"))))
(build-system gnu-build-system)
(inputs
`(("glib" ,glib)
(define-public librime
(package
(name "librime")
- (version "1.4.0")
+ (version "1.5.3")
(source
(origin
(method git-fetch)
(file-name (git-file-name name version))
(sha256
(base32
- "1zkx1wfbd94v55gfycyd2b94jxclfyk2zl7yw35pyjx63qdlb6sd"))
+ "0xskhdhk7dgpc71r39pfzxi5vrlzy90aqj1gzv8nnapq91p2awhv"))
(modules '((guix build utils)))
(snippet
'(begin
(assoc-ref inputs "rime-data")
"/share/rime-data\"\n")))
#t))
+ (add-after 'unpack 'fix-file-names
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; IBus uses the component file rime.xml to start the Rime
+ ;; engine. It must be patched with appropriate file names.
+ (substitute* "rime.xml"
+ (("/usr") (assoc-ref outputs "out")))
+ #t))
(delete 'configure))))
(inputs
`(("gdk-pixbuf" ,gdk-pixbuf)
("librime" ,librime)
("rime-data" ,rime-data)))
(native-inputs
- `(("cmake" ,cmake)
+ `(("cmake" ,cmake-minimal)
("pkg-config" ,pkg-config)))
(home-page "https://rime.im/")
(synopsis "Rime Input Method Engine for IBus")
compose phrases and sentences intelligently and provide very accurate
traditional Chinese output.")
(license gpl3+)))
+
+(define-public libhangul
+ (package
+ (name "libhangul")
+ (version "0.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://kldp.net/hangul/release/"
+ "3442-libhangul-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ni9b0v70wkm0116na7ghv03pgxsfpfszhgyj3hld3bxamfal1ar"))))
+ (build-system gnu-build-system)
+ (home-page "https://github.com/libhangul/libhangul")
+ (synopsis "Library to support hangul input method logic")
+ (description
+ "This package provides a library to support hangul input method logic,
+hanja dictionary and small hangul character classification.")
+ (license lgpl2.1+)))
+
+(define-public ibus-libhangul
+ (package
+ (name "ibus-libhangul")
+ (version "1.5.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/libhangul/ibus-hangul/"
+ "releases/download/" version
+ "/ibus-hangul-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1400ba2p34vr9q285lqvjm73f6m677cgfdymmjpiwyrjgbbiqrjy"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/libexec/ibus-setup-hangul")
+ `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-append (assoc-ref inputs "libhangul") "/lib")))
+ `("GI_TYPELIB_PATH" ":" prefix
+ (,(getenv "GI_TYPELIB_PATH"))))
+ #t)))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("gettext" ,gettext-minimal)
+ ("glib:bin" ,glib "bin")))
+ (inputs
+ `(("ibus" ,ibus)
+ ("glib" ,glib)
+ ("python-pygobject" ,python-pygobject)
+ ("gtk+" ,gtk+)
+ ("libhangul" ,libhangul)
+ ("python" ,python)))
+ (home-page "https://github.com/libhangul/ibus-hangul")
+ (synopsis "Hangul engine for IBus")
+ (description
+ "ibus-hangul is a Korean input method engine for IBus.")
+ (license gpl2+)))