summaryrefslogtreecommitdiff
path: root/guix/scripts/pack.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-07-20 16:11:24 +0200
committerLudovic Courtès <ludo@gnu.org>2020-07-20 23:25:09 +0200
commit181e0dddd68dc58190bd4831ea5d1ecbd420d83a (patch)
treeee825f687ebdb17cfb1484bedc8e138e99420361 /guix/scripts/pack.scm
parente8088f0b06c2193f2cce04a48aa1350229442a9f (diff)
downloadguix-patches-181e0dddd68dc58190bd4831ea5d1ecbd420d83a.tar
guix-patches-181e0dddd68dc58190bd4831ea5d1ecbd420d83a.tar.gz
pack: 'self-contained-tarball' runs derivation in a UTF-8local.
* guix/scripts/pack.scm (self-contained-tarball) [set-utf8-locale]: New variable. [build]: Use it. * tests/pack.scm ("self-contained-tarball"): Use a <profile> record instead of 'profile-derivation'.
Diffstat (limited to 'guix/scripts/pack.scm')
-rw-r--r--guix/scripts/pack.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 5bd405ade4..51afaeb379 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -181,6 +181,15 @@ added to the pack."
(file-append (store-database (list profile))
"/db/db.sqlite")))
+ (define set-utf8-locale
+ ;; Arrange to not depend on 'glibc-utf8-locales' when using '--bootstrap'.
+ (and (or (not (profile? profile))
+ (profile-locales? profile))
+ #~(begin
+ (setenv "GUIX_LOCPATH"
+ #+(file-append glibc-utf8-locales "/lib/locale"))
+ (setlocale LC_ALL "en_US.utf8"))))
+
(define build
(with-imported-modules (source-module-closure
`((guix build utils)
@@ -226,6 +235,9 @@ added to the pack."
"cf" "/dev/null" "--files-from=/dev/null"
"--sort=name")))
+ ;; Make sure non-ASCII file names are properly handled.
+ #+set-utf8-locale
+
;; Add 'tar' to the search path.
(setenv "PATH" #+(file-append archiver "/bin"))