From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4ECzISIpBV/uQQAA0tVLHw (envelope-from ) for ; Wed, 08 Jul 2020 02:02:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CLoRHSIpBV/0YwAAbx9fmQ (envelope-from ) for ; Wed, 08 Jul 2020 02:02:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C999D940DB8 for ; Wed, 8 Jul 2020 02:02:09 +0000 (UTC) Received: from localhost ([::1]:56852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jszPU-0002oV-NT for larch@yhetil.org; Tue, 07 Jul 2020 22:02:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jszPP-0002m7-I2 for guix-patches@gnu.org; Tue, 07 Jul 2020 22:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jszPP-0003om-8S for guix-patches@gnu.org; Tue, 07 Jul 2020 22:02:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jszPP-0007au-6U for guix-patches@gnu.org; Tue, 07 Jul 2020 22:02:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42231] [PATCH 2/5] gnu: rime-data: Iterate over inputs to find Rime schemas. Resent-From: pengmeiyu@riseup.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Jul 2020 02:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42231 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42231@debbugs.gnu.org Cc: Peng Mei Yu Received: via spool by 42231-submit@debbugs.gnu.org id=B42231.159417367829112 (code B ref 42231); Wed, 08 Jul 2020 02:02:03 +0000 Received: (at 42231) by debbugs.gnu.org; 8 Jul 2020 02:01:18 +0000 Received: from localhost ([127.0.0.1]:37109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jszOg-0007ZO-05 for submit@debbugs.gnu.org; Tue, 07 Jul 2020 22:01:18 -0400 Received: from mx1.riseup.net ([198.252.153.129]:46034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jszOU-0007YX-Fl for 42231@debbugs.gnu.org; Tue, 07 Jul 2020 22:01:08 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4B1jFt04RGzFfxH; Tue, 7 Jul 2020 19:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1594173666; bh=lLqXLdcw1coooCMGjhX8D0kGJd+8V5AS1PtF/f7epts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MeVDmXYvu2mZ/m5HsQqXRBpPWyCjgb83QaRgAVor3rZiupXjdGbYigrTN9CsqyDMM 18NrfqSLtwGFUB8OJMxAkU6O8RmHL6dQbfLaK/Q/qeMlulvoc3K4G3I+fge6nltuUe wP8TzPpQPi3gZqKKK605U0gLmy3NtZDuvI7LNwr0= X-Riseup-User-ID: 422AFA9C50FC2712ADD2956FD97EDA0AA7345C28CBF76EEE7AA59C76927C515A Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4B1jFr4qmXzJql8; Tue, 7 Jul 2020 19:01:04 -0700 (PDT) Received: from localhost.localdomain (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id c78dbd54; Wed, 8 Jul 2020 02:00:59 +0000 (UTC) From: pengmeiyu@riseup.net Date: Wed, 8 Jul 2020 10:00:14 +0800 Message-Id: <20200708020017.26100-2-pengmeiyu@riseup.net> In-Reply-To: <20200708020017.26100-1-pengmeiyu@riseup.net> References: <20200708020017.26100-1-pengmeiyu@riseup.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=riseup.net header.s=squak header.b=MeVDmXYv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 5.09 X-TUID: m9GiBshb35J7 From: Peng Mei Yu * 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