2022-07-14 12:49:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, meson, ninja, pkg-config, wayland-scanner, python3
|
2021-07-21 07:28:18 +00:00
|
|
|
, wayland, libGL, mesa, libxkbcommon, cairo, libxcb
|
2020-04-24 23:36:52 +00:00
|
|
|
, libXcursor, xlibsWrapper, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput, libevdev
|
|
|
|
, colord, lcms2, pipewire ? null
|
|
|
|
, pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null
|
|
|
|
, libwebp ? null, xwayland ? null, wayland-protocols
|
|
|
|
# beware of null defaults, as the parameters *are* supplied by callPackage by default
|
|
|
|
}:
|
|
|
|
|
2021-01-17 00:15:33 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "weston";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "10.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "1bj7wnadr7ssn6xw7k8ki0wpj6np3kjd2pcysfz3h0mr290rc8sw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
patches = [
|
|
|
|
# Fix race condition in build system
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/wayland/weston/-/commit/0d3e438d080433ed5d203c876e7de6c7f8a14f98.patch";
|
|
|
|
sha256 = "sha256-d9NG1vUIuL4jpXqCo0myz/97JuFYesH+8kJnegQXeMU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkg-config wayland-scanner python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
wayland libGL mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm
|
|
|
|
mtdev libjpeg pam dbus libinput libevdev pango libunwind freerdp vaapi libva
|
|
|
|
libwebp wayland-protocols
|
|
|
|
colord lcms2 pipewire
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags= [
|
|
|
|
"-Dbackend-drm-screencast-vaapi=${boolToString (vaapi != null)}"
|
|
|
|
"-Dbackend-rdp=${boolToString (freerdp != null)}"
|
|
|
|
"-Dxwayland=${boolToString (xwayland != null)}" # Default is true!
|
|
|
|
"-Dremoting=false" # TODO
|
|
|
|
"-Dpipewire=${boolToString (pipewire != null)}"
|
|
|
|
"-Dimage-webp=${boolToString (libwebp != null)}"
|
|
|
|
"-Ddemo-clients=false"
|
|
|
|
"-Dsimple-clients="
|
|
|
|
"-Dtest-junit-xml=false"
|
|
|
|
# TODO:
|
|
|
|
#"--enable-clients"
|
|
|
|
#"--disable-setuid-install" # prevent install target to chown root weston-launch, which fails
|
|
|
|
] ++ optionals (xwayland != null) [
|
|
|
|
"-Dxwayland-path=${xwayland.out}/bin/Xwayland"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.providedSessions = [ "weston" ];
|
|
|
|
|
|
|
|
meta = {
|
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 ];
|
|
|
|
};
|
|
|
|
}
|