diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-07-02 16:34:43 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-07-24 16:23:20 +0200 |
commit | 3bf9c3afc158464756769d555267f141fdd960a6 (patch) | |
tree | 4e368f56578a8623224f2bc508b81acbda24fe0c /gnu/packages | |
parent | c192751fe1d987dba4a8e66d68182b36e52ef895 (diff) | |
download | guix-3bf9c3afc158464756769d555267f141fdd960a6.tar guix-3bf9c3afc158464756769d555267f141fdd960a6.tar.gz |
gnu: tzdata: Remove input labels.
* gnu/packages/base.scm (tzdata)[arguments]: Turn flags and phases into
a gexp.
[inputs]: Turn into a plain list.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/base.scm | 148 |
1 files changed, 75 insertions, 73 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index f221e9484f..6d614ce5c3 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -58,6 +58,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) @@ -1270,71 +1271,72 @@ command.") "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr")))) (build-system gnu-build-system) (arguments - `(#: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. - (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\"'") - '()) - - "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")))))) + (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 + + #: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") + + ;; 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" + #$(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) @@ -1363,14 +1365,14 @@ and daylight-saving rules.") (base32 "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr")))) (inputs - `(("tzcode" ,(origin - (method url-fetch) - (uri (string-append - "https://data.iana.org/time-zones/releases/tzcode" - version ".tar.gz")) - (sha256 - (base32 - "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))))))) + (list (origin + (method url-fetch) + (uri (string-append + "https://data.iana.org/time-zones/releases/tzcode" + version ".tar.gz")) + (sha256 + (base32 + "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb")))))))) (define-public libiconv (package |