GNU bug report logs - #75337
[PATCH 0/2] Add hyprland-qtutils; use it Hyprland

Previous Next

Package: guix-patches;

Reported by: John Kehayias <john.kehayias <at> protonmail.com>

Date: Sat, 4 Jan 2025 05:24:01 UTC

Severity: normal

Tags: patch

Done: John Kehayias <john.kehayias <at> protonmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75337 in the body.
You can then email your comments to 75337 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#75337; Package guix-patches. (Sat, 04 Jan 2025 05:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to John Kehayias <john.kehayias <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 04 Jan 2025 05:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: guix-patches <at> gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>, hako <at> ultrarare.space,
 collin <at> rekahsoft.ca
Subject: [PATCH 0/2] Add hyprland-qtutils; use it Hyprland
Date: Sat, 04 Jan 2025 05:23:05 +0000
Hi all,

As pointed out in <https://issues.guix.gnu.org/75036#2>, Hyprland now wants binaries from the hyprland-qtutils package, which this patch series adds. I checked that it builds and I can run the utlities. One is to send a message if Hyprland is updated, which isn't relevant for our package, but I didn't look into any easy way to disable that from the source if that's what we want to do.

One thing to point out is that I manually wrapped the binaries with needed QT environment variables to get them to work. Using qt-buid-system or calling qt-wrap-program (or qt-wrap-all-programs) did not do much: it just added the plugin path for qtbase-5 (not an input here). I didn't try to investigate further but maybe the qt-team could chime in.

On the Hyprland end, it just checks for these utlities somewhere on the PATH (or something like that) so I just used propagated-inputs. The package/build does not otherwise depend or try to find these at build time. Using propagated-inputs seems to me the easiest and most straight forward method here (the source does not just hardcode something like "/usr/bin/hyprland-dialog" to patch with a store path).

I have not actually tried running the latest Hyprland which will warn (but otherwise should work) about these.

Thanks all!
John

John Kehayias (2):
  gnu: Add hyprland-qtutils.
  gnu: hyprland: Add hyprland-qtutils to propagated-inputs.

 gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 gnu/packages/wm.scm |  2 ++
 2 files changed, 57 insertions(+)


base-commit: a707ebe5d3875a49523bc17de2d36af6f1c18f7e
prerequisite-patch-id: 3efc585c869da704ca71214328a78b6e6bbad919
prerequisite-patch-id: 82bcb22fe1f5bd69d26626e575b7629f6f223ae3
prerequisite-patch-id: b12f224a58be29cf89415a53dc245e4057139e22
prerequisite-patch-id: 9fa5469aa4528c28962598256414bf4a4f517dce
--
2.47.1






Information forwarded to guix-patches <at> gnu.org:
bug#75337; Package guix-patches. (Sat, 04 Jan 2025 05:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 75337 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: 75337 <at> debbugs.gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>, hako <at> ultrarare.space,
 collin <at> rekahsoft.ca
Subject: [PATCH 1/2] gnu: Add hyprland-qtutils.
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 <simon <at> simonsouth.net>
 ;;; Copyright © 2024 Foundation Devices, Inc. <hello <at> foundation.xyz>
 ;;; Copyright © 2024 Josep Bigorra <jjbigorra <at> gmail.com>
+;;; Copyright © 2025 John Kehayias <john.kehayias <at> protonmail.com>
 ;;;
 ;;; 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






Information forwarded to guix-patches <at> gnu.org:
bug#75337; Package guix-patches. (Sat, 04 Jan 2025 05:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 75337 <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: 75337 <at> debbugs.gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>, hako <at> ultrarare.space,
 collin <at> rekahsoft.ca
Subject: [PATCH 2/2] gnu: hyprland: Add hyprland-qtutils to propagated-inputs.
Date: Sat, 04 Jan 2025 05:26:09 +0000
Hyprland will warn and suggest on running that it expects to find binaries
from hyprland-qtutils.

* gnu/packages/wm.scm (hyprland)[propagated-inputs]: New field.

Change-Id: I54a2331181636b7aad9abdf7dfef9e1ac9c9fc3c
---
 gnu/packages/wm.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index e7a6cb6afc..4d53861ceb 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -169,6 +169,7 @@ (define-module (gnu packages wm)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages regex)
   #:use-module (gnu packages serialization)
@@ -423,6 +424,7 @@ (define-public hyprland
            xcb-util-errors
            xcb-util-wm
            xorg-server-xwayland))
