nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 gitUpdater,
5 fetchFromGitHub,
6 testers,
7 cmake,
8 pkg-config,
9 boost,
10 gtest,
11 wayland,
12 wayland-scanner,
13}:
14
15stdenv.mkDerivation (finalAttrs: {
16 pname = "wlcs";
17 version = "1.8.1";
18
19 src = fetchFromGitHub {
20 owner = "MirServer";
21 repo = "wlcs";
22 tag = "v${finalAttrs.version}";
23 hash = "sha256-W4/a7neFcaqdPIAWDk5TcIuIWZ76rC7xCk3beJVqE/E=";
24 };
25
26 strictDeps = true;
27
28 nativeBuildInputs = [
29 cmake
30 pkg-config
31 wayland-scanner
32 ];
33
34 buildInputs = [
35 boost
36 gtest
37 wayland
38 wayland-scanner # needed by cmake
39 ];
40
41 # GCC14-exclusive maybe-uninitialized error at higher optimisation levels that looks weird
42 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=maybe-uninitialized";
43
44 passthru = {
45 tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
46 updateScript = gitUpdater {
47 rev-prefix = "v";
48 };
49 };
50
51 meta = {
52 description = "Wayland Conformance Test Suite";
53 longDescription = ''
54 wlcs aspires to be a protocol-conformance-verifying test suite usable by Wayland
55 compositor implementors.
56
57 It is growing out of porting the existing Weston test suite to be run in Mir's
58 test suite, but it is designed to be usable by any compositor.
59
60 wlcs relies on compositors providing an integration module, providing wlcs with
61 API hooks to start a compositor, connect a client, move a window, and so on.
62 This makes both writing and debugging tests easier - the tests are (generally)
63 in the same address space as the compositor, so there is a consistent global
64 clock available, it's easier to poke around in compositor internals, and
65 standard debugging tools can follow control flow from the test client to the
66 compositor and back again.
67 '';
68 homepage = "https://github.com/MirServer/wlcs";
69 changelog = "https://github.com/MirServer/wlcs/releases/tag/v${finalAttrs.version}";
70 license = lib.licenses.gpl3Only;
71 maintainers = with lib.maintainers; [ OPNA2608 ];
72 platforms = lib.platforms.linux;
73 pkgConfigModules = [
74 "wlcs"
75 ];
76 };
77})