Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / libei / default.nix
blobb216cd231c22eaef8c51dbc0c2a4415270bfe152
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
17 let
18   munit = fetchFromGitHub {
19     owner = "nemequ";
20     repo = "munit";
21     rev = "fbbdf1467eb0d04a6ee465def2e529e4c87f2118";
22     hash = "sha256-qm30C++rpLtxBhOABBzo+6WILSpKz2ibvUvoe8ku4ow=";
23   };
25 stdenv.mkDerivation rec {
26   pname = "libei";
27   version = "1.1.0";
29   src = fetchFromGitLab {
30     domain = "gitlab.freedesktop.org";
31     owner = "libinput";
32     repo = "libei";
33     rev = version;
34     hash = "sha256-ebZZ2dGXrPBUDPsuu5GZY5kDv9qndnxepQUGFDe9PUg=";
35   };
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   ]);
59   postPatch = ''
60     ln -s "${munit}" ./subprojects/munit
61     patchShebangs ./proto/ei-scanner
62   '';
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   };