summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2020-09-20 13:14:41 +0530
committerArun Isaac <arunisaac@systemreboot.net>2020-10-12 11:42:02 +0530
commit9de76735dba9f4c44a51e755e2db472cdb528d49 (patch)
treeae4c1d34b3dbca1ffa92b9cb5a0d3376d75616c9
parent1cf95488cae8cb8d74ca012444d5cb63b024b334 (diff)
downloadguix-9de76735dba9f4c44a51e755e2db472cdb528d49.tar.gz
gnu: Add rust-dashmap-3.
* gnu/packages/crates-io.scm (rust-dashmap-3): New variable.
-rw-r--r--gnu/packages/crates-io.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 0af7460dc3..0ef859d629 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -5831,6 +5831,46 @@ reading attributes into structs when implementing custom derives.")
 reading attributes into structs when implementing custom derives.")
     (license license:expat)))
 
+(define-public rust-dashmap-3
+  (package
+    (name "rust-dashmap")
+    (version "3.11.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "dashmap" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1ddrjj4khb0s263pw278g5dvbhaid40611h123s9w5shr0phw9hg"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Enable unstable features
+           (substitute* "src/lib.rs"
+             (("#!\\[cfg_attr" all)
+              (string-append "#![feature(map_get_key_value)]" "\n"
+                             "#![feature(inner_deref)]" "\n"
+                             all)))
+           #t))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-ahash" ,rust-ahash-0.3)
+        ("rust-hashbrown" ,rust-hashbrown-0.8)
+        ("rust-serde" ,rust-serde-1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'enable-unstable-features
+           (lambda _
+             (setenv "RUSTC_BOOTSTRAP" "1")
+             #t)))))
+    (home-page "https://github.com/xacrimon/dashmap")
+    (synopsis "Blazing fast concurrent HashMap for Rust")
+    (description "This package implements a blazing fast concurrent HashMap
+for Rust.")
+    (license license:expat)))
+
 (define-public rust-data-encoding-2
   (package
     (name "rust-data-encoding")