How to add debug info to hyprland

I want to debug hyprland wm. In 24.05 it is not compiled with debug info. The symbols cannot be found with debuginfod by gdb. (Other symbols are found)

How can I change my configuration.nix to install/build hyprland with the debug symbols ?
(This is the prefered solution)

If this does not work, how can i set up a checkout of nixpkgs and make it the source of configuration.nix, patch hyprland with seperateDebugInfo, and rebuild (implicitly recompiling hyperwm) , so that gdb finds the symbols ?
(Is that event possible?)

How do more experienced nixos users who now and then need to debug a C/C++ progam do this ?

if you have nixseparatedebuginfod setup then something like this should help:

nixpkgs.overlays = [ (self: super: {
   hyprland = super.hyprland.overrideAttrs(oldAttrs : {
      separateDebugInfo = true;
}) ];
1 Like

It looks like a work for Overlays!