Subject: [bug#75980] [PATCH rust-team 014/106] gnu: rust-actix-http-1: Add cargo-development-inputs.

From: Herman Rimm <[email-masked]>
Date: Fri, 31 Jan 2025 22:09:35 +0100

* gnu/packages/crates-web.scm (rust-actix-http-1): Build without tests.
Add rust-actix-connect-1, rust-actix-server-1, rust-actix-tls-1,
rust-env-logger-0.6, rust-futures-0.3, rust-openssl-0.10,
rust-rustls-0.16, rust-serde-derive-1.
[source]: Use time instead of chrono.

Change-Id: I68208f7a2dd9c98f4198f182d1623c0c09f21fc4
---
 gnu/packages/crates-web.scm | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-web.scm b/gnu/packages/crates-web.scm
index 754f542619d..98a1669d923 100644
--- a/gnu/packages/crates-web.scm
+++ b/gnu/packages/crates-web.scm
@@ -560,11 +560,18 @@ (define-public rust-actix-http-1
        (uri (crate-uri "actix-http" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "06chrs9asbxmxzgiw5sw7ky97yrin9g88nmd6w407a6y9z668rn1"))))
-    ;; XXX: The crate fails to't build with with the same error as
-    ;; rust-actix-connect.  Skip build for now.
-    (arguments
-     `(#:skip-build? #true
+        (base32 "06chrs9asbxmxzgiw5sw7ky97yrin9g88nmd6w407a6y9z668rn1"))
+       (modules '((guix build utils)))
+       ;; Crate chrono stopped using the Duration struct of crate time.
+       ;; See: https://github.com/actix/actix-web/issues/3135
+       (snippet #~(substitute* '("src/cookie/builder.rs"
+                                 "src/cookie/jar.rs"
+                                 "src/cookie/mod.rs"
+                                 "src/cookie/parse.rs")
+                    (("use chrono::Duration") "use time::Duration")))))
+    (arguments
+     ;; Cargo fails to compile two different actix-http v1.0.1.
+     `(#:tests? #f
        #:cargo-inputs
        (("rust-actix-codec" ,rust-actix-codec-0.2)
         ("rust-actix-connect" ,rust-actix-connect-1)
@@ -608,7 +615,15 @@ (define-public rust-actix-http-1
         ("rust-slab" ,rust-slab-0.4)
         ("rust-time" ,rust-time-0.1))
        #:cargo-development-inputs
-       (("rust-actix-http-test" ,rust-actix-http-test-1))))))
+       (("rust-actix-connect" ,rust-actix-connect-1)
+        ("rust-actix-http-test" ,rust-actix-http-test-1)
+        ("rust-actix-server" ,rust-actix-server-1)
+        ("rust-actix-tls" ,rust-actix-tls-1)
+        ("rust-env-logger" ,rust-env-logger-0.6)
+        ("rust-futures" ,rust-futures-0.3)
+        ("rust-openssl" ,rust-openssl-0.10)
+        ("rust-rustls" ,rust-rustls-0.16)
+        ("rust-serde-derive" ,rust-serde-derive-1))))))
 
 (define-public rust-actix-http-0.2
   (package
-- 
2.47.1