This reduces the default set of locales from 92 MiB to 28 MiB.
* gnu/system/locale.scm (%default-locale-definitions): Reduce to 10
locales.
Change-Id: I3c092604301d69db591957bcfd62a062c3ac5ab0
The transition from glibc 2.33 to 2.35 was done in
c919bfefd9 (one year ago), so we can
assume that the backward-compatible locales are no longer needed by
default.
This removes 92 MiB from the system closure.
* gnu/system/locale.scm (%default-locale-libcs): Remove GLIBC-2.33.
Change-Id: I85948bbe6b2d424f9f158eeafdb5543688c66c6b
Having 2.29 is most likely no longer justified. Removing it reduces the
closure size returned by:
guix size $(guix system build gnu/system/install.scm)
from 1.6G to 1.5G.
* gnu/system/locale.scm (%default-locale-libcs): Remove GLIBC-2.29.
Only use the current glibc, as adding glibc-2.29 for compatibility adds
~100MiB to the barebones system closure.
* gnu/system/locale.scm (%default-locale-libcs): Remove glibc-2.29.
This eases transition for anyone reconfiguring and still having profiles
with packages using the former libc.
* gnu/system/locale.scm (%default-locale-libcs): Add GLIBC-2.29.
This is a follow-up of dfc8ccbf5d. Building
locales using the same glibc as the one programs are linked against is
enough.
* gnu/system/locale.scm (%default-locale-libcs): Use the plain glibc package.
* gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
the major+minor part of the libc version number in the locale directory name.
* gnu/system/locale.scm (single-locale-directory): Use 'computed-file'
instead of 'gexp->derivation'.
(locale-directory): Adjust accordingly and do the same.
* gnu/system.scm (operating-system-directory-base-entries): Adjust
accordingly.
Fixes <http://bugs.gnu.org/22572>.
Reported by Mark H Weaver <mhw@netris.org>.
* gnu/system/locale.scm (%not-dot): New variable.
(denormalize-codeset, locale-name->definition): New procedures.
* gnu/system.scm (locale-name->definition*): New procedure.
(operating-system-locale-directory): Instead of raising an error, add
the missing locale.
* doc/guix.texi (Locales): Adjust accordingly.
* gnu/system/locale.scm (localedef-command)[maybe-version-directory]:
New procedure.
Use it.
(locale-directory): Rename to...
(single-locale-directory): ... this. Check the version of LIBC to
determine whether to create a "X.Y" sub-directory or to make it a
symlink to ".". Add the version number in the derivation name.
(locale-directory): New procedure.
(%default-locale-libcs): New variable.
* gnu/system.scm (<operating-system>)[locale-libcs]: New field.
(operating-system-locale-directory): Pass it to 'locale-directory'.
* doc/guix.texi (operating-system Reference): Document 'locale-libcs'.
(Locales)[Locale Data Compatibility Considerations]: New section.
* gnu/packages/base.scm (glibc)[arguments]: Append VERSION to
'libc_cv_localedir'.
* gnu/system/locale.scm (localedef-command): Write to the sub-directory
called (package-version libc) in #$output.
(locale-directory): Create said directory.
* doc/guix.texi (Locales): Mention the per-version sub-directory.
* doc/guix.texi (Locales): Introduce "codeset".
<%default-locale-definitions>: Mention the "normalized codeset", with
an xref to libc's manual.
* gnu/system/locale.scm (%default-locale-definitions)[utf8-locale]:
Mention the "normalized codeset" in a comment.
* gnu/system/locale.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* gnu/system.scm (<operating-system>)[locale]: Change the default to
"en_US.utf8".
(operating-system-locale-directory): New procecure.
(operating-system-derivation): Use it.
* doc/guix.texi (Using the Configuration System): Change example locale
to "fr_FR.utf8".
(operating-system Reference): Add xref to "Locales". Document
'locale-definitions'.
(Locales): New section.
* po/guix/POTFILES.in: Add gnu/system.scm.