From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qAwLBIy5+WFhggEAgWs5BA (envelope-from ) for ; Tue, 01 Feb 2022 23:51:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KOBGOIu5+WEq9QAAG6o9tA (envelope-from ) for ; Tue, 01 Feb 2022 23:51:55 +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 8B315117CC for ; Tue, 1 Feb 2022 23:51:55 +0100 (CET) Received: from localhost ([::1]:50666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nF20A-0003NW-HD for larch@yhetil.org; Tue, 01 Feb 2022 17:51:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEzva-00070U-Az for guix-patches@gnu.org; Tue, 01 Feb 2022 15:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEzva-00042M-15 for guix-patches@gnu.org; Tue, 01 Feb 2022 15:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEzvZ-0002LC-Sz for guix-patches@gnu.org; Tue, 01 Feb 2022 15:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53711] [PATCH 1/1] home: services: import i18n module. Resent-From: Jaming Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Feb 2022 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53711 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53711@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16437479068951 (code B ref -1); Tue, 01 Feb 2022 20:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Feb 2022 20:38:26 +0000 Received: from localhost ([127.0.0.1]:44269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEzv0-0002KI-1x for submit@debbugs.gnu.org; Tue, 01 Feb 2022 15:38:26 -0500 Received: from lists.gnu.org ([209.51.188.17]:45194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEzjO-00020b-7a for submit@debbugs.gnu.org; Tue, 01 Feb 2022 15:26:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEzjO-0002Ma-0U for guix-patches@gnu.org; Tue, 01 Feb 2022 15:26:26 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:31079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEzir-0001vd-DZ for guix-patches@gnu.org; Tue, 01 Feb 2022 15:26:01 -0500 Date: Tue, 01 Feb 2022 20:25:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643747139; bh=JhAiNVGa+iessSM6Zz2qrodkgd7WHELgUGQ5DrUgCA0=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=pIWcNBOhHXUyTd0jhT1PBY40U7T2DzY9e9AEyA6AZ6is/9ply8d2x048msWgiVB6Y ppFGGAuJe6HaJfQFn2kR07kXgj+8xKKZYGOYkeZlpK7xJWrzjSvq/PonbbyQUErnGr KBK7LlBdWNt4TlAtO0QObfDvI3HVQZD+j/8ykHmHTftN7+gUsNP6chNffXkPkeecuC xLCzj4+RT/yDn7W4fUBvSawjHeoXW+8eDSyD8NhSOP7ZtoD5MRa162XgJak/ZNtmSI SHoPUVc9uMyIVBggtyRYNA/yoJ+6ySD8kA6ZpZDE831/bcIvLEDmRmDt6XOuXhJNif 8S77481tbtLRQ== Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.137; envelope-from=jaming@protonmail.com; helo=mail-40137.protonmail.ch 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, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 01 Feb 2022 15:38:25 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Tue, 01 Feb 2022 17:04:13 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Jaming X-ACL-Warn: , Jaming via Guix-patches From: Jaming via Guix-patches via 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=1643755915; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=JhAiNVGa+iessSM6Zz2qrodkgd7WHELgUGQ5DrUgCA0=; b=B1bWN10DbYXhT5eYHl5YZpdwQz4d7MN/xAyQ5EcqdLs0Bpf4UX/GQtavFVfKuhlxvUn/fx jPQV8oRoH3Kve4kYLCzi7nuRrmbErUUO/DY8iAymXeddmXrvapLXBVIdb/cGRgTfMuEi65 bd8Wvj0BXiRNYJojQn8wBPaQyE/cjDqL7kurze5Zy44Yvf5fcXiB8/+oFC1iDEOB6mFfty m6SnXJLzm1D4YZyqx2MjiFAK02VQB08SKtrhenaXwqQ41kt7Q0z2lTTkNfYMzHjgxjTJBr SPuZ5mwBlsPf1yHJog0GPicFwEt0ISe1OtvMcZy82Rrm8ZtjyRhZ4cy0tK95zQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643755915; a=rsa-sha256; cv=none; b=YUP6eucK5BaKe/irXw16qcyjKPZR9PF6M6XtkNrQdQ/+E+dl8U5ZeJUGUU8qqpQ9gGn+Fs wEJq/Ol9gKcKtlzpG/r6hhsPKkjarCq8a9elfJrAQ3ibvfqJdxgfHMfDKjtgnAFSrnR4AC mqGRuUmPknZ6zOTzbpJZ1CYEPpYw0xZ2fJnjE2NzXIT3CjLpkX2nXqcONIu7bmWLX5nOqq 4VA3/39kiDsQzHma2nsnBHo/r7ffgBCxwn17gSmYjy7bu47qYE7vhw0mM7lhZsIYlkvYKf inJOtNhjr1sjr896YEOmImpcY49yqCXEcenVQY9fYsuuF/LNY2PStqL9paZmHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail2 header.b=pIWcNBOh; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail2 header.b=pIWcNBOh; dmarc=pass (policy=none) header.from=gnu.org; 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: 8B315117CC X-Spam-Score: -3.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: bKuoAbYxAVHh >From 713a7002c63ad86c36b03656cdd3ec9e350e7480 Mon Sep 17 00:00:00 2001 From: Justin Martin Date: Tue, 1 Feb 2022 14:48:35 -0500 Subject: [PATCH 1/1] home: services: import i18n module. * gnu/home/services.scm (%initialize-gettext): remove setlocale for guile s= cripts. (compute-on-first-login-script): add module import for i18n. (compute-on-change-gexp): add module import for i18n. --- gnu/home/services.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 1c860d7b01..b7ea6f08dd 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -30,6 +30,7 @@ (define-module (gnu home services) #:use-module (guix discovery) #:use-module (guix diagnostics) #:use-module (guix i18n) + #:use-module (guix modules) #:use-module (srfi srfi-1) #:use-module (ice-9 match) @@ -282,13 +283,13 @@ (define %initialize-gettext #~(begin (bindtextdomain %gettext-domain (string-append #$guix "/share/locale")) - (textdomain %gettext-domain) - (setlocale LC_ALL ""))) + (textdomain %gettext-domain))) (define (compute-on-first-login-script _ gexps) (program-file "on-first-login" - #~(begin + (with-imported-modules (source-module-closure '((guix i18n))) + #~(begin (use-modules (guix i18n)) #$%initialize-gettext @@ -309,7 +310,7 @@ (define (compute-on-first-login-script _ gexps) (display (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login = script won't execute anything. You can check if xdg runtime directory exists, XDG_RUNTIME_DIR variable is set to appropriate value and manually execute = the -script by running '$HOME/.guix-home/on-first-login'"))))))) +script by running '$HOME/.guix-home/on-first-login'")))))))) (define (on-first-login-script-entry on-first-login) "Return, as a monadic value, an entry for the on-first-login script @@ -401,7 +402,8 @@ (define home-activation-service-type ;;; (define (compute-on-change-gexp eval-gexps? pattern-gexp-tuples) - #~(begin + (with-imported-modules (source-module-closure '((guix i18n))) + #~(begin (use-modules (guix i18n)) #$%initialize-gettext @@ -486,7 +488,7 @@ (define expressions-to-eval (display (G_ "On-change gexps evaluation finished.\n\n"))) (display "\ On-change gexps won't be evaluated; evaluation has been disabled in the -service configuration")))) +service configuration"))))) (define home-run-on-change-service-type (service-type (name 'home-run-on-change) -- 2.34.0