guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

357/471: gnu: Add rust-bitflags-2.


From: guix-commits
Subject: 357/471: gnu: Add rust-bitflags-2.
Date: Wed, 3 May 2023 09:28:52 -0400 (EDT)

efraim pushed a commit to branch rust-team
in repository guix.

commit 3b582dde70db73b67e8c09576901877036e81125
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Apr 16 13:03:47 2023 +0300

    gnu: Add rust-bitflags-2.
    
    * gnu/packages/crates-io.scm (rust-bitflags-2): New variable.
    (rust-bitflags-1): Inherit from rust-bitflags-2.
---
 gnu/packages/crates-io.scm | 42 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 34 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6140857770..32421a8d82 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -7325,8 +7325,41 @@ types.")
      "This crate provides macros to generate bitfield-like struct.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-bitflags-2
+  (package
+    (name "rust-bitflags")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "bitflags" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1cxcbx6mm1w2d7x9xd2vcqgr69a2ydw9k110ir7rrkmmrdwyn2y7"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-arbitrary" ,rust-arbitrary-1)
+        ("rust-compiler-builtins" ,rust-compiler-builtins-0.1)
+        ("rust-rustc-std-workspace-core" ,rust-rustc-std-workspace-core-1)
+        ("rust-serde" ,rust-serde-1))
+       #:cargo-development-inputs
+       (("rust-arbitrary" ,rust-arbitrary-1)
+        ("rust-rustversion" ,rust-rustversion-1)
+        ("rust-serde-derive" ,rust-serde-derive-1)
+        ("rust-serde-json" ,rust-serde-json-1)
+        ("rust-serde-test" ,rust-serde-test-1)
+        ("rust-trybuild" ,rust-trybuild-1))))
+    (home-page "https://github.com/bitflags/bitflags";)
+    (synopsis "Macro to generate structures which behave like bitflags")
+    (description "This package provides a macro to generate structures which
+behave like a set of bitflags.")
+    (license (list license:asl2.0
+                   license:expat))))
+
 (define-public rust-bitflags-1
   (package
+    (inherit rust-bitflags-2)
     (name "rust-bitflags")
     (version "1.3.2")
     (source
@@ -7336,7 +7369,6 @@ types.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32 "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:tests? #f                      ; Tests require rust-1.46 or newer.
        #:cargo-inputs
@@ -7348,13 +7380,7 @@ types.")
         ("rust-serde-derive" ,rust-serde-derive-1)
         ("rust-serde-json" ,rust-serde-json-1)
         ("rust-trybuild" ,rust-trybuild-1)
-        ("rust-walkdir" ,rust-walkdir-2))))
-    (home-page "https://github.com/bitflags/bitflags";)
-    (synopsis "Macro to generate structures which behave like bitflags")
-    (description "This package provides a macro to generate structures which
-behave like a set of bitflags.")
-    (license (list license:asl2.0
-                   license:expat))))
+        ("rust-walkdir" ,rust-walkdir-2))))))
 
 ;; XXX: The package below is meant to fix rust-nix-0.22, which has the
 ;; following requirements for bitflags version: ">=1.1.0 <1.3.0", and every



reply via email to

[Prev in Thread] Current Thread [Next in Thread]