+    (propagated-inputs (list hyprland-qtutils))
     (home-page "https://hyprland.org/")
     (synopsis "Dynamic tiling Wayland compositor")
     (description
--
2.47.1






Information forwarded to guix-patches <at> gnu.org:
bug#75337; Package guix-patches. (Sat, 04 Jan 2025 15:41:01 GMT) Full text and rfc822 format available.

Message #14 received at 75337 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: John Kehayias <john.kehayias <at> protonmail.com>
Cc: 75337 <at> debbugs.gnu.org, collin <at> rekahsoft.ca
Subject: Re: [PATCH 0/2] Add hyprland-qtutils; use it Hyprland
Date: Sat, 04 Jan 2025 22:58:34 +0800
On Sat, 04 Jan 2025 13:23:05 +0800,
John Kehayias wrote:
>
> Hi all,
>
> As pointed out in <https://issues.guix.gnu.org/75036#2>, Hyprland now wants
> binaries from the hyprland-qtutils package, which this patch series adds. I
> checked that it builds and I can run the utlities. One is to send a message if
> Hyprland is updated, which isn't relevant for our package, but I didn't look
> into any easy way to disable that from the source if that's what we want to
> do.
>
> One thing to point out is that I manually wrapped the binaries with needed QT
> environment variables to get them to work. Using qt-buid-system or calling
> qt-wrap-program (or qt-wrap-all-programs) did not do much: it just added the
> plugin path for qtbase-5 (not an input here). I didn't try to investigate
> further but maybe the qt-team could chime in.

qt-build-system has a #:qtbase argument, you can set it to qtbase.

> On the Hyprland end, it just checks for these utlities somewhere on the PATH
> (or something like that) so I just used propagated-inputs. The package/build
> does not otherwise depend or try to find these at build time. Using
> propagated-inputs seems to me the easiest and most straight forward method
> here (the source does not just hardcode something like
> "/usr/bin/hyprland-dialog" to patch with a store path).

Found a pattern to bypass the check :)
--8<---------------cut here---------------start------------->8---
(substitute* ...
  (("!executableExistsInPath.*\".") "false")
  (("hyprland-update-screen" cmd)
   (search-input-file inputs (in-vicinity "bin" cmd))))
--8<---------------cut here---------------end--------------->8---

> I have not actually tried running the latest Hyprland which will warn (but
> otherwise should work) about these.
>
> Thanks all!
> John
>
> John Kehayias (2):
>   gnu: Add hyprland-qtutils.
>   gnu: hyprland: Add hyprland-qtutils to propagated-inputs.
>
>  gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
>  gnu/packages/wm.scm |  2 ++
>  2 files changed, 57 insertions(+)
>
>
> base-commit: a707ebe5d3875a49523bc17de2d36af6f1c18f7e
> prerequisite-patch-id: 3efc585c869da704ca71214328a78b6e6bbad919
> prerequisite-patch-id: 82bcb22fe1f5bd69d26626e575b7629f6f223ae3
> prerequisite-patch-id: b12f224a58be29cf89415a53dc245e4057139e22
> prerequisite-patch-id: 9fa5469aa4528c28962598256414bf4a4f517dce
> --
> 2.47.1
>
>




Reply sent to John Kehayias <john.kehayias <at> protonmail.com>:
You have taken responsibility. (Mon, 06 Jan 2025 19:38:01 GMT) Full text and rfc822 format available.

Notification sent to John Kehayias <john.kehayias <at> protonmail.com>:
bug acknowledged by developer. (Mon, 06 Jan 2025 19:38:02 GMT) Full text and rfc822 format available.

Message #19 received at 75337-done <at> debbugs.gnu.org (full text, mbox):

From: John Kehayias <john.kehayias <at> protonmail.com>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 75337-done <at> debbugs.gnu.org, collin <at> rekahsoft.ca
Subject: Re: [PATCH 0/2] Add hyprland-qtutils; use it Hyprland
Date: Mon, 06 Jan 2025 19:37:11 +0000
Hi,

On Sat, Jan 04, 2025 at 10:58 PM, Hilton Chain wrote:

> On Sat, 04 Jan 2025 13:23:05 +0800,
> John Kehayias wrote:
>> One thing to point out is that I manually wrapped the binaries with needed QT
>> environment variables to get them to work. Using qt-buid-system or calling
>> qt-wrap-program (or qt-wrap-all-programs) did not do much: it just added the
>> plugin path for qtbase-5 (not an input here). I didn't try to investigate
>> further but maybe the qt-team could chime in.
>
> qt-build-system has a #:qtbase argument, you can set it to qtbase.
>

Right, and I swear I tried that but I guess that's what happens when
you do a bunch of things at the same time late at night :) Or maybe it
was when I was just using the wrap-qt-program phase and didn't quite
do it correctly. Anyway, that does indeed work and is much cleaner
now.

>> On the Hyprland end, it just checks for these utlities somewhere on the PATH
>> (or something like that) so I just used propagated-inputs. The package/build
>> does not otherwise depend or try to find these at build time. Using
>> propagated-inputs seems to me the easiest and most straight forward method
>> here (the source does not just hardcode something like
>> "/usr/bin/hyprland-dialog" to patch with a store path).
>
> Found a pattern to bypass the check :)
> --8<---------------cut here---------------start------------->8---
> (substitute* ...
>   (("!executableExistsInPath.*\".") "false")
>   (("hyprland-update-screen" cmd)
>    (search-input-file inputs (in-vicinity "bin" cmd))))
> --8<---------------cut here---------------end--------------->8---
>

Ah nice, thanks! I used that and made hyprland-qtutils just a regular
input (after checking the substitutions were correct in both files and
searching Hyprland to make sure that there were no other instances). I
added you as co-author to that patch.

Pushed both, as 8f261686ec0e5a988935e76e5495898e036f9fa7 and
0b4b22b6d363d0dd0bdaee65e47bda5cac72475c

Thanks for the help!
John





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Feb 2025 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.