1{ lib
2, stdenv
3, fetchurl
4, automake
5, autoconf
6, libX11
7}:
8
9stdenv.mkDerivation rec {
10 pname = "libstroke";
11 version = "0.5.1";
12
13 src = fetchurl {
14 url = "https://web.archive.org/web/20161204100704/http://etla.net/libstroke/${pname}-${version}.tar.gz";
15 sha256 = "0bbpqzsqh9zrc6cg62f6vp1p4dzvv37blsd0gdlzdskgwvyzba8d";
16 };
17
18 nativeBuildInputs = [ automake autoconf ];
19 buildInputs = [ libX11 ];
20
21 # libstroke ships with an ancient config.sub that doesn't know about x86_64, so regenerate it.
22 # Also, modern automake doesn't like things and returns error code 63. But it generates the file.
23 preConfigure = ''
24 rm config.sub
25 autoconf
26 automake -a || true
27 '';
28
29 meta = {
30 description = "A library for simple gesture recognition";
31 homepage = "https://web.archive.org/web/20161204100704/http://etla.net/libstroke/";
32 license = lib.licenses.gpl2;
33
34 longDescription =
35 '' libstroke, last updated in 2001, still successfully provides a basic
36 gesture recognition engine based around a 3x3 grid. It's simple and
37 easy to work with, and notably used by FVWM.
38 '';
39
40 platforms = lib.platforms.linux;
41 };
42}