summaryrefslogtreecommitdiffstats
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-09-09 08:11:34 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-09-09 08:11:34 +0200
commite3f25191c4af029ed071d6ad06547473edb35148 (patch)
treeb1aff626774ef44739bedf74f84a9d7ca97e4563 /pkgs/os-specific
parent3c5b794214bce4274d6dac34eda7f2c88f5a5884 (diff)
parent3a89de6ce2c268d65d46b7ccd400bf4c443863eb (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/chromium-xorg-conf/default.nix8
-rw-r--r--pkgs/os-specific/linux/libevdevc/default.nix29
-rw-r--r--pkgs/os-specific/linux/libgestures/default.nix33
-rw-r--r--pkgs/os-specific/linux/libgestures/include-fix.patch12
-rw-r--r--pkgs/os-specific/linux/xf86-input-cmt/default.nix36
5 files changed, 118 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/chromium-xorg-conf/default.nix b/pkgs/os-specific/linux/chromium-xorg-conf/default.nix
new file mode 100644
index 000000000000..58038923890b
--- /dev/null
+++ b/pkgs/os-specific/linux/chromium-xorg-conf/default.nix
@@ -0,0 +1,8 @@
+{fetchgit }:
+
+fetchgit {
+ name = "chromium-xorg-conf";
+ url = "https://chromium.googlesource.com/chromiumos/platform/xorg-conf";
+ rev = "26fb9d57e195c7e467616b35b17e2b5d279c1514";
+ sha256 = "0643y3l3hjk4mv4lm3h9z56h990q6k11hcr10lcqppgsii0d3zcf";
+}
diff --git a/pkgs/os-specific/linux/libevdevc/default.nix b/pkgs/os-specific/linux/libevdevc/default.nix
new file mode 100644
index 000000000000..e3dfbd3d6c22
--- /dev/null
+++ b/pkgs/os-specific/linux/libevdevc/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, coreutils, pkgconfig, glib, jsoncpp }:
+
+stdenv.mkDerivation rec {
+ name = "libevdevc";
+ version = "2.0.1";
+ src = fetchFromGitHub {
+ owner = "hugegreenbug";
+ repo = "libevdevc";
+ rev = "v${version}";
+ sha256 = "0ry30krfizh87yckmmv8n082ad91mqhhbbynx1lfidqzb6gdy2dd";
+ };
+
+ postPatch = ''
+ substituteInPlace common.mk \
+ --replace /bin/echo ${coreutils}/bin/echo
+ substituteInPlace include/module.mk \
+ --replace /usr/include /include
+ '';
+
+ makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
+
+ meta = with stdenv.lib; {
+ description = "ChromiumOS libevdev. Renamed to avoid conflicts with the standard libevdev found in Linux distros.";
+ license = licenses.bsd3;
+ platforms = platforms.linux;
+ homepage = "https://chromium.googlesource.com/chromiumos/platform/libevdev/";
+ maintainers = with maintainers; [ kcalvinalvin ];
+ };
+}
diff --git a/pkgs/os-specific/linux/libgestures/default.nix b/pkgs/os-specific/linux/libgestures/default.nix
new file mode 100644
index 000000000000..4c51525727af
--- /dev/null
+++ b/pkgs/os-specific/linux/libgestures/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, pkgconfig, glib, jsoncpp }:
+
+stdenv.mkDerivation rec {
+ name = "libgestures-${version}";
+ version = "2.0.1";
+ src = fetchFromGitHub {
+ owner = "hugegreenbug";
+ repo = "libgestures";
+ rev = "v${version}";
+ sha256 = "0dfvads2adzx4k8cqc1rbwrk1jm2wn9wl2jk51m26xxpmh1g0zab";
+ };
+ patches = [ ./include-fix.patch ];
+
+ postPatch = ''
+ substituteInPlace Makefile \
+ --replace -Werror -Wno-error \
+ --replace '$(DESTDIR)/usr/include' '$(DESTDIR)/include'
+ '';
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ glib jsoncpp ];
+
+
+ makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
+
+ meta = with stdenv.lib; {
+ description = "ChromiumOS libgestures modified to compile for Linux.";
+ license = licenses.bsd3;
+ platforms = platforms.linux;
+ homepage = "https://chromium.googlesource.com/chromiumos/platform/gestures";
+ maintainers = with maintainers; [ kcalvinalvin ];
+ };
+}
diff --git a/pkgs/os-specific/linux/libgestures/include-fix.patch b/pkgs/os-specific/linux/libgestures/include-fix.patch
new file mode 100644
index 000000000000..851be4771434
--- /dev/null
+++ b/pkgs/os-specific/linux/libgestures/include-fix.patch
@@ -0,0 +1,12 @@
+diff -ur a/include/gestures/include/finger_metrics.h b/include/gestures/include/finger_metrics.h
+--- a/include/gestures/include/finger_metrics.h 1970-01-01 09:00:01.000000000 +0900
++++ b/include/gestures/include/finger_metrics.h 2018-12-01 16:58:51.590718511 +0900
+@@ -5,6 +5,8 @@
+ #ifndef GESTURES_FINGER_METRICS_H_
+ #define GESTURES_FINGER_METRICS_H_
+
++#include <math.h>
++
+ #include "gestures/include/gestures.h"
+ #include "gestures/include/prop_registry.h"
+#include "gestures/include/vector.h"
diff --git a/pkgs/os-specific/linux/xf86-input-cmt/default.nix b/pkgs/os-specific/linux/xf86-input-cmt/default.nix
new file mode 100644
index 000000000000..2422b70b0685
--- /dev/null
+++ b/pkgs/os-specific/linux/xf86-input-cmt/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, pkgconfig, xorgserver, xorgproto,
+ utilmacros, libgestures, libevdevc }:
+
+stdenv.mkDerivation rec {
+ name = "xf86-input-cmt-${version}";
+ version = "2.0.2";
+ src = fetchFromGitHub {
+ owner = "hugegreenbug";
+ repo = "xf86-input-cmt";
+ rev = "v${version}";
+ sha256 = "1cnwf518nc0ybc1r3rsgc1gcql1k3785khffv0i4v3akrm9wdw98";
+ };
+
+ postPatch = ''
+ patchShebangs ./apply_patches.sh
+ ./apply_patches.sh
+ '';
+
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [
+ xorgserver xorgproto utilmacros
+ libgestures libevdevc
+ ];
+
+ configureFlags = [
+ "--with-sdkdir=${placeholder "out"}"
+ ];
+
+ meta = with stdenv.lib; {
+ description = "Chromebook touchpad driver.";
+ license = licenses.bsd3;
+ platforms = platforms.linux;
+ homepage = "www.github.com/hugegreenbug/xf86-input-cmt";
+ maintainers = with maintainers; [ kcalvinalvin ];
+ };
+}