From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0JzKMZipIGTAfwEASxT56A (envelope-from ) for ; Sun, 26 Mar 2023 22:22:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6Nq/MZipIGQfRQEA9RJhRA (envelope-from ) for ; Sun, 26 Mar 2023 22:22:48 +0200 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 81FB92B40 for ; Sun, 26 Mar 2023 22:22:40 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgWsb-0001Yc-Ln; Sun, 26 Mar 2023 16:22:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgWsa-0001Xt-B4 for help-guix@gnu.org; Sun, 26 Mar 2023 16:22:16 -0400 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgWsY-00032n-2F for help-guix@gnu.org; Sun, 26 Mar 2023 16:22:16 -0400 Received: by mail-vs1-xe35.google.com with SMTP id i10so5783667vss.5 for ; Sun, 26 Mar 2023 13:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679862131; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ng2stW+RskcD32PPbP6n3Ql+LfjiuLtI6ARQurEW7Eg=; b=dgFCi4tW9VabNzbfJY3BsxxsCxsOAXVVaONx1xlEy/FYTBnQqjisa3jxgSY7QwvgdW yPNIlJ8zMf15B/XioJptM2KcR245W+eLalAdrV91CQcrhJApJgTYDMQyM8YJBrEjyGXL OW6At/abis5LfVon8djscXPyR7QpBuBvkASBC5EEe4ZBdGfFGzaisS5QycyOPr4vSOz8 cUwosr/1/Zx1uU3oonkLu4ZG/vzcojMHqZy5e1XG8tGbj8zKxyhdJkGA+yFJeKdX6auh ucym1Mv9OVuNLirUBklwyrXAsCi3xmF7ukMKhho+4GN+gdKvI10mrBSUS11GGZ9us7yN sEDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679862131; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ng2stW+RskcD32PPbP6n3Ql+LfjiuLtI6ARQurEW7Eg=; b=c1REKlux2dUUWX91XxjsIK+zzja3efyoXISqkBXSYGvFh8Owoo/hzgS+VRegmm2zoO Pz/96P1vWOS5alyHp67eDl9HhVQFif7eJ1kHBxz1Eswqj82qMP2EU3dTekdef10CsgMG Fd2KW7nQ7rQu2wMA5V9UozeEljYqAJ5cgUG2/Pb8nkJxVYqa+2cef+hP8ZrHPdourErw ytBzs9hlFcbY3eu7okgw9vwQzTTVqpwIC96CYHNd1xtaYJf95pJGPB2fAB+7m+SSEzDO MmNdxhYa1TPxOrAH9hBy/1/vnytHf97/wLzuK/6cK6Sv3Xl9nBdXzHZtu3FVjW7uTBu6 PUsQ== X-Gm-Message-State: AAQBX9f/2yavP398VqvycgkFvTs3Cd0sY0/qORFvh5FJeB0+pcQaZp3E D+oz24ZnE/r38iMoRVCVdAA4WIETcCH3CdDfCM4dlQUmVE+iyA== X-Google-Smtp-Source: AKy350bClpX4UiEAQXpMlrcrDUyogMMSwlpn8BiChN26iISUFcIjcERcXpnFhSsjd65oIs4VXSNFUgDzhKcvhlE/xm0= X-Received: by 2002:a67:d484:0:b0:425:87ab:c386 with SMTP id g4-20020a67d484000000b0042587abc386mr5252884vsj.3.1679862130582; Sun, 26 Mar 2023 13:22:10 -0700 (PDT) MIME-Version: 1.0 From: Rodrigo Morales Date: Sun, 26 Mar 2023 20:21:54 +0000 Message-ID: Subject: Alternatives for defining package that install files to ~/.config/ibus/rime To: help-guix@gnu.org Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-vs1-xe35.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679862160; a=rsa-sha256; cv=none; b=i3tF3ByiOKECwXoW3tuj90RXKHjSXyQTa+QJUKygu/950hJFVqulJwC9HovtQpsRIpNb5y OFn5HaAZNznuVC6zZEwUSliOxfjC+Hwk1dagI6QeILyXRXknDjs/pA+PQPpcoL45HNoh4m lqNapxz25EhmkQHVu1UtlspegMJYh0RjWAXPvZsib0Z8zvfb8LgS8mx9eX9KJXVOZvpzRl QTExC3iu+DrxorpOrB+WV2DZJ9hyy0T87SRpKIDDOK/a4/AxgoQtvwesfVlckgITsjoypV cgoOE8r3wRVF8SVUajV2U7O6eyCzDlkg2BGt6QyeVr2HP2cbXuqdjQmUojF9vQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=dgFCi4tW; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679862160; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pL34jzpyeCVcx8A7ZWdvOXk+iVS25IkNN2mUZd3Dt8I=; b=BpEBPR/zXJsQDySDVWlhSSvybs3CDimZisTTp+W3nLYsPNkZ9RCPorHQUrLPv1NB3sxQVb swFLx2DFPTF5xk4tdfD4oVWSHALgGTjIerFVgZytO0/lVpVDoVFog0SM6Q4nCDLsDfDghP ACdJwE7mJLuc4zMYlMYJw7P1MKOxylAAps15YRjG6PKrP34xjLMnnuj0rc0uEvNlt0An6t oT0xAFkfzSfpcAi8ojjwasicfDYacVjC4NTdWoD2jSKBEKDkUXnUimDb5StaRG8Lwlu9YC fXsaiOL7wEt2pHN9V5Tl6uc7f4KtCL6nuImA9CiXWu/o5Q1qTh61ZGdmhK3mNw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=dgFCi4tW; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 2.37 X-Spam-Score: 2.37 X-Migadu-Queue-Id: 81FB92B40 X-TUID: bxOpbC8+OfLt Table of Contents _________________ 1. Prologue 2. What I tried .. 1. Looking into rime .. 2. Looking into guix home 3. What I'm trying to do 4. The question 5. The workaround 1 Prologue ========== On 18 Mar 2023, I created [a thread] to ask how to define a package that installs files to `~/.config/'. I asked because I want to download two files from [a git repo] and I want those files to exist in `~/.config/ibus/rime' so that they are read by rime, an Input Method Engine. Someone [replied] that it is not possible to install files outside of the store and recommended me to look into ibus in order to find out whether there was an environmental variable that I could set so that I could modify the behavior of ibus and make it search files in that directory. Another user [recommended] me to look into `guix home' (I already did). [a thread] [a git repo] [replied] [recommended] 2 What I tried ============== 2.1 Looking into rime ~~~~~~~~~~~~~~~~~~~~~ I looked into the source code of rime and discovered that rime has a compilation option which can be used to set the directory that are searched. The compilation option is called `RIME_DATA_DIR' and in fact is set by the guix package `ibus-rime' (see package definition below) to the directory where the Guix package `rime-data' exists. ,---- | (define-public ibus-rime | (package | (name "ibus-rime") | (version "1.5.0") | (source | (origin | (method git-fetch) | (uri (git-reference | (url "https://github.com/rime/ibus-rime") | (commit version))) | (file-name (git-file-name name version)) | (sha256 | (base32 "1vl3m6ydf7mvmalpdqqmrnnmqdi6l8yyac3bv19pp8a5q3qhkwlg")))) | (build-system cmake-build-system) | (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))))) | (inputs | (list gdk-pixbuf | glib | ibus | libnotify | librime | rime-data)) | (native-inputs | `(("cmake" ,cmake-minimal) | ("pkg-config" ,pkg-config))) | (home-page "https://rime.im/") | (synopsis "Rime Input Method Engine for IBus") | (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))) `---- 2.2 Looking into guix home ~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm currently using `guix home' to manage my dotfiles. I thought that I could find a way to download the files from the git repo if those files didn't existed. However, I thought that defining a Guix package for that git repo could be of better use since that way I could share my package with other users. 3 What I'm trying to do ======================= Basically, I want the two files that exist in [this repository] (i.e. `wubi86_8105.dict.yaml' and `wubi86_8105.schema.yaml') to be read by `ibus-rime'. One way to do this would be to modify the package definition of `ibus-rime' in order to set the value of `RIME_DATA_DIR'. I don't want to do this, because that would imply maintaining a package definition and to me, it is not a solution that scales well. To me, a solution that scales better is to define a Guix package for that repository and find a way that Guix copies those files to `~/.config/ibus/rime' which leads us to the same question I posted on 18 Mar 2023. [this repository] 4 The question ============== How to define a Guix package that install files to ~/.config? 5 The workaround ================ If nobody proposes an alternative and I don't find one, I guess I will make a Guix package that download those two files and save it in a location (which wouldn't work by itself) and then use `guix home' to download that package and create symlinks from `~/.config/ibus/rime' to the directory where those files were downloaded whenever I execute `guix home reconfigure'. This is a hacky way and I'd rather I used a more simpler way.