guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 3d364f0e493258cb15f7fbd54cd1827b4c543fea
Author: terramorpha <[email protected]>
AuthorDate: Sun Jan 25 18:12:42 2026 -0500

    gnu: Add nx-tzdb.
    
    * gnu/packages/emulators.scm (nx-tzdb): New variable.
    
    Change-Id: I2908f71ce7291e91015fe0b7f82a676552eb3a97
    Signed-off-by: Liliana Marie Prikler <[email protected]>
---
 gnu/packages/emulators.scm | 48 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index ab10959dff..af5797542e 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2025 Anderson Torres <[email protected]>
 ;;; Copyright © 2025 Laura Kirsch <[email protected]>
 ;;; Copyright © 2026 Nikita Alkhovik <[email protected]>
+;;; Copyright © 2026 Justin Veilleux <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -124,13 +125,14 @@
   #:use-module (gnu packages tls)
   #:use-module (gnu packages toolkits)
   #:use-module (gnu packages upnp)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages vulkan)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages web)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system copy)
   #:use-module (guix build-system glib-or-gtk)
@@ -1863,6 +1865,50 @@ System (NES/Famicom) emulator Nestopia, with 
enhancements from members of the
 emulation community.  It provides highly accurate emulation.")
     (license license:gpl2+)))
 
+(define-public nx-tzdb
+  (package
+    (name "nx-tzdb")
+    (version "121125")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.crueter.xyz/misc/tzdb_to_nx";)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 
"0fqxvwdlqysgdb0vhb6jvk8mw0f2r6hc6hckw1bsw58z71s5248h"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      ;; No tests.
+      #:tests? #f
+      #:configure-flags
+      #~(list
+         ;; Use Guix's tzdata instead of building from the tz submodule.
+         (string-append "-DTZDB2NX_ZONEINFO_DIR="
+                        #$(this-package-native-input "tzdata")
+                        "/share/zoneinfo")
+         (string-append "-DTZDB2NX_VERSION=" #$version))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'build 'build-tzdb
+            (lambda _
+              ;; Build the x80e target which converts timezone data.
+              (invoke "make" "x80e")))
+          (replace 'install
+            (lambda _
+              (let ((nx-dir (string-append (getcwd) "/src/tzdb/nx")))
+                (copy-recursively nx-dir #$output)))))))
+    (native-inputs
+     (list git-minimal tzdata))
+    (synopsis "Nintendo Switch timezone database")
+    (description "This package provides timezone data in the format expected by
+Nintendo Switch emulators.  It converts standard IANA timezone data to the
+Nintendo Switch's proprietary format.")
+    (home-page "https://git.crueter.xyz/misc/tzdb_to_nx";)
+    ;; The converter is MIT licensed; the generated data is public domain.
+    (license (list license:expat license:public-domain))))
+
 (define (make-libretro-beetle-psx name hw)
   (let ((commit "80d3eba272cf6efab6b76e4dc44ea2834c6f910d")
        (revision "0"))

Reply via email to