Hi tumashu, On Sun, 22 Jan 2017 08:57:49 +0800 (CST) tumashu <tuma...@163.com> 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")) ... ))))))