22 , withXwayland ? true , xwayland
26 stdenv.mkDerivation rec {
30 src = fetchFromGitHub {
31 owner = "project-repo";
34 hash = "sha256-cJEJ8V9lDbNb07eY3nWmNcT7ULGlcmOeyb9UDOLGWfI=";
53 mesa # for libEGL headers
64 "-Dversion_override=${version}"
65 "-Dxwayland=${lib.boolToString withXwayland}"
69 # TODO: investigate why is this happening
70 sed -i -e 's|<drm_fourcc.h>|<libdrm/drm_fourcc.h>|' *.c
72 # Patch cagebreak to read its default configuration from $out/share/cagebreak
73 sed -i "s|/etc/xdg/cagebreak|$out/share/cagebreak|" meson.build cagebreak.c
74 substituteInPlace meson.build \
75 --replace "/usr/share/licenses" "$out/share/licenses"
78 postFixup = lib.optionalString withXwayland ''
79 wrapProgram $out/bin/cagebreak \
80 --prefix PATH : "${lib.makeBinPath [ xwayland ]}"
84 homepage = "https://github.com/project-repo/cagebreak";
85 description = "A Wayland tiling compositor inspired by ratpoison";
86 license = licenses.mit;
87 maintainers = with maintainers; [ berbiche ];
88 platforms = platforms.linux;
89 changelog = "https://github.com/project-repo/cagebreak/blob/${version}/Changelog.md";
92 passthru.tests.basic = nixosTests.cagebreak;