1 { lib, stdenv, fetchFromGitHub
2 , meson, ninja, pkg-config, wayland-scanner, scdoc, makeWrapper
3 , wlroots, wayland, wayland-protocols, pixman, libxkbcommon, xcbutilwm
4 , systemd, libGL, libX11, mesa
9 stdenv.mkDerivation rec {
13 src = fetchFromGitHub {
17 hash = "sha256-Suq14YRw/MReDRvO/TQqjpZvpzAEDnHUyVbQj0BPT4c=";
24 nativeBuildInputs = [ meson ninja pkg-config wayland-scanner scdoc makeWrapper ];
27 wlroots wayland wayland-protocols pixman libxkbcommon xcbutilwm
28 mesa # for libEGL headers
32 mesonFlags = [ "-Dxwayland=${lib.boolToString (xwayland != null)}" ];
34 postFixup = lib.optionalString (xwayland != null) ''
35 wrapProgram $out/bin/cage --prefix PATH : "${xwayland}/bin"
38 # Tests Cage using the NixOS module by launching xterm:
39 passthru.tests.basic-nixos-module-functionality = nixosTests.cage;
42 description = "A Wayland kiosk that runs a single, maximized application";
43 homepage = "https://www.hjdskes.nl/projects/cage/";
44 license = licenses.mit;
45 platforms = platforms.linux;
46 maintainers = with maintainers; [ primeos ];