From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 04:54:44 2022 Received: (at 57963) by debbugs.gnu.org; 21 Sep 2022 08:54:44 +0000 Received: from localhost ([127.0.0.1]:60610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oavVE-00066m-5H for submit@debbugs.gnu.org; Wed, 21 Sep 2022 04:54:44 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:19475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oavV9-00066U-3l for 57963@debbugs.gnu.org; Wed, 21 Sep 2022 04:54:42 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4MXXKR14W2z1LZWr; Wed, 21 Sep 2022 10:54:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4MXXKR14W2z1LZWr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1663750475; bh=SiewZ3YU/RLxivLopaQMakfaHyE1Xt3JfmoPGcAK4IE=; h=Subject:From:To:Date:In-Reply-To:References:From; b=uSRE6G2kj61PuU1pga63SjQONpOWdIdxHqXUrcx6MRPYGblIcoLIs5TLJEwGwO06f IF28mSqhd2QsS+hDQBPEzi6aLVlM38y2hL0pwnMuv8wSl2ro9RVhkXnO+L2uj8FhZ2 cSKryeoe+tH28Q/LjP9/sTFsdvfa/2UyLSE7xP4Q= Message-ID: Subject: Re: [PATCH 1/1] home: fontutils: Support user's fontconfig. From: Liliana Marie Prikler To: Taiju HIGASHI , 57963@debbugs.gnu.org Date: Wed, 21 Sep 2022 10:54:34 +0200 In-Reply-To: <20220921002921.23631-2-higashi@taiju.info> References: <20220921002921.23631-2-higashi@taiju.info> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.45.3 MIME-Version: 1.0 X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -0.4 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 57963 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Am Mittwoch, dem 21.09.2022 um 09:29 +0900 schrieb Taiju HIGASHI: > * gnu/home/services/fontutils.scm (add-fontconfig-config-file): > Support user's fontconfig. > --- > =C2=A0gnu/home/services/fontutils.scm | 15 +++++++++++---- > =C2=A01 file changed, 11 insertions(+), 4 deletions(-) >=20 > diff --git a/gnu/home/services/fontutils.scm > b/gnu/home/services/fontutils.scm > index 6062eaed6a..3ea8b1db74 100644 > --- a/gnu/home/services/fontutils.scm > +++ b/gnu/home/services/fontutils.scm > @@ -1,6 +1,7 @@ > =C2=A0;;; GNU Guix --- Functional package management for GNU > =C2=A0;;; Copyright =C2=A9 2021 Andrew Tropin > =C2=A0;;; Copyright =C2=A9 2021 Xinglu Chen > +;;; Copyright =C2=A9 2022 Taiju HIGASHI > =C2=A0;;; > =C2=A0;;; This file is part of GNU Guix. > =C2=A0;;; > @@ -21,6 +22,7 @@ (define-module (gnu home services fontutils) > =C2=A0=C2=A0 #:use-module (gnu home services) > =C2=A0=C2=A0 #:use-module (gnu packages fontutils) > =C2=A0=C2=A0 #:use-module (guix gexp) > +=C2=A0 #:use-module (srfi srfi-1) > =C2=A0 > =C2=A0=C2=A0 #:export (home-fontconfig-service-type)) > =C2=A0 > @@ -33,15 +35,18 @@ (define-module (gnu home services fontutils) > =C2=A0;;; > =C2=A0;;; Code: > =C2=A0 > -(define (add-fontconfig-config-file he-symlink-path) > +(define (add-fontconfig-config-file font-config) > =C2=A0=C2=A0 `(("fontconfig/fonts.conf" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,(mixed-text-file > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "fonts.conf" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 " > =C2=A0 > =C2=A0 > -=C2=A0 ~/.guix-home/profile/share/fonts > -")))) > +=C2=A0 ~/.guix-home/profile/share/fonts\n" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (if (null? font-config) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-joi= n font-config "\n" 'suffix)) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "\n")))) I think it'd be wiser to pretty-print SXML here. The structure could look something like `(fontconfig=C2=A0 (dir "~/.guix-home/profile/share/fonts") ,@(extra-user-config ...)) Also, for the particular use case of handling multiple profiles gracefully (rather than the current status quo) I think fontconfig- service-type should be able to construct (dir "#$profile/share/fonts") style entries on its own. However, given that multiple profiles aren't supported yet, this is future work. Cheers