summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-03-18 11:44:23 +0200
committerEfraim Flashner <efraim@flashner.co.il>2024-07-19 00:43:01 +0300
commite59d4a9d5d09d0f86cc65361f45f2d3544bdf876 (patch)
tree935caf088f4e530d9dc7d36bfa6230326a2f6b6f
parentca6f159feff430eea5752420daa2b31563edbc5c (diff)
downloadguix-e59d4a9d5d09d0f86cc65361f45f2d3544bdf876.tar.gz
gnu: Add rust-poem-1.
* gnu/packages/crates-web.scm (rust-poem-1): New variable.
* gnu/packages/patches/rust-poem-1-fewer-deps.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I7438bf627daef5d4bae39b51472cc91bfc9aa5a9
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/crates-web.scm90
-rw-r--r--gnu/packages/patches/rust-poem-1-fewer-deps.patch229
3 files changed, 320 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 15e0c3f1fa..761295e6ce 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2058,6 +2058,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rust-ndarray-0.13-remove-blas-src.patch	\
   %D%/packages/patches/rust-ndarray-0.14-remove-blas-src.patch	\
   %D%/packages/patches/rust-nettle-disable-vendor.patch		 \
+  %D%/packages/patches/rust-poem-1-fewer-deps.patch		\
   %D%/packages/patches/rust-rspec-1-remove-clippy.patch	\
   %D%/packages/patches/rust-trash-2-update-windows.patch	\
   %D%/packages/patches/rust-webbrowser-remove-unsupported-os.patch	\
diff --git a/gnu/packages/crates-web.scm b/gnu/packages/crates-web.scm
index 9e5895fc7e..ca13af85c7 100644
--- a/gnu/packages/crates-web.scm
+++ b/gnu/packages/crates-web.scm
@@ -4036,6 +4036,96 @@ applications written in Rust.  Its API is inspired by the popular
 and metrics over HTTP.")
     (license license:asl2.0)))
 
