1{
2 lib,
3 stdenv,
4 fetchurl,
5 evdev-proto,
6 gitUpdater,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "mtdev";
11 version = "1.1.7";
12
13 src = fetchurl {
14 url = "https://bitmath.org/code/mtdev/${pname}-${version}.tar.bz2";
15 hash = "sha256-oQetrSEB/srFSsf58OCg3RVdlUGT2lXCNAyX8v8dgU4=";
16 };
17
18 buildInputs = lib.optional stdenv.hostPlatform.isFreeBSD evdev-proto;
19
20 passthru.updateScript = gitUpdater {
21 url = "https://bitmath.org/git/mtdev.git";
22 rev-prefix = "v";
23 };
24
25 meta = with lib; {
26 homepage = "https://bitmath.org/code/mtdev/";
27 description = "Multitouch Protocol Translation Library";
28 mainProgram = "mtdev-test";
29 longDescription = ''
30 The mtdev is a stand-alone library which transforms all variants of
31 kernel MT events to the slotted type B protocol. The events put into
32 mtdev may be from any MT device, specifically type A without contact
33 tracking, type A with contact tracking, or type B with contact tracking.
34 See the kernel documentation for further details.
35 '';
36 license = licenses.mit;
37 platforms = with platforms; freebsd ++ linux;
38 };
39}