1{ stdenv, fetchurl, pkgconfig, cmake, libyamlcpp,
2 libevdev, udev }:
3
4let
5 version = "0.1.1";
6 baseName = "interception-tools";
7in stdenv.mkDerivation {
8 name = "${baseName}-${version}";
9
10 src = fetchurl {
11 url = "https://gitlab.com/interception/linux/tools/repository/v${version}/archive.tar.gz";
12 sha256 = "14g4pphvylqdb922va322z1pbp12ap753hcf7zf9sii1ikvif83j";
13 };
14
15 nativeBuildInputs = [ cmake pkgconfig ];
16 buildInputs = [ libevdev udev libyamlcpp ];
17
18 prePatch = ''
19 substituteInPlace CMakeLists.txt --replace \
20 '"/usr/include/libevdev-1.0"' \
21 "\"$(pkg-config --cflags libevdev | cut -c 3-)\""
22 '';
23
24 patches = [ ./fix-udevmon-configuration-job-path.patch ];
25
26 meta = {
27 description = "A minimal composable infrastructure on top of libudev and libevdev";
28 homepage = "https://gitlab.com/interception/linux/tools";
29 license = stdenv.lib.licenses.gpl3;
30 maintainers = [ stdenv.lib.maintainers.vyp ];
31 platforms = stdenv.lib.platforms.linux;
32 };
33}