2022-09-24 10:06:09 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2022-09-24 09:54:54 +00:00
|
|
|
, meson, ninja, pkg-config, python3, wayland-scanner
|
2023-05-25 11:50:41 +00:00
|
|
|
, cairo, dbus, libdrm, libevdev, libinput, libxkbcommon, mesa, seatd, wayland
|
|
|
|
, wayland-protocols, xcbutilcursor
|
2023-05-25 11:11:36 +00:00
|
|
|
|
|
|
|
, demoSupport ? true
|
2023-05-25 11:24:18 +00:00
|
|
|
, hdrSupport ? true, libdisplay-info
|
2023-05-25 11:50:41 +00:00
|
|
|
, jpegSupport ? true, libjpeg
|
|
|
|
, lcmsSupport ? true, lcms2
|
2023-05-25 11:11:36 +00:00
|
|
|
, pangoSupport ? true, pango
|
|
|
|
, pipewireSupport ? true, pipewire
|
|
|
|
, rdpSupport ? true, freerdp
|
|
|
|
, remotingSupport ? true, gst_all_1
|
|
|
|
, vaapiSupport ? true, libva
|
2023-05-25 11:24:18 +00:00
|
|
|
, vncSupport ? true, aml, neatvnc, pam
|
2023-05-25 11:11:36 +00:00
|
|
|
, webpSupport ? true, libwebp
|
|
|
|
, xwaylandSupport ? true, libXcursor, xwayland
|
2014-10-17 21:26:36 +00:00
|
|
|
}:
|
2012-12-02 11:42:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "weston";
|
2023-08-07 20:50:54 +00:00
|
|
|
version = "12.0.2";
|
2012-12-02 11:42:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-05-17 15:08:41 +00:00
|
|
|
url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz";
|
2023-08-07 20:50:54 +00:00
|
|
|
hash = "sha256-62hqfPAJkqI7F/GS/KmohzE+ksNG7jXYV1GWmD1la0o=";
|
2012-12-02 11:42:55 +00:00
|
|
|
};
|
|
|
|
|
2023-02-26 18:12:13 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
2022-09-24 09:54:54 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 wayland-scanner ];
|
2013-11-23 22:56:38 +00:00
|
|
|
buildInputs = [
|
2023-05-25 11:50:41 +00:00
|
|
|
cairo libdrm libevdev libinput libxkbcommon mesa seatd wayland
|
|
|
|
wayland-protocols
|
2023-05-25 11:24:18 +00:00
|
|
|
] ++ lib.optional hdrSupport libdisplay-info
|
2023-05-25 11:50:41 +00:00
|
|
|
++ lib.optional jpegSupport libjpeg
|
|
|
|
++ lib.optional lcmsSupport lcms2
|
2023-05-25 11:24:18 +00:00
|
|
|
++ lib.optional pangoSupport pango
|
2023-05-25 11:11:36 +00:00
|
|
|
++ lib.optional pipewireSupport pipewire
|
|
|
|
++ lib.optional rdpSupport freerdp
|
|
|
|
++ lib.optionals remotingSupport [ gst_all_1.gstreamer gst_all_1.gst-plugins-base ]
|
|
|
|
++ lib.optional vaapiSupport libva
|
2023-05-25 11:24:18 +00:00
|
|
|
++ lib.optionals vncSupport [ aml neatvnc pam ]
|
2023-05-25 11:11:36 +00:00
|
|
|
++ lib.optional webpSupport libwebp
|
2023-05-25 11:24:18 +00:00
|
|
|
++ lib.optionals xwaylandSupport [ libXcursor xcbutilcursor xwayland ];
|
2012-12-02 11:42:55 +00:00
|
|
|
|
2019-05-31 20:59:51 +00:00
|
|
|
mesonFlags= [
|
2023-05-25 11:11:36 +00:00
|
|
|
(lib.mesonBool "backend-drm-screencast-vaapi" vaapiSupport)
|
2023-05-25 11:24:18 +00:00
|
|
|
(lib.mesonBool "backend-pipewire" pipewireSupport)
|
2023-05-25 11:11:36 +00:00
|
|
|
(lib.mesonBool "backend-rdp" rdpSupport)
|
2023-05-25 11:24:18 +00:00
|
|
|
(lib.mesonBool "backend-vnc" vncSupport)
|
2023-05-25 11:50:41 +00:00
|
|
|
(lib.mesonBool "color-management-lcms" lcmsSupport)
|
2023-05-25 11:11:36 +00:00
|
|
|
(lib.mesonBool "demo-clients" demoSupport)
|
2023-05-25 11:50:41 +00:00
|
|
|
(lib.mesonBool "image-jpeg" jpegSupport)
|
2023-05-25 11:11:36 +00:00
|
|
|
(lib.mesonBool "image-webp" webpSupport)
|
|
|
|
(lib.mesonBool "pipewire" pipewireSupport)
|
|
|
|
(lib.mesonBool "remoting" remotingSupport)
|
|
|
|
(lib.mesonOption "simple-clients" "")
|
|
|
|
(lib.mesonBool "test-junit-xml" false)
|
|
|
|
(lib.mesonBool "xwayland" xwaylandSupport)
|
|
|
|
] ++ lib.optionals xwaylandSupport [
|
2023-05-27 13:26:40 +00:00
|
|
|
(lib.mesonOption "xwayland-path" (lib.getExe xwayland))
|
2019-05-31 20:59:51 +00:00
|
|
|
];
|
2012-12-07 11:28:35 +00:00
|
|
|
|
2020-01-25 12:37:06 +00:00
|
|
|
passthru.providedSessions = [ "weston" ];
|
|
|
|
|
2022-07-29 21:20:10 +00:00
|
|
|
meta = with lib; {
|
2020-09-04 22:44:34 +00:00
|
|
|
description = "A lightweight and functional Wayland compositor";
|
|
|
|
longDescription = ''
|
|
|
|
Weston is the reference implementation of a Wayland compositor, as well
|
|
|
|
as a useful environment in and of itself.
|
|
|
|
Out of the box, Weston provides a very basic desktop, or a full-featured
|
|
|
|
environment for non-desktop uses such as automotive, embedded, in-flight,
|
|
|
|
industrial, kiosks, set-top boxes and TVs. It also provides a library
|
|
|
|
allowing other projects to build their own full-featured environments on
|
|
|
|
top of Weston's core. A small suite of example or demo clients are also
|
|
|
|
provided.
|
|
|
|
'';
|
|
|
|
homepage = "https://gitlab.freedesktop.org/wayland/weston";
|
|
|
|
license = licenses.mit; # Expat version
|
2014-10-17 21:26:36 +00:00
|
|
|
platforms = platforms.linux;
|
2023-09-25 11:45:08 +00:00
|
|
|
mainProgram = "weston";
|
2023-05-25 11:12:10 +00:00
|
|
|
maintainers = with maintainers; [ primeos qyliss ];
|
2012-12-02 11:42:55 +00:00
|
|
|
};
|
|
|
|
}
|