2023-02-02 18:25:31 +00:00
|
|
|
{ stdenv, lib, fetchFromGitLab, pkg-config, yaml-cpp, libevdev }:
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dual-function-keys";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.4.0";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
2021-06-28 23:13:55 +00:00
|
|
|
group = "interception";
|
|
|
|
owner = "linux/plugins";
|
2021-02-05 17:12:51 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "sha256-xlplbkeptXMBlRnSsc5NgGJfT8aoZxTRgTwTOd7aiWg=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = [ libevdev yaml-cpp ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|