summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2021-12-03 22:09:56 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-12-27 19:52:32 +0100
commitc733a843680c840b5b83883131a5b798b4ac8c3d (patch)
treee6e5d9febfd8c705bfce6dc9f5fcaa6dfd0de9ff /gnu/packages
parent5b1ec376239602725171d4523406801b684ee195 (diff)
downloadguix-c733a843680c840b5b83883131a5b798b4ac8c3d.tar.gz
gnu: Add rust-bson-2.
* gnu/packages/crates-io.scm (rust-bson-2): New variable.
(rust-bson-0.14): Inherit from above.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/crates-io.scm41
1 files changed, 34 insertions, 7 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 94edc21817..e9afd0f89a 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6798,8 +6798,41 @@ bytes), doesn't have the 128 byte limitation and supports a configurable
 alphabet.")
     (license (list license:asl2.0 license:expat))))
 
+(define-public rust-bson-2
+  (package
+    (name "rust-bson")
+    (version "2.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "bson" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0ff1xj1vgh2l6sl5gqhkgsfkbhh11jkwd5wf3h0f0mrbg1kd8n7z"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-ahash" ,rust-ahash-0.7)
+         ("rust-base64" ,rust-base64-0.13)
+         ("rust-chrono" ,rust-chrono-0.4)
+         ("rust-hex" ,rust-hex-0.4)
+         ("rust-indexmap" ,rust-indexmap-1)
+         ("rust-lazy-static" ,rust-lazy-static-1)
+         ("rust-rand" ,rust-rand-0.8)
+         ("rust-serde" ,rust-serde-1)
+         ("rust-serde-bytes" ,rust-serde-bytes-0.11)
+         ("rust-serde-json" ,rust-serde-json-1)
+         ("rust-uuid" ,rust-uuid-0.8))))
+    (home-page "https://github.com/mongodb/bson-rust")
+    (synopsis "Encoding and decoding support for BSON in Rust")
+    (description
+     "This crate provides encoding and decoding support for BSON.")
+    (license license:expat)))
+
 (define-public rust-bson-0.14
   (package
+    (inherit rust-bson-2)
     (name "rust-bson")
     (version "0.14.1")
     (source
@@ -6809,7 +6842,6 @@ alphabet.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "000wqyb4icy32h74wl5wb6iw2flzwwlrpgq51xgcw91g2b87w5rw"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
@@ -6823,12 +6855,7 @@ alphabet.")
         ("rust-rand" ,rust-rand-0.7)
         ("rust-serde" ,rust-serde-1)
         ("rust-serde-json" ,rust-serde-json-1)
-        ("rust-time" ,rust-time-0.1))))
-    (home-page "https://github.com/mongodb/bson-rust")
-    (synopsis "Encoding and decoding support for BSON in Rust")
-    (description
-     "This package provides encoding and decoding support for BSON in Rust.")
-    (license license:expat)))
+        ("rust-time" ,rust-time-0.1))))))
 
 (define-public rust-bstr-0.2
   (package