;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu installer newt timezone) #:use-module (gnu installer steps) #:use-module (gnu installer timezone) #:use-module (gnu installer newt page) #:use-module (guix i18n) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:use-module (ice-9 receive) #:use-module (newt) #:export (run-timezone-page)) ;; Information textbox width. (define info-textbox-width (make-parameter 40)) (define (fill-timezones listbox timezones) "Fill the given LISTBOX with TIMEZONES. Return an association list correlating listbox keys with timezones." (map (lambda (timezone) (let ((key (append-entry-to-listbox listbox timezone))) (cons key timezone))) timezones)) (define (run-timezone-page zonetab) "Run a page displaying available timezones, grouped by regions. The user is invited to select a timezone. The selected timezone, under Posix format is returned." (define (all-but-last list) (reverse (cdr (reverse list)))) (define (run-page timezone-tree) (define (loop path) ;; XXX: Translation of time zones isn't perfect here because the ;; "iso_3166-1" domain contains translation for "territories" (like ;; "Antarctic") but not for continents (like "Africa"). (let ((timezones (locate-children timezone-tree path))) (run-listbox-selection-page #:title (G_ "Timezone") #:info-text (G_ "Please select a timezone.") #:listbox-items timezones #:listbox-item->text (cut gettext <> "iso_3166-1") #:button-text (if (null? path) (G_ "Exit") (G_ "Back")) #:button-callback-procedure (if (null? path) (lambda _ (raise (condition (&installer-step-abort)))) (lambda _ (loop (all-but-last path)))) #:listbox-callback-procedure (lambda (timezone) (let* ((timezone* (append path (list timezone))) (tz (timezone->posix-tz timezone*))) (if (timezone-has-child? timezone-tree timezone*) (loop timezone*) tz)))))) (loop '())) (let ((timezone-tree (zonetab->timezone-tree zonetab))) (run-page timezone-tree))) he dependencies needed for ‘make dist’ to ‘manifest.scm’. Removing this extra dependencies make it simpler to build the ‘guix’ package in particular on less-capable systems like i586-gnu. * gnu/packages/package-management.scm (guix)[native-inputs]: Remove IMAGEMAGICK and PERL. Use GRAPHVIZ-MINIMAL instead of GRAPHVIZ. * manifest.scm: Use the full-blown ‘graphviz’ package; add ‘imagemagick’ and ‘perl’. Reported-by: Janneke Nieuwenhuizen <janneke@gnu.org> Change-Id: Ia9d05c699e3cc2f9a9235a67f8ec840c26b66a82 Ludovic Courtès 2024-06-24manifest: Streamline; add packages useful for patch review/submission....* manifest.scm: Fix alternate command line invocation (which would not consider 'manifest.scm'). Use specifications instead of packages. Remove perl (now in the guix package's native inputs). Add b4, git, git:send-email, mumi, nss-certs, openssl and patman to the manifest. Change-Id: I49d92dda059856ce217cea9054a466a1754dcf94 Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer 2024-04-02maint: Add perl to the manifest....* manifest.scm: Add perl. Change-Id: Ie70cea1eb4d62f2a649292209391a92abdae2288 Janneke Nieuwenhuizen 2024-01-31maint: Add gnupg to the manifest....* manifest.scm: Add gnupg. Change-Id: Id5e90f87e5c3a07aa3e49afa97cc0b6d3ce71b41 Ludovic Courtès 2023-09-18maint: Support `guix shell' in Guix's git archive with manifest.scm....* manifest.scm: New file. * Makefile.am (EXTRA_DIST): Add it. * doc/contributing.texi (Building from Git): Mention using it. Janneke Nieuwenhuizen