1{
2 lib,
3 stdenv,
4 wlroots,
5 pkg-config,
6 wayland-scanner,
7 libxkbcommon,
8 pixman,
9 udev,
10 wayland,
11 wayland-protocols,
12 nixosTests,
13}:
14
15stdenv.mkDerivation {
16 pname = "tinywl";
17 inherit (wlroots)
18 version
19 src
20 patches
21 postPatch
22 ;
23
24 nativeBuildInputs = [
25 pkg-config
26 wayland-scanner
27 ];
28 buildInputs = [
29 libxkbcommon
30 pixman
31 udev
32 wayland
33 wayland-protocols
34 wlroots
35 ];
36
37 makeFlags = [
38 "-C"
39 "tinywl"
40 ];
41
42 installPhase = ''
43 runHook preInstall
44 mkdir -p $out/bin
45 cp tinywl/tinywl $out/bin
46 runHook postInstall
47 '';
48
49 passthru.tests = { inherit (nixosTests) tinywl; };
50
51 meta = {
52 homepage = "https://gitlab.freedesktop.org/wlroots/wlroots/tree/master/tinywl";
53 description = ''A "minimum viable product" Wayland compositor based on wlroots'';
54 maintainers = with lib.maintainers; [ qyliss ] ++ wlroots.meta.maintainers;
55 license = lib.licenses.cc0;
56 inherit (wlroots.meta) platforms;
57 mainProgram = "tinywl";
58 };
59}