4a7f99d55d
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
41 lines
1.2 KiB
Nix
41 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, pkgconfig, libX11, libXtst, xorgproto,
|
|
libXi }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "xcape";
|
|
version = "unstable-2018-03-01";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "alols";
|
|
repo = pname;
|
|
rev = "a34d6bae27bbd55506852f5ed3c27045a3c0bd9e";
|
|
sha256 = "04grs4w9kpfzz25mqw82zdiy51g0w355gpn5b170p7ha5972ykc8";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libX11 libXtst xorgproto libXi ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"MANDIR=/share/man/man1"
|
|
];
|
|
|
|
postInstall = "install -Dm444 --target-directory $out/share/doc README.md";
|
|
|
|
meta = with lib; {
|
|
description = "Utility to configure modifier keys to act as other keys";
|
|
longDescription = ''
|
|
xcape allows you to use a modifier key as another key when
|
|
pressed and released on its own. Note that it is slightly
|
|
slower than pressing the original key, because the pressed event
|
|
does not occur until the key is released. The default behaviour
|
|
is to generate the Escape key when Left Control is pressed and
|
|
released on its own.
|
|
'';
|
|
homepage = "https://github.com/alols/xcape";
|
|
license = licenses.gpl3 ;
|
|
maintainers = with maintainers; [ raskin ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|