Files
nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

49 lines
972 B
Nix

{
stdenv,
lib,
fetchFromGitLab,
pkg-config,
yaml-cpp,
libevdev,
}:
stdenv.mkDerivation rec {
pname = "dual-function-keys";
version = "1.5.0";
src = fetchFromGitLab {
group = "interception";
owner = "linux/plugins";
repo = pname;
rev = version;
hash = "sha256-m/oEczUNKqj0gs/zMOIBxoQaffNg+YyPINMXArkATJ4=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libevdev
yaml-cpp
];
prePatch = ''
substituteInPlace config.mk --replace \
'/usr/include/libevdev-1.0' \
"$(pkg-config --cflags libevdev | cut -c 3-)"
'';
installFlags = [
"DESTDIR=$(out)"
"PREFIX="
];
meta = {
homepage = "https://gitlab.com/interception/linux/plugins/dual-function-keys";
description = "Tap for one key, hold for another";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ svend ];
platforms = lib.platforms.linux;
mainProgram = "dual-function-keys";
};
}