summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-04-21 22:43:28 +0200
committerLudovic Courtès <ludo@gnu.org>2017-04-21 22:45:29 +0200
commit9231ef12f2a595b8f1e677dbe50cc499555302b6 (patch)
tree0b43e1e56e5e196c5d7592f67affb719e02fe451 /guix
parent0a3bed8819551c94fd715828f0522f55af836ea0 (diff)
downloadgnu-guix-9231ef12f2a595b8f1e677dbe50cc499555302b6.tar
gnu-guix-9231ef12f2a595b8f1e677dbe50cc499555302b6.tar.gz
derivations: Restore UTF-8 encoding of build scripts.
Reported by Mark H Weaver <mhw@netris.org> at <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00457.html>. * guix/derivations.scm (build-expression->derivation): Use a string output port for the expression. This reverts part of 2dce88d5bbe7a65e101c0734d1c6db44ecc8c299. * tests/derivations.scm ("build-expression->derivation and builder encoding"): New test.
Diffstat (limited to 'guix')
-rw-r--r--guix/derivations.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 410c41083e..d5e0f453e2 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1238,16 +1238,15 @@ ALLOWED-REFERENCES, DISALLOWED-REFERENCES, LOCAL-BUILD?, and SUBSTITUTABLE?."
;; Guile sets it, but remove it to avoid conflicts when
;; building Guile-using packages.
(unsetenv "LD_LIBRARY_PATH")))
- (builder (add-data-to-store store
+ (builder (add-text-to-store store
(string-append name "-guile-builder")
;; Explicitly use UTF-8 for determinism,
;; and also because UTF-8 output is faster.
(with-fluids ((%default-port-encoding
"UTF-8"))
- (call-with-values
- open-bytevector-output-port
- (lambda (port get-bv)
+ (call-with-output-string
+ (lambda (port)
(write prologue port)
(write
`(exit
@@ -1255,8 +1254,7 @@ ALLOWED-REFERENCES, DISALLOWED-REFERENCES, LOCAL-BUILD?, and SUBSTITUTABLE?."
((_ ...)
(remove module-form? exp))
(_ `(,exp))))
- port)
- (get-bv))))
+ port))))
;; The references don't really matter
;; since the builder is always used in