Le Tue, 6 Apr 2021 14:11:03 -0400,
Leo Famulari <l...@famulari.name> a écrit :

> On Tue, Apr 06, 2021 at 03:59:20PM +0000, Luis Felipe wrote:
> > Hello,
> > 
> > I updated my local copy of guix-artwork repository today and now
> > running "haunt build" fails with this message:
> > 
> > ★★★★★★★★★★★★★★★★★★★★
> > Backtrace:
> > In ice-9/threads.scm:
> >     390:8 19 (_ _)
> > In ice-9/boot-9.scm:
> >   3223:13 18 (_)
> > In ice-9/threads.scm:
> >     390:8 17 (_ _)
> > In ice-9/boot-9.scm:
> >   3507:20 16 (_)
> >    2806:4 15 (save-module-excursion _)
> >   3527:26 14 (_)
> > In unknown file:
> >           13 (primitive-load-path "apps/base/data" #<procedure
> > 7fd2e…>) In ice-9/eval.scm:
> >    626:19 12 (_ #<directory (apps base data) 7fd2ec67e640>)
> >    173:55 11 (_ #<directory (apps base data) 7fd2ec67e640>)
> >    174:20 10 (_ #<directory (apps base data) 7fd2ec67e640>)
> >    177:32  9 (lp (#<procedure 7fd2eaff9b40 at ice-9/eval.scm:297:…>
> > …)) 159:9  8 (_ #(#<directory (apps base data) 7fd2ec67e640> (G_ …)
> > …)) 159:9  7 (_ #(#<directory (apps base data) 7fd2ec67e640> (G_ …)
> > …)) 159:9  6 (_ #(#<directory (apps base data) 7fd2ec67e640> (G_ …)
> > …)) 163:9  5 (_ #(#<directory (apps base data) 7fd2ec67e640> (G_ …)
> > …)) In srfi/srfi-1.scm:
> >    586:29  4 (map1 ("de_DE" "en_US" "eo" "es_ES" "fr_FR" "ko_KR" #
> > #)) 586:29  3 (map1 ("en_US" "eo" "es_ES" "fr_FR" "ko_KR" "ru_RU"
> > "…")) 586:17  2 (map1 ("eo" "es_ES" "fr_FR" "ko_KR" "ru_RU"
> > "zh_CN")) In ice-9/eval.scm:
> >     619:8  1 (_ #(#(#<directory (apps base data) 7fd2ec67e640> # …)
> > …)) In unknown file:
> >            0 (setlocale 6 "eo.utf8")
> > 
> > ERROR: In procedure setlocale:
> > In procedure setlocale: Argumento inválido
> > ★★★★★★★★★★★★★★★★★★★★  
> 
> This happens for me too.
> 

Attached is a patch to the manifest.scm that should fix the issue: it
ensures that you enter an environment where the locales corresponding
to po/LINGUAS are available. Can you check if it fixes your issues?

Thanks!
>From 432145b027b36cc0eedf28d89664a6646db9ebc6 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <jul...@lepiller.eu>
Date: Tue, 6 Apr 2021 22:16:43 +0200
Subject: [PATCH] website: Add locales in manifest.

* website/manifest.scm: Add locale definition for all our translations.
---
 website/manifest.scm | 53 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 40 insertions(+), 13 deletions(-)

diff --git a/website/manifest.scm b/website/manifest.scm
index eda382a..6248c87 100644
--- a/website/manifest.scm
+++ b/website/manifest.scm
@@ -1,6 +1,8 @@
 (use-modules (guix packages)
              ((gnu packages package-management) #:select (guix))
              ((gnu packages guile-xyz)          #:select (haunt))
+             (gnu system locale)
+             (ice-9 rdelim)
              (srfi srfi-1))
 
 (define the-good-guile
@@ -14,17 +16,42 @@
      `(("guile" ,the-good-guile)
        ,@(alist-delete "guile" (package-inputs haunt))))))
 
-(packages->manifest
- (append
-  ;; Guile needs to be compatible
-  (list
-   guix
-   the-good-guile
-   haunt-the-ghost)
+(define locales
+  (locale-directory
+    (call-with-input-file "po/LINGUAS"
+      (lambda (port)
+        (let loop ((line (read-line port))
+                   (locales '()))
+          (if (eof-object? line)
+              locales
+              (if (equal? (string-ref line 0) #\#)
+                  (loop (read-line port) locales)
+                  (loop (read-line port)
+                        (cons
+                          (locale-definition
+                            (name (string-append line ".utf8"))
+                            (source line))
+                          locales)))))))
+    #:libcs
+    (list glibc)))
 
-  ;; Other packages
-  (map specification->package
-       (list
-        "glibc-locales"
-        "git"
-        "guile-syntax-highlight"))))
+(manifest
+  (cons
+    (manifest-entry
+      (name "locales")
+      (version "0")
+      (item locales))
+    (manifest-entries
+      (packages->manifest
+       (append
+        ;; Guile needs to be compatible
+        (list
+         guix
+         the-good-guile
+         haunt-the-ghost)
+      
+        ;; Other packages
+        (map specification->package
+             (list
+              "git"
+              "guile-syntax-highlight")))))))
-- 
2.31.0

Reply via email to