grafts: Use C.UTF-8 and remove dependency on ‘glibc-utf8-locales’.

This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3.

* guix/grafts.scm (graft-derivation/shallow)[glibc-locales]: Remove.
[build]: Leave ‘GUIX_LOCPATH’ unset.  Use “C.UTF-8” instead of
“en_US.utf8”.

Reported-by: Janneke Nieuwenhuizen <janneke@gnu.org>
Change-Id: I59bc90130c6711a1a89068fbf697f9bd2ba2b5f1
This commit is contained in:
Ludovic Courtès 2024-01-25 22:31:35 +01:00
parent c4ceb60f74
commit a42d54039b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014-2024 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -96,12 +96,6 @@ (define* (graft-derivation/shallow drv grafts
"Return a derivation called NAME, which applies GRAFTS to the specified "Return a derivation called NAME, which applies GRAFTS to the specified
OUTPUTS of DRV. This procedure performs \"shallow\" grafting in that GRAFTS OUTPUTS of DRV. This procedure performs \"shallow\" grafting in that GRAFTS
are not recursively applied to dependencies of DRV." are not recursively applied to dependencies of DRV."
(define glibc-locales
(module-ref (resolve-interface '(gnu packages commencement))
(if (target-hurd? system)
'glibc-utf8-locales-final/hurd
'glibc-utf8-locales-final)))
(define mapping (define mapping
;; List of store item pairs. ;; List of store item pairs.
(map (lambda (graft) (map (lambda (graft)
@ -114,11 +108,8 @@ (define mapping
(define set-utf8-locale (define set-utf8-locale
(and (%graft-with-utf8-locale?) (and (%graft-with-utf8-locale?)
#~(begin ;; Let Guile interpret file names as UTF-8.
;; Let Guile interpret file names as UTF-8. #~(setlocale LC_ALL "C.UTF-8")))
(setenv "GUIX_LOCPATH"
#+(file-append glibc-locales "/lib/locale"))
(setlocale LC_ALL "en_US.utf8"))))
(define build (define build