mbox series

[bug#53015,0/4] Add mangohud (update dear-imgui)

Message ID Q7tnT9BK6ONvH70UZEXzlqJR968TW3cdJCw99_OCDwa0EHxp7k0YTRLa0XHOHsCsR6bMjuJdzqWOfuuilwIRolVj5mNo148mDaUwJtZ1hE8=@protonmail.com
Headers show
Series Add mangohud (update dear-imgui) | expand

Message

John Kehayias Jan. 4, 2022, 10:20 p.m. UTC
Hi Guix,

Here is a short series of patches to add mangohud (a cool Vulkan/OpenGL overlay for things like framerate and hardware display in games). There were a few steps involved that required some tweaks to other packages. Here is the breakdown, corresponding to the forthcoming patches:

1. pciutils-no-zlib: A new hidden package to provide uncompressed hardware info (pci.ids). Mangohud and at least one other package I have read this file directly, which is typically uncompressed, i.e. on Arch. We could later change it in pciutils or have both uncompressed and compressed, or a separate package just for the hardware info. Since this would be a bigger change, I opted for a simple hidden package of the full pciutils (I think programs will need the rest of the package anyway).

2. spdlog: Build with '-fpic'. Since this is compiled as a static library, and upstream implies this is more typical, compile it in a way to be useful to shared libraries as well (needed for mangohud). I checked a random package that uses spdlog and it built fine at least.

3. dear-imgui: Update to 1.81. This not the latest, but most recent of the Debian makefiles we use. The only dependent is Ogre (very out of date) which just uses the source, but needs 1.79. I made the previous one a hidden package and updated Ogre to use that. There were enough build changes that I didn't think an inherit would be very clean. Also added in the static library output (preferred by mangohud). New is many inputs for the backends (optional).

4. mangohud: The new addition. Unbundled libraries to use guix's spdlog, dear-imgui, fixed hardcoded paths. Tested that it builds and works. The only guix lint complaint was about the dear-imgui static input name not matching (also needed dear-imgui for the headers and pkgconfig file).

Okay, that's it! A few changes but I think these are not invasive and were the cleanest on my end to use.

Thanks!
John

Comments

John Kehayias Feb. 16, 2022, 1:48 a.m. UTC | #1
Hi Maxim,

I wanted to ping you on (at least) the imgui part of this patch, since you had added imgui 1.86 in 1a4cc954d2fcea172a450ae03419b7fdda28b81e to see how we should sort out the different imgui versions we have. I hope that is okay!

This was my note in the original patch:

> 3. dear-imgui: Update to 1.81. This not the latest, but most recent of the Debian makefiles we use. The only dependent is Ogre (very out of date) which just uses the source, but needs 1.79. I made the previous one a hidden package and updated Ogre to use that. There were enough build changes that I didn't think an inherit would be very clean. Also added in the static library output (preferred by mangohud). New is many inputs for the backends (optional).

My inclination is to keep the old 1.79 as a hidden package for Ogre until Ogre can be updated. Likewise, the package I'm trying to add, mangohud, currently requires imgui 1.81, so perhaps add this as a hidden package as well?

Or it could be a public version since it is the current one that follows the Debian makefiles of the dear-imgui package we currently have. And for one, it adds the pkg-config file which is useful. Then once mangohud has a newer version with the current imgui version it could be removed, as the only package using it as an input.

WDYT?

Thanks!
John
Brendan Tildesley March 2, 2022, 1:37 a.m. UTC | #2
I think it requires `(,hwdata "pci") as input, not just hwdata?
John Kehayias March 2, 2022, 4:54 a.m. UTC | #3
------- Original Message -------

On Tuesday, March 1st, 2022 at 8:37 PM, Brendan Tildesley wrote:

> I think it requires `(,hwdata "pci") as input, not just hwdata?

Yes, that's right, and what was in the most recent version of the patch (which was pushed).