Subject: [bug#69363] [PATCH 05/87] gnu: Add rust-unicode-truncate-0.2.0.

From: VÖRÖSKŐI András <[email-masked]>
Date: Sat, 24 Feb 2024 21:39:03 +0100

* gnu/packages/crates-io.scm (rust-unicode-truncate): New variable.

Change-Id: I9428c1d2fa463fd6254f1c1e0f52568ed77989bc
---
 gnu/packages/crates-io.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 0f5c31ed74..b8a8a501a4 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -75331,6 +75331,28 @@ (define-public rust-unicode-segmentation-1
 boundaries according to Unicode Standard Annex #29 rules.")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-unicode-truncate-0.2
+  (package
+    (name "rust-unicode-truncate")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "unicode-truncate" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0hlf6k1d7s1qqdvhxwh4xl8wd1wvqm0vr0pazxq74jksbz5fajx0"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-unicode-width" ,rust-unicode-width-0.1))
+       #:cargo-development-inputs (("rust-criterion" ,rust-criterion-0.3))))
+    (home-page "https://github.com/Aetf/unicode-truncate")
+    (synopsis
+     "Unicode-aware `str` truncate")
+    (description
+     "Unicode-aware algorithm to pad or truncate `str` in terms of displayed width.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-unicode-width-0.1
   (package
     (name "rust-unicode-width")
-- 
2.41.0