1{ lib, stdenv, fetchFromGitHub, coreutils, pkg-config, glib, jsoncpp }:
2
3stdenv.mkDerivation rec {
4 name = "libevdevc";
5 version = "2.0.1";
6 src = fetchFromGitHub {
7 owner = "hugegreenbug";
8 repo = "libevdevc";
9 rev = "v${version}";
10 sha256 = "0ry30krfizh87yckmmv8n082ad91mqhhbbynx1lfidqzb6gdy2dd";
11 };
12
13 postPatch = ''
14 substituteInPlace common.mk \
15 --replace /bin/echo ${coreutils}/bin/echo
16 substituteInPlace include/module.mk \
17 --replace /usr/include /include
18 '';
19
20 makeFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
21
22 meta = with lib; {
23 description = "ChromiumOS libevdev. Renamed to avoid conflicts with the standard libevdev found in Linux distros";
24 license = licenses.bsd3;
25 platforms = platforms.linux;
26 homepage = "https://chromium.googlesource.com/chromiumos/platform/libevdev/";
27 maintainers = with maintainers; [ kcalvinalvin ];
28 };
29}