3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/wayland/wshowkeys/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

38 lines
1.3 KiB
Nix

{ lib, 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 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 = with licenses; [ gpl3Only mit ];
# Some portions of the code are taken from Sway which is MIT licensed.
# TODO: gpl3Only or gpl3Plus (ask upstream)?
platforms = platforms.unix;
maintainers = with maintainers; [ primeos berbiche ];
};
}