diff options
-rw-r--r-- | guix/packages.scm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 5b686a122f..b72a6ddc8e 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -335,7 +335,8 @@ corresponds to the arguments expected by `set-path-environment-variable'." ("bzip2" ,(ref '(gnu packages compression) 'bzip2)) ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) - ("patch" ,(ref '(gnu packages base) 'patch))))) + ("patch" ,(ref '(gnu packages base) 'patch)) + ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales))))) (define (default-guile) "Return the default Guile package used to run the build code of @@ -411,7 +412,8 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (srfi srfi-1) (guix build utils)) - (let ((out (assoc-ref %outputs "out")) + (let ((locales (assoc-ref %build-inputs "locales")) + (out (assoc-ref %outputs "out")) (xz (assoc-ref %build-inputs "xz")) (decomp (assoc-ref %build-inputs ,decompression-type)) (source (assoc-ref %build-inputs "source")) @@ -433,6 +435,12 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." (lambda (name) (not (member name '("." ".."))))))) + (when locales + ;; First of all, install a UTF-8 locale so that UTF-8 file names + ;; are correctly interpreted. During bootstrap, LOCALES is #f. + (setenv "LOCPATH" (string-append locales "/lib/locale")) + (setlocale LC_ALL "en_US.UTF-8")) + (setenv "PATH" (string-append xz "/bin" ":" decomp "/bin")) |