Subject: [bug#56037] [PATCH 03/14] gnu: Add rust-similar-2.

From: Gabriel Arazas <[email-masked]>
Date: Fri, 17 Jun 2022 19:59:04 +0800

* gnu/packages/crates-io.scm (rust-similar-2): New variable.
(rust-similar-1): Inherit and adjust.
---
 gnu/packages/crates-io.scm | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 88339619ca..8278bef7a6 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -56363,8 +56363,31 @@ (define-public rust-simdutf8-0.1
 extensions.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-similar-2
+  (package
+    (name "rust-similar")
+    (version "2.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (crate-uri "similar" version))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1lw33na01r35h09s47jqhjgz3m29wapl20f6ybsla5d1cfgrf91f"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-bstr" ,rust-bstr-0.2) ("rust-serde" ,rust-serde-1)
+        ("rust-unicode-segmentation" ,rust-unicode-segmentation-1))))
+    (home-page "https://github.com/mitsuhiko/similar")
+    (synopsis "A diff library for Rust")
+    (description "This package provides a diff library for Rust.")
+    (license license:asl2.0)))
+
 (define-public rust-similar-1
   (package
+    (inherit rust-similar-2)
     (name "rust-similar")
     (version "1.3.0")
     (source
@@ -56379,12 +56402,7 @@ (define-public rust-similar-1
      `(#:skip-build? #t
        #:cargo-inputs
        (("rust-bstr" ,rust-bstr-0.2)
-        ("rust-unicode-segmentation" ,rust-unicode-segmentation-1))))
-    (home-page
-     "https://github.com/mitsuhiko/similar")
-    (synopsis "Diff library for Rust")
-    (description "This package provides a diff library for Rust.")
-    (license license:asl2.0)))
+        ("rust-unicode-segmentation" ,rust-unicode-segmentation-1))))))
 
 (define-public rust-simplelog-0.11
   (package
-- 
2.36.1