Subject: Re: [bug#51730] [PATCH 19/21] gnu: Add rust-wl-clipboard-rs-0.4.

From: phodina <[email-masked]>
Date: Fri, 03 Dec 2021 14:11:07 +0000

Hi Nicolas,

> Hello,
>
> phodina via Guix-patches via [email-masked] writes:
>
> > -   gnu/packages/crates-graphics.scm (rust-wl-clipboard-rs-0.4): New variable.
> > -   gnu/packages/patches/rust-wl-clipboard-rs-newer-wl.patch: New file.
> > -   gnu/local.mk: Add patch.
>
> This patch does not apply on current master + all previous patches.
>
> Also, I don't think it belongs to "crate-graphics.scm" but rather to
>
> "crates-io.scm".
>

I've rebased the patches on top of the latest master branch and fixed the conflicts.

I was looking for wayland crates therefore I put it in crates-graphics.scm. However, I agree with you the crates-io.scm is a better place.

Note that the order of rust-thread-local-0.3.4 and rust-stderrlog-0.4 is swapped.

----
Petr

From 2aee9e10163630fec3d52811eddea6343274966d Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:34:03 +0100
Subject: [PATCH v2 01/19] gnu: Add rust-argh-shared-0.1.

* gnu/packages/crates-io.scm (rust-argh-shared-0.1): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 7d5833ffc0..b0d5a93d5e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2374,6 +2374,24 @@ (define-public rust-arg-enum-proc-macro-0.3
 @code{arg_enum}.")
     (license license:expat)))
 
