2021-09-28 15:59:49 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
2021-07-03 15:02:23 +00:00
|
|
|
meson,
|
|
|
|
pkg-config,
|
|
|
|
wayland-scanner,
|
|
|
|
ninja,
|
|
|
|
cairo,
|
|
|
|
libinput,
|
|
|
|
pango,
|
|
|
|
wayland,
|
|
|
|
wayland-protocols,
|
|
|
|
libxkbcommon,
|
2020-03-23 14:17:37 +00:00
|
|
|
}:
|
|
|
|
|
2021-09-28 15:59:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-03-23 14:17:37 +00:00
|
|
|
pname = "wshowkeys-unstable";
|
2021-09-28 15:59:49 +00:00
|
|
|
version = "2021-08-01";
|
2020-03-23 14:17:37 +00:00
|
|
|
|
2021-09-28 15:59:49 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ammgws";
|
2021-03-13 11:33:02 +00:00
|
|
|
repo = "wshowkeys";
|
2021-09-28 15:59:49 +00:00
|
|
|
rev = "e8bfc78f08ebdd1316daae59ecc77e62bba68b2b";
|
|
|
|
sha256 = "sha256-/HvNCQWsXOJZeCxHWmsLlbBDhBzF7XP/SPLdDiWMDC4=";
|
2020-03-23 14:17:37 +00:00
|
|
|
};
|
|
|
|
|
2022-05-09 14:18:15 +00:00
|
|
|
strictDeps = true;
|
2021-07-03 15:02:23 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
pkg-config
|
|
|
|
wayland-scanner
|
|
|
|
ninja
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
libinput
|
|
|
|
pango
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
libxkbcommon
|
|
|
|
];
|
2020-03-23 14:17:37 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-23 14:17:37 +00:00
|
|
|
description = "Displays keys being pressed on a Wayland session";
|
|
|
|
longDescription = ''
|
|
|
|
Displays keypresses on screen on supported Wayland compositors (requires
|
|
|
|
wlr_layer_shell_v1 support).
|
|
|
|
Note: This tool requires root permissions to read input events, but these
|
|
|
|
permissions are dropped after startup. The NixOS module provides such a
|
|
|
|
setuid binary (use "programs.wshowkeys.enable = true;").
|
|
|
|
'';
|
2021-09-28 15:59:49 +00:00
|
|
|
homepage = "https://github.com/ammgws/wshowkeys";
|
2020-10-27 12:44:13 +00:00
|
|
|
license = with licenses; [
|
|
|
|
gpl3Only
|
|
|
|
mit
|
|
|
|
];
|
|
|
|
# Some portions of the code are taken from Sway which is MIT licensed.
|
|
|
|
# TODO: gpl3Only or gpl3Plus (ask upstream)?
|
2023-03-05 12:59:54 +00:00
|
|
|
platforms = platforms.linux;
|
2020-10-09 00:41:22 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
primeos
|
|
|
|
berbiche
|
|
|
|
];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "wshowkeys";
|
2020-03-23 14:17:37 +00:00
|
|
|
};
|
|
|
|
}
|