* [bug#73549] [PATCH 1/4] gnu: Add corrosion.
2024-09-29 7:53 [bug#73549] [PATCH 0/4] Update libchewing and add fcitx5 and ibus packages Efraim Flashner
@ 2024-09-29 7:55 ` Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 2/4] gnu: libchewing: Update to 0.9.0 Efraim Flashner
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2024-09-29 7:55 UTC (permalink / raw)
To: 73549; +Cc: Charles, Efraim Flashner
From: Charles <charles@charje.net>
* gnu/packages/cmake.scm (corrosion): New variable.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I0bb56889722128b9946af495fab05d39beaaf65a
---
gnu/packages/cmake.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 4466c4b91dd..8310dc55fa7 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2024 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2024 dan <i@dan.games>
+;;; Copyright © 2024 Charles <charles@charje.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,6 +55,7 @@ (define-module (gnu packages cmake)
#:use-module (gnu packages kde-frameworks)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages rust)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
@@ -440,6 +442,46 @@ (define-public cmake-minimal-cross
(search-paths
(package-native-search-paths cmake-minimal))))
+(define-public corrosion
+ (package
+ (name "corrosion")
+ (version "0.5.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/corrosion-rs/corrosion")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1sm1jhdrqzp3f36f7grh900wp7pk9l1zim49hrk87ac6frfmg8xx"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "ctest" "-E"
+ (string-append
+ "(" (string-join
+ (list "cbindgen_rust2cpp"
+ "rustup_proxy"
+ "hostbuild"
+ "parse_target_triple")
+ "|")
+ ")"))))))))
+ (native-inputs
+ (list rust
+ `(,rust "cargo")))
+ (home-page "https://corrosion-rs.github.io/corrosion/")
+ (synopsis "Tool for integrating Rust into an existing CMake project")
+ (description "Corrosion, formerly known as cmake-cargo, is a tool for
+integrating Rust into an existing CMake project. Corrosion can automatically
+import executables, static libraries, and dynamic libraries from a workspace
+or package manifest (Cargo.toml file).")
+ (license license:expat)))
+
(define-public emacs-cmake-mode
(package
(inherit cmake)
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#73549] [PATCH 2/4] gnu: libchewing: Update to 0.9.0.
2024-09-29 7:53 [bug#73549] [PATCH 0/4] Update libchewing and add fcitx5 and ibus packages Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 1/4] gnu: Add corrosion Efraim Flashner
@ 2024-09-29 7:55 ` Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 3/4] gnu: Add fcitx5-chewing Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 4/4] gnu: Add ibus-chewing Efraim Flashner
3 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2024-09-29 7:55 UTC (permalink / raw)
To: 73549; +Cc: Charles, Efraim Flashner
* gnu/packages/language.scm (libchewing): Update to 0.9.0.
[build-system]: Switch to cargo-build-system.
[arguments]: Adjust for switch to cargo-build-system. Enable
parallel-tests. Add a phase to allow older versions of
rust-clap-mangen. Add the cmake version of 'configure after 'configure.
Use the cmake versions of 'build, 'check and 'install.
[native-inputs]: Add corrosion, cmake-minimal. Remove autoconf,
automake, libtool, perl, pkg-config, python-wrapper, texinfo.
Co-authored-by: Charles <charles@charje.net>
Change-Id: Ic11e38646fc47cfc2c575320f43b9355a1c83b39
---
gnu/packages/language.scm | 94 ++++++++++++++++++++++-----------------
1 file changed, 54 insertions(+), 40 deletions(-)
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 7a3deb0b438..78fcba4287f 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -8,6 +8,8 @@
;;; Copyright © 2022 Milran <milranmike@protonmail.com>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2024 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2024 Charles <charles@charje.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,6 +33,9 @@ (define-module (gnu packages language)
#:use-module (gnu packages audio)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cmake)
+ #:use-module (gnu packages crates-io)
+ #:use-module (gnu packages crates-tls)
#:use-module (gnu packages dbm)
#:use-module (gnu packages docbook)
#:use-module (gnu packages emacs)
@@ -63,6 +68,7 @@ (define-module (gnu packages language)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (guix packages)
+ #:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
@@ -264,55 +270,63 @@ (define-public hime
(define-public libchewing
(package
(name "libchewing")
- (version "0.5.1")
+ (version "0.9.0")
(source
(origin
(method git-fetch)
- (uri
- (git-reference
- (url "https://github.com/chewing/libchewing.git")
- (commit
- (string-append "v" version))))
- (file-name
- (git-file-name name version))
+ (uri (git-reference
+ (url "https://github.com/chewing/libchewing")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "04d09w6xdd08v6laj9y4qmqsijw5i2jvshcilhh4vg6cfnfgl2my"))))
- (build-system gnu-build-system)
+ (base32 "1n0w9niff46w7vncs699gj4y2xghn1sbl0f4mg5x33dcapqd14sg"))))
+ (build-system cargo-build-system)
(arguments
- `(;; test-easy-symbol and test-fullshape fail with multiple cores.
- #:parallel-tests? #f
+ `(#:modules ((guix build cargo-build-system)
+ (guix build utils)
+ ((guix build cmake-build-system) #:prefix cmake:))
+ #:imported-modules ((guix build cmake-build-system)
+ ,@%cargo-build-system-modules)
+ #:install-source? #f
+ ;; Keep the vendor-dir outside of cmake's directories.
+ #:vendor-dir "../guix-vendor"
+ #:cargo-inputs
+ (("rust-anyhow" ,rust-anyhow-1)
+ ("rust-clap" ,rust-clap-4)
+ ("rust-clap-mangen" ,rust-clap-mangen-0.2)
+ ("rust-der" ,rust-der-0.7)
+ ("rust-directories" ,rust-directories-5)
+ ("rust-env-logger" ,rust-env-logger-0.10)
+ ("rust-log" ,rust-log-0.4)
+ ("rust-rusqlite" ,rust-rusqlite-0.29))
+ #:cargo-development-inputs
+ (("rust-tempfile" ,rust-tempfile-3))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'disable-failing-tests
+ (add-after 'unpack 'allow-older-version-of-clap-mangen
(lambda _
- (substitute* "test/Makefile.am"
- ((" test-bopomofo ")
- "")
- ((" test-config ")
- "")
- ((" test-reset ")
- "")
- ((" test-symbol ")
- "")
- ((" test-keyboardless ")
- "")
- ((" test-special-symbol ")
- "")
- ((" test-keyboard ")
- "")
- ((" test-regression ")
- "")
- ((" test-userphrase ")
- ""))
- #t)))))
+ (substitute* "tools/Cargo.toml"
+ (("0.2.12") "0.2.11"))))
+ (add-after 'configure 'cmake-configure
+ (lambda args
+ (apply (assoc-ref cmake:%standard-phases 'configure)
+ ;; For the tests.
+ (append args (list #:out-of-source? #f)))))
+ (add-after 'unpack 'work-around-genkeystroke
+ (lambda _
+ ;; Remove this phase when we can find ncurses with cmake.
+ (substitute* "tests/CMakeLists.txt"
+ (("CURSES_FOUND") "FALSE"))))
+ (replace 'build
+ (assoc-ref cmake:%standard-phases 'build))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys #:rest args)
+ (when tests?
+ ((assoc-ref cmake:%standard-phases 'check)))))
+ (replace 'install
+ (assoc-ref cmake:%standard-phases 'install)))))
(native-inputs
- `(("autoconf" ,autoconf)
- ("automake" ,automake)
- ("libtool" ,libtool)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
- ("python" ,python-wrapper)
- ("texinfo" ,texinfo)))
+ (list corrosion cmake-minimal))
(inputs
(list ncurses sqlite))
(synopsis "Chinese phonetic input method")
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#73549] [PATCH 3/4] gnu: Add fcitx5-chewing.
2024-09-29 7:53 [bug#73549] [PATCH 0/4] Update libchewing and add fcitx5 and ibus packages Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 1/4] gnu: Add corrosion Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 2/4] gnu: libchewing: Update to 0.9.0 Efraim Flashner
@ 2024-09-29 7:55 ` Efraim Flashner
2024-09-29 7:55 ` [bug#73549] [PATCH 4/4] gnu: Add ibus-chewing Efraim Flashner
3 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2024-09-29 7:55 UTC (permalink / raw)
To: 73549; +Cc: Charles, Efraim Flashner, Zhu Zihao, 宋文武
From: Charles <charles@charje.net>
* gnu/packages/fcitx5.scm (fcitx5-chewing): New variable.
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I27cd2d9732ad12a387ecaa258a36f7342d438ab1
---
gnu/packages/fcitx5.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
index c4c2b565db7..b6002f8023c 100644
--- a/gnu/packages/fcitx5.scm
+++ b/gnu/packages/fcitx5.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2022 Dominic Martinez <dom@dominicm.dev>
;;; Copyright © 2022 dan <i@dan.games>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 Charles <charles@charje.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,6 +42,7 @@ (define-module (gnu packages fcitx5)
#:use-module (gnu packages ibus)
#:use-module (gnu packages iso-codes)
#:use-module (gnu packages kde-frameworks)
+ #:use-module (gnu packages language)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
@@ -369,6 +371,35 @@ (define-public fcitx5-anthy
the Anthy input method.")
(license license:gpl2+)))
+(define-public fcitx5-chewing
+ (package
+ (name "fcitx5-chewing")
+ (version "5.1.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fcitx/fcitx5-chewing")
+ (commit version)))
+ (sha256
+ (base32 "011psyvvcbrw062zw807lm33n827qza7mqaagf8zb0cz3hh1qwm9"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _ (setenv "HOME" (getcwd)))))))
+ (inputs (list libchewing))
+ (native-inputs
+ (list extra-cmake-modules
+ pkg-config
+ gettext-minimal
+ fcitx5))
+ (home-page "https://github.com/fcitx/fcitx5-chewing")
+ (synopsis "Chewing wrapper for Fcitx")
+ (description "This provides libchewing input method support for fcitx5.")
+ (license license:gpl2+)))
+
(define-public fcitx5-chinese-addons
(package
(name "fcitx5-chinese-addons")
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#73549] [PATCH 4/4] gnu: Add ibus-chewing.
2024-09-29 7:53 [bug#73549] [PATCH 0/4] Update libchewing and add fcitx5 and ibus packages Efraim Flashner
` (2 preceding siblings ...)
2024-09-29 7:55 ` [bug#73549] [PATCH 3/4] gnu: Add fcitx5-chewing Efraim Flashner
@ 2024-09-29 7:55 ` Efraim Flashner
3 siblings, 0 replies; 5+ messages in thread
From: Efraim Flashner @ 2024-09-29 7:55 UTC (permalink / raw)
To: 73549; +Cc: Charles, Efraim Flashner, Zhu Zihao, 宋文武
* gnu/packages/ibus.scm (ibus-chewing): New variable.
Co-authored-by: Charles <charles@charje.net>.
Change-Id: I37c1ac836e5afd3101378d206e5c2056293cc182
---
gnu/packages/ibus.scm | 52 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 2f4211c385b..0dfce29ea36 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2015-2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
-;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019, 2020, 2021 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2020 kanichos <kanichos@yandex.ru>
@@ -13,6 +13,7 @@
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 Charles <charles@charje.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,6 +62,7 @@ (define-module (gnu packages ibus)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages iso-codes)
+ #:use-module (gnu packages language)
#:use-module (gnu packages linux)
#:use-module (gnu packages logging)
#:use-module (gnu packages perl)
@@ -380,6 +382,54 @@ (define-public libpinyin
(home-page "https://github.com/libpinyin/libpinyin")
(license gpl2+)))
+(define-public ibus-chewing
+ (package
+ (name "ibus-chewing")
+ (version "2.1.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chewing/ibus-chewing")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0fgscxb8nhli4g8d3yy0wxzbk9bcyj6bvmqrzbddkvgikmanj36b"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; Settings schema 'org.freedesktop.IBus.Chewing' is not installed
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'prepare-for-tests
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; IBus requires write access to the HOME directory.
+ (setenv "HOME" (getcwd))
+ ;; MESA: error: ZINK: failed to choose pdev
+ (setenv "GALLIUM_DRIVER" "llvmpipe")
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")))))))
+ (inputs
+ (list glib
+ gtk
+ ibus
+ libadwaita
+ libchewing))
+ (native-inputs
+ (list dbus
+ gettext-minimal
+ gobject-introspection
+ `(,glib "bin")
+ pkg-config
+ xorg-server-for-tests))
+ (home-page "https://chewing.im/")
+ (synopsis "Chewing engine for IBus")
+ (description "IBus-Chewing is an IBus front-end of Chewing, an intelligent
+Chinese input method for Zhuyin (BoPoMoFo) users.")
+ (license gpl2)))
+
(define-public ibus-anthy
(package
(name "ibus-anthy")
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
^ permalink raw reply related [flat|nested] 5+ messages in thread