gnu: tzdata: Remove input labels.

* gnu/packages/base.scm (tzdata)[arguments]: Turn flags and phases into
a gexp.
[inputs]: Turn into a plain list.
This commit is contained in:
Ludovic Courtès 2021-07-02 16:34:43 +02:00
parent c192751fe1
commit 3bf9c3afc1
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -58,6 +58,7 @@ (define-module (gnu packages base)
#:use-module (gnu packages gettext) #:use-module (gnu packages gettext)
#:use-module (guix i18n) #:use-module (guix i18n)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
@ -1270,16 +1271,15 @@ (define-public tzdata
"022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr")))) "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f (list #:tests? #f
;; This consists purely of (architecture-independent) data,
;; so cross-compilation is pointless here! ;; This consists purely of (architecture-independent) data, so
;; (The binaries zic, dump, and tzselect are deleted in the post-install ;; cross-compilation is pointless here! (The binaries zic,
;; phase.) ;; dump, and tzselect are deleted in the post-install phase.)
#:target #f #:target #f
;; share/zoneinfo/posix is a symlink to share/zoneinfo,
;; so include the package itself in #:allowed-references. #:make-flags
#:allowed-references ("out") #~(let ((out #$output)
#:make-flags (let ((out (assoc-ref %outputs "out"))
(tmp (getenv "TMPDIR"))) (tmp (getenv "TMPDIR")))
(list (string-append "TOPDIR=" out) (list (string-append "TOPDIR=" out)
(string-append "TZDIR=" out "/share/zoneinfo") (string-append "TZDIR=" out "/share/zoneinfo")
@ -1295,22 +1295,24 @@ (define-public tzdata
;; Many packages (particularly evolution-data-server) ;; Many packages (particularly evolution-data-server)
;; can not yet handle the latter, so we stick with ;; can not yet handle the latter, so we stick with
;; 'fat' for now. ;; 'fat' for now.
,@(if (version>=? (package-version this-package) #$@(if (version>=? (package-version this-package)
"2020b") "2020b")
'("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'") '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
'()) '())
"AWK=awk" "AWK=awk"
"CC=gcc")) "CC=gcc"))
#:modules ((guix build utils) #:modules '((guix build utils)
(guix build gnu-build-system) (guix build gnu-build-system)
(srfi srfi-1)) (srfi srfi-1))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(replace 'unpack (replace 'unpack
(lambda* (#:key source inputs #:allow-other-keys) (lambda* (#:key source inputs #:allow-other-keys)
(invoke "tar" "xvf" source) (invoke "tar" "xvf" source)
(invoke "tar" "xvf" (assoc-ref inputs "tzcode")))) (invoke "tar" "xvf"
#$(match (package-inputs this-package)
(((_ tzcode)) tzcode)))))
(add-after 'install 'post-install (add-after 'install 'post-install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Move data in the right place. ;; Move data in the right place.
@ -1327,14 +1329,14 @@ (define-public tzdata
(delete-file-recursively (delete-file-recursively
(string-append out "/share/zoneinfo-leaps"))))) (string-append out "/share/zoneinfo-leaps")))))
(delete 'configure)))) (delete 'configure))))
(inputs `(("tzcode" ,(origin (inputs (list (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://data.iana.org/time-zones/releases/tzcode" "https://data.iana.org/time-zones/releases/tzcode"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb")))))) "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb")))))
(home-page "https://www.iana.org/time-zones") (home-page "https://www.iana.org/time-zones")
(synopsis "Database of current and historical time zones") (synopsis "Database of current and historical time zones")
(description "The Time Zone Database (often called tz or zoneinfo) (description "The Time Zone Database (often called tz or zoneinfo)
@ -1363,14 +1365,14 @@ (define-public tzdata-for-tests
(base32 (base32
"022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr")))) "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
(inputs (inputs
`(("tzcode" ,(origin (list (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://data.iana.org/time-zones/releases/tzcode" "https://data.iana.org/time-zones/releases/tzcode"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))))))) "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))))))
(define-public libiconv (define-public libiconv
(package (package