2021-01-19 03:30:22 +00:00
|
|
|
{ stdenv, lib, fetchFromGitLab, pkg-config, libyamlcpp, libevdev }:
|
2020-07-26 18:18:15 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dual-function-keys";
|
2021-06-13 03:02:37 +01:00
|
|
|
version = "1.4.0";
|
2020-07-26 18:18:15 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
2021-06-13 03:02:37 +01:00
|
|
|
group = "interception";
|
|
|
|
owner = "linux/plugins";
|
2020-07-26 18:18:15 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-13 03:02:37 +01:00
|
|
|
sha256 = "sha256-xlplbkeptXMBlRnSsc5NgGJfT8aoZxTRgTwTOd7aiWg=";
|
2020-07-26 18:18:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-06-13 03:02:37 +01:00
|
|
|
|
2020-07-26 18:18:15 +01:00
|
|
|
buildInputs = [ libevdev libyamlcpp ];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace config.mk --replace \
|
|
|
|
'/usr/include/libevdev-1.0' \
|
|
|
|
"$(pkg-config --cflags libevdev | cut -c 3-)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
|
|
|
|
2021-01-19 03:30:22 +00:00
|
|
|
meta = with lib; {
|
2020-07-26 18:18:15 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|