Subject: [PATCH v5 3/3] gnu: Add blackbox-terminal.

From: Ashvith Shetty <[email-masked]>
Date: Sun, 8 Sep 2024 01:01:24 +0530

* gnu/packages/gnome-xyz.scm (blackbox-terminal-0.14.0): New public variable.

Change-Id: I3f95a4d9d2ecc5767e04f675d1fcf83649d684df
---
 gnu/packages/gnome-xyz.scm | 65 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index c5abcbb14d..5a2a5bf629 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -65,6 +65,7 @@ (define-module (gnu packages gnome-xyz)
   #:use-module (gnu packages ibus)
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-science)
@@ -1795,3 +1796,67 @@ (define-public libpqmarble
     (synopsis "Utility library for GNOME apps")
     (description "Utility library for GNOME apps.")
     (license license:gpl3)))
+
+(define-public blackbox-terminal
+  (package
+    (name "blackbox-terminal")
+    (version "0.14.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.gnome.org/raggesilver/blackbox")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0g7n2z0m7jjbn93zvx3ix7ph4mpncwq80cjjc2prp878cksj3g3r"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:configure-flags `("-Dblackbox_is_flatpak=false")
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'fix-gtk4-update-icon-cache
+                    (lambda _
+                      (substitute* "build-aux/meson/postinstall.py"
+                        (("gtk-update-icon-cache")
+                         "gtk4-update-icon-cache")))))))
+    (native-inputs (list pkg-config
+                         vala
+                         python-3.10
+                         desktop-file-utils ;for update-desktop-database
+                         `(,glib "bin") ;for glib-compile-schemas, etc.
+                         `(,gtk "bin") ;gtk4-update-icon-cache
+                         gettext-minimal))
+    (inputs (list gtk
+                  vte-gtk-4-with-sixel
+                  json-glib
+                  libpqmarble
+                  libadwaita
+                  pcre2
+                  ;; libxml2 and libgee are also required to build
+                  ;; but meson fails to catch it.
+                  libxml2
+                  libgee
+                  ;; The build won't fail without librsvg, but
+                  ;; since it is a dependency, it has been included.
+                  librsvg))
+    (home-page "https://gitlab.gnome.org/raggesilver/blackbox/")
+    (synopsis "Black Box is an elegant and customizable terminal for GNOME.")
+    (description
+     "An elegant and customizable terminal for GNOME:
+@itemize
+@item Color schemes - (Tilix compatible color scheme support)
+@item Theming - your color scheme can be used to style the whole app
+@item Background transparency
+@item Custom fonts, padding, and cell spacing
+@item Tabs
+@item Support for drag and dropping files
+@item Sixel (experimental)
+@item Customizable keybindings
+@item Toggle-able header bar
+@item Search your backlog with text or regex
+@item Context aware header bar - the header bar changes colors when running commands with sudo and in ssh sessions
+@item Desktop notifications - get notified when a command is finished in the background
+@item Customizable UI
+@end itemize")
+    (license license:gpl3)))
-- 
2.45.2