about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/interception-tools/default.nix
blob: a6aed47d964cee955e2bbb24a4e1f89f7e623311 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchurl, pkgconfig, cmake, libyamlcpp,
  libevdev, udev }:

let
  version = "0.1.1";
  baseName = "interception-tools";
in stdenv.mkDerivation {
  name = "${baseName}-${version}";

  src = fetchurl {
    url = "https://gitlab.com/interception/linux/tools/repository/v${version}/archive.tar.gz";
    sha256 = "14g4pphvylqdb922va322z1pbp12ap753hcf7zf9sii1ikvif83j";
  };

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ libevdev udev libyamlcpp ];

  prePatch = ''
    substituteInPlace CMakeLists.txt --replace \
      '"/usr/include/libevdev-1.0"' \
      "\"$(pkg-config --cflags libevdev | cut -c 3-)\""
  '';

  patches = [ ./fix-udevmon-configuration-job-path.patch ];

  meta = {
    description = "A minimal composable infrastructure on top of libudev and libevdev";
    homepage = "https://gitlab.com/interception/linux/tools";
    license = stdenv.lib.licenses.gpl3;
    maintainers = [ stdenv.lib.maintainers.vyp ];
    platforms = stdenv.lib.platforms.linux;
  };
}