From 817cca7ef9ab2866b7c4948cc8335865a13b98e3 Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Sun, 26 Jul 2020 10:13:06 -0700 Subject: [PATCH 1/3] Add myself to maintainers list --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 93c6422744f9..424c12f5900c 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8577,6 +8577,12 @@ githubId = 1040871; name = "Mathis Antony"; }; + svend = { + email = "svend@svends.net"; + github = "svend"; + githubId = 306190; + name = "Svend Sorensen"; + }; svrana = { email = "shaw@vranix.com"; github = "svrana"; From 802ec1b556a1c54a5252bfed200c8a4424f430a6 Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Sun, 26 Jul 2020 10:18:15 -0700 Subject: [PATCH 2/3] dual-function-keys: init at 1.1.0 --- .../interception-tools/dual-function-keys.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix 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 000000000000..c87989019059 --- /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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c0242b005a15..c7c622cb425a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3118,6 +3118,7 @@ in interception-tools = callPackage ../tools/inputmethods/interception-tools { }; interception-tools-plugins = { caps2esc = callPackage ../tools/inputmethods/interception-tools/caps2esc.nix { }; + dual-function-keys = callPackage ../tools/inputmethods/interception-tools/dual-function-keys.nix { }; }; age = callPackage ../tools/security/age { }; From ea7e4b3486be8b0380236ff2bbcbaa0e85aa6f83 Mon Sep 17 00:00:00 2001 From: Svend Sorensen Date: Mon, 18 Jan 2021 19:30:22 -0800 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Sandro --- .../inputmethods/interception-tools/dual-function-keys.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix b/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix index c87989019059..730135e4a7d9 100644 --- a/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix +++ b/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, pkg-config, libyamlcpp, libevdev }: +{ stdenv, lib, fetchFromGitLab, pkg-config, libyamlcpp, libevdev }: stdenv.mkDerivation rec { pname = "dual-function-keys"; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://gitlab.com/interception/linux/plugins/dual-function-keys"; description = "Tap for one key, hold for another."; license = licenses.mit;