1{ lib
2, stdenv
3, fetchFromGitHub
4, fetchFromGitLab
5, attr
6, libevdev
7, libxkbcommon
8, meson
9, ninja
10, pkg-config
11, protobuf
12, protobufc
13, python3
14, python3Packages
15, systemd
16}:
17let
18 munit = fetchFromGitHub {
19 owner = "nemequ";
20 repo = "munit";
21 rev = "fbbdf1467eb0d04a6ee465def2e529e4c87f2118";
22 hash = "sha256-qm30C++rpLtxBhOABBzo+6WILSpKz2ibvUvoe8ku4ow=";
23 };
24in
25stdenv.mkDerivation rec {
26 pname = "libei";
27 version = "0.99.2";
28
29 src = fetchFromGitLab {
30 domain = "gitlab.freedesktop.org";
31 owner = "libinput";
32 repo = "libei";
33 rev = version;
34 hash = "sha256-hxWWOvqenHHnzrvRwSwNT1GFVx9NR+Mm1XK9nisF8fA=";
35 };
36
37 buildInputs = [
38 libevdev
39 libxkbcommon
40 protobuf
41 protobufc
42 systemd
43 ];
44 nativeBuildInputs = [
45 attr
46 meson
47 ninja
48 pkg-config
49 python3
50 ] ++
51 (with python3Packages; [
52 jinja2
53 pytest
54 python-dbusmock
55 strenum
56 structlog
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 homepage = "https://gitlab.freedesktop.org/libinput/libei";
67 license = licenses.mit;
68 maintainers = [ maintainers.pedrohlc ];
69 platforms = platforms.linux;
70 };
71}