guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 19/86] gnu: Add rust-thread-local.


From: ng0
Subject: [PATCH 19/86] gnu: Add rust-thread-local.
Date: Tue, 3 Jan 2017 23:35:35 +0000

* gnu/packages/rust.scm (rust-thread-local): New variable.
---
 gnu/packages/rust.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index b31b3ee4c..910f296b6 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -655,3 +655,30 @@ that is different for every thread.  Until Rust version 
1.14, the
 standard library did not expose a way to do that, which
 made @code{thread-id} necessary.")
     (license license:asl2.0)))
+
+(define-public rust-thread-local
+  (package
+    (name "rust-thread-local")
+    (version "0.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "thread_local" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0pg07fla8i4z4v2bmzq49pr2z8ww6lbg9b7iwwbffz7py0ibg4vp"))))
+    (build-system cargo-build-system)
+    (inputs
+     `(("rust-thread-id" ,rust-thread-id "src")
+       ("rust-unreachable" ,rust-unreachable "src")))
+    (home-page "https://github.com/Amanieu/thread_local-rs";)
+    (synopsis "Per-object thread-local storage")
+    (description
+     "This library provides the ThreadLocal type which allows a
+separate copy of an object to be used for each thread.  This allows for
+per-object thread-local storage, unlike the standard library's
address@hidden macro which only allows static thread-local
+storage.")
+    (license (list license:asl2.0 license:expat))))
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]