efraim pushed a commit to branch rust-team
in repository guix.

commit 0436e88e55752c715f0ad20f2f60380c24c4fd24
Author: Herman Rimm <[email protected]>
AuthorDate: Fri Jan 31 22:09:35 2025 +0100

    gnu: rust-actix-http-1: Add cargo-development-inputs.
    
    * gnu/packages/crates-web.scm (rust-actix-http-1)[source]: Use time
    instead of chrono.
    [arguments]: Build the crate.  Don't run the tests.
    [cargo-development-inputs]: 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.
    
    Change-Id: I68208f7a2dd9c98f4198f182d1623c0c09f21fc4
    Signed-off-by: Efraim Flashner <[email protected]>
---
 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 35487d31c0..66fc6417f6 100644
--- a/gnu/packages/crates-web.scm
+++ b/gnu/packages/crates-web.scm
@@ -561,11 +561,18 @@
        (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)
@@ -609,7 +616,15 @@
         ("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

Reply via email to