1{ lib, stdenv, fetchFromGitHub, coreutils, pkg-config, glib, jsoncpp }:
2
3stdenv.mkDerivation rec {
4 pname = "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 # causes redefinition of _FORTIFY_SOURCE
23 hardeningDisable = [ "fortify3" ];
24
25 meta = with lib; {
26 description = "ChromiumOS libevdev. Renamed to avoid conflicts with the standard libevdev found in Linux distros";
27 license = licenses.bsd3;
28 platforms = platforms.linux;
29 homepage = "https://chromium.googlesource.com/chromiumos/platform/libevdev/";
30 maintainers = with maintainers; [ kcalvinalvin ];
31 };
32}