all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "(" <paren@disroot.org>
To: "Rodrigo Morales" <moralesrodrigo1100@gmail.com>, <help-guix@gnu.org>
Subject: Re: Alternatives for defining package that install files to ~/.config/ibus/rime
Date: Sun, 26 Mar 2023 21:33:46 +0100	[thread overview]
Message-ID: <CRGLO8QF2BMV.262I2G2SL6T73@guix-framework> (raw)
In-Reply-To: <CAGxMbPbWQbGtxu0J_D7PjyfGptftsX29ptb-Kqm4_x68wqwZyw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2515 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2023-03-26 20:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 20:21 Alternatives for defining package that install files to ~/.config/ibus/rime Rodrigo Morales
2023-03-26 20:33 ` ( [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CRGLO8QF2BMV.262I2G2SL6T73@guix-framework \
    --to=paren@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=moralesrodrigo1100@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.