aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-06 13:36:51 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-07 21:50:18 +0200
commit15ec93a7832ae7dde747ccd9bb2bb2776be9f199 (patch)
treec6b97d333950ec8ad734624244586cb60ca7e47d /gnu/installer
parentbc48088b14a4513044f87ce656db6945311c40d6 (diff)
downloadpatches-15ec93a7832ae7dde747ccd9bb2bb2776be9f199.tar
patches-15ec93a7832ae7dde747ccd9bb2bb2776be9f199.tar.gz
Add (gnu build locale).
* gnu/build/locale.scm: New file. * gnu/local.mk (MODULES_NOT_COMPILED): Add it. * gnu/installer/locale.scm (normalize-codeset): Remove. * gnu/system/locale.scm (localedef-command): Remove. (single-locale-directory): Use (gnu build locale). (glibc-supported-locales)[build]: Likewise, and remove 'read-supported-locales'.
Diffstat (limited to 'gnu/installer')
-rw-r--r--gnu/installer/locale.scm19
1 files changed, 1 insertions, 18 deletions
diff --git a/gnu/installer/locale.scm b/gnu/installer/locale.scm
index 2ee5eecd96..13f3a1e881 100644
--- a/gnu/installer/locale.scm
+++ b/gnu/installer/locale.scm
@@ -19,6 +19,7 @@
(define-module (gnu installer locale)
#:use-module (gnu installer utils)
+ #:use-module ((gnu build locale) #:select (normalize-codeset))
#:use-module (guix records)
#:use-module (json)
#:use-module (srfi srfi-1)
@@ -71,24 +72,6 @@ optionally, CODESET."
(codeset . ,(or codeset (match:substring matches 5)))
(modifier . ,(match:substring matches 7)))))
-(define (normalize-codeset codeset)
- "Compute the \"normalized\" variant of CODESET."
- ;; info "(libc) Using gettextized software", for the algorithm used to
- ;; compute the normalized codeset.
- (letrec-syntax ((-> (syntax-rules ()
- ((_ proc value)
- (proc value))
- ((_ proc rest ...)
- (proc (-> rest ...))))))
- (-> (lambda (str)
- (if (string-every char-set:digit str)
- (string-append "iso" str)
- str))
- string-downcase
- (lambda (str)
- (string-filter char-set:letter+digit str))
- codeset)))
-
(define (locale->locale-string locale)
"Reverse operation of locale-string->locale."
(let ((language (locale-language locale))