diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-04-20 23:16:47 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-04-20 23:16:47 +0200 |
commit | 38f50f49f395fcda6ab3395ebaa312f8ee24d80d (patch) | |
tree | febc6db507116f0be5a1712750eb0e6b8deb2c7e /guix/scripts/substitute.scm | |
parent | f954c9b5da256009fc41483e8fccd9bee1504870 (diff) | |
download | gnu-guix-38f50f49f395fcda6ab3395ebaa312f8ee24d80d.tar gnu-guix-38f50f49f395fcda6ab3395ebaa312f8ee24d80d.tar.gz |
substitute: Install the client's locale.
* guix/store.scm (set-build-options): Add #:locale parameter and honor
it.
* guix/scripts/substitute.scm (guix-substitute): Install the client's
locale.
Diffstat (limited to 'guix/scripts/substitute.scm')
-rwxr-xr-x | guix/scripts/substitute.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index e0a694ad0f..fa1dd09df8 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -1000,6 +1000,13 @@ default value." (newline) (force-output (current-output-port)) + ;; Attempt to install the client's locale, mostly so that messages are + ;; suitably translated. + (match (or (find-daemon-option "untrusted-locale") + (find-daemon-option "locale")) + (#f #f) + (locale (false-if-exception (setlocale LC_ALL locale)))) + (with-networking (with-error-handling ; for signature errors (match args |