aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-03 20:06:24 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-04 00:10:03 +0200
commit8a55e217ad3a6af96f9e05eb676616224fde509f (patch)
tree81625f9bf35902b070c69b7de94b72c8aef17b1b /gnu/packages/base.scm
parentb6ac54517cc878034f57f983cfe561ebf8e2eb7f (diff)
downloadguix-8a55e217ad3a6af96f9e05eb676616224fde509f.tar
guix-8a55e217ad3a6af96f9e05eb676616224fde509f.tar.gz
gnu: glibc-utf8-locales: Use the normalized codeset.
* gnu/packages/base.scm (glibc-utf8-locales)[argument]: Use the normalized codeset by default.
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm20
1 files changed, 15 insertions, 5 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 80b0332de7..c6abf56ebf 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -689,12 +689,22 @@ the 'share/locale' sub-directory of this package.")
(mkdir-p localedir)
(every (lambda (locale)
- (zero? (system* "localedef" "--no-archive"
- "--prefix" localedir "-i" locale
- "-f" "UTF-8"
+ (define file
+ ;; Use the "normalized codeset" by
+ ;; default--e.g., "en_US.utf8".
+ (string-append localedir "/" locale ".utf8"))
+
+ (and (zero? (system* "localedef" "--no-archive"
+ "--prefix" localedir
+ "-i" locale
+ "-f" "UTF-8" file))
+ (begin
+ ;; For backward compatibility with Guix
+ ;; <= 0.8.3, add "xx_YY.UTF-8".
+ (symlink (string-append locale ".utf8")
(string-append localedir "/"
- locale
- ".UTF-8"))))
+ locale ".UTF-8"))
+ #t)))
;; These are the locales commonly used for
;; tests---e.g., in Guile's i18n tests.