nixpkgs/pkgs/applications/window-managers/weston/default.nix

65 lines
2.5 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv, fetchurl, meson, ninja, pkg-config, wayland
, libGL, mesa, libxkbcommon, cairo, libxcb
, libXcursor, xlibsWrapper, udev, libdrm, mtdev, libjpeg, pam, dbus, libinput, libevdev
, colord, lcms2, pipewire ? null
2014-10-17 22:26:36 +01:00
, pango ? null, libunwind ? null, freerdp ? null, vaapi ? null, libva ? null
2016-04-08 21:13:14 +01:00
, libwebp ? null, xwayland ? null, wayland-protocols
# beware of null defaults, as the parameters *are* supplied by callPackage by default
2014-10-17 22:26:36 +01:00
}:
2021-01-15 13:21:58 +00:00
with lib;
stdenv.mkDerivation rec {
pname = "weston";
version = "9.0.0";
src = fetchurl {
url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz";
sha256 = "1zlql0xgiqc3pvgbpnnvj4xvpd91pwva8qf83xfb23if377ddxaw";
};
nativeBuildInputs = [ meson ninja pkg-config wayland ];
buildInputs = [
wayland libGL mesa libxkbcommon cairo libxcb libXcursor xlibsWrapper udev libdrm
mtdev libjpeg pam dbus libinput libevdev pango libunwind freerdp vaapi libva
2016-04-08 21:13:14 +01:00
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 = {
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 22:26:36 +01:00
platforms = platforms.linux;
maintainers = with maintainers; [ primeos ];
};
}