diff mbox series

[bug#44762,14/37] gnu: Add rust-cfg-if-1.

Message ID 20201120142716.41949-14-joseph@lafreniere.xyz
State New
Headers show
Series gnu: Add ripgrep-all. | expand

Checks

Context Check Description
cbaines/issue success View issue
cbaines/applying patch success View Laminar job
cbaines/git branch success View Git branch
cbaines/comparison success View comparision
cbaines/submitting builds success
cbaines/submitting builds success

Commit Message

Joseph LaFreniere Nov. 20, 2020, 2:26 p.m. UTC
* gnu/packages/crates-io.scm (rust-cfg-if-1): New variable.
---
 gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a9dacc163d..df475a2469 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -3688,6 +3688,32 @@  archive to be linked into Rustcode.")
                        (string-append clang "/lib")))
              #t)))))))
 
+(define-public rust-cfg-if-1
+  (package
+    (name "rust-cfg-if")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "cfg-if" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1za0vb97n4brpzpv8lsbnzmq5r8f2b0cpqqr0sy8h5bn751xxwds"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-compiler-builtins" ,rust-compiler-builtins-0.1)
+        ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1))))
+    (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 @code{#[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-cfg-if-0.1
   (package
     (name "rust-cfg-if")