+(define-public rust-argh-shared-0.1
+  (package
+    (name "rust-argh-shared")
+    (version "0.1.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "argh_shared" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0crzkzr4mq9gyys3m0idgsfwwrwd4dk70scp7rspvb2fmgd01piq"))))
+    (build-system cargo-build-system)
+    (arguments `(#:skip-build? #t))
+    (home-page "https://github.com/google/argh")
+    (synopsis "Derive-based argument parsing optimized for code size")
+    (description "Derive-based argument parsing optimized for code size")
+    (license license:bsd-3)))
+
 (define-public rust-argon2rs-0.2
   (package
     (name "rust-argon2rs")
-- 
2.33.1

From 42c7905484cc82f9fcdfcc6a2749308aba77dcf6 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:32:22 +0100
Subject: [PATCH v2 18/19] gnu: rust-arboard-1: Update to 1.2.1.

* gnu/packages/crates-io.scm (rust-arboard-1): Update to 1.2.1.
  [arguments](cargo-inputs): Add rust-env-logger-0.8, rust-simple-logger-1,
  rust-wl-clipboard-rs-0.4 and rust-x11rb-0.8. Remove rust-xcb-0.9.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 5ee9421ea4..d3410a2efd 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2266,20 +2266,21 @@ (define-public rust-arbitrary-0.2
 (define-public rust-arboard-1
   (package
     (name "rust-arboard")
-    (version "1.1.0")
+    (version "1.2.1")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "arboard" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "0wpyv732fxkplmiwik1sbgdlnbk748w1aqpkc71gn5lm2ns9w545"))))
+        (base32 "1a5qfmpzcf5rwlwsligf9z1gzndpvj0jncc4s3k3z5g214c4l127"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
        (("rust-clipboard-win" ,rust-clipboard-win-4)
         ("rust-core-graphics" ,rust-core-graphics-0.21)
+        ("rust-env-logger" ,rust-env-logger-0.8)
         ("rust-image" ,rust-image-0.23)
         ("rust-lazy-static" ,rust-lazy-static-1)
         ("rust-libc" ,rust-libc-0.2)
@@ -2287,9 +2288,11 @@ (define-public rust-arboard-1
         ("rust-objc-foundation" ,rust-objc-foundation-0.1)
         ("rust-objc-id" ,rust-objc-id-0.1)
         ("rust-scopeguard" ,rust-scopeguard-1)
+        ("rust-simple-logger" ,rust-simple-logger-1)
         ("rust-thiserror" ,rust-thiserror-1)
         ("rust-winapi" ,rust-winapi-0.3)
-        ("rust-xcb" ,rust-xcb-0.9))))
+        ("rust-wl-clipboard-rs" ,rust-wl-clipboard-rs-0.4)
+        ("rust-x11rb" ,rust-x11rb-0.8))))
     (home-page "https://github.com/ArturKovacs/arboard")
     (synopsis "Image and text handling for the OS clipboard")
     (description
-- 
2.33.1

From 298cf07470e92bba5ee91a2714810fa8fe0e80f7 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:23:49 +0100
Subject: [PATCH v2 17/19] gnu: Add rust-wl-clipboard-rs-0.4.

* gnu/packages/crates-io.scm (rust-wl-clipboard-rs-0.4): New variable.
* gnu/packages/patches/rust-wl-clipboard-rs-newer-wl.patch: New file.
* gnu/local.mk: Add patch.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 8a9277a318..5ee9421ea4 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -61168,6 +61168,44 @@ (define-public rust-watchexec-1
 modifications.")
     (license license:asl2.0)))
 
+(define-public rust-wl-clipboard-rs-0.4
+  (package
+    (name "rust-wl-clipboard-rs")
+    (version "0.4.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "wl-clipboard-rs" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (patches (search-patches "rust-wl-clipboard-rs-newer-wl.patch"))
+        (sha256
+          (base32 "1252cm67pkrr6ik5ys2cdyfr2zzw6ds7v351i1cmyi94yiv01l13"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-derive-new" ,rust-derive-new-0.5)
+         ("rust-derive-more" ,rust-derive-more-0.99)
+         ("rust-exitfailure" ,rust-exitfailure-0.5)
+         ("rust-failure" ,rust-failure-0.1)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-mime-guess" ,rust-mime-guess-2)
+         ("rust-nix" ,rust-nix-0.18)
+         ("rust-os-pipe" ,rust-os-pipe-0.9)
+         ("rust-stderrlog" ,rust-stderrlog-0.4)
+         ("rust-structopt" ,rust-structopt-0.3)
+         ("rust-tempfile" ,rust-tempfile-3)
+         ("rust-tree-magic" ,rust-tree-magic-0.2)
+         ("rust-wayland-client" ,rust-wayland-client-0.28)
+         ("rust-wayland-commons" ,rust-wayland-commons-0.28)
+         ("rust-wayland-protocols" ,rust-wayland-protocols-0.28))))
+    (home-page "https://github.com/YaLTeR/wl-clipboard-rs")
+    (synopsis "Access to the Wayland clipboard")
+    (description "This package provides access to the Wayland clipboard
+for terminal and other window-less applications.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-web-sys-0.3
   (package
     (name "rust-web-sys")
diff --git a/gnu/packages/patches/rust-wl-clipboard-rs-newer-wl.patch b/gnu/packages/patches/rust-wl-clipboard-rs-newer-wl.patch
new file mode 100644
index 0000000000..9fb692e9a6
--- /dev/null
+++ b/gnu/packages/patches/rust-wl-clipboard-rs-newer-wl.patch
@@ -0,0 +1,26 @@
+diff --git a/Cargo.toml b/Cargo.toml
+index 7b975e0..313cb63 100644
+--- a/Cargo.toml
++++ b/Cargo.toml.new
+@@ -75,17 +75,17 @@ version = "3"
+ version = "0.2"
+ 
+ [dependencies.wayland-client]
+-version = "0.27"
++version = "0.28"
+ 
+ [dependencies.wayland-protocols]
+-version = "0.27"
++version = "0.28"
+ features = ["client", "unstable_protocols"]
+ [dev-dependencies.wayland-protocols]
+-version = "0.27"
++version = "0.28"
+ features = ["server", "unstable_protocols"]
+ 
+ [dev-dependencies.wayland-server]
+-version = "0.27"
++version = "0.28"
+ 
+ [features]
+ dlopen = ["native_lib", "wayland-client/dlopen", "wayland-server/dlopen"]
-- 
2.33.1

From 8e0f94cf8df489b3099c983dd949cf3de73942ef Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:36:32 +0100
Subject: [PATCH v2 02/19] gnu: Add rust-argh-derive-0.1.

* gnu/packages/crates-io (rust-argh-derive-0.1): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b0d5a93d5e..86501a378d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2392,6 +2392,32 @@ (define-public rust-argh-shared-0.1
     (description "Derive-based argument parsing optimized for code size")
     (license license:bsd-3)))
 
+(define-public rust-argh-derive-0.1
+  (package
+    (name "rust-argh-derive")
+    (version "0.1.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "argh_derive" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "13qz9i9frdjl1v9aqw5b2cs7wn3h34x2xkpsi9wcl1hcpjd23ba8"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-argh-shared" ,rust-argh-shared-0.1)
+         ("rust-heck" ,rust-heck-0.3)
+         ("rust-proc-macro2" ,rust-proc-macro2-1)
+         ("rust-quote" ,rust-quote-1)
+         ("rust-syn" ,rust-syn-1))))
+    (home-page "https://github.com/google/argh")
+    (synopsis "Derive-based argument parsing optimized for code size")
+    (description "Derive-based argument parsing optimized for code size")
+    (license license:bsd-3)))
+
 (define-public rust-argon2rs-0.2
   (package
     (name "rust-argon2rs")
-- 
2.33.1

From 7afea721ef16e0a0ed6c71bcc1bebf3f083700a9 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:44:23 +0100
Subject: [PATCH v2 05/19] gnu: Add rust-dotenv-0.13

* gnu/packages/crates-io.scm (rust-dotenv-0.13): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6b19de802f..5fc795a6ea 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -15642,6 +15642,28 @@ (define-public rust-dotenv-0.15
 Rust.")
     (license license:expat)))
 
+(define-public rust-dotenv-0.13
+  (package
+    (inherit rust-dotenv-0.15)
+    (name "rust-dotenv")
+    (version "0.13.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "dotenv" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "11jdifvvwbn60gf5iq2awyq9fik1d9xk7rhch332nwwnkhks3l60"))))
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-clap" ,rust-clap-2)
+         ("rust-failure" ,rust-failure-0.1)
+         ("rust-lazy-static" ,rust-lazy-static-1)
+         ("rust-regex" ,rust-regex-1))
+        #:cargo-development-inputs
+        (("rust-tempdir" ,rust-tempdir-0.3))))))
+
 (define-public rust-dotenv-0.10
   (package
     (inherit rust-dotenv-0.15)
-- 
2.33.1

From 68acb11c5a095daf38e050bcbc78a2a752aaf98e Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:37:14 +0100
Subject: [PATCH v2 03/19] gnu: Add rust-argh-0.1.

* gnu/packages/crates-io.scm (rust-argh-0.1): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 86501a378d..c3873d7306 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2418,6 +2418,27 @@ (define-public rust-argh-derive-0.1
     (description "Derive-based argument parsing optimized for code size")
     (license license:bsd-3)))
 
+(define-public rust-argh-0.1
+  (package
+    (name "rust-argh")
+    (version "0.1.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "argh" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1gy9y69d38q7f5147kj823swgggc3m30x7z2z1lrjpwpsxncf8zh"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-argh-derive" ,rust-argh-derive-0.1)
+         ("rust-argh-shared" ,rust-argh-shared-0.1))))
+    (home-page "https://github.com/google/argh")
+    (synopsis "Derive-based argument parser optimized for code size")
+    (description "Derive-based argument parser optimized for code size")
+    (license license:bsd-3)))
+
 (define-public rust-argon2rs-0.2
   (package
     (name "rust-argon2rs")
-- 
2.33.1

From 4956fec7f2726b206dbf2e4a8605905997aab80d Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:38:32 +0100
Subject: [PATCH v2 04/19] gnu: Add rust-tui-0.16.

* gnu/packages/crates-io.scm (rust-tui-0.16): New variable.
 (rust-tui-0.15): Inherit from above.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c3873d7306..6b19de802f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -58194,31 +58194,34 @@ (define-public rust-ttf-parser-0.6
 parser.")
     (license (list license:expat license:asl2.0))))
 
-(define-public rust-tui-0.15
+(define-public rust-tui-0.16
   (package
     (name "rust-tui")
-    (version "0.15.0")
+    (version "0.16.0")
     (source
      (origin
        (method url-fetch)
        (uri (crate-uri "tui" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "0w9azg9zj1nnwcwbra9pxrwy47ab0m2bhanbkchydv8lscx8y7c6"))))
+        (base32 "08qcdjmi8sn2xyh38ilr17i9bn89ic2aaqx3rybyv7h44x7cxj1r"))))
     (build-system cargo-build-system)
     (arguments
      `(#:skip-build? #t
        #:cargo-inputs
        (("rust-bitflags" ,rust-bitflags-1)
         ("rust-cassowary" ,rust-cassowary-0.3)
-        ("rust-crossterm" ,rust-crossterm-0.19)
+        ("rust-crossterm" ,rust-crossterm-0.20)
         ("rust-easycurses" ,rust-easycurses-0.12)
         ("rust-pancurses" ,rust-pancurses-0.16)
         ("rust-rustbox" ,rust-rustbox-0.11)
         ("rust-serde" ,rust-serde-1)
         ("rust-termion" ,rust-termion-1)
         ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
-        ("rust-unicode-width" ,rust-unicode-width-0.1))))
+        ("rust-unicode-width" ,rust-unicode-width-0.1))
+       #:cargo-development-inputs
+       (("rust-argh" ,rust-argh-0.1)
+        ("rust-rand" ,rust-rand-0.8))))
     (home-page "https://github.com/fdehau/tui-rs")
     (synopsis "Library to build rich terminal user interfaces or dashboards")
     (description
@@ -58226,6 +58229,32 @@ (define-public rust-tui-0.15
 or dashboards.")
     (license license:expat)))
 
