janneke pushed a commit to branch core-packages-team
in repository guix.
commit 0d0f6634d66494f141f2e88fdd0c2c68a74b1f52
Author: Janneke Nieuwenhuizen <[email protected]>
AuthorDate: Sun Jan 5 14:08:56 2025 +0100
Revert "gexp: Improve support of Unicode characters." -- avoind world
rebuild at this time.
Avoid a world rebuild just now.
This reverts commit 1d5863fca8ca1e465bc7979f7606f254aa054c22.
Change-Id: I117f9428a36055dcafcbc081b13f4c835b922503
---
doc/guix.texi | 11 ++++-------
guix/gexp.scm | 24 ++++++------------------
2 files changed, 10 insertions(+), 25 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 5fbdd0eac6..924f13f0f6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -12414,9 +12414,7 @@ Return an object representing a text file called
@var{name} with the given
This is the declarative counterpart of @code{text-file}.
@end deffn
-@deffn {Procedure} computed-file @var{name} @var{gexp} @
- [#:local-build? #t] [#:guile] @
- [#:options '(#:env-vars (("LANG" . "C.UTF-8")))]
+@deffn {Procedure} computed-file name gexp [#:local-build? #t] [#:options '()]
Return an object representing the store item @var{name}, a file or
directory computed by @var{gexp}. When @var{local-build?} is true (the
default), the derivation is built locally. @var{options} is a list of
@@ -12427,7 +12425,7 @@ This is the declarative counterpart of
@code{gexp->derivation}.
@deffn {Monadic Procedure} gexp->script @var{name} @var{exp} @
[#:guile (default-guile)] [#:module-path %load-path] @
- [#:system (%current-system)] [#:target 'current] [#:locale "C.UTF-8"]
+ [#:system (%current-system)] [#:target #f]
Return an executable script @var{name} that runs @var{exp} using
@var{guile}, with @var{exp}'s imported modules in its search path.
Look up @var{exp}'s modules in @var{module-path}.
@@ -12464,9 +12462,8 @@ This is the declarative counterpart of
@code{gexp->script}.
@deffn {Monadic Procedure} gexp->file @var{name} @var{exp} @
[#:set-load-path? #t] [#:module-path %load-path] @
- [#:splice? #f] [#:guile (default-guile)] @
- [#:system (%current-system)] [#:target 'current] @
- [#:locale "C.UTF-8"]
+ [#:splice? #f] @
+ [#:guile (default-guile)]
Return a derivation that builds a file @var{name} containing @var{exp}.
When @var{splice?} is true, @var{exp} is considered to be a list of
expressions that will be spliced in the resulting file.
diff --git a/guix/gexp.scm b/guix/gexp.scm
index c8aba91779..e44aea6420 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -597,10 +597,7 @@ This is the declarative counterpart of 'text-file'."
(options computed-file-options)) ;list of arguments
(define* (computed-file name gexp
- #:key
- guile
- (local-build? #t)
- (options '(#:env-vars (("LANG" . "C.UTF-8")))))
+ #:key guile (local-build? #t) (options '()))
"Return an object representing the store item NAME, a file or directory
computed by GEXP. When LOCAL-BUILD? is #t (the default), it ensures the
corresponding derivation is built locally. OPTIONS may be used to pass
@@ -1703,9 +1700,6 @@ TARGET, a GNU triplet."
(system base target)
(system base compile))
- ;; Best effort. The locale is not installed in all contexts.
- (false-if-exception (setlocale LC_ALL "C.UTF-8"))
-
(define modules
(getenv "modules"))
@@ -1996,8 +1990,7 @@ particularly useful if SEXP is a long list or a deep
tree."
#:key (guile (default-guile))
(module-path %load-path)
(system (%current-system))
- (target 'current)
- (locale "C.UTF-8"))
+ (target 'current))
"Return an executable script NAME that runs EXP using GUILE, with EXP's
imported modules in its search path. Look up EXP's modules in MODULE-PATH."
(mlet* %store-monad ((target (if (eq? target 'current)
@@ -2040,8 +2033,7 @@ imported modules in its search path. Look up EXP's
modules in MODULE-PATH."
;; These derivations are not worth offloading or
;; substituting.
#:local-build? #t
- #:substitutable? #f
- #:env-vars `(("LANG" . ,locale)))))
+ #:substitutable? #f)))
(define* (gexp->file name exp #:key
(guile (default-guile))
@@ -2049,8 +2041,7 @@ imported modules in its search path. Look up EXP's
modules in MODULE-PATH."
(module-path %load-path)
(splice? #f)
(system (%current-system))
- (target 'current)
- (locale "C.UTF-8"))
+ (target 'current))
"Return a derivation that builds a file NAME containing EXP. When SPLICE?
is true, EXP is considered to be a list of expressions that will be spliced in
the resulting file.
@@ -2090,8 +2081,7 @@ Lookup EXP's modules in MODULE-PATH."
#:local-build? #t
#:substitutable? #f
#:system system
- #:target target
- #:env-vars `(("LANG" . ,locale)))
+ #:target target)
(gexp->derivation name
(gexp
(call-with-output-file (ungexp output)
@@ -2108,8 +2098,7 @@ Lookup EXP's modules in MODULE-PATH."
#:local-build? #t
#:substitutable? #f
#:system system
- #:target target
- #:env-vars `(("LANG" . ,locale))))))
+ #:target target))))
(define* (text-file* name #:rest text)
"Return as a monadic value a derivation that builds a text file containing
@@ -2119,7 +2108,6 @@ resulting store file holds references to all these."
(define builder
(gexp (call-with-output-file (ungexp output "out")
(lambda (port)
- (set-port-encoding! port "UTF-8")
(display (string-append (ungexp-splicing text)) port)))))
(gexp->derivation name builder