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'.
This commit is contained in:
parent
e8088f0b06
commit
181e0dddd6
|
@ -181,6 +181,15 @@ added to the pack."
|
||||||
(file-append (store-database (list profile))
|
(file-append (store-database (list profile))
|
||||||
"/db/db.sqlite")))
|
"/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
|
(define build
|
||||||
(with-imported-modules (source-module-closure
|
(with-imported-modules (source-module-closure
|
||||||
`((guix build utils)
|
`((guix build utils)
|
||||||
|
@ -226,6 +235,9 @@ added to the pack."
|
||||||
"cf" "/dev/null" "--files-from=/dev/null"
|
"cf" "/dev/null" "--files-from=/dev/null"
|
||||||
"--sort=name")))
|
"--sort=name")))
|
||||||
|
|
||||||
|
;; Make sure non-ASCII file names are properly handled.
|
||||||
|
#+set-utf8-locale
|
||||||
|
|
||||||
;; Add 'tar' to the search path.
|
;; Add 'tar' to the search path.
|
||||||
(setenv "PATH" #+(file-append archiver "/bin"))
|
(setenv "PATH" #+(file-append archiver "/bin"))
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,10 @@
|
||||||
(unless (network-reachable?) (test-skip 1))
|
(unless (network-reachable?) (test-skip 1))
|
||||||
(test-assertm "self-contained-tarball" %store
|
(test-assertm "self-contained-tarball" %store
|
||||||
(mlet* %store-monad
|
(mlet* %store-monad
|
||||||
((profile (profile-derivation (packages->manifest
|
((profile -> (profile
|
||||||
(list %bootstrap-guile))
|
(content (packages->manifest (list %bootstrap-guile)))
|
||||||
#:hooks '()
|
(hooks '())
|
||||||
#:locales? #f))
|
(locales? #f)))
|
||||||
(tarball (self-contained-tarball "pack" profile
|
(tarball (self-contained-tarball "pack" profile
|
||||||
#:symlinks '(("/bin/Guile"
|
#:symlinks '(("/bin/Guile"
|
||||||
-> "bin/guile"))
|
-> "bin/guile"))
|
||||||
|
|
Loading…
Reference in New Issue