+(define-public rust-tui-0.15
+  (package
+    (inherit rust-tui-0.16)
+    (name "rust-tui")
+    (version "0.15.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "tui" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0w9azg9zj1nnwcwbra9pxrwy47ab0m2bhanbkchydv8lscx8y7c6"))))
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-bitflags" ,rust-bitflags-1)
+        ("rust-cassowary" ,rust-cassowary-0.3)
+        ("rust-crossterm" ,rust-crossterm-0.19)
+        ("rust-easycurses" ,rust-easycurses-0.12)
+        ("rust-pancurses" ,rust-pancurses-0.16)
+        ("rust-rustbox" ,rust-rustbox-0.11)
+        ("rust-serde" ,rust-serde-1)
+        ("rust-termion" ,rust-termion-1)
+        ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+        ("rust-unicode-width" ,rust-unicode-width-0.1))))))
+
 (define-public rust-tui-0.14
   (package
     (inherit rust-tui-0.15)
-- 
2.33.1

From d919bd0916060a28f0dd098af86e3c330be134ce Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:50:49 +0100
Subject: [PATCH v2 06/19] gnu: Add rust-derive-builder-core-0.5.

* gnu/packages/crates-io.scm (rust-derive-builder-core-0.5): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 5fc795a6ea..a7ec8326cd 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -14281,6 +14281,27 @@ (define-public rust-derive-builder-core-0.9
        #:cargo-development-inputs
        (("rust-pretty-assertions" ,rust-pretty-assertions-0.6))))))
 
