guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packaging Hyprland


From: hutzdog
Subject: Re: Packaging Hyprland
Date: Sat, 24 Feb 2024 22:32:52 +0000

Hi,

> Hi Hutzdog,
> 

> On Fri, Feb 23, 2024 at 01:20 AM, hutzdog wrote:
> 

> > Hi all,
> >
> > I've been working on moving over to GNU Guix recently, and have hit a
> 

> Welcome to Guix! (For the first part, not the roadblock part...)
Thanks, so far I'm enjoying the experience

> > roadblock: there is no package for Hyprland (the one WLRoots based
> > compositor with single window capture and automatic window swallowing
> > that I know of). I've taken the liberty of packaging the latest
> > version (see
> > <https://git.sr.ht/~hutzdog/patchwork/tree/master/item/patchwork/packages/desktop.scm>
> 

> Funny enough, I just decided to take the plunge and try out Wayland
> finally with Hyprland, as a sucker for eye candy. I do miss using Lisp
> more (coming from lots of StumpWM time) and easy emacs keybindings
> everywhere.
> 

> I'm using a package from a channel, I believe, of one of our
> committers, who I'm cc'ing as I was just about to ask them about
> upstreaming.
> 

> <https://codeberg.org/hako/Rosenthal/src/branch/trunk/rosenthal/packages/wm.scm>
Cool, it looks like we did things slightly differently but it looks like we've 
reached similar outputs (though mine does keep bundled WLRoots due to the fact 
that having a wlroots-git package for all compositors could cause issues as 
APIs change over time. Their package definitely seems like a better base 
(partly because I'm new to packaging with Guix and thus don't know how to do it 
well yet), though there are a few things in mine that might make it worthwhile.

> Works great on my end, thanks to them!
> 

> > for the package), but there are some changes that need to happen in
> > order for it to be upstreamed (as of v0.35.0).
> >
> > # Pending Patches
> > The following existing patches need to be merged:
> > LibInput -> 1.25.0 (<https://issues.guix.gnu.org/68844>)
> 

> I could take this on mesa-updates as I was going to be doing some
> updates so might as well take this. I'll add it locally and send a
> message to the bug number. Part of my motivation was to be able to
> upstream Hyprland as well.
Cool, I don't know much about the various development branches so I can't say 
whether or not that's the correct branch.

> If this fits better on another existing branch, please let me know,
> someone.
> 

> > LibDRM -> 2.4.120 (<https://issues.guix.gnu.org/68845>)
> >
> 

> I have this locally on my mesa-updates. I'll send a message to that
> bug number.
Alright, that merging will be good

> > # New Patches
> > The following new patches will need to be created (I intend to submit
> > these at some point in the near future):
> > Cairo -> 1.18.0 (requires moving to Meson, I have a mostly complete
> > set of changes to make it work)
> 

> I have this locally as well and will send some patches for review. It
> took a bit more work, though the final result is pretty simple, it
> needed a hidden cairo and a new cairo-with-documentation to build the
> docs. I built up to icecat locally and all was good from what I could
> see.
> 

> Sorry for any duplicate work, perhaps your version can add something
> to mine.
Actually, from what I can tell my repo's version handles the documentation 
problem (I move it to the correct output after the install step), but otherwise 
either will work fine.

> > Toml++ (package will be sent as a patch soon)
> > Hyprlang (for xdg-desktop-portal-hyprland, will publish after Hyprland)
> >
> 

> I believe we'll need a more current version than the released wlroots
> as well. Possibly others based on the channel I referenced above, but
> the big update is libdrm and cairo, in terms of rebuilds.
Yeah, Hyprland depends on the Git version of WLRoots. I've chosen to use their 
bundled version in my package to avoid breakage from changes to WIP WLRoots 
APIs. Actually, I think that I did miss a different package (udis86), but that 
can be added.

> > ## HWData
> > As with packages using the release versions of WLRoots, due to how
> > Guix packages HWData a patch is needed to make Meson find it. We have
> > a few options: maintain a parallel package which simply farms all
> > outputs of HWData as symlinks and adds the pkg-config file, maintain a
> > patch on a much more volatile version of WLRoots, or find some other
> > solution.
> 

> Was this handled already in <https://issues.guix.gnu.org/68146> for
> wlroots? Which has been merged.
This is an interesting case, where applying a patch to the wlroots Git package 
would work. What I (and, as it seems, the developer of the other channel) seem 
to have come to is that maintaining a package that adds the pkg-config file to 
hwdata (correct me if I'm wrong on what their package is doing) will be less of 
a burden than maintaining a patch for an ever changing version of WLRoots.

> > # Hyprland
> > This will allow me to submit packages for Hyprland and its XDG Desktop
> > Portal at version 0.35.0 (the latest release). As it's one of the more
> > popular Wayland compositors out there, I think it is worth adding it
> > to the repos. For now, the package is available through my Guix
> > channel (fair warning, it is still very WIP and I wouldn't recommend
> > using it yet outside of maybe pulling the Hyprland packages). I look
> > forward to working with Guix (Scheme is certainly a breath of fresh
> > air after dealing with Nix for a while) and contributing to its
> > ecosystem.
> >
> > --Hutzdog
> >
> 

> Thanks for your efforts and helping get this conversation started! I
> think we can handle the bigger updates on the mesa-updates branch. I
> was planning on pushing that to get builds going once I send the cairo
> patch and have people take a look at that. Despite the big changes,
> I'm fairly confident in it since it seems pretty much everything we
> need is built by default now.
> 

> And agreed that Hyprland has been pretty nice so far as my first step
> into Wayland. Though if anyone can point me to the best way to get
> emacs keys everywhere I will be forever thankful. Seems xremap can do
> it (which we have packaged) except it doesn't pick up different
> applications for where keys apply on Hyprland. I do miss in Stump how
> easy that was right in the config.
> John
I'm just glad to hear there's interest in it, and hope to see Hyprland in 
upstream soon. I can send in patches if needed, though I am busy getting my 
configs ironed out (currently, I'm on a temporary River setup that has some 
fundamental design flaws which I intend to work around this time), but I should 
be able to make time to work on packaging what's needed.

Unfortunately, I don't know how to get Emacs keys to work everywhere 
(apparently, key chords can be handled by submaps, but I'm not entirely sure if 
that's what you mean). There is a way to passthrough keys as well 
(https://wiki.hyprland.org/Configuring/Advanced-config/#global-keybinds) 
otherwise, if that's what you're looking for.

If Hyprland does get merged, I'd be happy to try to co-maintain it (seeing as 
the configuration framework I'm making uses it as one of the available options, 
I should be fairly invested in keeping it up-to-date). I'm still learning, but 
I think I should be capable of keeping it up to date. Let me know if I'm doing 
anything wrong with the packaging (again, completely new to Guix), and I look 
forward to working with Guix.

Thanks,
--Hutzdog

Attachment: publickey - hutzdog@proton.me - 0xD0A768D6.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]