Subject: [PATCH v2 01/44] gnu: Add eww.

From: Murilo <[email-masked]>
Date: Fri, 31 May 2024 09:37:51 -0300

* gnu/packages/rust-apps.scm (eww): New variable.

Change-Id: Ib319868975fa400102ce983b6263bb96b181b165
---
 gnu/packages/rust-apps.scm | 82 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 04f88e769d..a22d363b71 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2024 Herman Rimm <[email-masked]>
 ;;; Copyright © 2024 Tomas Volf <[email-masked]>
 ;;; Copyright © 2024 Suhail Singh <[email-masked]>
+;;; Copyright © 2024 Murilo <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -66,6 +67,7 @@ (define-module (gnu packages rust-apps)
   #:use-module (gnu packages crates-crypto)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages crates-graphics)
+  #:use-module (gnu packages crates-gtk)
   #:use-module (gnu packages crates-tls)
   #:use-module (gnu packages crates-vcs)
   #:use-module (gnu packages crates-web)
@@ -546,6 +548,86 @@ (define-public emacs-lsp-booster
 configuration instructions.")
     (license license:expat)))
 
+(define-public eww
+  (package
+    (name "eww")
+    (version "0.6.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/elkowar/eww")
+             (commit (string-append "v" version))))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0fd5ycfccrcwnmmdb6bc48rcj4qj9hb6xwbnz7g22dj9a6kffc5g"))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:skip-build? #f
+       #:install-source? #f
+       #:imported-modules (,@%cargo-build-system-modules (guix build
+                                                          cargo-build-system))
+       #:modules ((guix build utils)
+                  (guix build cargo-build-system)
+                  (ice-9 match))
+       #:phases ,#~(modify-phases %standard-phases
+                     (replace 'install
+                       (lambda* (#:key outputs #:allow-other-keys)
+                         (let* ((out (assoc-ref outputs "out"))
+                                (bin (string-append out "/bin")))
+                           (install-file "target/release/eww" bin)))))
+       #:cargo-inputs (("rust-zbus" ,rust-zbus-3)
+                       ("rust-yuck" ,rust-yuck-0.1)
+                       ("rust-x11rb" ,rust-x11rb-0.11)
+                       ("rust-wait-timeout" ,rust-wait-timeout-0.2)
+                       ("rust-unescape" ,rust-unescape-0.1)
+                       ("rust-tokio-util" ,rust-tokio-util-0.7)
+                       ("rust-tokio" ,rust-tokio-1)
+                       ("rust-sysinfo" ,rust-sysinfo-0.30)
+                       ("rust-simplexpr" ,rust-simplexpr-0.1)
+                       ("rust-simple-signal" ,rust-simple-signal-1)
+                       ("rust-serde-json" ,rust-serde-json-1)
+                       ("rust-serde" ,rust-serde-1)
+                       ("rust-regex" ,rust-regex-1)
+                       ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.5)
+                       ("rust-pango" ,rust-pango-0.17)
+                       ("rust-ordered-stream" ,rust-ordered-stream-0.2)
+                       ("rust-once-cell" ,rust-once-cell-1)
+                       ("rust-notify" ,rust-notify-6)
+                       ("rust-notifier-host" ,rust-notifier-host-0.6)
+                       ("rust-nix" ,rust-nix-0.27)
+                       ("rust-maplit" ,rust-maplit-1)
+                       ("rust-log" ,rust-log-0.4)
+                       ("rust-libc" ,rust-libc-0.2)
+                       ("rust-itertools" ,rust-itertools-0.12)
+                       ("rust-gtk-layer-shell" ,rust-gtk-layer-shell-0.6)
+                       ("rust-gtk" ,rust-gtk-0.17)
+                       ("rust-grass" ,rust-grass-0.13)
+                       ("rust-glib-macros" ,rust-glib-macros-0.17)
+                       ("rust-glib" ,rust-glib-0.17)
+                       ("rust-gdkx11" ,rust-gdkx11-0.17)
+                       ("rust-gdk-pixbuf" ,rust-gdk-pixbuf-0.17)
+                       ("rust-gdk" ,rust-gdk-0.17)
+                       ("rust-futures" ,rust-futures-0.3)
+                       ("rust-extend" ,rust-extend-1)
+                       ("rust-eww-shared-util" ,rust-eww-shared-util-0.1)
+                       ("rust-derive-more" ,rust-derive-more-0.99)
+                       ("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
+                       ("rust-clap-complete" ,rust-clap-complete-4)
+                       ("rust-clap" ,rust-clap-4)
+                       ("rust-chrono" ,rust-chrono-0.4)
+                       ("rust-cairo-sys-rs" ,rust-cairo-sys-rs-0.17)
+                       ("rust-cairo-rs" ,rust-cairo-rs-0.17)
+                       ("rust-bincode" ,rust-bincode-1)
+                       ("rust-anyhow" ,rust-anyhow-1))))
+    (native-inputs (list pkg-config glib gtk+ libdbusmenu gtk-layer-shell))
+    (home-page "https://elkowar.github.io/eww/")
+    (synopsis "ElKowars wacky widgets")
+    (description
+     "Elkowars Wacky Widgets is a standalone widget system made in Rust that
+allows you to implement your own, custom widgets in any window manager.")
+    (license license:expat)))
+
 (define-public eza
   (package
     (name "eza")
-- 
2.41.0