From 46bd6edd5af4b4fe1f1d066028a6a84ed17ce96b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 30 Sep 2015 17:06:40 +0200 Subject: gnu: libc: Look for locale data under /run/current-system/locale/X.Y. * 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. --- gnu/system/locale.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/system') diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index 393dd42354..010fb45272 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -19,6 +19,7 @@ (define-module (gnu system locale) #:use-module (guix gexp) #:use-module (guix records) + #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (srfi srfi-26) @@ -57,14 +58,20 @@ "-i" #$(locale-definition-source locale) "-f" #$(locale-definition-charset locale) (string-append #$output "/" + #$(package-version libc) "/" #$(locale-definition-name locale)))))) (define* (locale-directory locales #:key (libc (canonical-package glibc))) - "Return a directory containing all of LOCALES compiled." + "Return a directory containing all of LOCALES for LIBC compiled. + +Because locale data formats are incompatible when switching from one libc to +another, locale data is put in a sub-directory named after the 'version' field +of LIBC." (define build #~(begin (mkdir #$output) + (mkdir (string-append #$output "/" #$(package-version libc))) ;; 'localedef' executes 'gzip' to access compressed locale sources. (setenv "PATH" (string-append #$gzip "/bin")) -- cgit v1.2.3