Subject: [bug#46192] [PATCH 04/22] gnu: Add rust-enum-primitive-0.1.

From: aecepoglu <[email-masked]>
Date: Sat, 30 Jan 2021 17:29:15 +0300

* gnu/packages/crates-io.scm (rust-enum-primitive-0.1): New variable.
---
 gnu/packages/crates-io.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d863ef1ad6..b6d882e777 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -10731,6 +10731,33 @@ accessor functions on enums.")
         ("rust-quote" ,rust-quote-0.6)
         ("rust-syn" ,rust-syn-0.15))))))
 
+(define-public rust-enum-primitive-0.1
+  (package
+    (name "rust-enum-primitive")
+    (version "0.1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "enum_primitive" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "100ip2p3w1rq0clca2ai5shhvpxfipnsjncj0f9ralad5w4m2idy"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-num-traits" ,rust-num-traits-0.1))))
+    (home-page
+      "https://github.com/andersk/enum_primitive-rs")
+    (synopsis
+      "Macro to generate @code{num::FromPrimitive} instances for enum that works
+in Rust 1.0")
+    (description
+      "Macro named @code{enum_from_primitive!} to generate
+@code{num::FromPrimitive} instances for enum that works in Rust 1.0")
+    (license license:expat)))
+
 (define-public rust-enum-to-u8-slice-derive-0.1
   (package
     (name "rust-enum-to-u8-slice-derive")
-- 
2.30.0