Subject: [bug#61958] [PATCH 17/32] gnu: Add rust-base64-0.21.

From: Arjan Adriaanse <[email-masked]>
Date: Sat, 4 Mar 2023 15:00:59 +0100

* gnu/packages/crates-io.scm (rust-base64-0.21): New variable.
(rust-base64-0.13): Inherit from above.
---
 gnu/packages/crates-io.scm | 34 +++++++++++++++++++++++++++-------
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ce406474fc..4cbaaf0810 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -5645,8 +5645,34 @@ (define-public rust-base58-0.1
 c6e7d37.  However, this package works only up to 128 bytes.")
     (license license:expat)))
 
+(define-public rust-base64-0.21
+  (package
+    (name "rust-base64")
+    (version "0.21.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "base64" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0sidjip5b33sr6w7kasfj9qxpbda41nw0x4gjjk55g55a6mdv954"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-development-inputs
+       (("rust-criterion" ,rust-criterion-0.4)
+        ("rust-rand" ,rust-rand-0.8)
+        ("rust-rstest" ,rust-rstest-0.12)
+        ("rust-rstest-reuse" ,rust-rstest-reuse-0.3)
+        ("rust-structopt" ,rust-structopt-0.3))))
+    (home-page "https://github.com/marshallpierce/rust-base64")
+    (synopsis "Encodes and decodes base64 as bytes or utf8")
+    (description
+     "This package encodes and decodes base64 as bytes or utf8.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-base64-0.13
   (package
+    (inherit rust-base64-0.21)
     (name "rust-base64")
     (version "0.13.0")
     (source
@@ -5657,7 +5683,6 @@ (define-public rust-base64-0.13
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1z82g23mbzjgijkpcrilc7nljpxpvpf7zxf6iyiapkgka2ngwkch"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-development-inputs
@@ -5670,12 +5695,7 @@ (define-public rust-base64-0.13
           (lambda* _
            (substitute* "Cargo.toml"
              (("0\\.3\\.2")
-              ,(package-version rust-criterion-0.3))))))))
-    (home-page "https://github.com/marshallpierce/rust-base64")
-    (synopsis "Encodes and decodes base64 as bytes or utf8")
-    (description
-     "This package encodes and decodes base64 as bytes or utf8.")
-    (license (list license:expat license:asl2.0))))
+              ,(package-version rust-criterion-0.3))))))))))
 
 (define-public rust-base64-0.12
   (package
-- 
2.39.1