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