Subject: [bug#69803] [PATCH rust-team 20/37] gnu: Add rust-litrs-0.4.

From: Herman Rimm <[email-masked]>
Date: Thu, 14 Mar 2024 22:16:21 +0100

* gnu/packages/crates-io.scm (rust-litrs-0.4): Add variable.
(rust-litrs-0.2): Inherit from rust-litrs-0.4.

Change-Id: I0f0a336bd94e08c1211a9171b31583b2f3309dd6
---
 gnu/packages/crates-io.scm | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 580209c281..c6c87f13ad 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -35586,8 +35586,32 @@ (define-public rust-libtest-mimic-0.3
         ("rust-structopt" ,rust-structopt-0.3)
         ("rust-termcolor" ,rust-termcolor-1))))))
 
+(define-public rust-litrs-0.4
+  (package
+    (name "rust-litrs")
+    (version "0.4.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "litrs" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "19cssch9gc0x2snd9089nvwzz79zx6nzsi3icffpx25p4hck1kml"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1)
+                       ("rust-unicode-xid" ,rust-unicode-xid-0.2))))
+    (home-page "https://github.com/LukasKalbertodt/litrs/")
+    (synopsis "Parse and inspect Rust literals")
+    (description
+     "Parse and inspect Rust literals (i.e. tokens in the Rust language
+representing fixed values).  Particularly useful for proc macros, but
+can also be used outside of a proc-macro context.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-litrs-0.2
   (package
+    (inherit rust-litrs-0.4)
     (name "rust-litrs")
     (version "0.2.3")
     (source (origin
@@ -35596,16 +35620,8 @@ (define-public rust-litrs-0.2
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32 "1akrxglqv6dz41jrjr409pjjysd00z5w0949007v52yg6c4mw9zr"))))
-    (build-system cargo-build-system)
     (arguments
-     `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1))))
-    (home-page "https://github.com/LukasKalbertodt/litrs/")
-    (synopsis "Parse and inspect Rust literals")
-    (description
-     "Parse and inspect Rust literals (i.e. tokens in the Rust programming
-language representing fixed values).  Particularly useful for proc macros, but
-can also be used outside of a proc-macro context.")
-    (license (list license:expat license:asl2.0))))
+     `(#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1))))))
 
 (define-public rust-llvm-bitcode-0.1
   (package
-- 
2.41.0