Subject: [PATCH 28/81] gnu: Add rust-rust-argon2-1.

From: Herman Rimm <[email-masked]>
Date: Mon, 20 May 2024 10:58:33 +0200

* gnu/packages/crates-crypto.scm (rust-rust-argon2-1): Add variable.
(rust-rust-argon2-0.8): Inherit from rust-rust-argon2-1.

Change-Id: I28f506cec246eed17da301aa74bf786ec77cb49a
---
 gnu/packages/crates-crypto.scm | 38 +++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-crypto.scm b/gnu/packages/crates-crypto.scm
index 39f4214905..f2ad7b73f1 100644
--- a/gnu/packages/crates-crypto.scm
+++ b/gnu/packages/crates-crypto.scm
@@ -5164,8 +5164,37 @@ (define-public rust-rsa-0.5
          ("rust-sha2" ,rust-sha2-0.9)
          ("rust-sha3" ,rust-sha3-0.9))))))
 
+(define-public rust-rust-argon2-1
+  (package
+    (name "rust-rust-argon2")
+    (version "1.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "rust-argon2" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+          "1z0v2kcmqdb61jh6y26797x1rlkqx0y57l88z3gnrgphzn9m9255"))))
+    (build-system cargo-build-system)
+    (arguments
+     (list
+      #:cargo-inputs (list rust-base64-0.21
+                           rust-blake2b-simd-1
+                           rust-constant-time-eq-0.3
+                           rust-crossbeam-utils-0.8
+                           rust-serde-1)
+      #:cargo-development-inputs (list rust-hex-0.4)))
+    (home-page "https://github.com/sru-systems/rust-argon2")
+    (synopsis "Argon2 password hashing function in Rust")
+    (description
+     "This package provides a Rust implementation of the Argon2 password
+hashing function.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-rust-argon2-0.8
   (package
+    (inherit rust-rust-argon2-1)
     (name "rust-rust-argon2")
     (version "0.8.3")
     (source
@@ -5175,7 +5204,6 @@ (define-public rust-rust-argon2-0.8
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1yvqkv04fqk3cbvyasibr4bqbxa6mij8jdvibakwlcsbjh6q462b"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
@@ -5183,13 +5211,7 @@ (define-public rust-rust-argon2-0.8
         ("rust-blake2b-simd" ,rust-blake2b-simd-0.5)
         ("rust-constant-time-eq" ,rust-constant-time-eq-0.1)
         ("rust-crossbeam-utils" ,rust-crossbeam-utils-0.8)
-        ("rust-serde" ,rust-serde-1))))
-    (home-page "https://github.com/sru-systems/rust-argon2")
-    (synopsis "Argon2 password hashing function in Rust")
-    (description
-     "This package provides a Rust implementation of the Argon2 password
-hashing function.")
-    (license (list license:expat license:asl2.0))))
+        ("rust-serde" ,rust-serde-1))))))
 
 (define-public rust-rust-argon2-0.7
   (package
-- 
2.41.0