forked from mirrors/nixpkgs
Merge pull request #83687 from primeos/wshowkeys
wshowkeys: init at 2020-03-29
This commit is contained in:
commit
178d373a8a
|
@ -173,6 +173,7 @@
|
|||
./programs/wavemon.nix
|
||||
./programs/waybar.nix
|
||||
./programs/wireshark.nix
|
||||
./programs/wshowkeys.nix
|
||||
./programs/x2goserver.nix
|
||||
./programs/xfs_quota.nix
|
||||
./programs/xonsh.nix
|
||||
|
|
22
nixos/modules/programs/wshowkeys.nix
Normal file
22
nixos/modules/programs/wshowkeys.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.wshowkeys;
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ primeos ];
|
||||
|
||||
options = {
|
||||
programs.wshowkeys = {
|
||||
enable = mkEnableOption ''
|
||||
wshowkeys (displays keypresses on screen on supported Wayland
|
||||
compositors). It requires root permissions to read input events, but
|
||||
these permissions are dropped after startup'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.wrappers.wshowkeys.source = "${pkgs.wshowkeys}/bin/wshowkeys";
|
||||
};
|
||||
}
|
35
pkgs/tools/wayland/wshowkeys/default.nix
Normal file
35
pkgs/tools/wayland/wshowkeys/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ stdenv, fetchurl
|
||||
, meson, pkg-config, wayland, ninja
|
||||
, cairo, libinput, pango, wayland-protocols, libxkbcommon
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2020-03-29";
|
||||
commit = "6388a49e0f431d6d5fcbd152b8ae4fa8e87884ee";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "wshowkeys-unstable";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://git.sr.ht/~sircmpwn/wshowkeys/archive/${commit}.tar.gz";
|
||||
sha256 = "0iplmw13jmc8d3m307kc047zq8yqwm42kw9fpm270562i3p0qk4d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson pkg-config wayland ninja ];
|
||||
buildInputs = [ cairo libinput pango wayland-protocols libxkbcommon ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
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";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ primeos berbiche ];
|
||||
};
|
||||
}
|
|
@ -3443,6 +3443,8 @@ in
|
|||
|
||||
wrangler = callPackage ../development/tools/wrangler { };
|
||||
|
||||
wshowkeys = callPackage ../tools/wayland/wshowkeys { };
|
||||
|
||||
xkcdpass = with pythonPackages; toPythonApplication xkcdpass;
|
||||
|
||||
xob = callPackage ../tools/X11/xob { };
|
||||
|
|
Loading…
Reference in a new issue