Subject: [bug#66842] [PATCH 37/39] gnu: Add rust-ansi-to-tui-2.

From: Jaeme Sifat <[email-masked]>
Date: Mon, 30 Oct 2023 22:52:41 -0400

These crates should be placed in (crates-graphics) as they deal with terminal
graphics.

* gnu/packages/crates-graphics.scm (rust-ansi-to-tui-2): New variable.

Change-Id: I3eb91a0ce8c66a911eaab5946e6b085ac0de8b96
---
 gnu/packages/crates-graphics.scm | 51 ++++++++++++++++++++++++++++++++
 gnu/packages/crates-io.scm       | 24 ---------------
 2 files changed, 51 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index 22b77121e9..dd0864a6bd 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -198,6 +198,33 @@ (define-public rust-ansi-term-0.9
          "1xif1bh938qpfc3d0f9xgidibpm65xix11w9gszwqnia00q7rb13"))))
     (arguments `())))
 
+(define-public rust-ansi-to-tui-2
+  (package
+    (name "rust-ansi-to-tui")
+    (version "2.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "ansi-to-tui" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0l43nyj2difngwjbiy6vd5p8bw96w06swgw5hx6vi9zvqzs8wyqm"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-nom" ,rust-nom-7)
+                       ("rust-simdutf8" ,rust-simdutf8-0.1)
+                       ("rust-thiserror" ,rust-thiserror-1)
+                       ("rust-tui" ,rust-tui-0.16))
+       #:cargo-development-inputs (("rust-anyhow" ,rust-anyhow-1))))
+    (home-page "https://github.com/uttarayan21/ansi-to-tui")
+    (synopsis
+     "Library to convert ansi color coded text into @code{ratatui::text::Text}
+type from the ratatui library")
+    (description
+     "This package provides a library to convert ansi color coded text into
+@code{ratatui::text::Text} type from the ratatui library.")
+    (license license:expat)))
+
 (define-public rust-aom-sys-0.3
   (package
     (name "rust-aom-sys")
@@ -470,6 +497,30 @@ (define-public rust-cgmath-0.16
        (;("rust-glium" ,rust-glium-0.19)
         ("rust-serde-json" ,rust-serde-json-1))))))
 
+(define-public rust-color-to-tui-0.2
+  (package
+    (name "rust-color-to-tui")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "color-to-tui" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1k3vyp2fl0lcqs8iwssv56562kag6ljqaixirrci77ydmcq3zi0s"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs (("rust-serde" ,rust-serde-1)
+                       ("rust-tui" ,rust-tui-0.16))
+       #:cargo-development-inputs (("rust-serde-json" ,rust-serde-json-1))))
+    (home-page "https://git.uttarayan.me/uttarayan/color-to-tui")
+    (synopsis
+     "Parse colors and convert them to @code{ratatui::style::Colors}")
+    (description
+     "This package provides parsing colors and converting them to
+@code{ratatui::style::Colors}.")
+    (license license:expat)))
+
 (define-public rust-core-graphics-0.22
   (package
     (name "rust-core-graphics")
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6e71b1f3df..29b56baeef 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -14071,30 +14071,6 @@ (define-public rust-colored-1
          (base32
           "0nbc1czs512h1k696y7glv1kjrb2b914zpxraic6q5fgv80wizzl"))))))
 
-(define-public rust-color-to-tui-0.2
-  (package
-    (name "rust-color-to-tui")
-    (version "0.2.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (crate-uri "color-to-tui" version))
-       (file-name (string-append name "-" version ".tar.gz"))
-       (sha256
-        (base32 "1k3vyp2fl0lcqs8iwssv56562kag6ljqaixirrci77ydmcq3zi0s"))))
-    (build-system cargo-build-system)
-    (arguments
-     `(#:cargo-inputs (("rust-serde" ,rust-serde-1)
-                       ("rust-tui" ,rust-tui-0.16))
-       #:cargo-development-inputs (("rust-serde-json" ,rust-serde-json-1))))
-    (home-page "https://git.uttarayan.me/uttarayan/color-to-tui")
-    (synopsis
-     "Parse colors and convert them to @code{ratatui::style::Colors}")
-    (description
-     "This package provides parsing colors and converting them to
-@code{ratatui::style::Colors}.")
-    (license license:expat)))
-
 (define-public rust-combine-4
   (package
     (name "rust-combine")
-- 
2.34.1