gnu: commencement: Remove ‘glibc-utf8-locales’ from ‘%final-inputs’.

* gnu/packages/commencement.scm (%boot5-inputs): Make an alias for
‘%boot4-inputs’.
(with-boot5): Turn into an alias for ‘with-boot4’.
(%final-inputs): Override ‘native-inputs’ of GAWK.  Remove "locales"
entry.
(canonical-package): Add “glibc-utf8-locales” entry.
* gnu/packages/base.scm (libc-utf8-locales-for-target): Use
‘canonical-package’.
* gnu/packages/gawk.scm (gawk)[native-inputs]: New field.
* gnu/packages/texinfo.scm (texinfo)[native-inputs]: Add
‘libc-utf8-locales-for-target’.

Change-Id: I2283ffc6c6000c98ad2db89c04d581e050667c94
This commit is contained in:
Ludovic Courtès 2023-12-11 11:50:42 +01:00
parent 5b3e996d29
commit 92727f4af5
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 33 additions and 22 deletions

View file

@ -1651,9 +1651,14 @@ (define* (libc-locales-for-target #:optional
(define* (libc-utf8-locales-for-target #:optional (define* (libc-utf8-locales-for-target #:optional
(target (or (%current-target-system) (target (or (%current-target-system)
(%current-system)))) (%current-system))))
(if (target-hurd? target) "Return the glibc UTF-8 locale package for TARGET."
glibc-utf8-locales/hurd ;; Note: To avoid circular dependencies (such as: texinfo ->
glibc-utf8-locales)) ;; glibc-utf8-locales -> glibc -> texinfo), refer to
;; 'glibc-utf8-locales-final' via 'canonical-package'.
(canonical-package
(if (target-hurd? target)
glibc-utf8-locales/hurd
glibc-utf8-locales)))
(define-public tzdata (define-public tzdata
(package (package

View file

@ -3394,17 +3394,11 @@ (define-public ld-gold-wrapper
#:guile guile-final #:guile guile-final
#:bash bash-final)) #:bash bash-final))
(define (%boot5-inputs) ;; There used to be a "stage 5" including a variant of the
;; Now with UTF-8 locales. Remember that the bootstrap binaries were built ;; 'glibc-utf8-locales' package. This is no longer necessary since 'glibc'
;; with an older libc, which cannot load the new locale format. See ;; embeds the "C.UTF-8" locale, but these aliases are kept for convenience.
;; <https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00737.html>. (define %boot5-inputs %boot4-inputs)
`(("locales" ,(if (target-hurd?) (define with-boot5 with-boot4)
glibc-utf8-locales-final/hurd
glibc-utf8-locales-final))
,@(%boot4-inputs)))
(define with-boot5
(package-with-explicit-inputs %boot5-inputs))
(define gnu-make-final (define gnu-make-final
;; The final GNU Make, which uses the final Guile. ;; The final GNU Make, which uses the final Guile.
@ -3493,7 +3487,11 @@ (define-public %final-inputs
("diffutils" ,diffutils) ("diffutils" ,diffutils)
("patch" ,patch/pinned) ("patch" ,patch/pinned)
("findutils" ,findutils) ("findutils" ,findutils)
("gawk" ,gawk))) ("gawk" ,(package/inherit gawk
(native-inputs
(list (if (target-hurd?)
glibc-utf8-locales-final/hurd
glibc-utf8-locales-final)))))))
("sed" ,sed-final) ("sed" ,sed-final)
("grep" ,grep-final) ("grep" ,grep-final)
("xz" ,xz-final) ("xz" ,xz-final)
@ -3504,10 +3502,7 @@ (define-public %final-inputs
("binutils" ,binutils-final) ("binutils" ,binutils-final)
("gcc" ,gcc-final) ("gcc" ,gcc-final)
("libc" ,glibc-final) ("libc" ,glibc-final)
("libc:static" ,glibc-final "static") ("libc:static" ,glibc-final "static"))))))
("locales" ,(if (target-hurd? (%current-system))
glibc-utf8-locales-final/hurd
glibc-utf8-locales-final)))))))
(define-public canonical-package (define-public canonical-package
(let ((name->package (mlambda (system) (let ((name->package (mlambda (system)
@ -3518,6 +3513,10 @@ (define-public canonical-package
package result)))) package result))))
vlist-null vlist-null
`(("guile" ,guile-final) `(("guile" ,guile-final)
("glibc-utf8-locales"
,(if (target-hurd? system)
glibc-utf8-locales-final/hurd
glibc-utf8-locales-final))
,@(%final-inputs system)))))) ,@(%final-inputs system))))))
(lambda (package) (lambda (package)
"Return the 'canonical' variant of PACKAGE---i.e., if PACKAGE is one of "Return the 'canonical' variant of PACKAGE---i.e., if PACKAGE is one of

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012-2016, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018, 2022, 2023 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018, 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
@ -79,6 +79,10 @@ (define-public gawk
(("#! /usr/bin/gawk") (("#! /usr/bin/gawk")
(string-append "#!" (which "gawk"))))))))) (string-append "#!" (which "gawk")))))))))
;; Tests explicitly require en_US.UTF-8, fr_FR.UTF-8, ru_RU.UTF-8 and
;; ja_JP.UTF-8.
(native-inputs (list (libc-utf8-locales-for-target)))
(inputs (list libsigsegv (inputs (list libsigsegv
;; Use the full-fledged Bash package, otherwise the test suite ;; Use the full-fledged Bash package, otherwise the test suite
;; sometimes fail non-deterministically. ;; sometimes fail non-deterministically.

View file

@ -38,6 +38,7 @@ (define-module (gnu packages texinfo)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages gettext) #:use-module (gnu packages gettext)
#:use-module (gnu packages ncurses) #:use-module (gnu packages ncurses)
@ -79,10 +80,12 @@ (define-public texinfo
#:tests? ,(and (not (target-hurd?)) #:tests? ,(and (not (target-hurd?))
(not (%current-target-system))))) (not (%current-target-system)))))
(inputs (list ncurses perl)) (inputs (list ncurses perl))
;; When cross-compiling, texinfo will build some of its own binaries with ;; When cross-compiling, texinfo will build some of its own binaries with
;; the native compiler. This means ncurses is needed both in both inputs ;; the native compiler. This means ncurses is needed both in both inputs
;; and native-inputs. ;; and native-inputs. Some of its tests require extra locales such as
(native-inputs (list perl ncurses)) ;; fr_FR.UTF-8.
(native-inputs (list perl ncurses (libc-utf8-locales-for-target)))
(native-search-paths (native-search-paths
;; This is the variable used by the standalone Info reader. ;; This is the variable used by the standalone Info reader.