anchor.diff:      "-Dtest-junit-xml=false"
       # TODO:
       #"--enable-clients"
  -    #"--disable-setuid-install" # prevent install target to chown root weston-launch, which fails
     ] ++ lib.optionals (xwayland != null) [
       "-Dxwayland-path=${xwayland.out}/bin/Xwayland"
     ];
  
positive.code: 
  stdenv.mkDerivation rec {
    pname = "weston";
    version = "10.0.1";
  
    src = fetchurl {
      url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz";
      sha256 = "05a10gfbadyxkwgsncc5vc343f493csgh10vk0878nl6d98557la";
    };
  
    patches = [
      # Fix race condition in build system
      (fetchpatch {
        url = "https://gitlab.freedesktop.org/wayland/weston/-/commit/0d3e438d080433ed5d203c876e7de6c7f8a14f98.patch";
        sha256 = "sha256-d9NG1vUIuL4jpXqCo0myz/97JuFYesH+8kJnegQXeMU=";
      })
    ];
  
    nativeBuildInputs = [ meson ninja pkg-config python3 wayland-scanner ];
    buildInputs = [
      cairo colord dbus freerdp lcms2 libGL libXcursor libdrm libevdev libinput
      libjpeg libunwind libva libwebp libxcb libxkbcommon mesa mtdev pam pango
      pipewire udev vaapi wayland wayland-protocols xlibsWrapper
    ];
  
    mesonFlags= [
  
negative.code: { lib, stdenv, fetchurl
  , meson, ninja, pkg-config, python3, wayland-scanner
  , cairo, colord, dbus, lcms2, libGL, libXcursor, libdrm, libevdev, libinput
  , libjpeg, libseat, libxcb, libxkbcommon, mesa, mtdev, pam, udev, wayland
  , wayland-protocols, xlibsWrapper
  , pipewire ? null, pango ? null, libunwind ? null, freerdp ? null, vaapi ? null
  , libva ? null, libwebp ? null, xwayland ? null
  