unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 49597@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#49597] [PATCH core-updates 02/15] gnu: tzdata: Remove input labels.
Date: Fri, 16 Jul 2021 17:54:07 +0200	[thread overview]
Message-ID: <20210716155420.32447-2-ludo@gnu.org> (raw)
In-Reply-To: <20210716155420.32447-1-ludo@gnu.org>

* gnu/packages/base.scm (tzdata)[arguments]: Turn flags and phases into
a gexp.
[inputs]: Turn into a plain list.
---
 gnu/packages/base.scm | 128 ++++++++++++++++++++++--------------------
 1 file changed, 66 insertions(+), 62 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9c1c946e4a..d6e0e55678 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -57,6 +57,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (guix i18n)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -1253,63 +1254,66 @@ command.")
                "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:tests? #f
-       #:make-flags (let ((out (assoc-ref %outputs "out"))
-                          (tmp (getenv "TMPDIR")))
-                      (list (string-append "TOPDIR=" out)
-                            (string-append "TZDIR=" out "/share/zoneinfo")
-                            (string-append "TZDEFAULT=" out
-                                           "/share/zoneinfo/localtime")
+     (list #:tests? #f
+           #:make-flags
+           #~(let ((out #$output)
+                   (tmp (getenv "TMPDIR")))
+               (list (string-append "TOPDIR=" out)
+                     (string-append "TZDIR=" out "/share/zoneinfo")
+                     (string-append "TZDEFAULT=" out
+                                    "/share/zoneinfo/localtime")
 
-                            ;; Likewise for the C library routines.
-                            (string-append "LIBDIR=" tmp "/lib")
-                            (string-append "MANDIR=" tmp "/man")
+                     ;; Likewise for the C library routines.
+                     (string-append "LIBDIR=" tmp "/lib")
+                     (string-append "MANDIR=" tmp "/man")
 
-                            ;; XXX: tzdata 2020b changed the on-disk format
-                            ;; of the time zone files from 'fat' to 'slim'.
-                            ;; Many packages (particularly evolution-data-server)
-                            ;; can not yet handle the latter, so we stick with
-                            ;; 'fat' for now.
-                            ,@(if (version>=? (package-version this-package)
-                                              "2020b")
-                                  '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
-                                  '())
+                     ;; XXX: tzdata 2020b changed the on-disk format
+                     ;; of the time zone files from 'fat' to 'slim'.
+                     ;; Many packages (particularly evolution-data-server)
+                     ;; can not yet handle the latter, so we stick with
+                     ;; 'fat' for now.
+                     #$@(if (version>=? (package-version this-package)
+                                        "2020b")
+                            '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
+                            '())
 
-                            "AWK=awk"
-                            "CC=gcc"))
-       #:modules ((guix build utils)
-                  (guix build gnu-build-system)
-                  (srfi srfi-1))
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'unpack
-           (lambda* (#:key source inputs #:allow-other-keys)
-             (invoke "tar" "xvf" source)
-             (invoke "tar" "xvf" (assoc-ref inputs "tzcode"))))
-         (add-after 'install 'post-install
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; Move data in the right place.
-             (let ((out (assoc-ref outputs "out")))
-               ;; Discard zic, dump, and tzselect, already
-               ;; provided by glibc.
-               (delete-file-recursively (string-append out "/usr"))
-               (symlink (string-append out "/share/zoneinfo")
-                        (string-append out "/share/zoneinfo/posix"))
-               (delete-file-recursively
-                (string-append out "/share/zoneinfo-posix"))
-               (copy-recursively (string-append out "/share/zoneinfo-leaps")
-                                 (string-append out "/share/zoneinfo/right"))
-               (delete-file-recursively
-                (string-append out "/share/zoneinfo-leaps")))))
-         (delete 'configure))))
-    (inputs `(("tzcode" ,(origin
-                          (method url-fetch)
-                          (uri (string-append
-                                "https://data.iana.org/time-zones/releases/tzcode"
-                                version ".tar.gz"))
-                          (sha256
-                           (base32
-                            "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))))
+                     "AWK=awk"
+                     "CC=gcc"))
+           #:modules '((guix build utils)
+                       (guix build gnu-build-system)
+                       (srfi srfi-1))
+           #:phases
+           #~(modify-phases %standard-phases
+               (replace 'unpack
+                 (lambda* (#:key source inputs #:allow-other-keys)
+                   (invoke "tar" "xvf" source)
+                   (invoke "tar" "xvf"
+                           #$(match (package-inputs this-package)
+                               (((_ tzcode)) tzcode)))))
+               (add-after 'install 'post-install
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; Move data in the right place.
+                   (let ((out (assoc-ref outputs "out")))
+                     ;; Discard zic, dump, and tzselect, already
+                     ;; provided by glibc.
+                     (delete-file-recursively (string-append out "/usr"))
+                     (symlink (string-append out "/share/zoneinfo")
+                              (string-append out "/share/zoneinfo/posix"))
+                     (delete-file-recursively
+                      (string-append out "/share/zoneinfo-posix"))
+                     (copy-recursively (string-append out "/share/zoneinfo-leaps")
+                                       (string-append out "/share/zoneinfo/right"))
+                     (delete-file-recursively
+                      (string-append out "/share/zoneinfo-leaps")))))
+               (delete 'configure))))
+    (inputs (list (origin
+                    (method url-fetch)
+                    (uri (string-append
+                          "https://data.iana.org/time-zones/releases/tzcode"
+                          version ".tar.gz"))
+                    (sha256
+                     (base32
+                      "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb")))))
     (home-page "https://www.iana.org/time-zones")
     (synopsis "Database of current and historical time zones")
     (description "The Time Zone Database (often called tz or zoneinfo)
@@ -1338,14 +1342,14 @@ and daylight-saving rules.")
                 (base32
                  "1wxskk9mh1x2073n99qna2mq58mgi648mbq5dxlqfcrnvrbkk0cd"))))
      (inputs
-      `(("tzcode" ,(origin
-                     (method url-fetch)
-                     (uri (string-append
-                           "https://data.iana.org/time-zones/releases/tzcode"
-                           version ".tar.gz"))
-                     (sha256
-                      (base32
-                       "1mgsckixmmk9qxzsflfxnp3999qi3ls72bgksclk01g852x51w3c")))))))))
+      (list (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://data.iana.org/time-zones/releases/tzcode"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1mgsckixmmk9qxzsflfxnp3999qi3ls72bgksclk01g852x51w3c"))))))))
 
 (define-public libiconv
   (package
-- 
2.32.0





  reply	other threads:[~2021-07-16 15:55 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 15:50 [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Ludovic Courtès
2021-07-16 15:54 ` [bug#49597] [PATCH core-updates 01/15] gnu: commencement: Use gexps and 'local-file' to refer to patches Ludovic Courtès
2021-07-16 15:54   ` Ludovic Courtès [this message]
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 03/15] gnu: Simplify "Xvbf" invocation in pre-check phases Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 04/15] gnu: Use 'search-input-directory' when looking for tzdata Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 05/15] gnu: Use 'search-input-directory' for the SDL header directory Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 06/15] gnu: Use 'search-input-directory' for the OpenEXR " Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 07/15] gnu: Use 'search-input-file' when searching for Automake files Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 08/15] gnu: Use 'search-input-directory' for the Eigen header directory Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 09/15] gnu: Use 'search-input-directory' for glibc locale data Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 10/15] gnu: Use 'search-input-directory' when looking for C/C++ library headers Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 11/15] gnu: Use 'search-input-file' when looking for *.so and *.a Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 12/15] gnu: Use 'search-input-file' when looking for executables Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 13/15] gnu: mozjs: Use 'which' where appropriate Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 14/15] gnu: Use 'search-input-file' when looking for .jar files Ludovic Courtès
2021-07-18 15:56     ` Maxime Devos
2021-07-19 14:52       ` [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Ludovic Courtès
2021-07-16 15:54   ` [bug#49597] [PATCH core-updates 15/15] gnu: Use 'search-input-directory' and 'search-input-file' where appropriate Ludovic Courtès
2021-07-17 15:06 ` [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Mathieu Othacehe
2021-07-18 15:44 ` Maxime Devos
2021-07-19 14:50   ` Ludovic Courtès
2021-07-19 16:47     ` Maxime Devos
2021-07-20 21:14       ` Ludovic Courtès
2021-07-24 14:29 ` bug#49597: " Ludovic Courtès
2021-07-25  9:54   ` [bug#49597] " Mathieu Othacehe
2021-07-25 15:13     ` Maxime Devos
2021-07-25 17:17       ` Mathieu Othacehe
2021-07-25 17:05     ` Ludovic Courtès
2021-07-25 17:18       ` Mathieu Othacehe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210716155420.32447-2-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=49597@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).