about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods
diff options
context:
space:
mode:
authorSvend Sorensen <svend@svends.net>2020-07-26 10:18:15 -0700
committerSvend Sorensen <svend@svends.net>2020-12-28 17:13:45 -0800
commit802ec1b556a1c54a5252bfed200c8a4424f430a6 (patch)
tree0025a829126e9724bff50077cb629663ea1a9a3b /pkgs/tools/inputmethods
parent817cca7ef9ab2866b7c4948cc8335865a13b98e3 (diff)
dual-function-keys: init at 1.1.0
Diffstat (limited to 'pkgs/tools/inputmethods')
-rw-r--r--pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix b/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
new file mode 100644
index 0000000000000..c879890190594
--- /dev/null
+++ b/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
@@ -0,0 +1,32 @@
+{ stdenv, 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 stdenv.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;
+  };
+}