1{ stdenv
2, lib
3, gitUpdater
4, fetchFromGitHub
5, fetchpatch
6, cmake
7, pkg-config
8, boost
9, gtest
10, wayland
11}:
12
13stdenv.mkDerivation rec {
14 pname = "wlcs";
15 version = "1.5.0";
16
17 src = fetchFromGitHub {
18 owner = "MirServer";
19 repo = "wlcs";
20 rev = "v${version}";
21 hash = "sha256-QxmWxu+w77/WE5pGXMWXm+NP95QmYo2O8ltZYrgCIWw=";
22 };
23
24 patches = [
25 # Improves pkg-config paths even more
26 # Remove when https://github.com/MirServer/wlcs/pull/260 merged & in a release
27 (fetchpatch {
28 name = "0001-wlcs-pkgsconfig-Use-better-path-concatenations.patch";
29 url = "https://github.com/MirServer/wlcs/pull/260/commits/20f28d82fa4dfa6a6e27212dbd6b0f2e8a833c69.patch";
30 hash = "sha256-m8zPD27JbX/vN2YQgNhcRsh/O+qLfvoeky5E5ZEeD1I=";
31 })
32 ];
33
34 nativeBuildInputs = [
35 cmake
36 pkg-config
37 ];
38
39 buildInputs = [
40 boost
41 gtest
42 wayland
43 ];
44
45 env.NIX_CFLAGS_COMPILE = toString [
46 # Needed with GCC 12
47 "-Wno-error=maybe-uninitialized"
48 ];
49
50 passthru.updateScript = gitUpdater {
51 rev-prefix = "v";
52 };
53
54 meta = with lib; {
55 description = "Wayland Conformance Test Suite";
56 longDescription = ''
57 wlcs aspires to be a protocol-conformance-verifying test suite usable by Wayland
58 compositor implementors.
59
60 It is growing out of porting the existing Weston test suite to be run in Mir's
61 test suite, but it is designed to be usable by any compositor.
62
63 wlcs relies on compositors providing an integration module, providing wlcs with
64 API hooks to start a compositor, connect a client, move a window, and so on.
65 This makes both writing and debugging tests easier - the tests are (generally)
66 in the same address space as the compositor, so there is a consistent global
67 clock available, it's easier to poke around in compositor internals, and
68 standard debugging tools can follow control flow from the test client to the
69 compositor and back again.
70 '';
71 homepage = "https://github.com/MirServer/wlcs";
72 changelog = "https://github.com/MirServer/wlcs/releases/tag/v${version}";
73 license = licenses.gpl3Only;
74 maintainers = with maintainers; [ OPNA2608 ];
75 platforms = platforms.linux;
76 };
77}