{
  fetchFromGitLab,
  lib,
  libxkbcommon,
  meson,
  ninja,
  pixman,
  pkg-config,
  scdoc,
  stdenv,
  unstableGitUpdater,
  wayland,
  wayland-protocols,
  wayland-scanner,
  wlroots_0_19,
  xwayland,
}:

stdenv.mkDerivation {
  pname = "wayback";
  version = "0.1";

  src = fetchFromGitLab {
    domain = "gitlab.freedesktop.org";
    owner = "wayback";
    repo = "wayback";
    rev = "156d7a86d112cd1bd70c2f75cb190fdd98565080";
    hash = "sha256-A4Ur32QZc0foS+O+jfQCug0k32nvYkB2MoacDT4W7dQ=";
  };

  strictDeps = true;

  depsBuildBuild = [
    pkg-config
  ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    scdoc
    wayland-scanner
  ];

  buildInputs = [
    libxkbcommon
    pixman
    wayland
    wayland-protocols
    wlroots_0_19
    xwayland
  ];

  passthru.updateScript = unstableGitUpdater { };

  meta = {
    description = "X11 compatibility layer leveraging wlroots and Xwayland";
    homepage = "https://wayback.freedesktop.org";
    license = lib.licenses.mit;
    platforms = lib.platforms.linux;
    mainProgram = "wayback-session";
    maintainers = with lib.maintainers; [ dramforever ];
  };
}
