@@ -0,0 +1,33 @@
1+{ stdenv, fetchFromGitHub, pkgconfig, glib, jsoncpp }:
2+
3+stdenv.mkDerivation rec {
4+ name = "libgestures-${version}";
5+ version = "2.0.1";
6+ src = fetchFromGitHub {
7+ owner = "hugegreenbug";
8+ repo = "libgestures";
9+ rev = "v${version}";
10+ sha256 = "0dfvads2adzx4k8cqc1rbwrk1jm2wn9wl2jk51m26xxpmh1g0zab";
11+ };
12+ patches = [ ./include-fix.patch ];
13+
14+ postPatch = ''
15+ substituteInPlace Makefile \
16+ --replace -Werror -Wno-error \
17+ --replace '$(DESTDIR)/usr/include' '$(DESTDIR)/include'
18+ '';
19+
20+ nativeBuildInputs = [ pkgconfig ];
21+ buildInputs = [ glib jsoncpp ];
22+
23+
24+ makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
25+
26+ meta = with stdenv.lib; {
27+ description = "ChromiumOS libgestures modified to compile for Linux.";
28+ license = licenses.bsd3;
29+ platforms = platforms.linux;
30+ homepage = "https://chromium.googlesource.com/chromiumos/platform/gestures";
31+ maintainers = with maintainers; [ kcalvinalvin ];
32+ };
33+}