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