guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51667] [PATCH] Several patches about fcitx5


From: 宋文武
Subject: [bug#51667] [PATCH] Several patches about fcitx5
Date: Wed, 10 Nov 2021 21:04:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

dan <igaryhe@gmail.com> writes:

> Hi, I would like to submit several patches I made about fcitx5, including:
> - 0001: add fcitx5-rime
> - 0002: let fcitx5 export XDG_DATA_DIRS
> - 0003: update fcitx5 to 5.0.10
> - 0004: update fcitx5-gtk to 5.0.9
> - 0005: update fcitx5-qt to 5.0.7
> - 0006: update fcitx5-configtool to 5.0.8

Thank you!  I had pushed 0003 to 0006 patches.

>
> This is my first time submitting patches, if there is anything wrong please 
> let me know.
>
> From a1eaefe5ed53e10dc8c4249372a7d33000b964fd Mon Sep 17 00:00:00 2001
> From: dan <igaryhe@gmail.com>
> Date: Sun, 7 Nov 2021 21:54:05 +0800
> Subject: [PATCH 1/6] gnu: Add fcitx5-rime.

Here missing the description for files modifications, eg:
```
* gnu/packages/fcitx5.scm (fcitx5-rime): New variable.
```
>
> ---
>  gnu/packages/fcitx5.scm | 41 ++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 40 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
> index 737f47f20f..ea19cc245a 100644
> --- a/gnu/packages/fcitx5.scm
> +++ b/gnu/packages/fcitx5.scm
> @@ -47,7 +47,8 @@ (define-module (gnu packages fcitx5)
>    #:use-module (gnu packages web)
>    #:use-module (gnu packages xdisorg)
>    #:use-module (gnu packages xml)
> -  #:use-module (gnu packages xorg))
> +  #:use-module (gnu packages xorg)
> +  #:use-module (gnu packages ibus))
>  
>  (define-public xcb-imdkit
>    (package
> @@ -453,3 +454,41 @@ (define (install-theme-variant variant target)
>  @item DeepPurple
>  @end itemize\n")
>      (license license:asl2.0)))
> +
> +(define-public fcitx5-rime
> +  (package
> +    (name "fcitx5-rime")
> +    (version "5.0.8")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +          (url "https://github.com/fcitx/fcitx5-rime";)
> +          (commit version)))
When use 'git-fetch', we will usually set 'file-name' too:
```
(file-name (git-file-name name version)
```
Otherwise, the source directory in store will be unnamed '....-checkout'.

> +       (sha256
> +        (base32
> +         "17fi36m70d8gwwyragms4rl7xjx4k7g5ixs8rcj8r2ph1ak9ymhy"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f
When disable tests, we should leave a comment, eg: '; no tests'.

Also, when the arguments value doesn't use unquote (,), I think it's
better to use quote ('), not quasiquote (`) here.

> +       #:configure-flags
> +       (list (string-append "-DRIME_DATA_DIR="
> +                         (assoc-ref %build-inputs "rime-data")
> +                         "/share/rime-data"))))
> +    (inputs
> +     `(("gettext", gettext-minimal)
In most cases "gettext" should be a native input, we can check the
result via "./pre-inst-env guix size fcitx5-rime", if "gettext" is not
in the output list, then it means "gettext" is only used at build time
(for envsubst, msgfmt, etc.), not runtime (maybe linked to
libgettextlib.so), thus should be a native input.

> +       ("fcitx5", fcitx5)
> +       ("librime", librime)
> +       ("rime-data", rime-data)))
> +    (native-inputs
> +     `(("extra-cmake-modules", extra-cmake-modules)
> +       ("pkg-config", pkg-config)))
> +    (home-page "https://github.com/fcitx/fcitx5-rime";)
> +    (synopsis "Rime Input Method Engine for fcitx5")
Like other packages in fcitx5.scm, we should use "for Fcitx 5".

> +    (description "@dfn{fcitx5-rime} provides the Rime input method engine for
> +fcitx5. Rime is a lightweight, extensible input method engine supporting
> +various input schemas including glyph-based input methods, romanization-based
> +input methods as well as those for Chinese dialects. It has the ability to
> +compose phrases and sentences intelligently and provide very accurate
> +traditional Chinese output.")

We use 2 spaces between sentences, eg: "... Chinese dialects.  It has ...".
> +    (license license:lgpl2.1+)))
> -- 
> 2.33.1
>
>
>
>
>
> From a646e2dee7e9f30c1583fb5345923af5b7a2380d Mon Sep 17 00:00:00 2001
> From: dan <igaryhe@gmail.com>
> Date: Sun, 7 Nov 2021 21:57:24 +0800
> Subject: [PATCH 2/6] gnu: fcitx5: Add native search path XDG_DATA_DIRS.
>
> ---
>  gnu/packages/fcitx5.scm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm
> index ea19cc245a..08120e3b36 100644
> --- a/gnu/packages/fcitx5.scm
> +++ b/gnu/packages/fcitx5.scm
> @@ -140,7 +140,10 @@ (define-public fcitx5
>      (native-search-paths
>       (list (search-path-specification
>              (variable "FCITX_ADDON_DIRS")
> -            (files '("lib/fcitx5")))))
> +            (files '("lib/fcitx5")))
> +           (search-path-specification
> +            (variable "XDG_DATA_DIRS")
> +            (files '("share")))))

Hello, just curious, what fcitx5 will search in XDG_DATA_DIRS?

>      (home-page "https://github.com/fcitx/fcitx5";)
>      (synopsis "Input method framework")
>      (description "Fcitx 5 is a generic input method framework.")


Hope this helps, thank you!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]