Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, pkg-config, libX11, libXtst, xorgproto, 2libXi }: 3 4stdenv.mkDerivation rec { 5 pname = "xcape"; 6 version = "unstable-2018-03-01"; 7 8 src = fetchFromGitHub { 9 owner = "alols"; 10 repo = pname; 11 rev = "a34d6bae27bbd55506852f5ed3c27045a3c0bd9e"; 12 sha256 = "04grs4w9kpfzz25mqw82zdiy51g0w355gpn5b170p7ha5972ykc8"; 13 }; 14 15 nativeBuildInputs = [ pkg-config ]; 16 17 buildInputs = [ libX11 libXtst xorgproto libXi ]; 18 19 makeFlags = [ 20 "PREFIX=$(out)" 21 "MANDIR=/share/man/man1" 22 ]; 23 24 postInstall = "install -Dm444 --target-directory $out/share/doc README.md"; 25 26 meta = with lib; { 27 description = "Utility to configure modifier keys to act as other keys"; 28 longDescription = '' 29 xcape allows you to use a modifier key as another key when 30 pressed and released on its own. Note that it is slightly 31 slower than pressing the original key, because the pressed event 32 does not occur until the key is released. The default behaviour 33 is to generate the Escape key when Left Control is pressed and 34 released on its own. 35 ''; 36 homepage = "https://github.com/alols/xcape"; 37 license = licenses.gpl3 ; 38 maintainers = with maintainers; [ raskin ]; 39 platforms = platforms.linux; 40 }; 41}