nixpkgs/pkgs/tools/X11/keynav/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

40 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, pkgconfig, libX11, xorgproto, libXtst, libXi, libXext
, libXinerama, libXrandr, glib, cairo, xdotool }:
let release = "20180821"; in
stdenv.mkDerivation {
name = "keynav-0.${release}.0";
src = fetchFromGitHub {
owner = "jordansissel";
repo = "keynav";
rev = "78f9e076a5618aba43b030fbb9344c415c30c1e5";
sha256 = "0hmc14fj612z5h7gjgk95zyqab3p35c4a99snnblzxfg0p3x2f1d";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libX11 xorgproto libXtst libXi libXext libXinerama libXrandr
glib cairo xdotool ];
patchPhase = ''
echo >>VERSION MAJOR=0
echo >>VERSION RELEASE=${release}
echo >>VERSION REVISION=0
'';
installPhase =
''
mkdir -p $out/bin $out/share/keynav/doc
cp keynav $out/bin
cp keynavrc $out/share/keynav/doc
'';
meta = with lib; {
description = "Generate X11 mouse clicks from keyboard";
homepage = "https://www.semicomplete.com/projects/keynav/";
license = licenses.bsd3;
maintainers = with maintainers; [ pSub ];
platforms = platforms.linux;
};
}