guix-commits
[Top][All Lists]
Advanced

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

03/04: ui: Hint at the installation of locale packages and 'GUIX_LOCPATH


From: Ludovic Courtès
Subject: 03/04: ui: Hint at the installation of locale packages and 'GUIX_LOCPATH'.
Date: Wed, 27 Jun 2018 10:59:33 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 26db747a863b08ebcfd630cce635be86c23d829d
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jun 27 15:36:03 2018 +0200

    ui: Hint at the installation of locale packages and 'GUIX_LOCPATH'.
    
    * guix/ui.scm (install-locale): Hide the "warning: failed to install
    locale" on Guile 2.2.  Add a hint about 'glibc-utf8-locales' and
    'GUIX_LOCPATH'.
---
 guix/ui.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 31830ee..ec70945 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -421,8 +421,21 @@ report them in a user-friendly way."
     (lambda _
       (setlocale LC_ALL ""))
     (lambda args
-      (warning (G_ "failed to install locale: ~a~%")
-               (strerror (system-error-errno args))))))
+      (cond-expand
+        ;; Guile 2.2 already emits a warning, so let's not add a second one.
+        (guile-2.2 #t)
+        (else (warning (G_ "failed to install locale: ~a~%")
+                       (strerror (system-error-errno args)))))
+      (display-hint (G_ "Consider installing the @code{glibc-utf8-locales} or
address@hidden package and defining @code{GUIX_LOCPATH}, along these
+lines:
+
address@hidden
+guix package -i glibc-utf8-locales
+export GUIX_LOCPATH=\"$HOME/.guix-profile/lib/locale\"
address@hidden example
+
+See the \"Application Setup\" section in the manual, for more info.\n")))))
 
 (define (initialize-guix)
   "Perform the usual initialization for stand-alone Guix commands."



reply via email to

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