help-guix
[Top][All Lists]
Advanced

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

Re: Alternatives for defining package that install files to ~/.config/ib


From: (
Subject: Re: Alternatives for defining package that install files to ~/.config/ibus/rime
Date: Sun, 26 Mar 2023 21:33:46 +0100

Hi Rodrigo,

To be clear, modifying RIME_DATA_DIR will not require a commitment to 
maintaining
the package; Guix doesn't have package maintainers.  What you're doing with the
attached package seems like the best possible way.  I've done a small review of
it so you don't have to revise it that much if/after you send it in to be added.

On Sun Mar 26, 2023 at 9:21 PM BST, Rodrigo Morales wrote:
>   ,----
>   |     (arguments
>   |      `(#:tests? #f                      ; no tests
>   |        #:configure-flags
>   |        (list (string-append "-DRIME_DATA_DIR="
>   |                             (assoc-ref %build-inputs "rime-data")
>   |                             "/share/rime-data"))
>   |        #:phases
>   |        (modify-phases %standard-phases
>   |          (add-after 'unpack 'patch-source
>   |            (lambda _
>   |              (substitute* "CMakeLists.txt"
>   |                (("DESTINATION....RIME_DATA_DIR..")
>   |                 "DESTINATION \"${CMAKE_INSTALL_DATADIR}/rime-data\""))
>   |              #t)))))

If the RIME_DATA_DIR here is a use of the variable changed with -D above,
surely you don't need MODIFY-PHASES?  (Also: don't put a #t here, and use
the gexp-style for ARGUMENTS; %OUTPUT, %OUTPUTS, and %BUILD-INPUTS are all
deprecated:

  (arguments
   (list #:tests? #f   ;no tests
         #:configure-flags
         #~(list (string-append "-DRIME_DATA_DIR="
                                #$(this-package-input "rime-data")
                                "/share/rime-data"))
         …))

>   |     (inputs
>   |      (list gdk-pixbuf
>   |            glib
>   |            ibus
>   |            libnotify
>   |            librime
>   |            rime-data))
>   |     (native-inputs
>   |      `(("cmake" ,cmake-minimal)
>   |        ("pkg-config" ,pkg-config)))

Make sure to use the new inputs style (just a LIST with packages, like in 
INPUTS).

>   |     (description "@dfn{ibus-rime} provides the Rime input method engine
> for
>   | IBus.  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.")
>   |     (license gpl3)))

By the way, this description uses too much marketing-speak IMO.

    -- (

Attachment: signature.asc
Description: PGP signature


reply via email to

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