Subject: [PATCH] gnu: Add chatterino

From: Vitor Hugo <[email-masked]>
Date: Thu, 13 Feb 2025 20:59:29 +0000

* gnu/packages/messaging.scm (chatterino): New variable.

Change-Id: I32d2cd4898a1ed234d5b9496a79ff4e30f74430b
---
 gnu/packages/messaging.scm | 50 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index f6ac865512..ce7b4d2fa3 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -221,6 +221,54 @@ (define-public biboumi
 users take part in IRC discussions, using their favourite XMPP client.")
    (license license:zlib)))
 
+(define-public chatterino
+  (package
+    (name "chatterino")
+    (version "2.5.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Chatterino/chatterino2")
+             (commit (string-append "v" version))
+             (recursive? #t)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1v1nd3pzghsx9fm1x2im0wmi01anfzm0pk4mdp6g736h1rskig4y"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:configure-flags #~(list "-DCMAKE_BUILD_TYPE=Release")
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (add-before 'configure 'setvars
+                     (lambda _
+                       (setenv "GIT_HASH" "f53d92c7")))
+                   (add-after 'install 'wrap-executable
+                     (lambda* _
+                       (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
+                         (wrap-program (string-append #$output
+                                                      "/bin/chatterino")
+                           `("QT_PLUGIN_PATH" ":" prefix
+                             (,plugin-path)))))))))
+    (inputs (list qtbase
+                  qtsvg
+                  qttools
+                  qt5compat
+                  boost
+                  openssl
+                  libsecret
+                  qtwayland
+                  qtimageformats
+                  bash-minimal))
+    (native-inputs (list pkg-config))
+    (synopsis "Chat client for Twitch")
+    (description
+     "Chatterino is a chat client for Twitch chat.
+It aims to be an improved/extended version of the Twitch web chat.")
+    (home-page "https://chatterino.com")
+    (license license:expat)))
+
 (define-public omemo-wget
   (package
     (name "omemo-wget")
@@ -3882,4 +3930,6 @@ (define-public ejabberd
     (home-page "https://www.ejabberd.im")
     (license license:gpl2+)))
 
+
+
 ;;; messaging.scm ends here
-- 
2.46.0