1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchFromGitLab,
6 libevdev,
7 libxkbcommon,
8 meson,
9 ninja,
10 pkg-config,
11 protobuf,
12 protobufc,
13 systemd,
14 buildPackages,
15}:
16let
17 munit = fetchFromGitHub {
18 owner = "nemequ";
19 repo = "munit";
20 rev = "fbbdf1467eb0d04a6ee465def2e529e4c87f2118";
21 hash = "sha256-qm30C++rpLtxBhOABBzo+6WILSpKz2ibvUvoe8ku4ow=";
22 };
23in
24stdenv.mkDerivation rec {
25 pname = "libei";
26 version = "1.4.1";
27
28 src = fetchFromGitLab {
29 domain = "gitlab.freedesktop.org";
30 owner = "libinput";
31 repo = "libei";
32 rev = version;
33 hash = "sha256-DoPQaTry1uzu6sM/wWEl4xeGq3h3BuMDeVYusHge6AI=";
34 };
35
36 buildInputs = [
37 libevdev
38 libxkbcommon
39 protobuf
40 protobufc
41 systemd
42 ];
43 nativeBuildInputs = [
44 meson
45 ninja
46 pkg-config
47 (buildPackages.python3.withPackages (
48 ps: with ps; [
49 attrs
50 jinja2
51 pytest
52 python-dbusmock
53 strenum
54 structlog
55 ]
56 ))
57 ];
58
59 postPatch = ''
60 ln -s "${munit}" ./subprojects/munit
61 patchShebangs ./proto/ei-scanner
62 '';
63
64 meta = with lib; {
65 description = "Library for Emulated Input";
66 mainProgram = "ei-debug-events";
67 homepage = "https://gitlab.freedesktop.org/libinput/libei";
68 license = licenses.mit;
69 maintainers = [ maintainers.pedrohlc ];
70 platforms = platforms.linux;
71 };
72}