Skip to content
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

Merged
merged 1 commit into from Oct 8, 2020
Merged

cagebreak: init at 1.4.2 #99604

merged 1 commit into from Oct 8, 2020

Conversation

@berbiche
Copy link
Member

@berbiche berbiche commented Oct 5, 2020

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".

$ nix path-info -Sh '.#cagebreak'
/nix/store/zb3hh4pklhd6h5symq3nfp7hzg178bc4-cagebreak-1.4.2	 205.6M

I am neither a ratpoison user nor a cagebreak user (yet).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@ofborg ofborg bot added the 6.topic: nixos label Oct 5, 2020
@berbiche
Copy link
Member Author

@berbiche berbiche commented Oct 5, 2020

nixos/tests/cagebreak.nix Outdated Show resolved Hide resolved
nixos/tests/cagebreak.nix Outdated Show resolved Hide resolved
cp $src/examples/config $contrib/share/cagebreak/config
'';

postFixup = stdenv.lib.optionalString (xwayland != null) ''

This comment has been minimized.

@worldofpeace

worldofpeace Oct 5, 2020
Contributor

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.

This comment has been minimized.

@berbiche

berbiche Oct 5, 2020
Author Member

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.

nixos/tests/cagebreak.nix Outdated Show resolved Hide resolved
@worldofpeace
Copy link
Contributor

@worldofpeace worldofpeace commented Oct 5, 2020

In order to test the binary, the user MUST create the file $XDG_CONFIG_HOME/cagebreak/config otherwise the program segfaults.

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.

@berbiche berbiche force-pushed the berbiche:cagebreak branch from 2652434 to c9cea82 Oct 6, 2020
@berbiche
Copy link
Member Author

@berbiche berbiche commented Oct 6, 2020

Wayland modules in NixOS do not have a common namespace which makes it awkward.
Should I add a module under programs?

@AndersonTorres
Copy link
Member

@AndersonTorres AndersonTorres commented Oct 6, 2020

@berbiche nope. Wayland-based window managers can be started from commandline as far as I remember.

@AndersonTorres
Copy link
Member

@AndersonTorres AndersonTorres commented Oct 6, 2020

@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

This comment has been minimized.

@berbiche

berbiche Oct 6, 2020
Author Member

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).

@berbiche
Copy link
Member Author

@berbiche berbiche commented Oct 6, 2020

@berbiche do you have an error log or something like that in order to fill a bug request for the Cagebreak maintainers?

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.

@AndersonTorres AndersonTorres merged commit 8aeaba6 into NixOS:master Oct 8, 2020
19 checks passed
19 checks passed
@github-actions
tests tests
Details
@github-actions
action
Details
@ofborg
cagebreak, cagebreak.passthru.tests on aarch64-linux Failure
Details
@ofborg
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions
Wait for ofborg
Details
@ofborg
cagebreak, cagebreak.passthru.tests on x86_64-linux Success
Details
@ofborg
grahamcofborg-eval ^.^!
Details
@ofborg
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c9cea82"; rev="c9cea8264e5bb6e72f35f0f4e146bfe65cbef1a1"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants