about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix')
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix b/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
new file mode 100644
index 000000000000..730135e4a7d9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitLab, pkg-config, libyamlcpp, libevdev }:
+
+stdenv.mkDerivation rec {
+  pname = "dual-function-keys";
+  version = "1.1.0";
+
+  src = fetchFromGitLab {
+    owner = "interception/linux/plugins";
+    repo = pname;
+    rev = version;
+    sha256 = "07hksca4g7v4zsvhmhc9j725j3n63fzrkx9sb4a0wrd7rwgr25rz";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libevdev libyamlcpp ];
+
+  prePatch = ''
+    substituteInPlace config.mk --replace \
+      '/usr/include/libevdev-1.0' \
+      "$(pkg-config --cflags libevdev | cut -c 3-)"
+  '';
+
+  installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/interception/linux/plugins/dual-function-keys";
+    description = "Tap for one key, hold for another.";
+    license = licenses.mit;
+    maintainers = with maintainers; [ svend ];
+    platforms = platforms.linux;
+  };
+}