[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/10: gnu: Add a 'update-mozilla-locales' helper for maintenance.
From: |
guix-commits |
Subject: |
01/10: gnu: Add a 'update-mozilla-locales' helper for maintenance. |
Date: |
Sun, 19 Feb 2023 20:04:36 -0500 (EST) |
apteryx pushed a commit to branch master
in repository guix.
commit f4a932cbd7a351b63c3bec9fa075e05d81848b5e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Fri Feb 10 13:40:40 2023 -0500
gnu: Add a 'update-mozilla-locales' helper for maintenance.
* gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure.
---
gnu/packages/gnuzilla.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index b2e0870fea..3f0dbf938e 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -37,6 +37,7 @@
(define-module (gnu packages gnuzilla)
#:use-module ((srfi srfi-1) #:hide (zip))
+ #:use-module (ice-9 format)
#:use-module (ice-9 match)
#:use-module (gnu packages)
#:use-module ((guix licenses) #:prefix license:)
@@ -91,7 +92,8 @@
#:use-module (gnu packages xiph)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages readline)
- #:use-module (gnu packages sqlite))
+ #:use-module (gnu packages sqlite)
+ #:autoload (json parser) (json->scm))
(define-public mozjs
(package
@@ -348,6 +350,10 @@ in C/C++.")
(inputs
(list icu4c readline zlib))))
+
+;;;
+;;; Localization helper procedures.
+;;;
(define mozilla-compare-locales
(origin
(method hg-fetch)
@@ -371,6 +377,18 @@ in C/C++.")
(list (mozilla-locale locale changeset hash-string)
...))
+(define (update-mozilla-locales changesets.json)
+ "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES
+variable defined below. It requires guile-json to be installed."
+ (match (call-with-input-file changesets.json json->scm)
+ (((lang ("revision" . revision) platforms pin) ...)
+ (let ((data (reverse (map (lambda (rev lang)
+ `(,(list->string (make-list 40 #\0))
+ ,(string-take rev 12) ,lang))
+ revision lang))))
+ (format #t "~{~s~%~}" data)
+ data))))
+
(define all-mozilla-locales
(mozilla-locales
;; sha256 changeset
locale
- branch master updated (636b771536 -> d318ccc363), guix-commits, 2023/02/19
- 09/10: gnu: icecat: Remove gtk+-2 input., guix-commits, 2023/02/19
- 08/10: gnu: icedove: Use the locale of the system., guix-commits, 2023/02/19
- 04/10: gnu: icecat-source: Update gnuzilla to f23f8b609., guix-commits, 2023/02/19
- 01/10: gnu: Add a 'update-mozilla-locales' helper for maintenance.,
guix-commits <=
- 05/10: gnu: Add icecat-l10n and icedove-l10n., guix-commits, 2023/02/19
- 06/10: gnu: icedove: Automatically load system-provided extensions., guix-commits, 2023/02/19
- 07/10: gnu: Add language packs to icecat and icedove., guix-commits, 2023/02/19
- 10/10: gnu: icecat: Unbundle nss and nspr., guix-commits, 2023/02/19
- 02/10: gnu: icedove: Compute a self-contained source., guix-commits, 2023/02/19
- 03/10: gnu: Define %icecat-base-version at the top level., guix-commits, 2023/02/19