From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WLJgEhSFFWSVDwEASxT56A (envelope-from ) for ; Sat, 18 Mar 2023 10:32:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eDguEhSFFWTueQEAauVa8A (envelope-from ) for ; Sat, 18 Mar 2023 10:32:04 +0100 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 EFC5711E5F for ; Sat, 18 Mar 2023 10:32:03 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=uni-bremen.de header.s=2019 header.b=sHwYgOjY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=uni-bremen.de (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=1679131924; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=LzU3Z+KCAoBN2kC6WjPSowtNo75WgVaGmar9FPp6vhU=; b=LK9cYXGRp259KHRIZWNcxKURRtd7OLGc4qz0NzuWGNbHnlop37hhZdcpmY3fhZRGnLSAvr AfPUVvJ2ELTrtto1MFwfTVS2TE6k9Y+6vMFZxyxofBBShRFn7kY2xawkG3hH104S+t40jo Q6Oi8OEZ+00G8HMFkUyAVp6xRuKTN8Q+nMm9AgdT52sqHXBF9T50K0/cJPNQ9gbj0FJsyd u0VOiRJ3VbIl9d2GAyNl1kocBgTLhkZLiiPUZlEqLBlPtfDAjccA3cg6Ncyc4AxZ+1dwab 3NgTCgzmdB3Wkgiij1yKsHqDkVP2Ym9Kd0SeEYOotNmhlQtD43e1tx5anHlBCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=uni-bremen.de header.s=2019 header.b=sHwYgOjY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=uni-bremen.de (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-Seal: i=1; s=key1; d=yhetil.org; t=1679131924; a=rsa-sha256; cv=none; b=BoGzkPhmxKx2wvwZ+Sx0g1IDMsohewdwwjPNvZD8PmZXMoZ0azyRbDY5ScavYossNJOzf1 6PRTWd0iNu2cSSYOi3K9hFh3FwSQKJhrRvlfGIVINWNRsa61Fd68/04BeJtmWwA68f6IjS tPySlfa4PXopX9PeGrmQlxP67M56/scwxHWv0rmXsL/dqRVEZmXElR+L+6nbyo6AEvihD8 GlVngnhK9FE4lT3gz1J3fevMzfyn+LNmnmCSDrF1KhM4lNJLKXbZfM03EHLrbUcubRgpqP 37rYna4MxrAe1gY+wTFx7TjW5JDu8Spu0hjaetmPzvBMTlB/FFh5kFL5AL5J9g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdSuK-0008Uh-S5; Sat, 18 Mar 2023 05:31:24 -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 1pdSuF-0008US-Vh for help-guix@gnu.org; Sat, 18 Mar 2023 05:31:20 -0400 Received: from smtp-old.zfn.uni-bremen.de ([134.102.50.15] helo=smtp.uni-bremen.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdSuD-00007k-3x for help-guix@gnu.org; Sat, 18 Mar 2023 05:31:19 -0400 Received: from [127.0.0.1] (ip4d16eb70.dynamic.kabel-deutschland.de [77.22.235.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.uni-bremen.de (Postfix) with ESMTPSA id 4PdwjS4jyszDCbM for ; Sat, 18 Mar 2023 10:31:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uni-bremen.de; s=2019; t=1679131868; bh=f08u4i04XjbeSdEmBqbCbW4das8RGO4c5MlWn9PoDXE=; h=Date:From:To:In-Reply-To:References; b=sHwYgOjYIpAgP52sr7PRvuqFv/oPSw5Ac7qqpcIbMWepTajkrH1rw4yAl3eG5YXIc LciEasYneqc1oH1VgW7YJeLIY0zSs+yhBj6z0qJyQa9YpJJwauH9sLqMQwbiKK37KH ccOP6DC6FI4JSC9A6mG3e+5ICeRYfN7/ASdTWeifn1AsEcemzo8PjTbokZ8Z+mF690 J04z5dPHWjzgY9E70AnZyF9SKLSXeY1YwJrk/PjsjB6A+OZoAfRm5zcYY4P1D/9y9D CM+4WcZdvj2MATJWTDJlcoKrMopcYMbNxHRhs9/79OhgQrsyrhV7eO9aeizWOG9ctm F6ZB1DGUEAaHQ== Date: Sat, 18 Mar 2023 10:31:03 +0100 From: Martin Castillo To: help-guix@gnu.org Subject: Re: Newbie: How to define a package that install files to ~/.config? User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <4BDC1A6D-9951-4D01-A1B2-785F7A029A82@uni-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=134.102.50.15; envelope-from=castilma@uni-bremen.de; helo=smtp.uni-bremen.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: EFC5711E5F X-Spam-Score: -1.95 X-Migadu-Spam-Score: -1.95 X-Migadu-Scanner: scn0.migadu.com 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 X-TUID: qTWDS8AVjHJR Am 18=2E M=C3=A4rz 2023 06:02:27 MEZ schrieb Rodrigo Morales : >Table of Contents >_________________ > >1=2E What I'm trying to do >2=2E What I've tried >3=2E The problem >4=2E The question > > >Newbie: How to define a package that creates files in ~/=2Econfig? > > >1 What I'm trying to do >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > I want to define a package that downloads a file from a git repository > and puts the file under a directory in `~/=2Econfig/' (specifically, > `~/=2Econfig/ibus/rime/') > > >2 What I've tried >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > I've defined a module containing the definition of a package that > tries to accomplish that goal=2E It uses `install-file' to copy the > downloaded files to the desired location (please see code block below) > > ,---- > | cat ~/my/packages/rime=2Escm > `---- > > ,---- > | (define-module (rime) > | #:use-module (guix licenses) > | #:use-module (guix packages) > | #:use-module (guix gexp) > | #:use-module (guix build-system trivial) > | #:use-module (guix git-download)) > | > | (define-public rime-wubi > | (package > | (name "rime-wubi") > | (version "1=2E0") > | (source (origin > | (method git-fetch) > | (uri (git-reference > | (url "https://github=2Ecom/rime/rime-wubi") > | (commit "f1876f08f1d4a9696395be0070c0e8e4353c44cb")= )) > | (file-name (git-file-name name version)) > | (sha256 > | (base32 > | "1d9y9rqssacria9d0hla96czsqv2wkfm6z926m1x269ryv96zxvk")= ))) > | (build-system trivial-build-system) > | (arguments > | (list > | #:modules `((guix build utils)) > | #:builder > | #~(begin > | (use-modules (guix build utils)) > | (chdir (assoc-ref %build-inputs "source")) > | (install-file "wubi86=2Edict=2Eyaml" (string-append #$output >"/=2Econfig/ibus/rime")) > | (install-file "wubi86=2Eschema=2Eyaml" (string-append #$outp= ut >"/=2Econfig/ibus/rime"))))) > | (synopsis "Wubi86 schema and dictionary for RIME") > | (description "This package contains a dictionary and a schema >definition for the 86 > | version of Wubi, a shape-based input method for Chinese characters=2E= ") > | (home-page "https://github=2Ecom/rime/rime-wubi") > | (license lgpl3))) > `---- > > The package is installed without no problems=2E > > ,---- > | export GUIX_PACKAGE_PATH=3D"$HOME/my/packages" > | guix package -i rime-wubi > `---- > > ,---- > | The following package will be installed: > | rime-wubi 1=2E0 > | > `---- > > ,---- > | echo $? > `---- > > ,---- > | 0 > `---- > > >3 The problem >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > However, the files `wubi86=2Edict=2Eyaml' and `wubi86=2Eschema=2Eyaml' = are > installed in `~/=2Eguix-profile/=2Econfig/ibus/rime' (see code block > below) > > ,---- > | find -L /home/rdrg/=2Eguix-profile/=2Econfig > `---- > > ,---- > | /home/rdrg/=2Eguix-profile/=2Econfig > | /home/rdrg/=2Eguix-profile/=2Econfig/ibus > | /home/rdrg/=2Eguix-profile/=2Econfig/ibus/rime > | /home/rdrg/=2Eguix-profile/=2Econfig/ibus/rime/wubi86=2Edict=2Eyaml > | /home/rdrg/=2Eguix-profile/=2Econfig/ibus/rime/wubi86=2Eschema=2Eyaml > `---- > > Those files don't appear in `~/=2Econfig/ibus/rime' (the location I wan= t > them to exist in) > > ,---- > | find ~/=2Econfig/ibus/rime > `---- > > ,---- > | /home/rdrg/=2Econfig/ibus/rime > | /home/rdrg/=2Econfig/ibus/rime/default=2Ecustom=2Eyaml > `---- > > >4 The question >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > How to define a package that install files to any directory under > `~/=2Econfig/'? Hi, I think packages cannot install files outside the store=2E Maybe you could try and see, whether ibus looks at a special environment v= ariable to find configs in another directory, too=2E Then you could define = that environment variable in your package and it will be added to your guix= profile=2E I dont know ibus, but: Otherwise you may need to adjust the system-wide installed ibus package an= d add that configuration that you want to it=2E Martin