1{ lib, stdenv, fetchFromGitLab, wayland-scanner }:
2
3stdenv.mkDerivation rec {
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 substituteInPlace Makefile \
24 --replace 'wlr-output-power-management-v1.xml' 'wlr-output-power-management-unstable-v1.xml'
25 '';
26
27 doCheck = true;
28 checkTarget = "check";
29
30 installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
31
32 meta = with lib; {
33 description = "Wayland roots protocol extensions";
34 longDescription = ''
35 wlr-protocols contains Wayland protocols that add functionality not
36 available in the Wayland core protocol, and specific to wlroots-based
37 compositors. Such protocols either add completely new functionality, or
38 extend the functionality of some other protocol either in Wayland core,
39 or some other protocol in wayland-protocols.
40 '';
41 homepage = "https://gitlab.freedesktop.org/wlroots/wlr-protocols";
42 license = licenses.mit; # See file headers
43 platforms = platforms.linux;
44 maintainers = with maintainers; [ twitchyliquid64 ];
45 };
46}