guix-commits
[Top][All Lists]
Advanced

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

02/12: gnu: Add iso-codes variant for use within Guix.


From: guix-commits
Subject: 02/12: gnu: Add iso-codes variant for use within Guix.
Date: Sat, 4 Jun 2022 14:31:15 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 48e66b01d6c0e330dc96a6a480d97006c064187b
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun May 29 02:00:00 2022 +0200

    gnu: Add iso-codes variant for use within Guix.
    
    * gnu/packages/iso-codes.scm (iso-codes):
    Replace with hidden-package that inherits…
    (iso-codes/official): …this ‘new’ variable with its previous value.
    * gnu/packages/gtk.scm (gtk+)[inputs]:
    Use iso-codes/official to prevent mass rebuilds.
---
 gnu/packages/gtk.scm       |  2 +-
 gnu/packages/iso-codes.scm | 25 +++++++++++++++++++++++--
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 64bac20f3d..3bf986403a 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -990,7 +990,7 @@ application suites.")
            cups
            graphene
            harfbuzz
-           iso-codes
+           iso-codes/official ;XXX TODO core-updates: use iso-codes
            json-glib-minimal
            libxml2
            rest))
diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm
index c34911fe9b..f8775c5eaa 100644
--- a/gnu/packages/iso-codes.scm
+++ b/gnu/packages/iso-codes.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +29,9 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python))
 
-(define-public iso-codes
+(define-public iso-codes/official
+  ;; This package variant is intended for ‘external’ use, such as users running
+  ;; ‘guix install’, where any deviation from ISO gospel might be harmful.
   (package
     (name "iso-codes")
     (version "4.5.0")
@@ -77,6 +79,25 @@ changes in the ISO standard and will not work with outdated
 information.")
     (license license:gpl2+)))           ; some bits use the lgpl2
 
+(define-public iso-codes
+  ;; This package should be used universally within Guix, e.g., as an input to
+  ;; other Guix packages or in the Guix System installer's country selector.
+  (hidden-package
+   (package
+     (inherit iso-codes/official)
+     (source
+      (origin
+        (inherit (package-source iso-codes/official))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin
+            (substitute* (find-files "." "\\.po$")
+              (("#.*Name for TWN,.*") "")
+              (("^msgid \"Taiwan, .*") "# Guix doesn't use "))
+            (substitute* "data/iso_3166-1.json"
+              (("(Taiwan), [^\"]*" _ name) name))))))
+     (synopsis "Various ISO standards as used by GNU@tie{}Guix"))))
+
 (define-public python-iso639
   (package
     (name "python-iso639")



reply via email to

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