git.iko.soy/typeable/nixpkgs
on master help sign in
libgestures: init at 2.0.1
commitb084a3dcccd95f4838408e629932f2414f55c2e6 authorCalvin Kim <ccychc@gmail.com> dateSun 8 Sep 2019, 03:00 (7 years ago) parentae8c8f8
2 files changed+45
pkgs/os-specific/linux/libgestures/default.nix+33 pkgs/os-specific/linux/libgestures/include-fix.patch+12
pkgs/os-specific/linux/libgestures/default.nixnew file+33
@@ -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+}
pkgs/os-specific/linux/libgestures/include-fix.patchnew file+12
@@ -0,0 +1,12 @@
1+diff -ur a/include/gestures/include/finger_metrics.h b/include/gestures/include/finger_metrics.h
2+--- a/include/gestures/include/finger_metrics.h 1970-01-01 09:00:01.000000000 +0900
3++++ b/include/gestures/include/finger_metrics.h 2018-12-01 16:58:51.590718511 +0900
4+@@ -5,6 +5,8 @@
5+ #ifndef GESTURES_FINGER_METRICS_H_
6+ #define GESTURES_FINGER_METRICS_H_
7+
8++#include <math.h>
9++
10+ #include "gestures/include/gestures.h"
11+ #include "gestures/include/prop_registry.h"
12+#include "gestures/include/vector.h"