[PATCH] gnu: Add hyprland.

  • Done
  • quality assurance status badge
Details
5 participants
  • Léonard
  • Adam Faiz
  • Graguton
  • John Kehayias
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Adam Faiz
Severity
normal
Blocked by

Debbugs page

Adam Faiz wrote 2 years ago
(address . guix-patches@gnu.org)
ac9bcef4-d8db-e9b6-80a3-79c7bbae65a5@disroot.org
From a8f78a0b951cce3ab4c03b3f1e61b1b95d93c723 Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Mon, 21 Nov 2022 13:29:16 +0800
Subject: [PATCH] gnu: Add hyprland.

* gnu/packages/wm.scm (hyprland): New variable.
---
gnu/packages/wm.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index c87a616ed9..c2b567bd62 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -107,6 +107,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages gawk)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gperf)
@@ -2723,6 +2724,49 @@ (define-public hikari
capabilities. It is heavily inspired by the Calm Window manager(cwm).")
(license license:bsd-2)))

+(define-public hyprland
+ (package
+ (name "hyprland")
+ (version "0.18.0beta")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hyprwm/Hyprland")
+ (commit (string-append "v"version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1sbf12mqvgqpjfw4bni4p2gk2djnh49fwzki4dnsyq4ykcp7x6hb"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Unbundle dependencies and add it to the dependency list
+ (delete-file-recursively "subprojects")
+ (substitute* "CMakeLists.txt"
+ ((".*subprojects/wlroots/.*") "")
+ (("libinput)") "libinput wlroots)"))))))
+ (build-system cmake-build-system)
+ (native-inputs
+ (list pkg-config gcc-12))
+ (inputs
+ (list wayland
+ wayland-protocols
+ cairo
+ pango
+ libdrm
+ egl-wayland
+ libxkbcommon
+ libinput
+ wlroots))
+ (home-page "https://www.hyprland.org/")
+ (synopsis "Dynamic tiling Wayland compositor based on wlroots")
+ (description
+ "Hyprland is a dynamic tiling Wayland compositor based on wlroots
+that doesn't sacrifice on its looks. It supports multiple layouts,
+fancy effects, has a very flexible IPC model allowing for a lot of
+customization, and more. ")
+ (license license:bsd-3)))
+
(define-public devour
(package
(name "devour")
--
2.38.1
Ricardo Wurmus wrote 2 years ago
(address . 59434@debbugs.gnu.org)
874jtgbte4.fsf@elephly.net
Hi Adam,

thank you for the patch. Unfortunately, this package does not build:

Toggle snippet (41 lines)
/gnu/store/shhxkiy9qr695h8k64g9m6a03msaw2yk-gcc-12.2.0/bin/c++ -DGIT_BRANCH=\"\" -DGIT_COMMIT_HASH=\"\" -DGIT_COMMIT_MESSAGE=\"\" -DGIT_DIRTY=\"dirty\" -isystem /gnu/store/6gq2n65ixpn6drd5wai2h7g5wjm6bp2b-cairo-1.16.0/include/cairo -isystem /gnu/store/c1nvl9hcgl09nysmy1qqsz5ljiarxdjs-libdrm-2.4.107/include/libdrm -isystem /gnu/store/vk23fcm4livzrnb3kzhxs6yjds8f355c-pango-1.48.10/include/pango-1.0 -isystem /gnu/store/j8x167zaka2h6pxk7wiq5zkg67hzf8a2-pixman-0.40.0/include/pixman-1 -isystem /gnu/store/p7iq81hxxyk9zy7a9dngbf16zm8d4klx-libpng-1.6.37/include/libpng16 -isystem /gnu/store/96srhmpmxa20wmsck95g3iq4hb3lz4a0-glib-2.70.2/include/glib-2.0 -isystem /gnu/store/96srhmpmxa20wmsck95g3iq4hb3lz4a0-glib-2.70.2/lib/glib-2.0/include -isystem /gnu/store/ak70pk2hjks17cx7zjdmdmzpcpiy9gpi-freetype-2.10.4/include/freetype2 -isystem /gnu/store/f6ibajh7x233cvr30c2p314l2absk36h-harfbuzz-2.8.2/include/harfbuzz -isystem /gnu/store/v5x6f3dml69pmn4pfkl51j6y03v6rlsg-fribidi-1.0.9/include/fribidi -isystem /gnu/store/5583c2za2jsn9g6az79rnksgvigwnsk7-util-linux-2.37.2-lib/include/libmount -isystem /gnu/store/5583c2za2jsn9g6az79rnksgvigwnsk7-util-linux-2.37.2-lib/include/blkid -isystem /gnu/store/v3hqc5i1jqi0s04zxvi465bihrgb1sq1-elogind-246.10/include/elogind -O2 -g -DNDEBUG -O3 -std=c++23 -DWLR_USE_UNSTABLE -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -pthread -MD -MT CMakeFiles/Hyprland.dir/src/debug/HyprCtl.cpp.o -MF CMakeFiles/Hyprland.dir/src/debug/HyprCtl.cpp.o.d -o CMakeFiles/Hyprland.dir/src/debug/HyprCtl.cpp.o -c /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/debug/HyprCtl.cpp
In file included from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/defines.hpp:1,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/Window.hpp:3,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/Window.cpp:1:
/tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/includes.hpp:40:10: fatal error: wlr/render/allocator.h: No such file or directory
40 | #include <wlr/render/allocator.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/Hyprland.dir/build.make:93: CMakeFiles/Hyprland.dir/src/Window.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/defines.hpp:1,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/Compositor.hpp:7,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/Compositor.cpp:1:
/tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/includes.hpp:40:10: fatal error: wlr/render/allocator.h: No such file or directory
40 | #include <wlr/render/allocator.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/Hyprland.dir/build.make:79: CMakeFiles/Hyprland.dir/src/Compositor.cpp.o] Error 1
In file included from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/config/../defines.hpp:1,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/config/ConfigManager.hpp:8,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/config/ConfigManager.cpp:1:
/tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/config/../includes.hpp:40:10: fatal error: wlr/render/allocator.h: No such file or directory
40 | #include <wlr/render/allocator.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/Hyprland.dir/build.make:107: CMakeFiles/Hyprland.dir/src/config/ConfigManager.cpp.o] Error 1
In file included from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/debug/../defines.hpp:1,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/debug/../Compositor.hpp:7,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/debug/HyprCtl.hpp:3,
from /tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/debug/HyprCtl.cpp:1:
/tmp/guix-build-hyprland-0.18.0beta.drv-0/source/src/debug/../includes.hpp:40:10: fatal error: wlr/render/allocator.h: No such file or directory
40 | #include <wlr/render/allocator.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/Hyprland.dir/build.make:121: CMakeFiles/Hyprland.dir/src/debug/HyprCtl.cpp.o] Error 1
make[2]: Leaving directory '/tmp/guix-build-hyprland-0.18.0beta.drv-0/build'
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/Hyprland.dir/all] Error 2
make[1]: Leaving directory '/tmp/guix-build-hyprland-0.18.0beta.drv-0/build'
make: *** [Makefile:114: all] Error 2

wlroots does not provide this file.

--
Ricardo
Ricardo Wurmus wrote 2 years ago
Control message for 59434
(address . control@debbugs.gnu.org)
87zgb8adsc.fsf@elephly.net
block 59434 by 59433
thanks

--
Ricardo
Léonard wrote 2 years ago
Solution
(name . 59434@debbugs.gnu.org)(address . 59434@debbugs.gnu.org)
_RdfqBwhz3UqGwOXQGWOyx6tah7ut_0zB7GCJWsw8pe5F3WFXG9lMAu5EuydyOq_H68wNk1NEDpgw3G2StuTYgqGlx3KVkkAfZhIekUeEsM=@protonmail.com
This is because wlroots has migrated to gitlab and the github repo has been archived. The guix wlroots package still uses the github repo as you can see on line 1546 of ./gnu/packages/wm.scm.

Since hyprland is made to be built with the latest wlroots version it fails to build with the old github version. Possible solutions would be to use the bundled wlroots or update the wlroots package in wm.scm to the new source.

I would send a patch if I could but I'm not familiar enough with guix and guile to do so.

- Léonard Gomez
Attachment: file
Graguton wrote 11 months ago
hyprland
(address . 59434@debbugs.gnu.org)
CAPnFStK0bbrBmghjo=a51+oViFNzb5j_WDFeoRnWUiK_57A=Eg@mail.gmail.com
It appears that 59434 has been fixed and will no longer block this patch,
although it is now out of date. This is my first time commenting or using
guix so I am not familiar enough to complete this myself. There appears to
be an up to date version at
but it is implemented differently and I do not have the experience to know
why.

Thanks, Ethan
Attachment: file
John Kehayias wrote 2 months ago
(address . 59434-done@debbugs.gnu.org)
87v7uyi9bh.fsf@protonmail.com
On Thu, Apr 25, 2024 at 03:51 AM, Graguton wrote:

Toggle quote (7 lines)
> It appears that 59434 has been fixed and will no longer block this patch, although it is now out of date. This is my first time commenting or using guix
> so I am not familiar enough to complete this myself. There appears to be an up to date version at
> https://github.com/rakino/Rosenthal/blob/trunk/rosenthal/packages/wm.scm but it is implemented differently and I do not have the experience to
> know why.
>
> Thanks, Ethan

Following up on this old patch as hyprland was added to Guix some weeks
ago, yay!

John

PS: Ethan and Léonard, your emails did not go to anyone since you only
sent it to the debbugs number. Unfortunately that is not an email list,
alias, for forward to anyone. In the future, please look to "wide reply"
or reply all via mumi, emacs debbugs, or getting emails from the debbugs
website. (A common and annoying gotcha.)
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 59434@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 59434
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help