From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iFQaJ7ACWmP97gAAbAwnHQ (envelope-from ) for ; Thu, 27 Oct 2022 06:01:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yMU8JrACWmMy3wAAG6o9tA (envelope-from ) for ; Thu, 27 Oct 2022 06:01:52 +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 2147995CC for ; Thu, 27 Oct 2022 06:01:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onu4p-0002zs-6c; Thu, 27 Oct 2022 00:01:07 -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 1onu4m-0002pA-Ty for guix-patches@gnu.org; Thu, 27 Oct 2022 00:01:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onu4k-00035J-HM for guix-patches@gnu.org; Thu, 27 Oct 2022 00:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onu4k-0002Ox-3B for guix-patches@gnu.org; Thu, 27 Oct 2022 00:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Oct 2022 04:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57963 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 57963@debbugs.gnu.org, liliana.prikler@gmail.com, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16668432319184 (code B ref 57963); Thu, 27 Oct 2022 04:01:02 +0000 Received: (at 57963) by debbugs.gnu.org; 27 Oct 2022 04:00:31 +0000 Received: from localhost ([127.0.0.1]:55719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onu4B-0002Ny-9V for submit@debbugs.gnu.org; Thu, 27 Oct 2022 00:00:30 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:43609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onu45-0002Nf-QW for 57963@debbugs.gnu.org; Thu, 27 Oct 2022 00:00:25 -0400 Received: by mail-pg1-f172.google.com with SMTP id h185so71026pgc.10 for <57963@debbugs.gnu.org>; Wed, 26 Oct 2022 21:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=G2elrcjFXVJ/o+CIi0phXKyyAcOg6jIwI6IrJWT15w4=; b=xdlAm2Is7bZnqu39e12VpUyIxpTmEg4YehW6l8V7Tbaa7JVc8vYgjRWbYUuU19FWQE FjwtV9DI0xHKzB40veRAogfHYtTAIaSZoGDHxci3VthKl0Qf2Jq8B7YaNqxBpuLmA98G N0ytfhT76cCOy3LqcZbhiqPjSPDcmFW2wYtIEDWIg3ey5yoUzCTp7DA0XGgtfBxPEE0z 3qpslJnGFjtHyymKKzeCsaDgnexVVpZ+rm/ne9Oz55+gK1DGZ/dyqYZZF8NJNs2SORYr CZhrjURO8sXB+H5pVsHvbDrmFsJMX4YrLpfv24HuLIySWais7FBp2fB0MGPM0J5jJFEs Mogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=G2elrcjFXVJ/o+CIi0phXKyyAcOg6jIwI6IrJWT15w4=; b=M5R8LsR6VVrJD6oAHj0i0CM/d82N5rUT6NTzDb84OHzNG+86vqHaka1qH0lY2+4X/O QwVJ9qw2INQhmUjpWpFNuctARy4fwKbeY2nZZdp+b0M5eYlrZQYRfBp1jyXaTN2n/Pck WpjN2L6RYiBv3eyaif92fXH7b7lodnPA3z+PzBC7JTYnwADOMv17VDjZ3GbqKiBC1HSh aUlE75GWODQhTLj8m4dHGobsXw3iWE2W/qHDkM+D7RSvVHEdp+FgY4GyRhvgI0fO/Aqm 19BuIYiak6QAv+/Gn3y7Rv+CrTInvQMEU9gTjS1pLdIxqGPZYtAi9VQbgbR6VK3hsytB +fgA== X-Gm-Message-State: ACrzQf3sH1EemJjXDVz5bsaEmmLcxLGVTGygzFurLTLukPNOw054Q0Ut rIJFoBAPRPprpgltXapZMTtptA== X-Google-Smtp-Source: AMsMyM4eXrA/6Z1h6gpSSKVxtB44XkjvStDpU3huFdKxXPCCOu2CASWCGz0fhku/vYYR795HA8HzhQ== X-Received: by 2002:a63:34c8:0:b0:46e:f67c:c117 with SMTP id b191-20020a6334c8000000b0046ef67cc117mr18592548pga.401.1666843215869; Wed, 26 Oct 2022 21:00:15 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id x15-20020aa79a4f000000b0056b91044485sm165484pfj.133.2022.10.26.21.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 21:00:15 -0700 (PDT) From: Taiju HIGASHI References: <87k053sxur.fsf@gnu.org> <87zgdzat99.fsf@trop.in> <87zgdxgx0l.fsf@taiju.info> <875ygiqur9.fsf@gnu.org> <87r0z5e23k.fsf@taiju.info> <87czanebhd.fsf@taiju.info> Date: Thu, 27 Oct 2022 13:00:11 +0900 In-Reply-To: <87czanebhd.fsf@taiju.info> (Taiju HIGASHI's message of "Thu, 20 Oct 2022 06:42:54 +0900") Message-ID: <871qqtapbo.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666843312; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=G2elrcjFXVJ/o+CIi0phXKyyAcOg6jIwI6IrJWT15w4=; b=pho/VVqm2S32N5ybzVe3U37Yuht9LVWnuzOxtAhTZxggvZJm2fdgKBL5Mlb18F6cyIA946 Gds7Q+k36gljPVaHAyV6aOwMkoop+DXr3osZY9xx4Dbdo5wngRd/iya1mU3oxILNFZqmER txtW3s7nBnhOHQRE8A+sPqHM0TJXeKrAhAKFBOthV6XuT+/hFM/wsLA55SX+6neSdXep9n dGK1kR+uMoHH5GeRgiXYuhNP5+6S1mygKOyUIUDJvGcqZYEptRQLlFt4KecyzMB/XhWnJP YWQ+SsKim99YNxWXbp0Dq5NALLA60fJ1OdajMTz61d178xaEAdJfFEFsIiGXYA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666843312; a=rsa-sha256; cv=none; b=Yb0lP/zRL8CKj+PDPnWzVQxF24Pw9O21GJzcG5VWdgtgrPShhj6Zi7lm0NfhO+EWKEjU+j HKyrJ2kDz5gGxO0TkanDExEkCA+BpZPSiOidiic+iS8BDvzpnQBwTDZQG6NI4T8H66seLo EEw8pr9l4aF7kj9uaDKvzKaYtG8a7BD7bVaNE+iPlb0h0KHb+lMlWCEG1IXNmN/RT4kSqN e+xoIIIwQbyAz2Dm5pKL2ru+N9bQyIvpmD6NNtD6EO+JHGfU9j2LjM020LIv+xf8eQ+ruP IVA/LBlFRaAcrRxSlUQbRV2R1h6OBwhZw+DCGeggZ0IcAYbwGn+ZXhB0JogsZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=xdlAm2Is; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.08 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=xdlAm2Is; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2147995CC X-Spam-Score: 4.08 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2sIP+/kamCxb Hi, Taiju HIGASHI writes: > Taiju HIGASHI writes: > >> Hi, >> >> Ludovic Court=C3=A8s writes: >> >>> Hi, >>> >>> Taiju HIGASHI skribis: >>> >>>> Andrew Tropin writes: >>> >>> [...] >>> >>>>>> Andrew Tropin skribis: >>>>>> >>>>>>> If serialization would support G-exps, we could write >>>>>>> >>>>>>> (list #~"RAW_XML_HERE") >>>>>> >>>>>> There=E2=80=99s a one-to-one lossless mapping between XML and SXML, = so I don=E2=80=99t >>>>>> think it makes sense to support XML-in-strings when we have SXML. >>>>>> >>>>>> The only thing it would give us, as I see it, is the ability to gene= rate >>>>>> syntactically-invalid XML. Maybe we can live without it? :-) >>>>> >>>>> Of course we can :), but we won't be able: >>>>> >>>>> 1. To take already existing xml config and use it without rewriting. >>>> >>>> I find it surprisingly important to be able to simply copy and paste >>>> settings without having to rewrite existing settings or those listed on >>>> a web page somewhere. I know we can easily convert from XML to SXML, >>>> but those unfamiliar with SXML may find it a bothering task. >>> >>> OK, that makes sense. >>> >>> But then, let=E2=80=99s not allow users to intersperse XML-in-strings i= n the >>> middle of XML. It should be either a user-provided file/string or the >>> generated config, but not a mixture of both; that=E2=80=99d be a recipe= for >>> confusion. >>> >>> How about this: the service takes either a >>> record or a file-like object? >>> >>> (We can even have a =E2=80=9Cgexp compiler=E2=80=9D for to >>> make that transparent.) >> >> Thank you for your consideration. >> >> That idea sounds good. I don't know if I can successfully implement >> this, but I will consider it and give it a try. >> >> Thanks, > > I'm trying to implement the following, is it consistent with the intent > of what you suggested? > > (define (add-fontconfig-config-file user-config) > `(("fontconfig/fonts.conf" > ,(if (home-fontconfig-configuration? user-config) > (mixed-text-file > "fonts.conf" > " > > " > (serialize-configuration user-config home-fontconfig-configura= tion-fields) > "\n") > user-config)))) > > > It is assumed that configurations can be specified in one of the > following ways. > > * fontconfig-configuration: > > (home-environment > (packages (list font-google-noto)) > (services > (append > (list > (service home-bash-service-type)) > (modify-services %home-base-services > (home-fontconfig-service-type > config =3D> (home-fontconfig-configuration > (font-directories > (cons* "~/fonts" %home-fontconfig-base-font-director= ies)) > (default-font-serif-family "Noto Serif CJK JP") > (default-font-sans-serif-family "Noto Sans Serif CJK = JP") > (default-font-monospace-family "PlemolJP Console") > (extra-config > '(foo "bar")))))))) > > > Note: > %home-fontconfig-base-font-directories is the new variable I plan to > export as the default value, based on Andrew's and Liliana's point. > > * file-like objects: > > (home-environment > (packages (list font-google-noto)) > (services > (append > (list > (service home-bash-service-type)) > (modify-services %home-base-services > (home-fontconfig-service-type > config =3D> (local-file "/path/to/your/fonts.conf")))))) > > Thanks, Sorry for the long time it has taken to resolve the issue. What do you think about it? Thanks, --=20 Taiju