Subject: [bug#67077] [PATCH 29/36] gnu: Add rust-pcap-0.7.

From: VÖRÖSKŐI András <[email-masked]>
Date: Sat, 11 Nov 2023 16:35:37 +0100

* gnu/packages/crates-io.scm (rust-pcap-0.7): New variable.

Change-Id: I7f6f1056208ebefaef537a9eeefff6c80fbc906e
---
 gnu/packages/crates-io.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 3b30ab5253..2bd3f682bc 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49961,6 +49961,34 @@ (define-public rust-pbkdf2-0.4
         ("rust-sha-1" ,rust-sha-1-0.9)
         ("rust-sha2" ,rust-sha2-0.9))))))
 
+(define-public rust-pcap-0.7
+  (package
+    (name "rust-pcap")
+    (version "0.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pcap" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "14blflnbj87z3ajlj1hszsl6k7rwa338y4aw2yjm2j0xdpjvj4pr"))))
+    (native-inputs (list libpcap))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f ;; fails with missing futures crate
+       #:cargo-inputs
+       (("rust-clippy" ,rust-clippy-0.0)
+        ("rust-futures" ,rust-futures-0.1)
+        ("rust-libc" ,rust-libc-0.2)
+        ("rust-mio" ,rust-mio-0.6)
+        ("rust-tokio-core" ,rust-tokio-core-0.1))
+       #:cargo-development-inputs
+       (("rust-tempdir" ,rust-tempdir-0.3))))
+    (home-page "https://github.com/rust-pcap/pcap")
+    (synopsis "A packet capture API around pcap/wpcap")
+    (description "This package provides a packet capture API around pcap/wpcap.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-pcap-sys-0.1
   (package
     (name "rust-pcap-sys")
-- 
2.41.0