xwax: init at version 1.9 (#377421)
[NixPkgs.git] / pkgs / by-name / we / weston / package.nix
blob8c31cb0b22a065f9abb60c648a848d3bba266fae
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch2,
6   meson,
7   ninja,
8   pkg-config,
9   python3,
10   wayland-scanner,
11   cairo,
12   libGL,
13   libdisplay-info,
14   libdrm,
15   libevdev,
16   libinput,
17   libxkbcommon,
18   libgbm,
19   seatd,
20   wayland,
21   wayland-protocols,
22   xcbutilcursor,
24   demoSupport ? true,
25   jpegSupport ? true,
26   libjpeg,
27   lcmsSupport ? true,
28   lcms2,
29   pangoSupport ? true,
30   pango,
31   pipewireSupport ? true,
32   pipewire,
33   rdpSupport ? true,
34   freerdp,
35   remotingSupport ? true,
36   gst_all_1,
37   vaapiSupport ? true,
38   libva,
39   vncSupport ? true,
40   aml,
41   neatvnc,
42   pam,
43   webpSupport ? true,
44   libwebp,
45   xwaylandSupport ? true,
46   libXcursor,
47   xwayland,
50 stdenv.mkDerivation rec {
51   pname = "weston";
52   version = "14.0.1";
54   src = fetchurl {
55     url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz";
56     hash = "sha256-qBUFBbEmpZ33gf6MMMjm+H2nAT4XkDnrhEpbu8x8ebM=";
57   };
59   patches = [
60     (fetchpatch2 {
61       # vnc: Allow neatvnc in version 0.9.0
62       # https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1649
63       url = "https://gitlab.freedesktop.org/wayland/weston/-/commit/b4386289d614f26e89e1c6eb17e048826e925ed1.patch";
64       hash = "sha256-mkIOup44C9Kp42tFMXz8Sis4URmPi4t605MQG672nJU=";
65     })
66   ];
68   depsBuildBuild = [ pkg-config ];
69   nativeBuildInputs = [
70     meson
71     ninja
72     pkg-config
73     python3
74     wayland-scanner
75   ];
76   buildInputs =
77     [
78       cairo
79       libGL
80       libdisplay-info
81       libdrm
82       libevdev
83       libinput
84       libxkbcommon
85       libgbm
86       seatd
87       wayland
88       wayland-protocols
89     ]
90     ++ lib.optional jpegSupport libjpeg
91     ++ lib.optional lcmsSupport lcms2
92     ++ lib.optional pangoSupport pango
93     ++ lib.optional pipewireSupport pipewire
94     ++ lib.optional rdpSupport freerdp
95     ++ lib.optionals remotingSupport [
96       gst_all_1.gstreamer
97       gst_all_1.gst-plugins-base
98     ]
99     ++ lib.optional vaapiSupport libva
100     ++ lib.optionals vncSupport [
101       aml
102       neatvnc
103       pam
104     ]
105     ++ lib.optional webpSupport libwebp
106     ++ lib.optionals xwaylandSupport [
107       libXcursor
108       xcbutilcursor
109       xwayland
110     ];
112   mesonFlags =
113     [
114       (lib.mesonBool "backend-drm-screencast-vaapi" vaapiSupport)
115       (lib.mesonBool "backend-pipewire" pipewireSupport)
116       (lib.mesonBool "backend-rdp" rdpSupport)
117       (lib.mesonBool "backend-vnc" vncSupport)
118       (lib.mesonBool "color-management-lcms" lcmsSupport)
119       (lib.mesonBool "demo-clients" demoSupport)
120       (lib.mesonBool "image-jpeg" jpegSupport)
121       (lib.mesonBool "image-webp" webpSupport)
122       (lib.mesonBool "pipewire" pipewireSupport)
123       (lib.mesonBool "remoting" remotingSupport)
124       (lib.mesonOption "simple-clients" "")
125       (lib.mesonBool "test-junit-xml" false)
126       (lib.mesonBool "xwayland" xwaylandSupport)
127     ]
128     ++ lib.optionals xwaylandSupport [
129       (lib.mesonOption "xwayland-path" (lib.getExe xwayland))
130     ];
132   passthru.providedSessions = [ "weston" ];
134   meta = with lib; {
135     description = "Lightweight and functional Wayland compositor";
136     longDescription = ''
137       Weston is the reference implementation of a Wayland compositor, as well
138       as a useful environment in and of itself.
139       Out of the box, Weston provides a very basic desktop, or a full-featured
140       environment for non-desktop uses such as automotive, embedded, in-flight,
141       industrial, kiosks, set-top boxes and TVs. It also provides a library
142       allowing other projects to build their own full-featured environments on
143       top of Weston's core. A small suite of example or demo clients are also
144       provided.
145     '';
146     homepage = "https://gitlab.freedesktop.org/wayland/weston";
147     license = licenses.mit; # Expat version
148     platforms = platforms.linux;
149     mainProgram = "weston";
150     maintainers = with maintainers; [
151       primeos
152       qyliss
153     ];
154   };