From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 12:43:13 2023 Received: (at submit) by debbugs.gnu.org; 2 Jan 2023 17:43:13 +0000 Received: from localhost ([127.0.0.1]:43973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCOq8-0004Bw-QI for submit@debbugs.gnu.org; Mon, 02 Jan 2023 12:43:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:43528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCOq5-0004Bl-Id for submit@debbugs.gnu.org; Mon, 02 Jan 2023 12:43:12 -0500 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 1pCOq5-0006KC-AI for guix-patches@gnu.org; Mon, 02 Jan 2023 12:43:09 -0500 Received: from devianza.investici.org ([198.167.222.108]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCOq2-0004T4-TC for guix-patches@gnu.org; Mon, 02 Jan 2023 12:43:09 -0500 Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by devianza.investici.org (Postfix) with ESMTP id 4Nm39h5bKhz6v3x for ; Mon, 2 Jan 2023 17:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1672681384; bh=vJOdlp331+ThQ2QvyJG4vCiJSiKFQ5/VsYuWSpyU6hc=; h=Date:From:To:Subject:From; b=JpwuXWWItpCTehTcAcMWC+Pb/C+J48zEYmP80tkSz4o7SWFeLwtrOlIeoO+1TFu32 +TM4Nu6pJ+Ypk1zhVVjn0UEJXhU6Bmgg4+LmrmQIc5RKFZcZb576Q/BlrPeqwe50vH trLAJTNKP5FkAPpz0RBPalpasAx0NMvsQoUPsNa4= Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: goodoldpaul@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 4Nm39h4Zp8z5spq for ; Mon, 2 Jan 2023 17:43:04 +0000 (UTC) MIME-Version: 1.0 Date: Mon, 02 Jan 2023 17:43:04 +0000 From: goodoldpaul@autistici.org To: guix-patches@gnu.org Subject: [PATCH] home: services: fontutils: Add service value. User-Agent: Roundcube Webmail Message-ID: <3c0e43334aab599678ddeee842c073ee@autistici.org> X-Sender: goodoldpaul@autistici.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=198.167.222.108; envelope-from=goodoldpaul@autistici.org; helo=devianza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit 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: -2.4 (--) Dear Guixers, I'm sending a patch to allow for multiple directories in home-fontconfig-service-type's configuration. Thank you for your time and efforts, giacomo From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 12:45:22 2023 Received: (at 60498) by debbugs.gnu.org; 2 Jan 2023 17:45:22 +0000 Received: from localhost ([127.0.0.1]:43986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCOry-0004G6-UV for submit@debbugs.gnu.org; Mon, 02 Jan 2023 12:45:22 -0500 Received: from confino.investici.org ([93.190.126.19]:36061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCOrw-0004Fu-6b for 60498@debbugs.gnu.org; Mon, 02 Jan 2023 12:45:05 -0500 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4Nm3Cx4db1z10ww; Mon, 2 Jan 2023 17:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1672681501; bh=i3ET5w9nIvh9zCbeTi7ECFmtyIbq3VVddT0dgccqug4=; h=From:To:Cc:Subject:Date:From; b=U1IJqMRPGC0boe3NE1Fy1lOLi9nsvOJ60JMoU5V5IJ7SWPfDEA5EfSaonIu/CbYsg KGBoMFtnCUh1nnQsoKzuQ21jbyE7d609RTtaVkA4e38waPa4UxP2M01kV68+Q7DYld 9+ziu7zAgcNMBdXy846dfOHy2TMAQFR+2LFWd2cw= Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4Nm3Cx46rSz10sk; Mon, 2 Jan 2023 17:45:01 +0000 (UTC) From: Giacomo Leidi To: 60498@debbugs.gnu.org Subject: [PATCH] home: services: fontutils: Add service value. Date: Mon, 2 Jan 2023 18:44:51 +0100 Message-Id: <20230102174451.6827-1-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60498 Cc: Giacomo Leidi 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.0 (-) * gnu/home/services/fontutils.scm (add-fontconfig-config-file): Add support for multiple paths; (home-fontconfig-service-type): Honor it; * doc/guix.texi (Fonts Services): Document it. --- doc/guix.texi | 25 +++++++++++++++++++++++++ gnu/home/services/fontutils.scm | 18 ++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5c85680831..1e70dd05c0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -40980,6 +40980,7 @@ services)}. * SSH: Secure Shell. Setting up the secure shell client. * Desktop: Desktop Home Services. Services for graphical environments. * Guix: Guix Home Services. Services for Guix. +* Fonts: Fonts Home Services. Services for managing User's fonts. @end menu @c In addition to that Home Services can provide @@ -41856,6 +41857,30 @@ A typical extension for adding a channel might look like this: @end lisp @end defvr +@node Fonts Services +@subsection Fonts Home Services + +The @code{(gnu home services fontutils)} module provides services for +user-specific @code{fontconfig} setup. + +@defvr {Scheme Variable} home-fontconfig-service-type +This is the service type for generating configurations for @code{fontconfig} and @code{fc-*} utilities. +Its associated value is a list of strings (or gexps) pointing to fonts locations. + +Generally, it is better to extend this service than to directly +configure it, as its default value is the default Guix Home's profile +font installation path (@code{~/.guix-home/profile/share/fonts}). If you configure this +service directly, be sure to include the above path. + +A typical extension for adding an additional path might look like this: + +@lisp +(simple-service 'additional-fonts-service + home-fontconfig-service-type + (list "~/.nix-profile/share/fonts")) +@end lisp +@end defvr + @node Invoking guix home @section Invoking @command{guix home} diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.scm index 6062eaed6a..f959ee4fd6 100644 --- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2023 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,7 @@ (define-module (gnu home services fontutils) #:use-module (gnu home services) #:use-module (gnu packages fontutils) #:use-module (guix gexp) + #:use-module (srfi srfi-1) #:export (home-fontconfig-service-type)) @@ -33,15 +35,17 @@ (define-module (gnu home services fontutils) ;;; ;;; Code: -(define (add-fontconfig-config-file he-symlink-path) +(define (add-fontconfig-config-file paths) `(("fontconfig/fonts.conf" ,(mixed-text-file "fonts.conf" - " + (apply string-append + `(" - - ~/.guix-home/profile/share/fonts -")))) +\n" ,@(map (lambda (path) + (string-append " " path "\n")) + paths) + "\n")))))) (define (regenerate-font-cache-gexp _) `(("profile/share/fonts" @@ -59,7 +63,9 @@ (define home-fontconfig-service-type (service-extension home-profile-service-type (const (list fontconfig))))) - (default-value #f) + (compose concatenate) + (extend append) + (default-value '("~/.guix-home/profile/share/fonts")) (description "Provides configuration file for fontconfig and make fc-* utilities aware of font packages installed in Guix Home's profile."))) base-commit: 7efcf36e3b753a1dba6f8208f3c22d151007eaf0 -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 17:06:15 2023 Received: (at 60498-done) by debbugs.gnu.org; 31 Jan 2023 22:06:15 +0000 Received: from localhost ([127.0.0.1]:55197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMylb-0007Jk-1h for submit@debbugs.gnu.org; Tue, 31 Jan 2023 17:06:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMylY-0007JT-1a for 60498-done@debbugs.gnu.org; Tue, 31 Jan 2023 17:06:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMylS-0004fF-CN; Tue, 31 Jan 2023 17:06:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=S3V5XGQR7XNH79w/pwo9kuGuD2yBu7XaPPUoonQMkBE=; b=RSQ+zt0pIzf/jTrwtCXk lHFIODKinobnWBPiE1wb02KAU6dGiahCCe7tpmd/Tgcx/V4y9mqHgRv69d7Vo6wO1e+DVp8iU9I3F oiI4JLxHruErljzOz1QjkGECdmnQLmYZghzyPWhFiBN7Aca8NDLDb+xSYhlcmPdRmHjxcovMUDGCn IvAkNVUNts1RiMRMbKTtwWjzqidhELV5JPf8aOLXckRZVaOSdWAz2VHpdy/DyA6w95fVyLbLByNFX 43RrVa86jYBP9q2a7f5SUBRg24qqwrS4dYtw03WuS474ysYW3jqLBCYJE72ZUwJKaM2Me7ewLY6g9 gme76cr3GnYssQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMylR-0000D0-Vv; Tue, 31 Jan 2023 17:06:06 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: bug#60498: [PATCH] home: services: fontutils: Add service value. References: <3c0e43334aab599678ddeee842c073ee@autistici.org> <20230102174451.6827-1-goodoldpaul@autistici.org> Date: Tue, 31 Jan 2023 23:06:03 +0100 In-Reply-To: <20230102174451.6827-1-goodoldpaul@autistici.org> (Giacomo Leidi's message of "Mon, 2 Jan 2023 18:44:51 +0100") Message-ID: <878rhitl4k.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60498-done Cc: 60498-done@debbugs.gnu.org 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: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Giacomo, Giacomo Leidi skribis: > * gnu/home/services/fontutils.scm (add-fontconfig-config-file): Add > support for multiple paths; > (home-fontconfig-service-type): Honor it; > * doc/guix.texi (Fonts Services): Document it. Applied with the cosmetic changes below. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/guix.texi b/doc/guix.texi index f72deb3222..64873db00b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -42015,29 +42015,34 @@ A typical extension for adding a channel might look like this: @end lisp @end defvar -@node Fonts Services +@node Fonts Home Services @subsection Fonts Home Services The @code{(gnu home services fontutils)} module provides services for -user-specific @code{fontconfig} setup. +user-specific Fontconfig setup. The +@uref{https://www.freedesktop.org/wiki/Software/fontconfig,Fontconfig} +library is used by many applications to access fonts on the system. -@defvr {Scheme Variable} home-fontconfig-service-type -This is the service type for generating configurations for @code{fontconfig} and @code{fc-*} utilities. -Its associated value is a list of strings (or gexps) pointing to fonts locations. +@defvar home-fontconfig-service-type +This is the service type for generating configurations for Fontconfig. +Its associated value is a list of strings (or gexps) pointing to fonts +locations. Generally, it is better to extend this service than to directly configure it, as its default value is the default Guix Home's profile -font installation path (@code{~/.guix-home/profile/share/fonts}). If you configure this -service directly, be sure to include the above path. +font installation path (@file{~/.guix-home/profile/share/fonts}). If +you configure this service directly, be sure to include the above +directory. -A typical extension for adding an additional path might look like this: +A typical extension for adding an additional font directory might look +like this: @lisp (simple-service 'additional-fonts-service home-fontconfig-service-type (list "~/.nix-profile/share/fonts")) @end lisp -@end defvr +@end defvar @node Invoking guix home @section Invoking @command{guix home} diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.scm index f959ee4fd6..3399cb7ec8 100644 --- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -35,16 +35,16 @@ (define-module (gnu home services fontutils) ;;; ;;; Code: -(define (add-fontconfig-config-file paths) +(define (add-fontconfig-config-file directories) `(("fontconfig/fonts.conf" ,(mixed-text-file "fonts.conf" (apply string-append `(" -\n" ,@(map (lambda (path) - (string-append " " path "\n")) - paths) +\n" ,@(map (lambda (directory) + (string-append " " directory "\n")) + directories) "\n")))))) (define (regenerate-font-cache-gexp _) --=-=-=-- From unknown Fri Jun 20 19:59:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 01 Mar 2023 12:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator