2017-09-25 21:01:05 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, meson, ninja, libevdev, mtdev, udev, libwacom
|
2015-08-13 19:39:12 +01:00
|
|
|
, documentationSupport ? false, doxygen ? null, graphviz ? null # Documentation
|
2015-02-24 07:32:49 +00:00
|
|
|
, eventGUISupport ? false, cairo ? null, glib ? null, gtk3 ? null # GUI event viewer support
|
2017-09-25 21:01:05 +01:00
|
|
|
, testsSupport ? false, check ? null, valgrind ? null }:
|
2014-10-17 22:26:05 +01:00
|
|
|
|
2015-02-24 07:32:49 +00:00
|
|
|
assert documentationSupport -> doxygen != null && graphviz != null;
|
|
|
|
assert eventGUISupport -> cairo != null && glib != null && gtk3 != null;
|
|
|
|
assert testsSupport -> check != null && valgrind != null;
|
|
|
|
|
2017-09-25 21:01:05 +01:00
|
|
|
let mkFlag = c: flag: if c then "-D${flag}=true" else "-D${flag}=false";
|
|
|
|
in with stdenv.lib; stdenv.mkDerivation rec {
|
2016-09-18 18:01:01 +01:00
|
|
|
name = "libinput-${version}";
|
2017-09-25 21:01:05 +01:00
|
|
|
version = "1.8.3";
|
2014-10-17 22:26:05 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-25 21:01:05 +01:00
|
|
|
url = "https://freedesktop.org/software/libinput/${name}.tar.xz";
|
|
|
|
sha256 = "0b8l2dmzzm20xf2hw1dr9gnzd3fah9jz5f216p2ajw895zsy5qig";
|
2014-10-17 22:26:05 +01:00
|
|
|
};
|
|
|
|
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-04-25 12:51:41 +01:00
|
|
|
|
2017-09-25 21:01:05 +01:00
|
|
|
mesonFlags = [
|
2015-06-01 20:29:47 +01:00
|
|
|
(mkFlag documentationSupport "documentation")
|
2017-09-25 21:01:05 +01:00
|
|
|
(mkFlag eventGUISupport "debug-gui")
|
2015-06-01 20:29:47 +01:00
|
|
|
(mkFlag testsSupport "tests")
|
2015-02-24 07:32:49 +00:00
|
|
|
];
|
|
|
|
|
2017-09-25 21:01:05 +01:00
|
|
|
patches = [ ./udev-absolute-path.patch ];
|
2015-02-24 07:32:49 +00:00
|
|
|
|
2017-09-25 21:01:05 +01:00
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig ];
|
|
|
|
buildInputs = [ libevdev mtdev libwacom ]
|
2015-02-24 07:32:49 +00:00
|
|
|
++ optionals eventGUISupport [ cairo glib gtk3 ]
|
|
|
|
++ optionals documentationSupport [ doxygen graphviz ]
|
|
|
|
++ optionals testsSupport [ check valgrind ];
|
2014-10-17 22:26:05 +01:00
|
|
|
|
2016-04-08 21:11:46 +01:00
|
|
|
propagatedBuildInputs = [ udev ];
|
|
|
|
|
2015-02-24 07:32:49 +00:00
|
|
|
meta = {
|
|
|
|
description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver";
|
|
|
|
homepage = http://www.freedesktop.org/wiki/Software/libinput;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ codyopel wkennington ];
|
2014-10-17 22:26:05 +01:00
|
|
|
};
|
|
|
|
}
|