Subject: [PATCH 084/156] gnu: Add rust-metrics-0.21.

From: Wilko Meyer <[email-masked]>
Date: Mon, 8 Jan 2024 02:53:01 +0100

* gnu/packages/crates-io.scm (rust-metrics-0.21): New variable.
(rust-metrics-0.14): Inherit from rust-metrics-0.21.

Change-Id: I68a9b9567ac78242aa05d67bc6ea8cbc62a2a653
---
 gnu/packages/crates-io.scm | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 061fd64df04..d3104a8feca 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -41375,13 +41375,31 @@ (define-public rust-metrics-macros-0.2
         ("rust-regex" ,rust-regex-1)
         ("rust-syn" ,rust-syn-1))))))
 
+(define-public rust-metrics-0.21
+  (package
+    (name "rust-metrics")
+    (version "0.21.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "metrics" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1ibndxzk0sja8cgwrr73b9vzbgfvwzwxwkxqiivnmmwy00dazqzx"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs (("rust-ahash" ,rust-ahash-0.8)
+                       ("rust-metrics-macros" ,rust-metrics-macros-0.7)
+                       ("rust-portable-atomic" ,rust-portable-atomic-1))))
     (home-page "https://github.com/metrics-rs/metrics")
-    (synopsis "Macros for the metrics crate")
-    (description "This package provides macros for the metrics crate.")
+    (synopsis "A lightweight metrics facade.")
+    (description "This package provides a lightweight metrics facade.")
     (license license:expat)))
 
 (define-public rust-metrics-0.14
   (package
+    (inherit rust-metrics-0.21)
     (name "rust-metrics")
     (version "0.14.2")
     (source (origin
@@ -41391,7 +41409,6 @@ (define-public rust-metrics-0.14
               (sha256
                (base32
                 "0lf80vznlh0p06nchj08nlqgf3bajnwr6w3syflg7ffg3mh8bqjq"))))
-    (build-system cargo-build-system)
     (arguments
      `(#:tests? #f      ; Tests pass on earlier version of rust
        #:cargo-inputs
@@ -41399,11 +41416,7 @@ (define-public rust-metrics-0.14
         ("rust-proc-macro-hack" ,rust-proc-macro-hack-0.5))
        #:cargo-development-inputs
        (("rust-criterion" ,rust-criterion-0.3)
-        ("rust-trybuild" ,rust-trybuild-1))))
-    (home-page "https://github.com/metrics-rs/metrics")
-    (synopsis "Lightweight metrics facade")
-    (description "This package provides a lightweight metrics facade.")
-    (license license:expat)))
+        ("rust-trybuild" ,rust-trybuild-1))))))
 
 (define-public rust-metrohash-1
   (package
-- 
2.41.0