From 44161fe16c28062275fe8226272c924283c34499 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 16 Mar 2018 01:26:17 -0400 Subject: [PATCH] gnu: glibc-utf8-locales: Use invoke instead of system*. * gnu/packages/base.scm (glibc-utf8-locales)[arguments]: Use invoke and remove the vestigial result code plumbing. --- gnu/packages/base.scm | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d2afa24add..7569e30569 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -985,8 +985,7 @@ the 'share/locale' sub-directory of this package.") (arguments `(#:modules ((guix build utils)) #:builder (begin - (use-modules (srfi srfi-1) - (guix build utils)) + (use-modules (guix build utils)) (let* ((libc (assoc-ref %build-inputs "glibc")) (gzip (assoc-ref %build-inputs "gzip")) @@ -997,27 +996,27 @@ the 'share/locale' sub-directory of this package.") (setenv "PATH" (string-append libc "/bin:" gzip "/bin")) (mkdir-p localedir) - (every (lambda (locale) - (define file - ;; Use the "normalized codeset" by - ;; default--e.g., "en_US.utf8". - (string-append localedir "/" locale ".utf8")) + (for-each (lambda (locale) + (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")) - #t))) + (invoke "localedef" "--no-archive" + "--prefix" localedir + "-i" locale + "-f" "UTF-8" file) - ;; These are the locales commonly used for - ;; tests---e.g., in Guile's i18n tests. - '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")))))) + ;; For backward compatibility with Guix + ;; <= 0.8.3, add "xx_YY.UTF-8". + (symlink (string-append locale ".utf8") + (string-append localedir "/" + locale ".UTF-8"))) + + ;; These are the locales commonly used for + ;; tests---e.g., in Guile's i18n tests. + '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")) + #t)))) (inputs `(("glibc" ,glibc) ("gzip" ,gzip))) (synopsis "Small sample of UTF-8 locales")