me
/
guix
Archived
1
0
Fork 0

gnu: glibc-utf8-locales: Hide the package.

This package has a long history of confusing users, due to containing only a
small, arbitrary subset of UTF-8 locales.

* gnu/packages/base.scm (glibc-utf8-locales): Define as a hidden package.
* doc/guix.texi (Application Setup): Do not mention glibc-utf8-locales.
Instead, provide an example for defining a custom locales package.
Maxim Cournoyer 2022-02-26 23:06:24 -05:00
parent 9b0171fe1a
commit 61a847187d
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
2 changed files with 20 additions and 3 deletions

View File

@ -1867,8 +1867,24 @@ $ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
Note that the @code{glibc-locales} package contains data for all the Note that the @code{glibc-locales} package contains data for all the
locales supported by the GNU@tie{}libc and weighs in at around locales supported by the GNU@tie{}libc and weighs in at around
917@tie{}MiB@. Alternatively, the @code{glibc-utf8-locales} is smaller but 930@tie{}MiB@footnote{The size of the @code{glibc-locales} package is
limited to a few UTF-8 locales. reduced down to about 213@tie{}MiB with store deduplication and further
down to about 67@tie{}MiB when using a zstd-compressed Btrfs file
system.}. If you only need a few locales, you can define your custom
locales package via the @code{make-glibc-utf8-locales} procedure from
the @code{(gnu packages base)} module. The following example defines a
package containing the various Canadian UTF-8 locales known to the
GNU@tie{}libc, that weighs around 14@tie{}MiB:
@lisp
(use-modules (gnu packages base))
(define my-glibc-locales
(make-glibc-utf8-locales
glibc
#:locales (list "en_CA" "fr_CA" "ik_CA" "iu_CA" "shs_CA")
#:name "glibc-canadian-utf8-locales"))
@end lisp
The @env{GUIX_LOCPATH} variable plays a role similar to @env{LOCPATH} The @env{GUIX_LOCPATH} variable plays a role similar to @env{LOCPATH}
(@pxref{Locale Names, @env{LOCPATH},, libc, The GNU C Library Reference (@pxref{Locale Names, @env{LOCPATH},, libc, The GNU C Library Reference

View File

@ -1171,7 +1171,8 @@ test environments.")
(define-public glibc-locales (define-public glibc-locales
(make-glibc-locales glibc)) (make-glibc-locales glibc))
(define-public glibc-utf8-locales (define-public glibc-utf8-locales
(make-glibc-utf8-locales glibc)) (hidden-package
(make-glibc-utf8-locales glibc)))
;; Packages provided to ease use of binaries linked against the previous libc. ;; Packages provided to ease use of binaries linked against the previous libc.
(define-public glibc-locales-2.29 (define-public glibc-locales-2.29