From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cOgfN/NcZ2WQRgEA9RJhRA:P1 (envelope-from ) for ; Wed, 29 Nov 2023 16:47:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cOgfN/NcZ2WQRgEA9RJhRA (envelope-from ) for ; Wed, 29 Nov 2023 16:47:00 +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 5632E420F3 for ; Wed, 29 Nov 2023 16:46:59 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=SBuyEKwM; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701272819; 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=iRH//JwB1iK1MAvH4Mggf/oZj+ZDNHPMLluXrwljejk=; b=flW51amU8/Mb4rBck1/JVQpC2XXEv4RD1CpT+ah7Sc04QAMx22ztTgybOEjiFf+tR+iVgg HI5i7Xix0zASrmT/jXgyGPHHJYBB95/X2EI1R06y1hOvs+hm5UL9jA5zTl2V7N+COBX9mb XPDoeNBj6A1G4izUEl5zib9n7MU+X3YDoqNqpsCO8zfIcR02WMRjrq4nhB18Ihcb4TZeyt JeuJZXmCyKgKFmdvKldL70nPC6K170fPCNx9iOh82Pk7uxmvIX1IXnnUbQMdRysr8R0ZFg kJapHmXgUoj/22oNCAKk6rh4yGm+/YTaoHDGUua8DHGrG7t3o9iz0FX6XIa/fg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701272819; a=rsa-sha256; cv=none; b=LTe09OmuGBhKx+0d3+V6NuQ8pukzceHuB+D5AwSY8fmOPTtE72kYVA63u9V6ekYNQvu4hW CwC+dFOVrOWnEjSRhF9jZSh7x4MSHfoSZT60oAF1cZqIuvnhIaTMrlt3Q1pfJ82r96M9Z9 RyqeYIHgIOW3i7BLuxOItoenADF6QE3sAUOkQSf8QlHAJBRUNrRsb3PsT2b9uoyTi1OPeh 1EzFJXQnL7Ldu80fviNOP3cMSUkDH3vkrV0bxx5KkxUUCtn/vdSndFzJq4s0Cn0d97T9ts LtO0OIgYFKsaqXuPXLnPeJYFIJchEXDKai6mEFzPZMI9YnMP+Yhj6ycBvhy7Cg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=SBuyEKwM; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8Mli-0004rL-53; Wed, 29 Nov 2023 10:46:30 -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 1r8MlB-0004fy-Qc for guix-patches@gnu.org; Wed, 29 Nov 2023 10:45:58 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8Ml9-0000jG-IP for guix-patches@gnu.org; Wed, 29 Nov 2023 10:45:57 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8MlH-0005Fx-22 for guix-patches@gnu.org; Wed, 29 Nov 2023 10:46:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67507] [PATCH v2 2/2] gnu: Use =?UTF-8?Q?=E2=80=98libc-utf8-locales-for-target=E2=80=99.?= Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Wed, 29 Nov 2023 15:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67507 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67507@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Janneke Nieuwenhuizen , ( , Andrew Tropin , Christopher Baines , Josselin Poiret , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: ( , Andrew Tropin , Christopher Baines , Josselin Poiret , Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Maxim Cournoyer , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 67507-submit@debbugs.gnu.org id=B67507.170127275620178 (code B ref 67507); Wed, 29 Nov 2023 15:46:03 +0000 Received: (at 67507) by debbugs.gnu.org; 29 Nov 2023 15:45:56 +0000 Received: from localhost ([127.0.0.1]:50761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8Ml9-0005FM-0W for submit@debbugs.gnu.org; Wed, 29 Nov 2023 10:45:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8Ml2-0005Ed-FV for 67507@debbugs.gnu.org; Wed, 29 Nov 2023 10:45:53 -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 1r8Mkp-0000aY-5T; Wed, 29 Nov 2023 10:45:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=iRH//JwB1iK1MAvH4Mggf/oZj+ZDNHPMLluXrwljejk=; b=SBuyEKwMNhac8m/3oCSq 8ik5HKApfqrWdiGUtuMcQkYy1F9uojyP4FPHk/aTYjmesXxhc+TLvPhhRSfSsmPsZ9sk2vnvpaHhj nJsZu2e5UgxIcHBn2oOAbiOUtjaKJ6nDkVrxOTWgtdG18i4eoiNlcC1KU5I/V9EXsHWL5o2TdxknE pj94PXx1XqQPUBWTUzaTXypqcqPItkae4mqRKhDhEepfJLQT6Y/1TVgyjtlbX9wMW+t4UMfVUE9Mw vf601LvzvDiDTMxUmrYm4nKHlSjJh1AqMBaPgGPOulVhkRxeuSNKNpw6cLHowwIfZflse4YG8Nz4h N0G5FbbnUv+1Bg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 29 Nov 2023 16:44:51 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <5bf71a8fa945627d1610b772a04ac65031e8d6b6.1701171221.git.mail@cbaines.net> References: <5bf71a8fa945627d1610b772a04ac65031e8d6b6.1701171221.git.mail@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -5.84 X-Spam-Score: -5.84 X-Migadu-Queue-Id: 5632E420F3 X-TUID: oGrrdDVZ4soU From: Janneke Nieuwenhuizen * guix/packages.scm (%standard-patch-inputs): Use ‘libc-utf8-locales-for-target’ instead of ‘glibc-utf8-locales’. * guix/self.scm (%packages): Likewise. * gnu/home/services/ssh.scm (file-join): Likewise * gnu/installer.scm (build-compiled-file): Likewise. * gnu/packages/chromium.scm (ungoogled-chromium/wayland): Likewise. * gnu/packages/gnome.scm (libgweather4, tracker): Likewise. * gnu/packages/javascript.scm (js-mathjax): Likewise. * gnu/packages/package-management.scm (guix, flatpak): Likewise. * gnu/packages/raspberry-pi.scm (raspi-arm64-chainloader): Likewise. * gnu/packages/suckless.scm (svkbd): Likewise. * gnu/services.scm (cleanup-gexp): Likewise. * gnu/services/base.scm (guix-publish-shepherd-service): Likewise. * gnu/services/guix.scm (guix-build-coordinator-shepherd-services) (guix-build-coordinator-agent-shepherd-services): Likewise. * gnu/services/guix.scm (guix-build-coordinator-queue-builds-shepherd-services): (guix-data-service-shepherd-services) (nar-herder-shepherd-services) (bffe-shepherd-services): Likewise. * gnu/services/web.scm (anonip-shepherd-service) (mumi-shepherd-services): Likewise. * gnu/system/image.scm (system-disk-image, system-iso9660-image) (system-docker-image, system-tarball-image): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * guix/profiles.scm (info-dir-file): Likewise. (ca-certificate-bundle, profile-derivation): Likewise. * guix/scripts/pack.scm (store-database, set-utf8-locale): Likewise. * tests/pack.scm: Likewise. * tests/profiles.scm ("profile-derivation, cross-compilation"): Likewise. Co-authored-by: Ludovic Courtès Co-authored-by: Christopher Baines Change-Id: I24239f427bcc930c29d2ba5d00dc615960a6c374 --- gnu/home/services/ssh.scm | 8 ++++--- gnu/installer.scm | 7 +++--- gnu/packages/chromium.scm | 2 +- gnu/packages/gnome.scm | 4 ++-- gnu/packages/javascript.scm | 2 +- gnu/packages/package-management.scm | 4 ++-- gnu/packages/raspberry-pi.scm | 2 +- gnu/packages/suckless.scm | 2 +- gnu/services.scm | 4 +++- gnu/services/base.scm | 7 ++++-- gnu/services/guix.scm | 23 +++++++++++------- gnu/services/web.scm | 6 +++-- gnu/system/image.scm | 13 ++++++---- gnu/system/install.scm | 2 +- guix/packages.scm | 6 ++++- guix/profiles.scm | 37 +++++++++++++++++------------ guix/scripts/pack.scm | 8 +++++-- guix/self.scm | 5 +++- tests/pack.scm | 7 +++--- tests/profiles.scm | 4 ++-- 20 files changed, 97 insertions(+), 56 deletions(-) diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm index 34b1fe4658..295707d59f 100644 --- a/gnu/home/services/ssh.scm +++ b/gnu/home/services/ssh.scm @@ -25,6 +25,7 @@ (define-module (gnu home services ssh) #:use-module (guix deprecation) #:use-module (guix diagnostics) #:use-module (guix i18n) + #:use-module ((guix utils) #:select (%current-system)) #:use-module (gnu services) #:use-module (gnu services configuration) #:use-module (guix modules) @@ -32,7 +33,7 @@ (define-module (gnu home services ssh) #:use-module (gnu home services shepherd) #:use-module ((gnu home services utils) #:select (object->camel-case-string)) - #:autoload (gnu packages base) (glibc-utf8-locales) + #:autoload (gnu packages base) (libc-utf8-locales-for-target) #:use-module (gnu packages ssh) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -357,8 +358,9 @@ (define* (file-join name files #:optional (delimiter " ")) ;; Support non-ASCII file names. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales - "/lib/locale")) + #+(file-append + (libc-utf8-locales-for-target (%current-system)) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (call-with-output-file #$output diff --git a/gnu/installer.scm b/gnu/installer.scm index d9b71e2ca8..db79c11530 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -85,9 +85,10 @@ (define* (build-compiled-file name locale-builder) (define set-utf8-locale #~(begin (setenv "LOCPATH" - #$(file-append glibc-utf8-locales "/lib/locale/" - (version-major+minor - (package-version glibc-utf8-locales)))) + #$(file-append + (libc-utf8-locales-for-target) "/lib/locale/" + (version-major+minor + (package-version (libc-utf8-locales-for-target))))) (setlocale LC_ALL "en_US.utf8"))) (define builder diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index 513e545938..bc49e24f0e 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -967,7 +967,7 @@ (define-public ungoogled-chromium/wayland (name "ungoogled-chromium-wayland") (native-inputs '()) (inputs - (list bash-minimal glibc-utf8-locales ungoogled-chromium)) + (list bash-minimal (libc-utf8-locales-for-target) ungoogled-chromium)) (build-system trivial-build-system) (arguments (list diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 0be935585d..7364655d25 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5917,7 +5917,7 @@ (define-public libgweather4 gi-docgen `(,glib "bin") ;for glib-mkenums gobject-introspection - glibc-utf8-locales + (libc-utf8-locales-for-target) gsettings-desktop-schemas pkg-config python @@ -9471,7 +9471,7 @@ (define-public tracker (native-inputs (list gettext-minimal `(,glib "bin") - glibc-utf8-locales + (libc-utf8-locales-for-target) gobject-introspection docbook-xsl docbook-xml diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index e70aa7d7e1..2c7ff744ea 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -184,7 +184,7 @@ (define-public js-mathjax #t)))) (native-inputs `(("font-mathjax" ,font-mathjax) - ("glibc-utf8-locales" ,glibc-utf8-locales) + ("glibc-utf8-locales" ,(libc-utf8-locales-for-target)) ("uglifyjs" ,node-uglify-js) ,@(package-native-inputs font-mathjax))) (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath") diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 756222318b..ba0bede493 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -524,7 +524,7 @@ (define-public guix ("git-minimal" ,git-minimal) ;for 'guix perform-download' - ("glibc-utf8-locales" ,glibc-utf8-locales))) + ("glibc-utf8-locales" ,(libc-utf8-locales-for-target)))) (propagated-inputs `(("guile-gnutls" ,guile-gnutls) ;; Avahi requires "glib" which doesn't cross-compile yet. @@ -2052,7 +2052,7 @@ (define-public flatpak dbus ; for dbus-daemon gettext-minimal `(,glib "bin") ; for glib-mkenums + gdbus-codegen - glibc-utf8-locales + (libc-utf8-locales-for-target) gobject-introspection libcap pkg-config diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index 80bfaf0896..5c25ed96da 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -199,7 +199,7 @@ (define-public raspi-arm64-chainloader ("ld-wrapper" ,ld-wrapper) ("make" ,gnu-make) ("gcc" ,gcc-6) - ("locales" ,glibc-utf8-locales))) + ("locales" ,(libc-utf8-locales-for-target)))) (inputs `()) (arguments diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm index 400832045f..714225c654 100644 --- a/gnu/packages/suckless.scm +++ b/gnu/packages/suckless.scm @@ -1247,7 +1247,7 @@ (define-public svkbd (delete 'configure)))) ;no configure script (native-inputs (list pkg-config)) (inputs (list freetype libx11 libxft libxtst libxinerama)) - (propagated-inputs (list glibc-utf8-locales)) + (propagated-inputs (list (libc-utf8-locales-for-target))) (home-page "https://tools.suckless.org/x/svkbd/") (synopsis "Virtual on-screen keyboard") (description "svkbd is a simple virtual keyboard, intended to be used in diff --git a/gnu/services.scm b/gnu/services.scm index ff153fbc7b..23c3d8a9f4 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -651,7 +651,9 @@ (define (cleanup-gexp _) ;; Force file names to be decoded as UTF-8. See ;; . (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append + (libc-utf8-locales-for-target (%current-system)) + "/lib/locale")) (setlocale LC_CTYPE "en_US.utf8") (delete-file-recursively "/tmp") (delete-file-recursively "/var/run") diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 82c6940780..dc001fdef6 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -63,7 +63,9 @@ (define-module (gnu services base) #:use-module (gnu packages bash) #:use-module ((gnu packages base) #:select (coreutils glibc glibc/hurd - glibc-utf8-locales make-glibc-utf8-locales + glibc-utf8-locales + libc-utf8-locales-for-target + make-glibc-utf8-locales tar canonical-package)) #:use-module ((gnu packages compression) #:select (gzip)) #:use-module (gnu packages fonts) @@ -2147,7 +2149,8 @@ (define (guix-publish-shepherd-service config) ;; nars for packages that contain UTF-8 file names such ;; as 'nss-certs'. See . (list (string-append "GUIX_LOCPATH=" - #$glibc-utf8-locales "/lib/locale") + #$(libc-utf8-locales-for-target) + "/lib/locale") "LC_ALL=en_US.utf8") #:log-file "/var/log/guix-publish.log")) (endpoints #~(let ((ai (false-if-exception diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index fe602efb99..389903451a 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -23,7 +23,7 @@ (define-module (gnu services guix) #:use-module (guix records) #:use-module (guix packages) #:use-module ((gnu packages base) - #:select (glibc-utf8-locales)) + #:select (libc-utf8-locales-for-target)) #:use-module (gnu packages admin) #:use-module (gnu packages databases) #:use-module (gnu packages web) @@ -381,7 +381,8 @@ (define (guix-build-coordinator-shepherd-services config) #:pid-file-timeout 60 #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8" "PATH=/run/current-system/profile/bin" ; for hooks #$@extra-environment-variables) @@ -508,7 +509,8 @@ (define (guix-build-coordinator-agent-shepherd-services config) #:user #$user #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") ;; XDG_CACHE_HOME is used by Guix when caching narinfo files "XDG_CACHE_HOME=/var/cache/guix-build-coordinator-agent" "LC_ALL=en_US.utf8") @@ -600,7 +602,8 @@ (define (guix-build-coordinator-queue-builds-shepherd-services config) #:user #$user #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8") #:log-file "/var/log/guix-build-coordinator/queue-builds.log")))) (stop #~(make-kill-destructor)) @@ -712,7 +715,8 @@ (define (guix-data-service-shepherd-services config) #:pid-file "/var/run/guix-data-service/pid" #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.UTF-8") #:log-file "/var/log/guix-data-service/web.log")) (stop #~(make-kill-destructor))) @@ -733,7 +737,8 @@ (define (guix-data-service-shepherd-services config) `("HOME=/var/lib/guix-data-service" "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" ,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.UTF-8") #:log-file "/var/log/guix-data-service/process-jobs.log")) (stop #~(make-kill-destructor)))))) @@ -989,7 +994,8 @@ (define (nar-herder-shepherd-services config) #:pid-file "/var/run/nar-herder/pid" #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8" #$@extra-environment-variables) #:log-file "/var/log/nar-herder/server.log")) @@ -1108,7 +1114,8 @@ (define (bffe-shepherd-services config) #:directory "/var/lib/bffe" #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8" #$@extra-environment-variables) #:log-file "/var/log/bffe/server.log")) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 818226a4f7..023b187cb0 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1498,7 +1498,8 @@ (define (anonip-shepherd-service config) '#$(optional anonip-configuration-regex "--regex")) ;; Run in a UTF-8 locale #:environment-variables - (list (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales + (list (string-append "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8"))) @@ -1976,7 +1977,8 @@ (define %mumi-worker-log "/var/log/mumi.worker.log") (define (mumi-shepherd-services config) (define environment #~(list "LC_ALL=en_US.utf8" - (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales + (string-append "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale"))) (match config diff --git a/gnu/system/image.scm b/gnu/system/image.scm index a990c4f861..b825892232 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -466,7 +466,9 @@ (define* (system-disk-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be ;; decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target + (%current-system)) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (initializer image-root @@ -633,7 +635,8 @@ (define* (system-iso9660-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target (%current-system)) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") @@ -737,7 +740,8 @@ (define* (system-docker-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target (%current-system)) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (set-path-environment-variable "PATH" '("bin" "sbin") '(#+tar)) @@ -816,7 +820,8 @@ (define* (system-tarball-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target (%current-system)) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (let ((image-root (string-append (getcwd) "/tmp-root")) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 28161de153..336d13bd07 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -454,7 +454,7 @@ (define* (%installation-services #:key (system (or (and=> (service gc-root-service-type (append (list bare-bones-os - glibc-utf8-locales + (libc-utf8-locales-for-target system) texinfo guile-3.0) %default-locale-libcs))) diff --git a/guix/packages.scm b/guix/packages.scm index e2e82692ad..b768dddb5f 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -866,7 +866,11 @@ (define (%standard-patch-inputs) ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("unzip" ,(ref '(gnu packages compression) 'unzip)) ("patch" ,(ref '(gnu packages base) 'patch)) - ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales))))) + ("locales" + ,(parameterize ((%current-target-system #f)) + (canonical + ((module-ref (resolve-interface '(gnu packages base)) + 'libc-utf8-locales-for-target)))))))) (define (default-guile) "Return the default Guile package used to run the build code of diff --git a/guix/profiles.scm b/guix/profiles.scm index 5d2fb8dc64..ce2f8337bf 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1000,8 +1000,9 @@ (define* (info-dir-file manifest #:optional system) (module-ref (resolve-interface '(gnu packages texinfo)) 'texinfo)) (define gzip ;lazy reference (module-ref (resolve-interface '(gnu packages compression)) 'gzip)) - (define glibc-utf8-locales ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) 'glibc-utf8-locales)) + (define libc-utf8-locales-for-target ;lazy reference + (module-ref (resolve-interface '(gnu packages base)) + 'libc-utf8-locales-for-target)) (define build (with-imported-modules '((guix build utils)) @@ -1043,7 +1044,8 @@ (define* (info-dir-file manifest #:optional system) (setenv "PATH" (string-append #+gzip "/bin")) ;for info.gz files (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target system) + "/lib/locale")) (mkdir-p (string-append #$output "/share/info")) (exit (every install-info @@ -1124,8 +1126,9 @@ (define* (ca-certificate-bundle manifest #:optional system) ;; See ;; for a discussion. - (define glibc-utf8-locales ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) 'glibc-utf8-locales)) + (define libc-utf8-locales-for-target ;lazy reference + (module-ref (resolve-interface '(gnu packages base)) + 'libc-utf8-locales-for-target)) (define build (with-imported-modules '((guix build utils)) @@ -1159,9 +1162,11 @@ (define* (ca-certificate-bundle manifest #:optional system) ;; Some file names in the NSS certificates are UTF-8 encoded so ;; install a UTF-8 locale. (setenv "LOCPATH" - (string-append #+glibc-utf8-locales "/lib/locale/" + (string-append #+(libc-utf8-locales-for-target system) + "/lib/locale/" #+(version-major+minor - (package-version glibc-utf8-locales)))) + (package-version + (libc-utf8-locales-for-target system))))) (setlocale LC_ALL "en_US.utf8") (match (append-map ca-files '#$(manifest-inputs manifest)) @@ -1999,19 +2004,21 @@ (define* (profile-derivation manifest (and (derivation? drv) (gexp-input drv))) extras)) - (define glibc-utf8-locales ;lazy reference + (define libc-utf8-locales-for-target ;lazy reference (module-ref (resolve-interface '(gnu packages base)) - 'glibc-utf8-locales)) + 'libc-utf8-locales-for-target)) (define set-utf8-locale ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so ;; install a UTF-8 locale. - #~(begin - (setenv "LOCPATH" - #$(file-append glibc-utf8-locales "/lib/locale/" - (version-major+minor - (package-version glibc-utf8-locales)))) - (setlocale LC_ALL "en_US.utf8"))) + (let ((locales (libc-utf8-locales-for-target + (or system (%current-system))))) + #~(begin + (setenv "LOCPATH" + #$(file-append locales "/lib/locale/" + (version-major+minor + (package-version locales)))) + (setlocale LC_ALL "en_US.utf8")))) (define builder (with-imported-modules '((guix build profiles) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index bdbea49910..8071840de1 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -137,7 +137,8 @@ (define (store-database items) ;; Make sure non-ASCII file names are properly handled. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target (%current-system)) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (sql-schema #$schema) @@ -209,7 +210,10 @@ (define (set-utf8-locale profile) (profile-locales? profile)) #~(begin (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (let-system (system target) + (libc-utf8-locales-for-target + (or target system))) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8")) #~(setenv "GUIX_LOCPATH" "unset for tests"))) diff --git a/guix/self.scm b/guix/self.scm index a1f235659d..f378548959 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -73,7 +73,10 @@ (define %packages ("po4a" . ,(ref 'gettext 'po4a)) ("gettext-minimal" . ,(ref 'gettext 'gettext-minimal)) ("gcc-toolchain" . ,(ref 'commencement 'gcc-toolchain)) - ("glibc-utf8-locales" . ,(ref 'base 'glibc-utf8-locales)) + ("glibc-utf8-locales" . ,(delay + ((module-ref (resolve-interface + '(gnu packages base)) + 'libc-utf8-locales-for-target)))) ("graphviz" . ,(ref 'graphviz 'graphviz-minimal)) ("font-ghostscript" . ,(ref 'ghostscript 'font-ghostscript)) ("texinfo" . ,(ref 'texinfo 'texinfo))))) diff --git a/tests/pack.scm b/tests/pack.scm index 8fdaed0168..ac78817a70 100644 --- a/tests/pack.scm +++ b/tests/pack.scm @@ -30,7 +30,7 @@ (define-module (test-pack) #:use-module (guix modules) #:use-module (guix utils) #:use-module (gnu packages) - #:use-module ((gnu packages base) #:select (glibc-utf8-locales)) + #:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target)) #:use-module (gnu packages bootstrap) #:use-module ((gnu packages package-management) #:select (rpm)) #:use-module ((gnu packages compression) #:select (squashfs-tools)) @@ -197,8 +197,9 @@ (define rpm-for-tests ;; Make sure non-ASCII file names are properly ;; handled. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales - "/lib/locale")) + #+(file-append + (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (mkdir #$output) diff --git a/tests/profiles.scm b/tests/profiles.scm index 9c419ada93..ddd6d74f3b 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -463,7 +463,7 @@ (define glibc (target -> "arm-linux-gnueabihf") (grep (package->cross-derivation packages:grep target)) (sed (package->cross-derivation packages:sed target)) - (locales (package->derivation packages:glibc-utf8-locales)) + (locales (package->derivation (packages:libc-utf8-locales-for-target))) (drv (profile-derivation manifest #:hooks '() #:locales? #t @@ -482,7 +482,7 @@ (define glibc (derivation-file-name grep)) (string=? (find-input packages:sed) (derivation-file-name sed)) - (string=? (find-input packages:glibc-utf8-locales) + (string=? (find-input (packages:libc-utf8-locales-for-target)) (derivation-file-name locales)))))) (test-assert "package->manifest-entry defaults to \"out\"" -- 2.41.0