summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJoseph LaFreniere <joseph@lafreniere.xyz>2020-11-20 08:26:53 -0600
committerEfraim Flashner <efraim@flashner.co.il>2020-12-12 22:58:18 +0200
commitfb7f184af4779bf516b55782c393a7330b3ea770 (patch)
treeb4bb7ecd8f5002e31d3a94dd2b8295d29ec154c8 /gnu/packages
parent4964b17e38153a5f23bc61910754d9bb38aa5c27 (diff)
downloadguix-fb7f184af4779bf516b55782c393a7330b3ea770.tar.gz
gnu: Add rust-cfg-if-1.
* gnu/packages/crates-io.scm (rust-cfg-if-1): New variable.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
-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 51f31ce1e8..8d176ea18e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -3732,6 +3732,32 @@ archive to be linked into Rustcode.")
        #:cargo-development-inputs
        (("rust-clang-sys" ,rust-clang-sys-0.11))))))
 
+(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")