[bug#36920,05/43] gnu: Add rust-cfg-if.
diff mbox series

Message ID 6f323ddd7adef7ee5cb4b4a2bd3765e1172cefff.1564918220.git.efraim@flashner.co.il
State New
Headers show
Series
  • [bug#36920,01/43] gnu: crates-io.scm: Sort packages alphabetically.
Related show

Commit Message

Efraim Flashner Aug. 4, 2019, 11:33 a.m. UTC
* gnu/packages/crates-io.scm (rust-cfg-if): New variable.
---
 gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Patch
diff mbox series

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 5d79833f7d..7ba20a0f40 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -91,6 +91,27 @@  behave like a set of bitflags.")
     (license (list license:asl2.0
                    license:expat))))
 
+(define-public rust-cfg-if
+  (package
+    (name "rust-cfg-if")
+    (version "0.1.9")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "cfg-if" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0csygklgz3ybpr0670rkip49zh76m43ar3k7xgypkzbzrwycx1ml"))))
+    (build-system cargo-build-system)
+    (home-page "https://github.com/alexcrichton/cfg-if")
+    (synopsis "Define an item depending on parameters")
+    (description "This package provides a macro to ergonomically define an item
+depending on a large number of #[cfg] parameters.  Structured like an
+@code{if-else} chain, the first matching branch is the item that gets emitted.")
+    (license (list license:asl2.0
+                   license:expat))))
+
 (define-public rust-proc-macro2
   (package
     (name "rust-proc-macro2")