summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-08-28 14:51:42 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-08-28 16:53:01 +0300
commita353643035997e5392f43715b2878caecf849e6d (patch)
treea0f6e557175edefbd894c6f96f65d3bbe4e2adc3
parentb44863d1be518ff8ef8a5ef6253a88899696bc09 (diff)
downloadpatches-a353643035997e5392f43715b2878caecf849e6d.tar
patches-a353643035997e5392f43715b2878caecf849e6d.tar.gz
gnu: Add rust-lazy-static.
* gnu/packages/crates-io.scm (rust-lazy-static): New variable.
-rw-r--r--gnu/packages/crates-io.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d017ee6216..2034c2198e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -335,6 +335,32 @@ friction with idiomatic Rust structs to ease interopability.")
(license (list license:asl2.0
license:expat))))
+(define-public rust-lazy-static
+ (package
+ (name "rust-lazy-static")
+ (version "1.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "lazy_static" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "052ac27w189hrf1j3hz7sga46rp84zl2hqnzyihxv78mgzr2jmxw"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs (("rust-spin" ,rust-spin))))
+ (home-page "https://github.com/rust-lang-nursery/lazy-static.rs")
+ (synopsis "Macro for declaring lazily evaluated statics in Rust")
+ (description
+ "This package provides a macro for declaring lazily evaluated statics in
+Rust. Using this macro, it is possible to have @code{static}s that require code
+to be executed at runtime in order to be initialized. This includes anything
+requiring heap allocations, like vectors or hash maps, as well as anything that
+requires non-const function calls to be computed.")
+ (license (list license:asl2.0
+ license:expat))))
+
(define-public rust-libc
(package
(name "rust-libc")