* gnu/packages/rust.scm (rust-thread-id): New variable. --- gnu/packages/rust.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 9893e5a72..b31b3ee4c 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -629,3 +629,29 @@ behave like bitflags.") "Unreachable provides an unreachable code optimization hint in stable rust, and some useful extension traits for @code{Option} and @code{Result}.") (license license:expat))) + +(define-public rust-thread-id + (package + (name "rust-thread-id") + (version "3.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "thread-id" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0jn13q459lz46l9r8qqy62ngzc9zbcw5p6k282g143f7b1swjds4")))) + (build-system cargo-build-system) + (inputs + `(;("rust-kernel32-sys" ,rust-kernel32-sys "src") ; WINAPI + ("rust-libc" ,rust-libc "src"))) + (home-page "https://github.com/ruuda/thread-id") + (synopsis "Get a unique thread ID") + (description + "For diagnostics and debugging it can often be useful to get an ID +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))) -- 2.11.0