From 0447eafe43f06dc7073bef925ba9c9bf122406e9 Mon Sep 17 00:00:00 2001 From: Herman Rimm Date: Sun, 18 Feb 2024 22:02:59 +0100 Subject: [PATCH] gnu: Add rust-tower-http-0.5. * gnu/packages/crates-web.scm (rust-tower-http-0.5): Add variable. (rust-tower-http-0.4): Inherit from rust-tower-http-0.5. Change-Id: I03d03c7ce34b0fbd38c0bdef08b691a9ee4c8e81 Signed-off-by: Efraim Flashner --- gnu/packages/crates-web.scm | 73 +++++++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/gnu/packages/crates-web.scm b/gnu/packages/crates-web.scm index 65692183f8..d974579b25 100644 --- a/gnu/packages/crates-web.scm +++ b/gnu/packages/crates-web.scm @@ -4405,8 +4405,73 @@ on high performance, interoperability, and flexibility.") robust clients and servers.") (license license:expat))) +(define-public rust-tower-http-0.5 + (package + (name "rust-tower-http") + (version "0.5.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "tower-http" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0bmgfh1hr92blw7kv2636ykd0gf3h0aqdd89kvjk6b2fg8kr788d")) + (modules '((guix build utils))) + (snippet '(begin + ;; Remove disabled doctests with unresolved imports. + (substitute* "src/lib.rs" (("//!.*") "")) + (substitute* "src/classify/status_in_range_is_error.rs" + (("///.*") "")))))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-async-compression" ,rust-async-compression-0.4) + ("rust-base64" ,rust-base64-0.21) + ("rust-bitflags" ,rust-bitflags-2) + ("rust-bytes" ,rust-bytes-1) + ("rust-futures-core" ,rust-futures-core-0.3) + ("rust-futures-util" ,rust-futures-util-0.3) + ("rust-http" ,rust-http-1) + ("rust-http-body" ,rust-http-body-1) + ("rust-http-body-util" ,rust-http-body-util-0.1) + ("rust-http-range-header" ,rust-http-range-header-0.4) + ("rust-httpdate" ,rust-httpdate-1) + ("rust-iri-string" ,rust-iri-string-0.7) + ("rust-mime" ,rust-mime-0.3) + ("rust-mime-guess" ,rust-mime-guess-2) + ("rust-percent-encoding" ,rust-percent-encoding-2) + ("rust-pin-project-lite" ,rust-pin-project-lite-0.2) + ("rust-tokio" ,rust-tokio-1) + ("rust-tokio-util" ,rust-tokio-util-0.7) + ("rust-tower" ,rust-tower-0.4) + ("rust-tower-layer" ,rust-tower-layer-0.3) + ("rust-tower-service" ,rust-tower-service-0.3) + ("rust-tracing" ,rust-tracing-0.1) + ("rust-uuid" ,rust-uuid-1)) + #:cargo-development-inputs + (("rust-async-trait" ,rust-async-trait-0.1) + ("rust-brotli" ,rust-brotli-3) + ("rust-bytes" ,rust-bytes-1) + ("rust-flate2" ,rust-flate2-1) + ("rust-futures-util" ,rust-futures-util-0.3) + ("rust-hyper-util" ,rust-hyper-util-0.1) + ("rust-once-cell" ,rust-once-cell-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-sync-wrapper" ,rust-sync-wrapper-0.1) + ("rust-tokio" ,rust-tokio-1) + ("rust-tower" ,rust-tower-0.4) + ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3) + ("rust-uuid" ,rust-uuid-1) + ("rust-zstd" ,rust-zstd-0.12)))) + (home-page "https://github.com/tower-rs/tower-http") + (synopsis "Tower middleware and utilities for HTTP clients and servers") + (description + "This package provides Tower middleware and utilities for HTTP +clients and servers.") + (license license:expat))) + (define-public rust-tower-http-0.4 (package + (inherit rust-tower-http-0.5) (name "rust-tower-http") (version "0.4.4") (source @@ -4416,7 +4481,6 @@ robust clients and servers.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0h0i2flrw25zwxv72sifq4v5mwcb030spksy7r2a4xl2d4fvpib1")))) - (build-system cargo-build-system) (arguments `(#:cargo-test-flags (list "--release" ;; Not the doc tests. @@ -4455,12 +4519,7 @@ robust clients and servers.") ("rust-tower" ,rust-tower-0.4) ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3) ("rust-uuid" ,rust-uuid-1) - ("rust-zstd" ,rust-zstd-0.12)))) - (home-page "https://github.com/tower-rs/tower-http") - (synopsis "Tower middleware and utilities for HTTP clients and servers") - (description "This package provides the tower middleware and utilities for -HTTP clients and servers.") - (license license:expat))) + ("rust-zstd" ,rust-zstd-0.12)))))) (define-public rust-tower-layer-0.3 (package