From patchwork Tue Jan 31 22:06:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 46553 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 145F527BBEB; Tue, 31 Jan 2023 22:07:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E050F27BBE9 for ; Tue, 31 Jan 2023 22:07:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMymR-0007Av-7w; Tue, 31 Jan 2023 17:07:07 -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 1pMymN-0007AN-8k for guix-patches@gnu.org; Tue, 31 Jan 2023 17:07:03 -0500 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 1pMymN-0004qc-0R for guix-patches@gnu.org; Tue, 31 Jan 2023 17:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMymM-0007Ks-KP for guix-patches@gnu.org; Tue, 31 Jan 2023 17:07:02 -0500 Subject: bug#60498: [PATCH] home: services: fontutils: Add service value. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Tue, 31 Jan 2023 22:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 60498 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Giacomo Leidi Cc: 60498-done@debbugs.gnu.org Mail-Followup-To: 60498@debbugs.gnu.org, ludo@gnu.org, goodoldpaul@autistici.org Received: via spool by 60498-done@debbugs.gnu.org id=D60498.167520277528136 (code D ref 60498); Tue, 31 Jan 2023 22:07:02 +0000 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: Ludovic =?utf-8?q?Court=C3=A8s?= 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 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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’. 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 _)