1{ lib, stdenv, fetchFromGitLab, wayland-scanner }:
2
3stdenv.mkDerivation {
4 pname = "wlr-protocols";
5 version = "unstable-2022-09-05";
6
7 src = fetchFromGitLab {
8 domain = "gitlab.freedesktop.org";
9 owner = "wlroots";
10 repo = "wlr-protocols";
11 rev = "4264185db3b7e961e7f157e1cc4fd0ab75137568";
12 sha256 = "Ztc07RLg+BZPondP/r6Jo3Fw1QY/z1QsFvdEuOqQshA=";
13 };
14
15 strictDeps = true;
16 nativeBuildInputs = [ wayland-scanner ];
17
18 patchPhase = ''
19 substituteInPlace wlr-protocols.pc.in \
20 --replace '=''${pc_sysrootdir}' "=" \
21 --replace '=@prefix@' "=$out"
22 '';
23
24 doCheck = true;
25 checkTarget = "check";
26
27 installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
28
29 meta = with lib; {
30 description = "Wayland roots protocol extensions";
31 longDescription = ''
32 wlr-protocols contains Wayland protocols that add functionality not
33 available in the Wayland core protocol, and specific to wlroots-based
34 compositors. Such protocols either add completely new functionality, or
35 extend the functionality of some other protocol either in Wayland core,
36 or some other protocol in wayland-protocols.
37 '';
38 homepage = "https://gitlab.freedesktop.org/wlroots/wlr-protocols";
39 license = licenses.mit; # See file headers
40 platforms = platforms.linux;
41 maintainers = with maintainers; [ Scrumplex ];
42 };
43}