2021-03-13 11:33:02 +00:00
|
|
|
{ lib, stdenv, fetchFromSourcehut
|
2021-07-03 16:02:23 +01:00
|
|
|
, meson, pkg-config, wayland-scanner, ninja
|
|
|
|
, cairo, libinput, pango, wayland, wayland-protocols, libxkbcommon
|
2020-03-23 14:17:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2020-10-09 01:41:22 +01:00
|
|
|
version = "2020-03-29";
|
|
|
|
commit = "6388a49e0f431d6d5fcbd152b8ae4fa8e87884ee";
|
2020-03-23 14:17:37 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "wshowkeys-unstable";
|
|
|
|
inherit version;
|
|
|
|
|
2021-03-13 11:33:02 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~sircmpwn";
|
|
|
|
repo = "wshowkeys";
|
|
|
|
rev = commit;
|
|
|
|
sha256 = "10kafdja5cwbypspwhvaxjz3hvf51vqjzbgdasl977193cvxgmbs";
|
2020-03-23 14:17:37 +00:00
|
|
|
};
|
|
|
|
|
2021-07-03 16:02:23 +01: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;").
|
|
|
|
'';
|
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/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)?
|
2020-03-23 14:17:37 +00:00
|
|
|
platforms = platforms.unix;
|
2020-10-09 01:41:22 +01:00
|
|
|
maintainers = with maintainers; [ primeos berbiche ];
|
2021-07-08 17:36:27 +01:00
|
|
|
broken = true; # Unmaintained and fails to run (Wayland protocol error)
|
|
|
|
# TODO (@primeos): Remove this package after the NixOS 21.11 branch-off
|
2020-03-23 14:17:37 +00:00
|
|
|
};
|
|
|
|
}
|