Subject: [PATCH 024/150] gnu: Add rust-chacha20-0.8.

From: Aleksandr Vityazev <[email-masked]>
Date: Mon, 17 Jan 2022 13:10:56 +0000

* gnu/packages/crates-io.scm (rust-chacha20-0.8): New variable.
---
 gnu/packages/crates-io.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index fe4e366c60..88af7f4b54 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -9206,6 +9206,38 @@ (define-public rust-cfg-if-0.1
        (("rust-compiler-builtins" ,rust-compiler-builtins-0.1)
         ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1))))))
 
+(define-public rust-chacha20-0.8
+  (package
+    (name "rust-chacha20")
+    (version "0.8.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "chacha20" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "14cgpnnpqsn5hmqkgrj4yaqdsvy56hkgcw5s2gqsxwhc7m1jmdq1"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-cfg-if" ,rust-cfg-if-1)
+        ("rust-cipher" ,rust-cipher-0.3)
+        ("rust-cpufeatures" ,rust-cpufeatures-0.2)
+        ("rust-rand-core" ,rust-rand-core-0.6)
+        ("rust-zeroize" ,rust-zeroize-1))
+       #:cargo-development-inputs
+       (("rust-cipher" ,rust-cipher-0.3)
+        ("rust-hex-literal" ,rust-hex-literal-0.2))))
+    (home-page "https://github.com/RustCrypto/stream-ciphers")
+    (synopsis "ChaCha20 stream cipher implemented in pure Rust")
+    (description
+     "The ChaCha20 stream cipher (RFC 8439) implemented in pure Rust using traits
+from the RustCrypto @code{cipher} crate, with optional architecture-specific
+hardware acceleration (AVX2, SSE2).  Additionally provides the ChaCha8, ChaCha12,
+XChaCha20, XChaCha12 and XChaCha8 stream ciphers, and also optional
+@code{rand_core-compatible} RNGs based on those ciphers.")
+    (license (list license:asl2.0 license:expat))))
+
 (define-public rust-chalk-derive-0.68
   (package
     (name "rust-chalk-derive")
-- 
2.34.0

-- 

Aleksandr Vityazev