Subject: [PATCH 1/2] gnu: Add hyprland-qtutils.

From: John Kehayias <[email-masked]>
Date: Sat, 04 Jan 2025 05:25:57 +0000

* gnu/packages/qt.scm (hyprland-qtutils): New variable.

Change-Id: I11d1460e29e456c3f69ea3bf018ef9f19969e342
---
 gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index e51962e0a7..44b61e2e7b 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -33,6 +33,7 @@
 ;;; Copyright © 2023 Simon South <[email-masked]>
 ;;; Copyright © 2024 Foundation Devices, Inc. <[email-masked]>
 ;;; Copyright © 2024 Josep Bigorra <[email-masked]>
+;;; Copyright © 2025 John Kehayias <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5396,6 +5397,60 @@ (define-public soqt
 of the InventorXt GUI component toolkit.")
   (license license:bsd-3)))

+(define-public hyprland-qtutils
+  (package
+    (name "hyprland-qtutils")
+    (version "0.1.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/hyprwm/hyprland-qtutils")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "02ymf8xypnxhknb3d0bxbp96hargwrg9syb9xs3va3rmx909r7b6"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:tests? #f ;There are no tests.
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output "/bin/" prog)
+                        `("QML_IMPORT_PATH" ":" prefix
+                          #$(map (lambda (i)
+                                   (file-append (this-package-input i) "/lib/qt6/qml"))
+                                 '("kirigami"
+                                   "qqc2-desktop-style"
+                                   "qtdeclarative"
+                                   "qtwayland")))
+                        `("QT_PLUGIN_PATH" ":" prefix
+                          #$(map (lambda (i)
+                                   (file-append (this-package-input i) "/lib/qt6/plugins"))
+                                 '("qqc2-desktop-style" "qtwayland")))))
+                    '("hyprland-dialog" "hyprland-update-screen")))))))
+    (native-inputs (list gcc-14 pkg-config))
+    (inputs
+     (list bash-minimal
+           hyprutils
+           kirigami
+           libxkbcommon
+           qqc2-desktop-style
+           qtbase
+           qtdeclarative
+           qtwayland
+           wayland))
+    (home-page "https://github.com/hyprwm/hyprland-qtutils")
+    (synopsis "Hyprland QT/QML utility apps")
+    (description
+     "This package provides some QT/QML utilities that might be used by
+various hypr* apps.")
+    (license license:bsd-3)))
+
+
 (define-public libdbusmenu-qt
   (package
     (name "libdbusmenu-qt")
--
2.47.1