From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: A question about im-config Date: Sun, 22 Jan 2017 02:15:26 +0100 Message-ID: <20170122021526.1fb7e1d8@scratchpost.org> References: <79e91191.7f7.159c3ade0c8.Coremail.tumashu@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cV6ks-00017X-Cy for guix-devel@gnu.org; Sat, 21 Jan 2017 20:15:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cV6kp-00044A-94 for guix-devel@gnu.org; Sat, 21 Jan 2017 20:15:38 -0500 Received: from dd1012.kasserver.com ([85.13.128.8]:50659) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cV6kp-00043l-2A for guix-devel@gnu.org; Sat, 21 Jan 2017 20:15:35 -0500 In-Reply-To: <79e91191.7f7.159c3ade0c8.Coremail.tumashu@163.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: tumashu Cc: guix Hi tumashu, On Sun, 22 Jan 2017 08:57:49 +0800 (CST) tumashu wrote: > Im-config (https://anonscm.debian.org/cgit/collab-maint/im-config.git) is a shell script which > used to manager input method by debian, I want to package it to guixsd, but many problem I faced: > > 1. How to deal with "/usr/bin/XXX" in schell script, for example: /usr/bin/fcitx, /usr/bin/ibux .... > 2. How to deal with " > /usr/lib/*/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin. > " Please substitute paths by store paths. The intention is to make sure that im-config always keeps doing the same thing every time it is invoked. To do that you can add a phase by: (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "im-config" (("/usr/bin/fcitx") (string-append (assoc-ref inputs "fcitx") "/bin/fcitx")) ... ))))))