* [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland
@ 2025-01-04 5:23 John Kehayias via Guix-patches via
2025-01-04 5:25 ` [bug#75337] [PATCH 1/2] gnu: Add hyprland-qtutils John Kehayias via Guix-patches via
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: John Kehayias via Guix-patches via @ 2025-01-04 5:23 UTC (permalink / raw)
To: 75337; +Cc: John Kehayias, hako, collin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#75337] [PATCH 1/2] gnu: Add hyprland-qtutils.
2025-01-04 5:23 [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland John Kehayias via Guix-patches via
@ 2025-01-04 5:25 ` John Kehayias via Guix-patches via
2025-01-04 5:26 ` [bug#75337] [PATCH 2/2] gnu: hyprland: Add hyprland-qtutils to propagated-inputs John Kehayias via Guix-patches via
2025-01-04 14:58 ` [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland Hilton Chain
2 siblings, 0 replies; 5+ messages in thread
From: John Kehayias via Guix-patches via @ 2025-01-04 5:25 UTC (permalink / raw)
To: 75337; +Cc: John Kehayias, hako, collin
* 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@simonsouth.net>
;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
;;; Copyright © 2024 Josep Bigorra <jjbigorra@gmail.com>
+;;; Copyright © 2025 John Kehayias <john.kehayias@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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#75337] [PATCH 2/2] gnu: hyprland: Add hyprland-qtutils to propagated-inputs.
2025-01-04 5:23 [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland John Kehayias via Guix-patches via
2025-01-04 5:25 ` [bug#75337] [PATCH 1/2] gnu: Add hyprland-qtutils John Kehayias via Guix-patches via
@ 2025-01-04 5:26 ` John Kehayias via Guix-patches via
2025-01-04 14:58 ` [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland Hilton Chain
2 siblings, 0 replies; 5+ messages in thread
From: John Kehayias via Guix-patches via @ 2025-01-04 5:26 UTC (permalink / raw)
To: 75337; +Cc: John Kehayias, hako, collin
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland
2025-01-04 5:23 [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland John Kehayias via Guix-patches via
2025-01-04 5:25 ` [bug#75337] [PATCH 1/2] gnu: Add hyprland-qtutils John Kehayias via Guix-patches via
2025-01-04 5:26 ` [bug#75337] [PATCH 2/2] gnu: hyprland: Add hyprland-qtutils to propagated-inputs John Kehayias via Guix-patches via
@ 2025-01-04 14:58 ` Hilton Chain
2025-01-06 19:37 ` bug#75337: " John Kehayias via Guix-patches via
2 siblings, 1 reply; 5+ messages in thread
From: Hilton Chain @ 2025-01-04 14:58 UTC (permalink / raw)
To: John Kehayias; +Cc: 75337, collin
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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#75337: [PATCH 0/2] Add hyprland-qtutils; use it Hyprland
2025-01-04 14:58 ` [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland Hilton Chain
@ 2025-01-06 19:37 ` John Kehayias via Guix-patches via
0 siblings, 0 replies; 5+ messages in thread
From: John Kehayias via Guix-patches via @ 2025-01-06 19:37 UTC (permalink / raw)
To: Hilton Chain; +Cc: 75337-done, collin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-06 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-04 5:23 [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland John Kehayias via Guix-patches via
2025-01-04 5:25 ` [bug#75337] [PATCH 1/2] gnu: Add hyprland-qtutils John Kehayias via Guix-patches via
2025-01-04 5:26 ` [bug#75337] [PATCH 2/2] gnu: hyprland: Add hyprland-qtutils to propagated-inputs John Kehayias via Guix-patches via
2025-01-04 14:58 ` [bug#75337] [PATCH 0/2] Add hyprland-qtutils; use it Hyprland Hilton Chain
2025-01-06 19:37 ` bug#75337: " John Kehayias via Guix-patches via
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).