+(define-public rust-derive-builder-core-0.5
+  (package
+    (inherit rust-derive-builder-core-0.9)
+    (name "rust-derive-builder-core")
+    (version "0.5.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "derive_builder_core" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0drbjk6n8ywls8cmhp4r8xkyjsja0wk3854cn5mj8g1km4ys5202"))))
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-darling" ,rust-darling-0.9)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-proc-macro2" ,rust-proc-macro2-0.4)
+         ("rust-quote" ,rust-quote-0.6)
+         ("rust-syn" ,rust-syn-0.15))))))
+
 (define-public rust-derive-builder-core-0.2
   (package
     (inherit rust-derive-builder-core-0.9)
-- 
2.33.1

From f4c2476114c01dc69905f9dc26a143481b527d85 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:54:46 +0100
Subject: [PATCH v2 07/19] gnu: Add rust-derive-builder-0.7.

* gnu/packages/crates-io.scm (rust-derive-builder-0.7): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a7ec8326cd..14f73ce3dd 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -14205,6 +14205,31 @@ (define-public rust-derive-builder-0.9
         #:cargo-development-inputs
         (("rust-pretty-assertions" ,rust-pretty-assertions-0.6))))))
 
+(define-public rust-derive-builder-0.7
+  (package
+    (inherit rust-derive-builder-0.9)
+    (name "rust-derive-builder")
+    (version "0.7.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "derive_builder" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "1m34zpj6fw764g7s368r2wgazp154m24d4rshbgn18fdlfk3zi9s"))))
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-compiletest-rs" ,rust-compiletest-rs-0.3)
+         ("rust-darling" ,rust-darling-0.9)
+         ("rust-derive-builder-core" ,rust-derive-builder-core-0.5)
+         ("rust-env-logger" ,rust-env-logger-0.5)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-proc-macro2" ,rust-proc-macro2-0.4)
+         ("rust-quote" ,rust-quote-0.6)
+         ("rust-skeptic" ,rust-skeptic-0.13)
+         ("rust-syn" ,rust-syn-0.15))))))
+
 (define-public rust-derive-builder-0.5
   (package
     (inherit rust-derive-builder-0.9)
-- 
2.33.1

From f0dff934745c08ac12ae60cdedc7a450117fd3cb Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:12:54 +0100
Subject: [PATCH v2 12/19] gnu: rust-anyhow-1: Update to 1.0.46.

* gnu/packages/crates-io.scm (rust-anyhow-1): Update to 1.0.46.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index f53747412e..bd7b7ab38c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2042,7 +2042,7 @@ (define-public rust-antidote-1
 (define-public rust-anyhow-1
   (package
     (name "rust-anyhow")
-    (version "1.0.37")
+    (version "1.0.46")
     (source
      (origin
        (method url-fetch)
@@ -2051,7 +2051,7 @@ (define-public rust-anyhow-1
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "11kaqp25lchr2ckyc46zm6blzndnw0w2w8qv0sp8z4xcxqgw2rzf"))))
+         "0w0zm1bqk5kbk834r4xszlzqiln4vw5k1lnlswyjkh24khi2ia1s"))))
     (build-system cargo-build-system)
     (arguments
      `(#:cargo-development-inputs
-- 
2.33.1

From cee21c93247bad999a5c9ddbd7db542956cb93a5 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:24:34 +0100
Subject: [PATCH v2 19/19] gnu: Add rust-spotify-tui-0.25.

* gnu/packages/crates-io.scm (rust-spotify-tui-0.25): New variable.

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index be60f3f376..e68371a24a 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -778,6 +778,41 @@ (define-public sniffglue
 of the project is to be runnable on untrusted networks without crashing.")
     (license license:gpl3)))
 
+(define-public spotify-tui-0.25
+  (package
+    (name "spotify-tui")
+    (version "0.25.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "spotify-tui" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "08bpihkdv3rmcksnxp4cz04kawjs6spmwa3wr2k27b30x3q9cd4r"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-anyhow" ,rust-anyhow-1)
+         ("rust-arboard" ,rust-arboard-1)
+         ("rust-backtrace" ,rust-backtrace-0.3)
+         ("rust-clap" ,rust-clap-2)
+         ("rust-crossterm" ,rust-crossterm-0.20)
+         ("rust-dirs" ,rust-dirs-3)
+         ("rust-rand" ,rust-rand-0.8)
+         ("rust-rspotify" ,rust-rspotify-0.10)
+         ("rust-serde" ,rust-serde-1)
+         ("rust-serde-json" ,rust-serde-json-1)
+         ("rust-serde-yaml" ,rust-serde-yaml-0.8)
+         ("rust-tokio" ,rust-tokio-0.2)
+         ("rust-tui" ,rust-tui-0.16)
+         ("rust-unicode-width" ,rust-unicode-width-0.1))))
+    (native-inputs `(("pkg-config" ,pkg-config)))
+    (inputs `(("openssl" ,openssl)))
+    (home-page "https://github.com/Rigellute/spotify-tui")
+    (synopsis "Terminal user interface for Spotify")
+    (description "This package provides a terminal user interface for Spotify")
+    (license (list license:expat license:asl2.0))))
+
 (define-public tectonic
   (package
     (name "tectonic")
-- 
2.33.1

From 877da65de7cc74cf9d8769f57edee2ac86efff69 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:15:00 +0100
Subject: [PATCH v2 13/19] gnu: Add rust-atty-0.2.11.

* gnu/packages/crates-io.scm (rust-atty-0.2.11): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index bd7b7ab38c..418906db23 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -4148,6 +4148,26 @@ (define-public rust-atty-0.2
      "This package provides a simple interface for querying atty.")
     (license license:expat)))
 
+(define-public rust-atty-0.2.11
+  (package
+    (inherit rust-atty-0.2)
+    (name "rust-atty")
+    (version "0.2.11")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "atty" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0lln6vaczj521qqjbaqnb81w5p6xk4fjfkg33r0m22cm4f3mnzcs"))))
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-libc" ,rust-libc-0.2)
+         ("rust-termion" ,rust-termion-1)
+         ("rust-winapi" ,rust-winapi-0.3))))))
+
 (define-public rust-autocfg-1
   (package
     (name "rust-autocfg")
-- 
2.33.1

From 7e63805d6ea1cfcfd0c1f5dae2c994988cdcb6a2 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 19:58:26 +0100
Subject: [PATCH v2 08/19] gnu: Add rust-rspotify-0.10.

* gnu/packages/crates-io.scm (rust-rspotify-0.10): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 14f73ce3dd..5e1cfc1b1e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -50146,6 +50146,45 @@ (define-public rust-spmc-0.3
     (description "Simple SPMC channel")
     (license (list license:expat license:asl2.0))))
 
+(define-public rust-rspotify-0.10
+  (package
+    (name "rust-rspotify")
+    (version "0.10.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "rspotify" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "196wd157l3fn6hlyixgffhl2x516g4fpa3s91arhcikiifsppzgf"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-base64" ,rust-base64-0.10)
+         ("rust-chrono" ,rust-chrono-0.4)
+         ("rust-derive-builder" ,rust-derive-builder-0.7)
+         ("rust-dotenv" ,rust-dotenv-0.13)
+         ("rust-env-logger" ,rust-env-logger-0.6)
+         ("rust-failure" ,rust-failure-0.1)
+         ("rust-itertools" ,rust-itertools-0.8)
+         ("rust-lazy-static" ,rust-lazy-static-1)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-percent-encoding" ,rust-percent-encoding-1)
+         ("rust-rand" ,rust-rand-0.6)
+         ("rust-random" ,rust-random-0.12)
+         ("rust-reqwest" ,rust-reqwest-0.10)
+         ("rust-serde" ,rust-serde-1)
+         ("rust-serde-derive" ,rust-serde-derive-1)
+         ("rust-serde-json" ,rust-serde-json-1)
+         ("rust-url" ,rust-url-1)
+         ("rust-webbrowser" ,rust-webbrowser-0.5))))
+    (home-page "https://github.com/ramsayleung/rspotify")
+    (synopsis "Spotify API wrapper")
+    (description "This package provides wrapper API forSpotify streaming
+service.")
+    (license license:expat)))
+
 (define-public rust-spsc-buffer-0.1
   (package
     (name "rust-spsc-buffer")
-- 
2.33.1

From acc1ecfa00af08ceae3fe4ab228209503fa37539 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 20:06:46 +0100
Subject: [PATCH v2 10/19] gnu: Add rust-x11rb-0.8.

* gnu/packages/crates-graphics.scm (rust-x11rb-0.8): New variable.

diff --git a/gnu/packages/crates-graphics.scm b/gnu/packages/crates-graphics.scm
index e3be9bcdcd..d50056e948 100644
--- a/gnu/packages/crates-graphics.scm
+++ b/gnu/packages/crates-graphics.scm
@@ -3005,6 +3005,33 @@ (define-public rust-x11-2
     (description "This crate provides X11 library bindings for Rust.")
     (license license:expat)))
 
+(define-public rust-x11rb-0.8
+  (package
+    (name "rust-x11rb")
+    (version "0.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "x11rb" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "068g5ll4l5f35c2v098hj0kj2c9ma0r7v3pbli164q9g7w5hiyvg"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-gethostname" ,rust-gethostname-0.2)
+         ("rust-libc" ,rust-libc-0.2)
+         ("rust-libloading" ,rust-libloading-0.7)
+         ("rust-nix" ,rust-nix-0.20)
+         ("rust-once-cell" ,rust-once-cell-1)
+         ("rust-winapi" ,rust-winapi-0.3)
+         ("rust-winapi-wsapoll" ,rust-winapi-wsapoll-0.1))))
+    (home-page "https://github.com/psychon/x11rb")
+    (synopsis "Rust bindings to X11")
+    (description "This package provides Rust bindings to X11")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-x11-clipboard-0.5
   (package
     (name "rust-x11-clipboard")
-- 
2.33.1

From 51a4124989a744a401c5011244ce0bb0aba0bdda Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:20:16 +0100
Subject: [PATCH v2 16/19] gnu: Add rust-stderrlog-0.4.

* gnu/packages/crates-io.scm (rust-stderrlog-0.4): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 4a59f6526e..8a9277a318 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -50637,6 +50637,32 @@ (define-public rust-std-prelude-0.2
 codebase.")
     (license license:expat)))
 
+(define-public rust-stderrlog-0.4
+  (package
+    (name "rust-stderrlog")
+    (version "0.4.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "stderrlog" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "09bzvmx2lzyycr1xfcvfwnvqsjg9kb4w22hb19bjqid5j2dyxr9j"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-atty" ,rust-atty-0.2.11)
+         ("rust-chrono" ,rust-chrono-0.4)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-termcolor" ,rust-termcolor-1)
+         ("rust-thread-local" ,rust-thread-local-0.3.4))))
+    (home-page "https://github.com/cardoe/stderrlog-rs")
+    (synopsis "Logger that logs to stderr")
+    (description "This package provides logger that logs to stderr based
+on verbosity specified")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-stdweb-0.4
   (package
     (name "rust-stdweb")
-- 
2.33.1

From f842dd175aa46d0cf5dff1964a5bf908dabd90c4 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 20:12:39 +0100
Subject: [PATCH v2 11/19] gnu: Add rust-tree-magic-0.2.

* gnu/packages/crates-io.scm (rust-tree-magic-0.2): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 3085b9669b..f53747412e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -57357,6 +57357,38 @@ (define-public rust-trash-1
 recycle bin.")
     (license license:expat)))
 
+(define-public rust-tree-magic-0.2
+  (package
+    (name "rust-tree-magic")
+    (version "0.2.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "tree_magic" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "0adndj775gjcvkf7yxdfj3pl39fcdiibswwgff23lm9yrrkr7ndi"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build?
+        #t
+        #:cargo-inputs
+        (("rust-clap" ,rust-clap-2)
+         ("rust-fnv" ,rust-fnv-1)
+         ("rust-lazy-static" ,rust-lazy-static-1)
+         ("rust-nom" ,rust-nom-3)
+         ("rust-num-cpus" ,rust-num-cpus-1)
+         ("rust-parking-lot" ,rust-parking-lot-0.10)
+         ("rust-petgraph" ,rust-petgraph-0.5)
+         ("rust-scoped-threadpool" ,rust-scoped-threadpool-0.1)
+         ("rust-tabwriter" ,rust-tabwriter-1)
+         ("rust-walkdir" ,rust-walkdir-2))))
+    (home-page "https://github.com/aahancoc/tree_magic/")
+    (synopsis "Determines the MIME type")
+    (description "This package determines the MIME type of a file by
+traversing a filetype tree.")
+    (license license:expat)))
+
 (define-public rust-treeline-0.1
   (package
     (name "rust-treeline")
-- 
2.33.1

From 7951a5e3e0a402f9413669603ec13a477a192128 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 20:04:18 +0100
Subject: [PATCH v2 09/19] gnu: Add rust-winapi-wsapoll-0.1.

* gnu/packages/crates-io.scm (rust-winapi-wsapoll-0.1): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 5e1cfc1b1e..3085b9669b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -61700,6 +61700,27 @@ (define-public rust-winapi-util-0.1
     (license (list license:unlicense
                    license:expat))))
 
+(define-public rust-winapi-wsapoll-0.1
+  (package
+    (name "rust-winapi-wsapoll")
+    (version "0.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "winapi-wsapoll" version))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0vnzlcm6yrlx0xdx4g7zr41n84aj73h0p8fwh0m60mbiyl873ha4"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #t
+       #:cargo-inputs
+       (("rust-winapi" ,rust-winapi-0.3))))
+    (home-page "https://github.com/psychon/winapi-wsapoll")
+    (synopsis "Safe wrapper around WSAPoll")
+    (description "This package provides safe wrapper around WSAPoll.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-winapi-x86-64-pc-windows-gnu-0.4
   (package
     (name "rust-winapi-x86-64-pc-windows-gnu")
-- 
2.33.1

From d2ffdf208f553fd8045745afe931f4beb0a82648 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:18:47 +0100
Subject: [PATCH v2 14/19] gnu: Add rust-simple-logger-1.

* gnu/packages/crates-io.scm (rust-simple-logger-1): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 418906db23..ce30d8f830 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -48958,6 +48958,32 @@ (define-public rust-similar-1
     (description "This package provides a diff library for Rust.")
     (license license:asl2.0)))
 
+(define-public rust-simple-logger-1
+  (package
+    (name "rust-simple-logger")
+    (version "1.13.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "simple-logger" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "01wz5xjpski45xq8v1bg8g05flj5h1sl63aabl2c6kj0hz337pmp"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-atty" ,rust-atty-0.2)
+         ("rust-chrono" ,rust-chrono-0.4)
+         ("rust-colored" ,rust-colored-1)
+         ("rust-log" ,rust-log-0.4)
+         ("rust-winapi" ,rust-winapi-0.3))))
+    (home-page "https://github.com/borntyping/rust-simple_logger")
+    (synopsis "Logger with a readable output format")
+    (description
+      "This package provides a logger that prints all messages with
+a readable output format")
+    (license license:expat)))
+
 (define-public rust-simple-mutex-1
   (package
     (name "rust-simple-mutex")
-- 
2.33.1

From 4e2b8675abd3984ea8f78b8e1f89eafbdbdeaac3 Mon Sep 17 00:00:00 2001
From: Petr Hodina <[email-masked]>
Date: Tue, 9 Nov 2021 21:21:25 +0100
Subject: [PATCH v2 15/19] gnu: Add rust-thread-local-0.3.4.

* gnu/packages/crates-io.scm (rust-thread-local-0.3.4): New variable.

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index ce30d8f830..4a59f6526e 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -54407,6 +54407,25 @@ (define-public rust-thread-local-0.3
      `(#:skip-build? #t
        #:cargo-inputs (("rust-lazy-static" ,rust-lazy-static-1))))))
 
+(define-public rust-thread-local-0.3.4
+  (package
+    (inherit rust-thread-local-0.3)
+    (name "rust-thread-local")
+    (version "0.3.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "thread_local" version))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32 "055vj0ddb6vh0zaqdlxssfqzzpgs4ll5l5j7nqvabdzfgasw95qn"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:skip-build? #t
+        #:cargo-inputs
+        (("rust-lazy-static" ,rust-lazy-static-0.2)
+         ("rust-unreachable" ,rust-unreachable-1))))))
+
 (define-public rust-thread-local-0.2
   (package
     (inherit rust-thread-local-0.3)
-- 
2.33.1