From: pengmeiyu@riseup.net
To: 42231@debbugs.gnu.org
Cc: Peng Mei Yu <i@pengmeiyu.com>
Subject: [bug#42231] [PATCH 2/5] gnu: rime-data: Iterate over inputs to find Rime schemas.
Date: Wed, 8 Jul 2020 10:00:14 +0800 [thread overview]
Message-ID: <20200708020017.26100-2-pengmeiyu@riseup.net> (raw)
In-Reply-To: <20200708020017.26100-1-pengmeiyu@riseup.net>
From: Peng Mei Yu <i@pengmeiyu.com>
* gnu/packages/ibus.scm (rime-data)[arguments]: Iterate over inputs to find
Rime schemas rather than using a pre-loaded list.
[native-inputs]: Move to ...
[inputs]: ... here.
---
gnu/packages/ibus.scm | 45 ++++++++++++++-----------------------------
1 file changed, 14 insertions(+), 31 deletions(-)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index bce907122d..d0b40a6eb2 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -363,7 +363,9 @@ traditional Chinese output.")
(base32 "06ad5c4m7xsfr4if5ywshfj2aj5g5b5hwzh38dzccn7c1l2ibi0z"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; no tests
+ `(#:modules ((ice-9 match)
+ ,@%gnu-build-system-modules)
+ #:tests? #f ; no tests
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"no_update=1")
#:phases
@@ -376,40 +378,21 @@ traditional Chinese output.")
(("^\\.DEFAULT_GOAL := preset")
".DEFAULT_GOAL := all"))
#t))
- ;; Add schema packages into "package/rime" directory.
- (add-after 'unpack 'add-packages
+ ;; Copy Rime schemas into the "package/rime" directory.
+ (add-after 'unpack 'copy-rime-schemas
(lambda* (#:key inputs #:allow-other-keys)
- (let* ((dest-dir "package/rime"))
+ (let ((dest-dir "package/rime"))
(mkdir-p dest-dir)
- (for-each (lambda (pkg)
- (symlink (assoc-ref inputs
- (string-append "rime-" pkg))
- (string-append dest-dir "/" pkg)))
- '("array"
- "bopomofo"
- "cangjie"
- "cantonese"
- "combo-pinyin"
- "double-pinyin"
- "emoji"
- "essay"
- "ipa"
- "jyutping"
- "luna-pinyin"
- "middle-chinese"
- "pinyin-simp"
- "prelude"
- "quick"
- "scj"
- "soutzoe"
- "stenotype"
- "stroke"
- "terra-pinyin"
- "wubi"
- "wugniu")))
+ (for-each
+ (match-lambda
+ ((name . path)
+ (if (string-prefix? "rime-" name)
+ (let ((schema (substring name (string-length "rime-"))))
+ (symlink path (string-append dest-dir "/" schema))))))
+ inputs))
#t))
(delete 'configure))))
- (native-inputs
+ (inputs
`(("rime-array"
,(origin
(method git-fetch)
--
2.27.0
next prev parent reply other threads:[~2020-07-08 2:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 8:20 [bug#42231] [PATCH 0/5] Update rime-data to 20200623 Peng Mei Yu via Guix-patches via
2020-07-07 12:38 ` Nicolas Goaziou
2020-07-08 2:00 ` [bug#42231] [PATCH 1/5] gnu: rime-data: Update to 0.38.20200623 pengmeiyu
2020-07-08 2:00 ` pengmeiyu [this message]
2020-07-08 2:00 ` [bug#42231] [PATCH 3/5] gnu: rime-data: Disable git operations and update comments pengmeiyu
2020-07-08 2:00 ` [bug#42231] [PATCH 4/5] gnu: rime-data: Fix license pengmeiyu
2020-07-08 2:00 ` [bug#42231] [PATCH 5/5] gnu: ibus-rime: " pengmeiyu
2020-07-08 10:43 ` [bug#42231] [PATCH 0/5] Update rime-data to 20200623 Nicolas Goaziou
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=20200708020017.26100-2-pengmeiyu@riseup.net \
--to=pengmeiyu@riseup.net \
--cc=42231@debbugs.gnu.org \
--cc=i@pengmeiyu.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.