diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-12-11 16:55:29 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-31 10:42:49 +0200 |
commit | 949ee85019b242d29a1065cde27c491af57b657b (patch) | |
tree | d8a2b98fec697741b79ef965b7edb1efddf3418c /guix | |
parent | 92727f4af5d410b0a521d57d5ecef6b35779bdc2 (diff) | |
download | guix-949ee85019b242d29a1065cde27c491af57b657b.tar.gz guix-949ee85019b242d29a1065cde27c491af57b657b.zip |
profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible.
This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3.
* guix/profiles.scm (ca-certificate-bundle)[libc-utf8-locales-for-target]:
Remove.
[build]: Use “C.UTF-8” instead of “en_US.utf8”.
(profile-derivation)[libc-utf8-locales-for-target]: Remove.
[set-utf8-locale]: Rewrite to a gexp that calls ‘setlocale’ for “C.UTF-8”.
* tests/profiles.scm ("profile-derivation, cross-compilation"): Remove
‘locales’ variable and related check.
Change-Id: I7cb148b9149fe5fbe5b9b1b25fdce1002ad1f37e
Diffstat (limited to 'guix')
-rw-r--r-- | guix/profiles.scm | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm index 864ed02b6d..92418edfa9 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1127,11 +1127,6 @@ certificates in the /etc/ssl/certs sub-directories of the packages in MANIFEST. Single-file bundles are required by programs such as Git and Lynx." ;; See <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00429.html> ;; for a discussion. - - (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)) #~(begin @@ -1163,13 +1158,7 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." ;; Some file names in the NSS certificates are UTF-8 encoded so ;; install a UTF-8 locale. - (setenv "LOCPATH" - (string-append #+(libc-utf8-locales-for-target system) - "/lib/locale/" - #+(version-major+minor - (package-version - (libc-utf8-locales-for-target system))))) - (setlocale LC_ALL "en_US.utf8") + (setlocale LC_ALL "C.UTF-8") (match (append-map ca-files '#$(manifest-inputs manifest)) (() @@ -1965,8 +1954,7 @@ with a different version number.) Unless ALLOW-UNSUPPORTED-PACKAGES? is true or TARGET is set, raise an error if MANIFEST contains a package that does not support SYSTEM. -When LOCALES? is true, the build is performed under a UTF-8 locale; this adds -a dependency on the 'glibc-utf8-locales' package. +When LOCALES? is true, the build is performed under a UTF-8 locale. When RELATIVE-SYMLINKS? is true, use relative file names for symlink targets. This is one of the things to do for the result to be relocatable. @@ -2009,21 +1997,10 @@ are cross-built for TARGET." (and (derivation? drv) (gexp-input drv))) extras)) - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - '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. - (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")))) + ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so install a + ;; UTF-8 locale. Assume libc comes with a copy of C.UTF-8. + #~(setlocale LC_ALL "C.UTF-8")) (define builder (with-imported-modules '((guix build profiles) |