+(define-public rust-poem-1
+  (package
+    (name "rust-poem")
+    (version "1.3.59")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "poem" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0159agmjig6s45sjf1jcbira8icpbakfadwa23pc2i07gg4p8ish"))
+       (patches (search-patches "rust-poem-1-fewer-deps.patch"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t ; use of undeclared crate or module `futures_util`
+       #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1)
+                       ("rust-async-compression" ,rust-async-compression-0.4)
+                       ("rust-async-trait" ,rust-async-trait-0.1)
+                       ("rust-base64" ,rust-base64-0.21)
+                       ("rust-bytes" ,rust-bytes-1)
+                       ("rust-chrono" ,rust-chrono-0.4)
+                       ("rust-cookie" ,rust-cookie-0.17)
+                       ("rust-csrf" ,rust-csrf-0.4)
+                       ;("rust-eyre" ,rust-eyre-0.6)
+                       ;("rust-fluent" ,rust-fluent-0.16)
+                       ;("rust-fluent-langneg" ,rust-fluent-langneg-0.13)
+                       ;("rust-fluent-syntax" ,rust-fluent-syntax-0.11)
+                       ("rust-futures-util" ,rust-futures-util-0.3)
+                       ("rust-headers" ,rust-headers-0.3)
+                       ("rust-hex" ,rust-hex-0.4)
+                       ("rust-http" ,rust-http-0.2)
+                       ("rust-httpdate" ,rust-httpdate-1)
+                       ("rust-hyper" ,rust-hyper-0.14)
+                       ("rust-hyper-rustls" ,rust-hyper-rustls-0.24)
+                       ;("rust-intl-memoizer" ,rust-intl-memoizer-0.5)
+                       ("rust-mime" ,rust-mime-0.3)
+                       ("rust-mime-guess" ,rust-mime-guess-2)
+                       ("rust-multer" ,rust-multer-2)
+                       ("rust-nix" ,rust-nix-0.27)
+                       ("rust-openssl" ,rust-openssl-0.10)
+                       ;("rust-opentelemetry" ,rust-opentelemetry-0.21)
+                       ;("rust-opentelemetry-http" ,rust-opentelemetry-http-0.10)
+                       ;("rust-opentelemetry-prometheus" ,rust-opentelemetry-prometheus-0.14)
+                       ;("rust-opentelemetry-semantic-conventions" ,rust-opentelemetry-semantic-conventions-0.13)
+                       ("rust-parking-lot" ,rust-parking-lot-0.12)
+                       ("rust-percent-encoding" ,rust-percent-encoding-2)
+                       ("rust-pin-project-lite" ,rust-pin-project-lite-0.2)
+                       ("rust-poem-derive" ,rust-poem-derive-1)
+                       ("rust-priority-queue" ,rust-priority-queue-1)
+                       ;("rust-prometheus" ,rust-prometheus-0.13)
+                       ("rust-quick-xml" ,rust-quick-xml-0.30)
+                       ("rust-rand" ,rust-rand-0.8)
+                       ("rust-rcgen" ,rust-rcgen-0.11)
+                       ;("rust-redis" ,rust-redis-0.23)
+                       ("rust-regex" ,rust-regex-1)
+                       ("rust-rfc7239" ,rust-rfc7239-0.1)
+                       ("rust-ring" ,rust-ring-0.16)
+                       ("rust-rust-embed" ,rust-rust-embed-8)
+                       ("rust-rustls-pemfile" ,rust-rustls-pemfile-1)
+                       ("rust-serde" ,rust-serde-1)
+                       ("rust-serde-json" ,rust-serde-json-1)
+                       ("rust-serde-urlencoded" ,rust-serde-urlencoded-0.7)
+                       ("rust-serde-yaml" ,rust-serde-yaml-0.9)
+                       ("rust-smallvec" ,rust-smallvec-1)
+                       ;("rust-sse-codec" ,rust-sse-codec-0.3)
+                       ("rust-tempfile" ,rust-tempfile-3)
+                       ("rust-thiserror" ,rust-thiserror-1)
+                       ("rust-time" ,rust-time-0.3)
+                       ("rust-tokio" ,rust-tokio-1)
+                       ("rust-tokio-metrics" ,rust-tokio-metrics-0.3)
+                       ("rust-tokio-native-tls" ,rust-tokio-native-tls-0.3)
+                       ("rust-tokio-openssl" ,rust-tokio-openssl-0.6)
+                       ("rust-tokio-rustls" ,rust-tokio-rustls-0.24)
+                       ("rust-tokio-stream" ,rust-tokio-stream-0.1)
+                       ("rust-tokio-tungstenite" ,rust-tokio-tungstenite-0.20)
+                       ("rust-tokio-util" ,rust-tokio-util-0.7)
+                       ("rust-tower" ,rust-tower-0.4)
+                       ("rust-tracing" ,rust-tracing-0.1)
+                       ;("rust-unic-langid" ,rust-unic-langid-0.9)
+                       ("rust-wildmatch" ,rust-wildmatch-2)
+                       ("rust-x509-parser" ,rust-x509-parser-0.15))
+       #:cargo-development-inputs (("rust-async-stream" ,rust-async-stream-0.3)
+                                   ("rust-tokio" ,rust-tokio-1))))
+    (home-page "https://github.com/poem-web/poem")
+    (synopsis
+     "Web framework written in the Rust programming language")
+    (description "Poem is a full-featured and easy-to-use web framework written
+in the Rust programming language.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-poem-derive-1
   (package
     (name "rust-poem-derive")
diff --git a/gnu/packages/patches/rust-poem-1-fewer-deps.patch b/gnu/packages/patches/rust-poem-1-fewer-deps.patch
new file mode 100644
index 0000000000..b98947b407
--- /dev/null
+++ b/gnu/packages/patches/rust-poem-1-fewer-deps.patch
@@ -0,0 +1,229 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 79b878c..95ec54c 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -71,26 +71,26 @@ features = ["clock"]
+ optional = true
+ default-features = false
+ 
+-[dependencies.eyre06]
+-version = "0.6"
+-optional = true
+-package = "eyre"
++#[dependencies.eyre06]
++#version = "0.6"
++#optional = true
++#package = "eyre"
+ 
+-[dependencies.fluent]
+-version = "0.16.0"
+-optional = true
++#[dependencies.fluent]
++#version = "0.16.0"
++#optional = true
+ 
+-[dependencies.fluent-langneg]
+-version = "0.13.0"
+-optional = true
++#[dependencies.fluent-langneg]
++#version = "0.13.0"
++#optional = true
+ 
+-[dependencies.fluent-syntax]
+-version = "0.11.0"
+-optional = true
++#[dependencies.fluent-syntax]
++#version = "0.11.0"
++#optional = true
+ 
+-[dependencies.futures-util]
+-version = "0.3.17"
+-features = ["sink"]
++#[dependencies.futures-util]
++#version = "0.3.17"
++#features = ["sink"]
+ 
+ [dependencies.headers]
+ version = "0.3.7"
+@@ -125,9 +125,9 @@ features = [
+ optional = true
+ default-features = false
+ 
+-[dependencies.intl-memoizer]
+-version = "0.5.1"
+-optional = true
++#[dependencies.intl-memoizer]
++#version = "0.5.1"
++#optional = true
+ 
+ [dependencies.libcookie]
+ version = "0.17"
+@@ -146,16 +146,16 @@ version = "0.4.1"
+ optional = true
+ package = "csrf"
+ 
+-[dependencies.libopentelemetry]
+-version = "0.21.0"
+-features = ["metrics"]
+-optional = true
+-package = "opentelemetry"
++#[dependencies.libopentelemetry]
++#version = "0.21.0"
++#features = ["metrics"]
++#optional = true
++#package = "opentelemetry"
+ 
+-[dependencies.libprometheus]
+-version = "0.13.0"
+-optional = true
+-package = "prometheus"
++#[dependencies.libprometheus]
++#version = "0.13.0"
++#optional = true
++#package = "prometheus"
+ 
+ [dependencies.libtempfile]
+ version = "3.2.0"
+@@ -178,17 +178,17 @@ optional = true
+ version = "0.10.56"
+ optional = true
+ 
+-[dependencies.opentelemetry-http]
+-version = "0.10.0"
+-optional = true
++#[dependencies.opentelemetry-http]
++#version = "0.10.0"
++#optional = true
+ 
+-[dependencies.opentelemetry-prometheus]
+-version = "0.14.0"
+-optional = true
++#[dependencies.opentelemetry-prometheus]
++#version = "0.14.0"
++#optional = true
+ 
+-[dependencies.opentelemetry-semantic-conventions]
+-version = "0.13.0"
+-optional = true
++#[dependencies.opentelemetry-semantic-conventions]
++#version = "0.13.0"
++#optional = true
+ 
+ [dependencies.parking_lot]
+ version = "0.12.0"
+@@ -219,14 +219,14 @@ optional = true
+ version = "0.11.1"
+ optional = true
+ 
+-[dependencies.redis]
+-version = "0.23.0"
+-features = [
+-    "aio",
+-    "tokio-comp",
+-    "connection-manager",
+-]
+-optional = true
++#[dependencies.redis]
++#version = "0.23.0"
++#features = [
++#    "aio",
++#    "tokio-comp",
++#    "connection-manager",
++#]
++#optional = true
+ 
+ [dependencies.regex]
+ version = "1.5.5"
+@@ -263,9 +263,9 @@ optional = true
+ [dependencies.smallvec]
+ version = "1.6.1"
+ 
+-[dependencies.sse-codec]
+-version = "0.3.2"
+-optional = true
++#[dependencies.sse-codec]
++#version = "0.3.2"
++#optional = true
+ 
+ [dependencies.thiserror]
+ version = "1.0.30"
+@@ -323,10 +323,10 @@ default-features = false
+ [dependencies.tracing]
+ version = "0.1.36"
+ 
+-[dependencies.unic-langid]
+-version = "0.9.0"
+-features = ["macros"]
+-optional = true
++#[dependencies.unic-langid]
++#version = "0.9.0"
++#features = ["macros"]
++#optional = true
+ 
+ [dependencies.wildmatch]
+ version = "2"
+@@ -383,13 +383,13 @@ embed = [
+     "hex",
+     "mime_guess",
+ ]
+-i18n = [
+-    "fluent",
+-    "fluent-langneg",
+-    "fluent-syntax",
+-    "unic-langid",
+-    "intl-memoizer",
+-]
++#i18n = [
++#    "fluent",
++#    "fluent-langneg",
++#    "fluent-syntax",
++#    "unic-langid",
++#    "intl-memoizer",
++#]
+ multipart = ["multer"]
+ native-tls = [
+     "server",
+@@ -400,20 +400,20 @@ openssl-tls = [
+     "tokio-openssl",
+     "openssl",
+ ]
+-opentelemetry = [
+-    "libopentelemetry",
+-    "opentelemetry-http",
+-    "opentelemetry-semantic-conventions",
+-]
+-prometheus = [
+-    "libopentelemetry",
+-    "opentelemetry-prometheus",
+-    "libprometheus",
+-]
+-redis-session = [
+-    "session",
+-    "redis",
+-]
++#opentelemetry = [
++#    "libopentelemetry",
++#    "opentelemetry-http",
++#    "opentelemetry-semantic-conventions",
++#]
++#prometheus = [
++#    "libopentelemetry",
++#    "opentelemetry-prometheus",
++#    "libprometheus",
++#]
++#redis-session = [
++#    "session",
++#    "redis",
++#]
+ rustls = [
+     "server",
+     "tokio-rustls",
+@@ -445,7 +445,7 @@ tempfile = [
+ ]
+ test = [
+     "sse",
+-    "sse-codec",
++#    "sse-codec",
+     "tokio-util/compat",
+ ]
+ tower-compat = [