From: John Darrington <jmd@gnu.org>
To: guix-devel@gnu.org
Cc: John Darrington <jmd@gnu.org>
Subject: [PATCH 2/2] gnu: tzdata: Use modify-phases
Date: Thu, 6 Oct 2016 20:18:07 +0200 [thread overview]
Message-ID: <1475777887-6628-2-git-send-email-jmd@gnu.org> (raw)
In-Reply-To: <1475777887-6628-1-git-send-email-jmd@gnu.org>
* gnu/packages/base.scm (tzdata)[arguments]: Replace alist- procedures
with modify-phases
---
gnu/packages/base.scm | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 52d8de3..0760c11 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -936,23 +936,24 @@ command.")
(guix build gnu-build-system)
(srfi srfi-1))
#:phases
- (alist-replace
- 'unpack
- (lambda* (#:key source inputs #:allow-other-keys)
- (and (zero? (system* "tar" "xvf" source))
- (zero? (system* "tar" "xvf" (assoc-ref inputs "tzcode")))))
- (alist-cons-after
- 'install 'post-install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move data in the right place.
- (let ((out (assoc-ref outputs "out")))
- (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"))))
- (alist-delete 'configure %standard-phases)))))
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source inputs #:allow-other-keys)
+ (and (zero? (system* "tar" "xvf" source))
+ (zero? (system* "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")))
+ (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
--
2.1.4
next prev parent reply other threads:[~2016-10-06 18:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 18:18 [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link John Darrington
2016-10-06 18:18 ` John Darrington [this message]
2016-10-06 19:36 ` [PATCH 2/2] gnu: tzdata: Use modify-phases Ludovic Courtès
2016-10-06 21:46 ` Leo Famulari
2016-10-06 19:36 ` [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link Ludovic Courtès
2016-10-06 20:40 ` Danny Milosavljevic
2016-10-07 19:53 ` Ludovic Courtès
2016-10-07 19:58 ` Danny Milosavljevic
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475777887-6628-2-git-send-email-jmd@gnu.org \
--to=jmd@gnu.org \
--cc=guix-devel@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.