gnu: tzdata: Use modify-phases

* gnu/packages/base.scm (tzdata)[arguments]: Replace alist- procedures
with modify-phases
master
John Darrington 2016-10-06 20:14:03 +02:00
parent 12b85b3787
commit c8f354588e
No known key found for this signature in database
GPG Key ID: 8A67719C2DE827B3
1 changed files with 18 additions and 17 deletions

View File

@ -950,23 +950,24 @@ command.")
(guix build gnu-build-system) (guix build gnu-build-system)
(srfi srfi-1)) (srfi srfi-1))
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'unpack (replace 'unpack
(lambda* (#:key source inputs #:allow-other-keys) (lambda* (#:key source inputs #:allow-other-keys)
(and (zero? (system* "tar" "xvf" source)) (and (zero? (system* "tar" "xvf" source))
(zero? (system* "tar" "xvf" (assoc-ref inputs "tzcode"))))) (zero? (system* "tar" "xvf" (assoc-ref inputs "tzcode"))))))
(alist-cons-after (add-after 'install 'post-install
'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. (let ((out (assoc-ref outputs "out")))
(let ((out (assoc-ref outputs "out"))) (symlink (string-append out "/share/zoneinfo")
(symlink (string-append out "/share/zoneinfo") (string-append out "/share/zoneinfo/posix"))
(string-append out "/share/zoneinfo/posix")) (delete-file-recursively
(delete-file-recursively (string-append out "/share/zoneinfo-posix")) (string-append out "/share/zoneinfo-posix"))
(copy-recursively (string-append out "/share/zoneinfo-leaps") (copy-recursively (string-append out "/share/zoneinfo-leaps")
(string-append out "/share/zoneinfo/right")) (string-append out "/share/zoneinfo/right"))
(delete-file-recursively (string-append out "/share/zoneinfo-leaps")))) (delete-file-recursively
(alist-delete 'configure %standard-phases))))) (string-append out "/share/zoneinfo-leaps")))))
(delete 'configure))))
(inputs `(("tzcode" ,(origin (inputs `(("tzcode" ,(origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append