Subject: [PATCH 08/49] gnu: Replace rust-chrono-tz-0.6 with rust-chrono-tz-0.8.

From: Herman Rimm <[email-masked]>
Date: Tue, 30 Jan 2024 16:24:51 +0100

* gnu/packages/crates-io.scm (rust-chrono-tz-0.8): Add variable.
(rust-chrono-tz-0.6): Delete variable.
(rust-chrono-tz-0.5): Inherit from rust-chrono-tz-0.8.
(rust-tera-1): Use rust-chrono-tz-0.8 and substitute version.
(rust-arrow2-0.7): Use rust-chrono-tz-0.8 and substitute version.

Change-Id: I2b21e216469e5a192f38bda5fcaa25a8c2268741
---
 gnu/packages/crates-io.scm | 51 ++++++++++++++++++++++----------------
 1 file changed, 30 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 8dc83e46a1..70af71362f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2584,7 +2584,7 @@ (define-public rust-arrow2-0.7
         ("rust-avro-rs" ,rust-avro-rs-0.13)
         ("rust-base64" ,rust-base64-0.13)
         ("rust-chrono" ,rust-chrono-0.4)
-        ("rust-chrono-tz" ,rust-chrono-tz-0.6)
+        ("rust-chrono-tz" ,rust-chrono-tz-0.8)
         ("rust-comfy-table" ,rust-comfy-table-4)
         ("rust-csv" ,rust-csv-1)
         ("rust-futures" ,rust-futures-0.3)
@@ -2608,7 +2608,14 @@ (define-public rust-arrow2-0.7
         ("rust-simdutf8" ,rust-simdutf8-0.1)
         ("rust-streaming-iterator" ,rust-streaming-iterator-0.1)
         ("rust-strength-reduce" ,rust-strength-reduce-0.2)
-        ("rust-zstd" ,rust-zstd-0.9))))
+        ("rust-zstd" ,rust-zstd-0.9))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-chrono-tz-version
+           (lambda* _
+             (substitute* "Cargo.toml"
+               (("chrono-tz = \\{ version = \"0.6\"")
+                "chrono-tz = { version = \"0.8\"")))))))
     (home-page "https://github.com/jorgecarleitao/arrow2")
     (synopsis "Unofficial implementation of Apache Arrow spec in safe Rust")
     (description
@@ -10054,33 +10061,29 @@ (define-public rust-chrono-humanize-0.2
 Python @code{arrow.humanize}.")
     (license (list license:expat license:asl2.0))))
 
-(define-public rust-chrono-tz-0.6
+(define-public rust-chrono-tz-0.8
   (package
     (name "rust-chrono-tz")
-    (version "0.6.3")
+    (version "0.8.5")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "chrono-tz" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "1pmv434fhw9pwiqc12pvgaiskrq4v1dh1f238gfsg48r301r5hr9"))))
+        (base32 "1dv0yqhr60wrhm4sdlralqw1jf5plcxc91q6v93hvamzk6gbgmwi"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:cargo-test-flags
-       (list "--release" "--"
-             "--skip=tests::second_offsets")
-       #:cargo-inputs
-       (("rust-chrono" ,rust-chrono-0.4)
-        ("rust-chrono-tz-build" ,rust-chrono-tz-build-0.0.3)
-        ("rust-phf" ,rust-phf-0.11)
-        ("rust-serde" ,rust-serde-1)
-        ("rust-uncased" ,rust-uncased-0.9))
-       #:cargo-development-inputs
-       (("rust-chrono" ,rust-chrono-0.4)
-        ("rust-serde-test" ,rust-serde-test-1))))
+     `(#:cargo-inputs (("rust-arbitrary" ,rust-arbitrary-1)
+                       ("rust-chrono" ,rust-chrono-0.4)
+                       ("rust-chrono-tz-build" ,rust-chrono-tz-build-0.2)
+                       ("rust-phf" ,rust-phf-0.11)
+                       ("rust-serde" ,rust-serde-1)
+                       ("rust-uncased" ,rust-uncased-0.9))
+       #:cargo-development-inputs (("rust-chrono" ,rust-chrono-0.4)
+                                   ("rust-serde-test" ,rust-serde-test-1))))
     (home-page "https://github.com/chronotope/chrono-tz")
-    (synopsis "TimeZone implementations for rust-chrono from the IANA database")
+    (synopsis "TimeZone implementations for chrono from the IANA database")
     (description
      "Chrono-TZ is a library that provides implementors of the TimeZone trait
 for @code{rust-chrono}.")
@@ -10088,7 +10091,7 @@ (define-public rust-chrono-tz-0.6
 
 (define-public rust-chrono-tz-0.5
   (package
-    (inherit rust-chrono-tz-0.6)
+    (inherit rust-chrono-tz-0.8)
     (name "rust-chrono-tz")
     (version "0.5.3")
     (source
@@ -66539,7 +66542,7 @@ (define-public rust-tera-1
              "--skip=tera::tests::can_load_from_glob")
        #:cargo-inputs
        (("rust-chrono" ,rust-chrono-0.4)
-        ("rust-chrono-tz" ,rust-chrono-tz-0.6)
+        ("rust-chrono-tz" ,rust-chrono-tz-0.8)
         ("rust-globwalk" ,rust-globwalk-0.8)
         ("rust-humansize" ,rust-humansize-2)
         ("rust-lazy-static" ,rust-lazy-static-1)
@@ -66555,7 +66558,13 @@ (define-public rust-tera-1
        #:cargo-development-inputs
        (("rust-pretty-assertions" ,rust-pretty-assertions-1)
         ("rust-serde-derive" ,rust-serde-derive-1)
-        ("rust-tempfile" ,rust-tempfile-3))))
+        ("rust-tempfile" ,rust-tempfile-3))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-chrono-tz-version
+           (lambda* _
+             (substitute* "Cargo.toml"
+               (("0.6.1") "0.8")))))))
     (home-page "https://tera.netlify.com/")
     (synopsis "Template engine based on Jinja2/Django templates")
     (description
-- 
2.41.0