about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix b/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix
new file mode 100644
index 000000000000..21636ea8d8eb
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, pkg-config, cmake, libyamlcpp,
+  libevdev, udev }:
+
+let
+  version = "0.2.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 = "0lqz89wsf9r5xdgflincysxg4l8fpgg5z8zczhhrg9s5787srfzi";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.vyp ];
+    platforms = lib.platforms.linux;
+  };
+}