guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: tzdata: Restore the test variant tzdata-for-tests.


From: Leo Famulari
Subject: 01/01: gnu: tzdata: Restore the test variant tzdata-for-tests.
Date: Tue, 20 Feb 2018 14:15:50 -0500 (EST)

lfam pushed a commit to branch staging
in repository guix.

commit eadcdc742207dccf29230fafe03634cad3af4707
Author: Leo Famulari <address@hidden>
Date:   Tue Feb 20 14:05:30 2018 -0500

    gnu: tzdata: Restore the test variant tzdata-for-tests.
    
    Commit 62868f124cf (gnu: tzdata: Preserve directory layout from before 
tzdata
    2018a) changed the derivation of this package, which doesn't need to change 
yet.
    
    * gnu/packages/base.scm (tzdata-for-tests)[arguments]: Copy the build
    arguments from before commit 62868f124cf9443a43f4ea5867da692e32e77c58.
---
 gnu/packages/base.scm | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 87a12e8..b6c6dab 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1164,6 +1164,45 @@ and daylight-saving rules.")
         (sha256
          (base32
           "02yrrfj0p7ar885ja41ylijzbr8wc6kz6kzlw8c670i9m693ym6n"))))
+    (arguments
+     '(#:tests? #f
+       #:make-flags (let ((out (assoc-ref %outputs "out"))
+                          (tmp (getenv "TMPDIR")))
+                      (list (string-append "TOPDIR=" out)
+                            (string-append "TZDIR=" out "/share/zoneinfo")
+
+                            ;; Discard zic, dump, and tzselect, already
+                            ;; provided by glibc.
+                            (string-append "ETCDIR=" tmp "/etc")
+
+                            ;; Likewise for the C library routines.
+                            (string-append "LIBDIR=" tmp "/lib")
+                            (string-append "MANDIR=" tmp "/man")
+
+                            "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)
+             (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
@@ -1173,7 +1212,6 @@ and daylight-saving rules.")
                            (base32
                             
"1dvrq0b2hz7cjqdyd7x21wpy4qcng3rvysr61ij0c2g64fyb9s41")))))))))
 
-
 (define-public libiconv
   (package
     (name "libiconv")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]