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