2018-12-31 03:40:47 +00:00
|
|
|
{ stdenv, fetchFromGitHub, pkgconfig, libX11, libXtst, xorgproto,
|
2016-11-23 09:30:00 +00:00
|
|
|
libXi }:
|
|
|
|
|
2013-07-30 12:51:01 +01:00
|
|
|
let
|
2016-11-23 09:30:00 +00:00
|
|
|
baseName = "xcape";
|
|
|
|
version = "1.2";
|
2013-07-30 12:51:01 +01:00
|
|
|
in
|
2016-11-23 09:30:00 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${baseName}-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alols";
|
|
|
|
repo = baseName;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "09a05cxgrip6nqy1qmwblamp2bhknqnqmxn7i2a1rgxa0nba95dm";
|
2013-07-30 12:51:01 +01:00
|
|
|
};
|
2016-11-23 09:30:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
2018-12-31 03:40:47 +00:00
|
|
|
buildInputs = [ libX11 libXtst xorgproto libXi ];
|
2016-11-23 09:30:00 +00:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" "MANDIR=/share/man/man1" ];
|
|
|
|
|
|
|
|
postInstall = "install -D --target-directory $out/share/doc README.md";
|
|
|
|
|
2013-07-30 12:51:01 +01:00
|
|
|
meta = {
|
2016-11-23 09:30:00 +00:00
|
|
|
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.
|
|
|
|
'';
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://github.com/alols/xcape;
|
2013-07-30 12:51:01 +01:00
|
|
|
license = stdenv.lib.licenses.gpl3 ;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-11-23 09:30:00 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.raskin ];
|
2013-07-30 12:51:01 +01:00
|
|
|
};
|
|
|
|
}
|