mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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.
This commit is contained in:
parent
5dc9ded15d
commit
44161fe16c
1 changed files with 20 additions and 21 deletions
|
@ -985,8 +985,7 @@ (define-public glibc-utf8-locales
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build utils))
|
`(#:modules ((guix build utils))
|
||||||
#:builder (begin
|
#:builder (begin
|
||||||
(use-modules (srfi srfi-1)
|
(use-modules (guix build utils))
|
||||||
(guix build utils))
|
|
||||||
|
|
||||||
(let* ((libc (assoc-ref %build-inputs "glibc"))
|
(let* ((libc (assoc-ref %build-inputs "glibc"))
|
||||||
(gzip (assoc-ref %build-inputs "gzip"))
|
(gzip (assoc-ref %build-inputs "gzip"))
|
||||||
|
@ -997,27 +996,27 @@ (define-public glibc-utf8-locales
|
||||||
(setenv "PATH" (string-append libc "/bin:" gzip "/bin"))
|
(setenv "PATH" (string-append libc "/bin:" gzip "/bin"))
|
||||||
|
|
||||||
(mkdir-p localedir)
|
(mkdir-p localedir)
|
||||||
(every (lambda (locale)
|
(for-each (lambda (locale)
|
||||||
(define file
|
(define file
|
||||||
;; Use the "normalized codeset" by
|
;; Use the "normalized codeset" by
|
||||||
;; default--e.g., "en_US.utf8".
|
;; default--e.g., "en_US.utf8".
|
||||||
(string-append localedir "/" locale ".utf8"))
|
(string-append localedir "/" locale ".utf8"))
|
||||||
|
|
||||||
(and (zero? (system* "localedef" "--no-archive"
|
(invoke "localedef" "--no-archive"
|
||||||
"--prefix" localedir
|
"--prefix" localedir
|
||||||
"-i" locale
|
"-i" locale
|
||||||
"-f" "UTF-8" file))
|
"-f" "UTF-8" file)
|
||||||
(begin
|
|
||||||
;; For backward compatibility with Guix
|
;; For backward compatibility with Guix
|
||||||
;; <= 0.8.3, add "xx_YY.UTF-8".
|
;; <= 0.8.3, add "xx_YY.UTF-8".
|
||||||
(symlink (string-append locale ".utf8")
|
(symlink (string-append locale ".utf8")
|
||||||
(string-append localedir "/"
|
(string-append localedir "/"
|
||||||
locale ".UTF-8"))
|
locale ".UTF-8")))
|
||||||
#t)))
|
|
||||||
|
|
||||||
;; These are the locales commonly used for
|
;; These are the locales commonly used for
|
||||||
;; tests---e.g., in Guile's i18n tests.
|
;; tests---e.g., in Guile's i18n tests.
|
||||||
'("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR"))))))
|
'("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR"))
|
||||||
|
#t))))
|
||||||
(inputs `(("glibc" ,glibc)
|
(inputs `(("glibc" ,glibc)
|
||||||
("gzip" ,gzip)))
|
("gzip" ,gzip)))
|
||||||
(synopsis "Small sample of UTF-8 locales")
|
(synopsis "Small sample of UTF-8 locales")
|
||||||
|
|
Loading…
Reference in a new issue