summary refs log tree commit diff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-02-26 23:06:24 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-02-27 20:21:02 -0500
commit61a847187d781bcecdc77fbec1fb75d1b9531e55 (patch)
tree4c7cb0a36d6821333ad4caf9e65de322a06b2a64 /doc/guix.texi
parent9b0171fe1ae499f57462c4b45e91ef68e076f57d (diff)
downloadguix-61a847187d781bcecdc77fbec1fb75d1b9531e55.tar.gz
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.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi20
1 files changed, 18 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 7596b0567b..1e8b23ad7e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1867,8 +1867,24 @@ $ export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
 
 Note that the @code{glibc-locales} package contains data for all the
 locales supported by the GNU@tie{}libc and weighs in at around
-917@tie{}MiB@.  Alternatively, the @code{glibc-utf8-locales} is smaller but
-limited to a few UTF-8 locales.
+930@tie{}MiB@footnote{The size of the @code{glibc-locales} package is
+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}
 (@pxref{Locale Names, @env{LOCPATH},, libc, The GNU C Library Reference