about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/interception-tools/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/inputmethods/interception-tools/default.nix')
-rw-r--r--pkgs/tools/inputmethods/interception-tools/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/interception-tools/default.nix b/pkgs/tools/inputmethods/interception-tools/default.nix
new file mode 100644
index 000000000000..ba54d4954c58
--- /dev/null
+++ b/pkgs/tools/inputmethods/interception-tools/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, cmake, libyamlcppWithoutBoost,
+  libevdev, libudev }:
+
+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 = [ pkgconfig ];
+  buildInputs = [ cmake libevdev libudev libyamlcppWithoutBoost ];
+
+  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;
+  };
+}