mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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:
parent
c192751fe1
commit
3bf9c3afc1
1 changed files with 72 additions and 70 deletions
|
@ -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,71 +1271,72 @@ (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!
|
|
||||||
;; (The binaries zic, dump, and tzselect are deleted in the post-install
|
|
||||||
;; phase.)
|
|
||||||
#:target #f
|
|
||||||
;; share/zoneinfo/posix is a symlink to share/zoneinfo,
|
|
||||||
;; so include the package itself in #:allowed-references.
|
|
||||||
#:allowed-references ("out")
|
|
||||||
#: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")
|
|
||||||
|
|
||||||
;; Likewise for the C library routines.
|
;; This consists purely of (architecture-independent) data, so
|
||||||
(string-append "LIBDIR=" tmp "/lib")
|
;; ‘cross-compilation’ is pointless here! (The binaries zic,
|
||||||
(string-append "MANDIR=" tmp "/man")
|
;; dump, and tzselect are deleted in the post-install phase.)
|
||||||
|
#:target #f
|
||||||
|
|
||||||
;; XXX: tzdata 2020b changed the on-disk format
|
#:make-flags
|
||||||
;; of the time zone files from 'fat' to 'slim'.
|
#~(let ((out #$output)
|
||||||
;; Many packages (particularly evolution-data-server)
|
(tmp (getenv "TMPDIR")))
|
||||||
;; can not yet handle the latter, so we stick with
|
(list (string-append "TOPDIR=" out)
|
||||||
;; 'fat' for now.
|
(string-append "TZDIR=" out "/share/zoneinfo")
|
||||||
,@(if (version>=? (package-version this-package)
|
(string-append "TZDEFAULT=" out
|
||||||
"2020b")
|
"/share/zoneinfo/localtime")
|
||||||
'("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
|
|
||||||
'())
|
|
||||||
|
|
||||||
"AWK=awk"
|
;; Likewise for the C library routines.
|
||||||
"CC=gcc"))
|
(string-append "LIBDIR=" tmp "/lib")
|
||||||
#:modules ((guix build utils)
|
(string-append "MANDIR=" tmp "/man")
|
||||||
(guix build gnu-build-system)
|
|
||||||
(srfi srfi-1))
|
;; XXX: tzdata 2020b changed the on-disk format
|
||||||
#:phases
|
;; of the time zone files from 'fat' to 'slim'.
|
||||||
(modify-phases %standard-phases
|
;; Many packages (particularly evolution-data-server)
|
||||||
(replace 'unpack
|
;; can not yet handle the latter, so we stick with
|
||||||
(lambda* (#:key source inputs #:allow-other-keys)
|
;; 'fat' for now.
|
||||||
(invoke "tar" "xvf" source)
|
#$@(if (version>=? (package-version this-package)
|
||||||
(invoke "tar" "xvf" (assoc-ref inputs "tzcode"))))
|
"2020b")
|
||||||
(add-after 'install 'post-install
|
'("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
'())
|
||||||
;; Move data in the right place.
|
|
||||||
(let ((out (assoc-ref outputs "out")))
|
"AWK=awk"
|
||||||
;; Discard zic, dump, and tzselect, already
|
"CC=gcc"))
|
||||||
;; provided by glibc.
|
#:modules '((guix build utils)
|
||||||
(delete-file-recursively (string-append out "/usr"))
|
(guix build gnu-build-system)
|
||||||
(symlink (string-append out "/share/zoneinfo")
|
(srfi srfi-1))
|
||||||
(string-append out "/share/zoneinfo/posix"))
|
#:phases
|
||||||
(delete-file-recursively
|
#~(modify-phases %standard-phases
|
||||||
(string-append out "/share/zoneinfo-posix"))
|
(replace 'unpack
|
||||||
(copy-recursively (string-append out "/share/zoneinfo-leaps")
|
(lambda* (#:key source inputs #:allow-other-keys)
|
||||||
(string-append out "/share/zoneinfo/right"))
|
(invoke "tar" "xvf" source)
|
||||||
(delete-file-recursively
|
(invoke "tar" "xvf"
|
||||||
(string-append out "/share/zoneinfo-leaps")))))
|
#$(match (package-inputs this-package)
|
||||||
(delete 'configure))))
|
(((_ tzcode)) tzcode)))))
|
||||||
(inputs `(("tzcode" ,(origin
|
(add-after 'install 'post-install
|
||||||
(method url-fetch)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(uri (string-append
|
;; Move data in the right place.
|
||||||
"https://data.iana.org/time-zones/releases/tzcode"
|
(let ((out (assoc-ref outputs "out")))
|
||||||
version ".tar.gz"))
|
;; Discard zic, dump, and tzselect, already
|
||||||
(sha256
|
;; provided by glibc.
|
||||||
(base32
|
(delete-file-recursively (string-append out "/usr"))
|
||||||
"1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))))
|
(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")
|
(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
|
||||||
|
|
Loading…
Reference in a new issue