Subject: [PATCH v2 25/26] gnu: Add rust-colored-2

From: Domagoj Stolfa <[email-masked]>
Date: Sun, 11 Jul 2021 15:55:57 +0100

* gnu/packages/crates-io.scm (rust-colored-2): New public variable.
---
 gnu/packages/crates-io.scm | 44 ++++++++++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7f68e4e4eb..7fdbe1658f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -8637,19 +8637,19 @@ diagnostics easy and relatively painless for everyone!")
 colors.")
     (license license:expat)))
 
-(define-public rust-colored-1
+(define-public rust-colored-2
   (package
     (name "rust-colored")
-    (version "1.9.3")
+    (version "2.0.0")
     (source
       (origin
         (method url-fetch)
         (uri (crate-uri "colored" version))
         (file-name
-         (string-append name "-" version ".tar.gz"))
+          (string-append name "-" version ".tar.gz"))
         (sha256
-         (base32
-          "0nbc1czs512h1k696y7glv1kjrb2b914zpxraic6q5fgv80wizzl"))))
+          (base32
+            "1gbcijscmznzy42rn213yp9ima7210zakgaqibgg1n441dsnyqdk"))))
     (build-system cargo-build-system)
     (arguments
      `(#:tests? #f
@@ -8673,9 +8673,41 @@ colors.")
      "The most simple way to add colors in your terminal.")
     (license license:mpl2.0)))
 
+(define-public rust-colored-1
+  (package
+    (inherit rust-colored-2)
+    (name "rust-colored")
+    (version "1.9.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "colored" version))
+        (file-name
+         (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32
+          "0nbc1czs512h1k696y7glv1kjrb2b914zpxraic6q5fgv80wizzl"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:tests? #f
+       #:cargo-inputs
+       (("rust-atty" ,rust-atty-0.2)
+        ("rust-winapi" ,rust-winapi-0.3)
+        ("rust-lazy-static" ,rust-lazy-static-1))
+       #:cargo-development-inputs
+       (("rust-ansi-term" ,rust-ansi-term-0.12)
+        ("rust-rspec" ,rust-rspec-1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-version-requirements
+           (lambda _
+             (substitute* "Cargo.toml"
+               (("1.0.0-beta.3") ,(package-version rust-rspec-1)))
+             #t)))))))
+
 (define-public rust-colored-1.9.1
   (package
-    (inherit rust-colored-1)
+    (inherit rust-colored-2)
     (name "rust-colored")
     (version "1.9.1")
     (source
-- 
2.32.0