gnu: guix: Embed 'glibc-utf8-locales'.

This will ensure people who download the binary installation tarball
do not get locale-related warnings, provided they use one of the
selected UTF-8 locales.

* gnu/packages/package-management.scm (guix)[arguments]: In
'wrap-program' phase, set GUIX_LOCPATH.
[inputs]: Add GLIBC-UTF8-LOCALES.
This commit is contained in:
Ludovic Courtès 2019-02-14 23:07:42 +01:00
parent e6e599fa01
commit 8a973abc6f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -34,6 +34,7 @@ (define-module (gnu packages package-management)
#:use-module (gnu packages avahi) #:use-module (gnu packages avahi)
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
#:use-module (gnu packages backup) #:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages bdw-gc) #:use-module (gnu packages bdw-gc)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin' #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
@ -228,6 +229,7 @@ (define (intern tarball)
"guile-bytestructures")) "guile-bytestructures"))
(ssh (assoc-ref inputs "guile-ssh")) (ssh (assoc-ref inputs "guile-ssh"))
(gnutls (assoc-ref inputs "gnutls")) (gnutls (assoc-ref inputs "gnutls"))
(locales (assoc-ref inputs "glibc-utf8-locales"))
(deps (list gcrypt json sqlite gnutls (deps (list gcrypt json sqlite gnutls
git bs ssh)) git bs ssh))
(effective (effective
@ -246,11 +248,13 @@ (define (intern tarball)
"/lib/guile/" effective "/lib/guile/" effective
"/site-ccache") "/site-ccache")
(delete #f deps)) (delete #f deps))
":"))) ":"))
(locpath (string-append locales "/lib/locale")))
(wrap-program (string-append out "/bin/guix") (wrap-program (string-append out "/bin/guix")
`("GUILE_LOAD_PATH" ":" prefix (,path)) `("GUILE_LOAD_PATH" ":" prefix (,path))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))) `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
`("GUIX_LOCPATH" ":" suffix (,locpath)))
#t)))))) #t))))))
(native-inputs `(("pkg-config" ,pkg-config) (native-inputs `(("pkg-config" ,pkg-config)
@ -283,7 +287,9 @@ (define (intern tarball)
,@(if (and (not (%current-target-system)) ,@(if (and (not (%current-target-system))
(string=? (%current-system) "x86_64-linux")) (string=? (%current-system) "x86_64-linux"))
`(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux"))) `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
'()))) '())
("glibc-utf8-locales" ,glibc-utf8-locales)))
(propagated-inputs (propagated-inputs
`(("gnutls" ,gnutls) `(("gnutls" ,gnutls)
("guile-gcrypt" ,guile-gcrypt) ("guile-gcrypt" ,guile-gcrypt)