guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/07: services: mumi: Run in a UTF-8 locale.


From: guix-commits
Subject: 01/07: services: mumi: Run in a UTF-8 locale.
Date: Sun, 12 Jul 2020 19:03:23 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 060211853d3f18f9d582549fcfb803e9ec8d2837
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Jul 12 15:05:51 2020 +0200

    services: mumi: Run in a UTF-8 locale.
    
    * gnu/services/web.scm (mumi-shepherd-services)[environment]: New
    variable.
    Pass it as #:environment-variables to each 'make-forkexec-constructor'
    call.
---
 gnu/services/web.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 63d2324..3c5b4d2 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -37,6 +37,7 @@
   #:use-module (gnu system pam)
   #:use-module (gnu system shadow)
   #:use-module (gnu packages admin)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages web)
   #:use-module (gnu packages patchutils)
@@ -1720,6 +1721,11 @@ WSGIPassAuthorization On
          (shell (file-append shadow "/sbin/nologin")))))
 
 (define (mumi-shepherd-services config)
+  (define environment
+    #~(list "LC_ALL=en_US.utf8"
+            (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales
+                           "/lib/locale")))
+
   (match config
     (($ <mumi-configuration> mumi mailer? sender smtp)
      (list (shepherd-service
@@ -1729,6 +1735,7 @@ WSGIPassAuthorization On
             (start #~(make-forkexec-constructor
                       `(#$(file-append mumi "/bin/mumi") "web"
                         ,@(if #$mailer? '() '("--disable-mailer")))
+                      #:environment-variables #$environment
                       #:user "mumi" #:group "mumi"
                       #:log-file "/var/log/mumi.log"))
             (stop #~(make-kill-destructor)))
@@ -1738,6 +1745,7 @@ WSGIPassAuthorization On
             (requirement '(networking))
             (start #~(make-forkexec-constructor
                       '(#$(file-append mumi "/bin/mumi") "worker")
+                      #:environment-variables #$environment
                       #:user "mumi" #:group "mumi"
                       #:log-file "/var/log/mumi.worker.log"))
             (stop #~(make-kill-destructor)))
@@ -1753,6 +1761,7 @@ WSGIPassAuthorization On
                         ,@(if #$smtp
                               (list (string-append "--smtp=" #$smtp))
                               '()))
+                      #:environment-variables #$environment
                       #:user "mumi" #:group "mumi"
                       #:log-file "/var/log/mumi.mailer.log"))
             (stop #~(make-kill-destructor)))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]