New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cagebreak: init at 1.4.2 #99604
cagebreak: init at 1.4.2 #99604
Conversation
cc relevant maintainers: @primeos @colemickens @AndersonTorres @worldofpeace |
cp $src/examples/config $contrib/share/cagebreak/config | ||
''; | ||
|
||
postFixup = stdenv.lib.optionalString (xwayland != null) '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know where in the code it wants to call the binary? It would be best if they didn't try to look for it from PATH
since it's done with conditional compilation anyways (and not just a runtime optional feature).
They could use find_program
for it and then generate a header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xwayland server is started by wlroots' libraries so no calls to the xserver binary take place in cagebreak.
The sway module requires xwayland in its extraPackages
otherwise it fails to start the xwayland backend.
That sounds like a bug. Ideally it could have a settings to default when there are none (and then write those out), but not segfault. We should open a bug. |
Wayland modules in NixOS do not have a common namespace which makes it awkward. |
@berbiche nope. Wayland-based window managers can be started from commandline as far as I remember. |
@berbiche do you have an error log or something like that in order to fill a bug request for the Cagebreak maintainers? |
cagebreakConfigfile = pkgs.writeText "config" '' | ||
workspaces 1 | ||
escape C-t | ||
bind t exec env DISPLAY=:0 ${pkgs.xterm}/bin/xterm -cm -pc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What annoys me about this is that the DISPLAY environment variable is :1
inside the VM, but when I test cagebreak locally (started as a nested wayland session within Sway) the DISPLAY
environment variable is properly set to :0
.
This might be a bug with cagebreak being launched by an X11 session manager (lightdm).
I'm not really a C/C++ programmer so I'll see what I can do. I was thinking about compiling with address sanitizer flags and without stripping the binary and debug from there. |
Motivation for this change
Cagebreak is a Wayland tiling compositor inspired by ratpoison and based on wlroots.
In order to test the binary, the user MUST create the file
$XDG_CONFIG_HOME/cagebreak/config
otherwise the program segfaults.The upstream example configuration is made available in
"${cagebreak.contrib}/share/cagebreak/config"
.I am neither a ratpoison user nor a cagebreak user (yet).
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)