2022-10-06 18:32:54 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
|
|
|
, meson, ninja, pkg-config, python3, wayland-scanner
|
|
|
|
, cairo, colord, dbus, lcms2, libGL, libXcursor, libdrm, libevdev, libinput
|
|
|
|
, libjpeg, seatd, libxcb, libxkbcommon, mesa, mtdev, pam, udev, wayland
|
2022-12-02 08:20:57 +00:00
|
|
|
, wayland-protocols
|
2022-10-06 18:32:54 +00:00
|
|
|
, pipewire ? null, pango ? null, libunwind ? null, freerdp ? null, vaapi ? null
|
|
|
|
, libva ? null, libwebp ? null, xwayland ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
# beware of null defaults, as the parameters *are* supplied by callPackage by default
|
2023-04-12 12:48:02 +00:00
|
|
|
, buildDemo ? true
|
|
|
|
, buildRemoting ? true, gst_all_1
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "weston";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "11.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-04-12 12:48:02 +00:00
|
|
|
url = "https://gitlab.freedesktop.org/wayland/weston/uploads/f5648c818fba5432edc3ea63c4db4813/weston-${version}.tar.xz";
|
|
|
|
sha256 = "sha256-pBP2jCUpV/wxkcNlCCPsNWrowSTMwMtEDaXNxOLLnlc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config python3 wayland-scanner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-10-06 18:32:54 +00:00
|
|
|
cairo colord dbus freerdp lcms2 libGL libXcursor libdrm libevdev libinput
|
|
|
|
libjpeg seatd libunwind libva libwebp libxcb libxkbcommon mesa mtdev pam
|
2022-12-02 08:20:57 +00:00
|
|
|
pango pipewire udev vaapi wayland wayland-protocols
|
2023-04-12 12:48:02 +00:00
|
|
|
] ++ lib.optionals buildRemoting [
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags= [
|
2022-08-12 12:06:08 +00:00
|
|
|
"-Dbackend-drm-screencast-vaapi=${lib.boolToString (vaapi != null)}"
|
|
|
|
"-Dbackend-rdp=${lib.boolToString (freerdp != null)}"
|
|
|
|
"-Dxwayland=${lib.boolToString (xwayland != null)}" # Default is true!
|
2023-04-12 12:48:02 +00:00
|
|
|
(lib.mesonBool "remoting" buildRemoting)
|
2022-08-12 12:06:08 +00:00
|
|
|
"-Dpipewire=${lib.boolToString (pipewire != null)}"
|
|
|
|
"-Dimage-webp=${lib.boolToString (libwebp != null)}"
|
2023-03-15 16:39:30 +00:00
|
|
|
(lib.mesonBool "demo-clients" buildDemo)
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Dsimple-clients="
|
|
|
|
"-Dtest-junit-xml=false"
|
2022-08-12 12:06:08 +00:00
|
|
|
] ++ lib.optionals (xwayland != null) [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-Dxwayland-path=${xwayland.out}/bin/Xwayland"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.providedSessions = [ "weston" ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +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
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
|
|
|
}
|