guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

13/30: gnu: glibc-utf8-locales: Use invoke instead of system*.


From: Mark H. Weaver
Subject: 13/30: gnu: glibc-utf8-locales: Use invoke instead of system*.
Date: Fri, 16 Mar 2018 05:03:37 -0400 (EDT)

mhw pushed a commit to branch core-updates
in repository guix.

commit 44161fe16c28062275fe8226272c924283c34499
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 16 01:26:17 2018 -0400

    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 | 45 ++++++++++++++++++++++-----------------------
 1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d2afa24..7569e30 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"))
-
-                              (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)))
-
-                            ;; 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-each (lambda (locale)
+                                 (define file
+                                   ;; Use the "normalized codeset" by
+                                   ;; default--e.g., "en_US.utf8".
+                                   (string-append localedir "/" locale 
".utf8"))
+
+                                 (invoke "localedef" "--no-archive"
+                                         "--prefix" localedir
+                                         "-i" locale
+                                         "-f" "UTF-8" file)
+
+                                 ;; 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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]