Subject: [bug#68312] [PATCH 051/156] gnu: Add rust-ed25519-dalek-2.

From: Wilko Meyer <[email-masked]>
Date: Mon, 8 Jan 2024 02:52:28 +0100

* gnu/packages/crates-io.scm (rust-ed25519-dalek-2): New variable.
(rust-ed25519-dalek-1): Inherit from rust-ed25519-dalek-2.

Change-Id: Ia800295e33e837cb1c701acb7e07a62cd8baab60
---
 gnu/packages/crates-io.scm | 40 ++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ad58c75b48e..471de55c822 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -22904,8 +22904,39 @@ (define-public rust-ed25519-compact-2
 implementation.")
     (license license:expat)))
 
+(define-public rust-ed25519-dalek-2
+  (package
+    (name "rust-ed25519-dalek")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "ed25519-dalek" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1h13qm789m9gdjl6jazss80hqi8ll37m0afwcnw23zcbqjp8wqhz"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-curve25519-dalek" ,rust-curve25519-dalek-4)
+                       ("rust-ed25519" ,rust-ed25519-2)
+                       ("rust-merlin" ,rust-merlin-3)
+                       ("rust-rand-core" ,rust-rand-core-0.6)
+                       ("rust-serde" ,rust-serde-1)
+                       ("rust-sha2" ,rust-sha2-0.10)
+                       ("rust-signature" ,rust-signature-2)
+                       ("rust-subtle" ,rust-subtle-2)
+                       ("rust-zeroize" ,rust-zeroize-1))))
+    (home-page "https://dalek.rs")
+    (synopsis "Ed25519 EdDSA key generations, signing, and verification")
+    (description
+      "This package provides fast and efficient ed25519 EdDSA key generations,
+signing, and verification in pure Rust.")
+    (license license:bsd-3)))
+
 (define-public rust-ed25519-dalek-1
   (package
+    (inherit rust-ed25519-dalek-2)
     (name "rust-ed25519-dalek")
     (version "1.0.1")
     (source
@@ -22915,7 +22946,6 @@ (define-public rust-ed25519-dalek-1
         (file-name (string-append name "-" version ".tar.gz"))
         (sha256
           (base32 "17bsriciv93nkm39z22w7mr0h2a3hnbmgf378v4c895gvkkblqn7"))))
-    (build-system cargo-build-system)
     (arguments
       `(#:skip-build? #t
         #:cargo-inputs
@@ -22927,13 +22957,7 @@ (define-public rust-ed25519-dalek-1
          ("rust-serde" ,rust-serde-1)
          ("rust-serde-bytes" ,rust-serde-bytes-0.11)
          ("rust-sha2" ,rust-sha2-0.9)
-         ("rust-zeroize" ,rust-zeroize-1))))
-    (home-page "https://dalek.rs")
-    (synopsis "Ed25519 EdDSA key generations, signing, and verification")
-    (description
-      "This package provides fast and efficient ed25519 EdDSA key generations,
-signing, and verification in pure Rust.")
-    (license license:bsd-3)))
+         ("rust-zeroize" ,rust-zeroize-1))))))
 
 (define-public rust-edit-distance-2
   (package
-- 
2.41.0