gnu: tzdata: Update to 2020a.
[jackhill/guix/guix.git] / gnu / packages / base.scm
index ebaa93f..715c454 100644 (file)
@@ -14,6 +14,7 @@
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -353,10 +354,11 @@ used to apply commands with arbitrarily long arguments.")
                      #t)))))
    (synopsis "Core GNU utilities (file, text, shell)")
    (description
-    "GNU Coreutils includes all of the basic command-line tools that are
-expected in a POSIX system.  These provide the basic file, shell and text
-manipulation functions of the GNU system.  Most of these tools offer extended
-functionality beyond that which is outlined in the POSIX standard.")
+    "GNU Coreutils package includes all of the basic command-line tools that
+are expected in a POSIX system, excluding shell.  This package is the union of
+the GNU fileutils, sh-utils, and textutils packages.  Most of these tools
+offer extended functionality beyond that which is outlined in the POSIX
+standard.")
    (license gpl3+)
    (home-page "https://www.gnu.org/software/coreutils/")))
 
@@ -981,18 +983,23 @@ with the Linux kernel.")
             (substitute-keyword-arguments
              (ensure-keyword-arguments (package-arguments base-gcc)
                                        '(#:implicit-inputs? #f))
-             ((#:make-flags flags)
-              `(let ((libc (assoc-ref %build-inputs "libc")))
-                 ;; FLAGS_FOR_TARGET are needed for the target libraries to receive
-                 ;; the -Bxxx for the startfiles.
-                 (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
-                       ,flags)))))
+             ((#:phases phases)
+              `(modify-phases ,phases
+                 (add-before 'configure 'treat-glibc-as-system-header
+                   (lambda _
+                     (let ((libc (assoc-ref %build-inputs "libc")))
+                       ;; GCCs build processes requires that the libc
+                       ;; we're building against is on the system header
+                       ;; search path.
+                       (for-each (lambda (var)
+                                   (setenv var (string-append libc "/include")))
+                                 '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
+                       #t)))))))
            (native-inputs
-            `(("libc" ,libc)
-              ("libc:static" ,libc "static")
-              ,@(append (package-inputs base-gcc)
-                        (fold alist-delete (%final-inputs) '("libc" "libc:static")))))
-           (inputs '())))
+            `(,@(package-native-inputs base-gcc)
+              ,@(append (fold alist-delete (%final-inputs) '("libc" "libc:static")))
+              ("libc" ,libc)
+              ("libc:static" ,libc "static")))))
 
 (define-public (make-glibc-locales glibc)
   (package
@@ -1126,12 +1133,19 @@ test environments.")
 (define-public glibc-utf8-locales
   (make-glibc-utf8-locales glibc))
 
-(define-public glibc-locales-2.27
-  (package (inherit (make-glibc-locales glibc-2.27))
-           (name "glibc-locales-2.27")))
+;; Packages provided to ease use of binaries linked against the previous libc.
+(define-public glibc-locales-2.28
+  (package (inherit (make-glibc-locales glibc-2.28))
+           (name "glibc-locales-2.28")))
+(define-public glibc-utf8-locales-2.28
+  (package (inherit (make-glibc-utf8-locales glibc-2.28))
+           (name "glibc-utf8-locales-2.28")))
+
+;; These should no longer be needed.
 (define-public glibc-utf8-locales-2.27
-  (package (inherit (make-glibc-utf8-locales glibc-2.27))
-           (name "glibc-utf8-locales-2.27")))
+  (deprecated-package "glibc-utf8-locales-2.27" glibc-utf8-locales-2.28))
+(define-public glibc-locales-2.27
+  (deprecated-package "glibc-locales-2.27" glibc-locales-2.28))
 
 (define-public which
   (package
@@ -1184,7 +1198,7 @@ command.")
 (define-public tzdata
   (package
     (name "tzdata")
-    (version "2019b")
+    (version "2020a")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -1192,7 +1206,7 @@ command.")
                    version ".tar.gz"))
              (sha256
               (base32
-               "0r0clnlslwm15m1c61dinf1fi9ffgl6aipng7i7yryfwj0n0kn85"))))
+               "18lrp0zh8m931jjlrv8lvjas4ka5dfkzdbwnbw5lwd2dlbn62wal"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f
@@ -1242,7 +1256,7 @@ command.")
                                 version ".tar.gz"))
                           (sha256
                            (base32
-                            "0vbmswvv3li25s31shyllq5v24449lxnrki9hr043nipjd09sirf"))))))
+                            "0sfnlqw1p93r7klny69rwr94fh22mz632h52phgzfgg01q9gfakx"))))))
     (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)
@@ -1260,7 +1274,25 @@ and daylight-saving rules.")
 (define-public tzdata-for-tests
   (hidden-package
    (package
-     (inherit tzdata))))
+     (inherit tzdata)
+     (version "2019b")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append
+                     "https://data.iana.org/time-zones/releases/tzdata"
+                     version ".tar.gz"))
+               (sha256
+                (base32
+                 "0r0clnlslwm15m1c61dinf1fi9ffgl6aipng7i7yryfwj0n0kn85"))))
+     (inputs
+      `(("tzcode" ,(origin
+                     (method url-fetch)
+                     (uri (string-append
+                           "https://data.iana.org/time-zones/releases/tzcode"
+                           version ".tar.gz"))
+                     (sha256
+                      (base32
+                       "0vbmswvv3li25s31shyllq5v24449lxnrki9hr043nipjd09sirf")))))))))
 
 (define-public libiconv
   (package