nixpkgs/pkgs/by-name/we/weston/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

146 lines
3.5 KiB
Nix

{
lib,
stdenv,
fetchurl,
meson,
ninja,
pkg-config,
python3,
wayland-scanner,
cairo,
libGL,
libdisplay-info,
libdrm,
libevdev,
libinput,
libxkbcommon,
mesa,
seatd,
wayland,
wayland-protocols,
xcbutilcursor,
demoSupport ? true,
jpegSupport ? true,
libjpeg,
lcmsSupport ? true,
lcms2,
pangoSupport ? true,
pango,
pipewireSupport ? true,
pipewire,
rdpSupport ? true,
freerdp,
remotingSupport ? true,
gst_all_1,
vaapiSupport ? true,
libva,
vncSupport ? true,
aml,
neatvnc,
pam,
webpSupport ? true,
libwebp,
xwaylandSupport ? true,
libXcursor,
xwayland,
}:
stdenv.mkDerivation rec {
pname = "weston";
version = "14.0.1";
src = fetchurl {
url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz";
hash = "sha256-qBUFBbEmpZ33gf6MMMjm+H2nAT4XkDnrhEpbu8x8ebM=";
};
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
meson
ninja
pkg-config
python3
wayland-scanner
];
buildInputs =
[
cairo
libGL
libdisplay-info
libdrm
libevdev
libinput
libxkbcommon
mesa
seatd
wayland
wayland-protocols
]
++ lib.optional jpegSupport libjpeg
++ lib.optional lcmsSupport lcms2
++ lib.optional pangoSupport pango
++ 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
++ lib.optionals vncSupport [
aml
neatvnc
pam
]
++ lib.optional webpSupport libwebp
++ lib.optionals xwaylandSupport [
libXcursor
xcbutilcursor
xwayland
];
mesonFlags =
[
(lib.mesonBool "backend-drm-screencast-vaapi" vaapiSupport)
(lib.mesonBool "backend-pipewire" pipewireSupport)
(lib.mesonBool "backend-rdp" rdpSupport)
(lib.mesonBool "backend-vnc" vncSupport)
(lib.mesonBool "color-management-lcms" lcmsSupport)
(lib.mesonBool "demo-clients" demoSupport)
(lib.mesonBool "image-jpeg" jpegSupport)
(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 [
(lib.mesonOption "xwayland-path" (lib.getExe xwayland))
];
passthru.providedSessions = [ "weston" ];
meta = with lib; {
description = "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
platforms = platforms.linux;
mainProgram = "weston";
maintainers = with maintainers; [
primeos
qyliss
];
};
}