Subject: [bug#69257] [PATCH rust-team v2 079/117] gnu: Add rust-serde-wasm-bindgen-0.6.

From: Herman Rimm <[email-masked]>
Date: Sun, 28 Apr 2024 20:55:45 +0200

* gnu/packages/crates-io.scm (rust-serde-wasm-bindgen-0.6): Add
variable.
(rust-serde-wasm-bindgen-0.3): Inherit from rust-serde-wasm-bindgen-0.6.

Change-Id: I7bbc4fbd84fa0d15bcee8f37f7e9675f00ae8713
---
 gnu/packages/crates-io.scm | 39 ++++++++++++++++++++++++++++++++------
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 0b4c0bfcb6..3f300927cd 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -70590,8 +70590,40 @@ (define-public rust-serde-value-0.7
 for later processing.")
     (license license:expat)))
 
+(define-public rust-serde-wasm-bindgen-0.6
+  (package
+    (name "rust-serde-wasm-bindgen")
+    (version "0.6.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "serde-wasm-bindgen" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0cpik86f5vsyms0jhm553p7w55f2lnyvnnv6ja6izbhk0pvi7dxr"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f ; needs wasm target
+       #:cargo-inputs (("rust-js-sys" ,rust-js-sys-0.3)
+                       ("rust-serde" ,rust-serde-1)
+                       ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2))
+       #:cargo-development-inputs
+       (("rust-bincode" ,rust-bincode-1)
+        ("rust-getrandom" ,rust-getrandom-0.2)
+        ("rust-maplit" ,rust-maplit-1)
+        ("rust-proptest" ,rust-proptest-1)
+        ("rust-serde-bytes" ,rust-serde-bytes-0.11)
+        ("rust-serde-json" ,rust-serde-json-1)
+        ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3))))
+    (home-page "https://github.com/RReverser/serde-wasm-bindgen")
+    (synopsis "Native Serde adapter for wasm-bindgen")
+    (description
+      "This package provides a native Serde adapter for wasm-bindgen.")
+    (license license:expat)))
+
 (define-public rust-serde-wasm-bindgen-0.3
   (package
+    (inherit rust-serde-wasm-bindgen-0.6)
     (name "rust-serde-wasm-bindgen")
     (version "0.3.1")
     (source
@@ -70601,7 +70633,6 @@ (define-public rust-serde-wasm-bindgen-0.3
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "1xzh1a3rhapirlca4rbvh6bycphxg5yjmdwjsqij3hl6wpl6b0v1"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:cargo-inputs
        (("rust-fnv" ,rust-fnv-1)
@@ -70613,11 +70644,7 @@ (define-public rust-serde-wasm-bindgen-0.3
         ("rust-serde" ,rust-serde-1)
         ("rust-serde-bytes" ,rust-serde-bytes-0.11)
         ("rust-serde-json" ,rust-serde-json-1)
-        ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3))))
-    (home-page "https://github.com/cloudflare/serde-wasm-bindgen")
-    (synopsis "Native Serde adapter for wasm-bindgen")
-    (description "Native Serde adapter for wasm-bindgen.")
-    (license license:expat)))
+        ("rust-wasm-bindgen-test" ,rust-wasm-bindgen-test-0.3))))))
 
 (define-public rust-serde-with-3
   (package
-- 
2.41.0