From 12f460e9e62c08c25309ebf80718f7b27503a780 Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Mon, 25 Sep 2017 20:01:05 +0000 Subject: [PATCH] libinput: 1.7.3 -> 1.8.3 fixes #29784 --- .../libraries/libinput/default.nix | 33 +++++++------------ .../libinput/udev-absolute-path.patch | 21 ++++++------ 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 1cc275b30480..0f0e67260321 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -1,49 +1,40 @@ -{ stdenv, fetchurl, pkgconfig -, libevdev, mtdev, udev, libwacom +{ stdenv, fetchurl, pkgconfig, meson, ninja, libevdev, mtdev, udev, libwacom , documentationSupport ? false, doxygen ? null, graphviz ? null # Documentation , eventGUISupport ? false, cairo ? null, glib ? null, gtk3 ? null # GUI event viewer support -, testsSupport ? false, check ? null, valgrind ? null -, autoconf, automake -}: +, testsSupport ? false, check ? null, valgrind ? null }: assert documentationSupport -> doxygen != null && graphviz != null; assert eventGUISupport -> cairo != null && glib != null && gtk3 != null; assert testsSupport -> check != null && valgrind != null; -let - mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; -in - -with stdenv.lib; -stdenv.mkDerivation rec { +let mkFlag = c: flag: if c then "-D${flag}=true" else "-D${flag}=false"; +in with stdenv.lib; stdenv.mkDerivation rec { name = "libinput-${version}"; - version = "1.7.3"; + version = "1.8.3"; src = fetchurl { - url = "http://www.freedesktop.org/software/libinput/${name}.tar.xz"; - sha256 = "07fbzxddvhjcch43hdxb24sj7ri96zzpcjalvsicmw0i4wnn2v89"; + url = "https://freedesktop.org/software/libinput/${name}.tar.xz"; + sha256 = "0b8l2dmzzm20xf2hw1dr9gnzd3fah9jz5f216p2ajw895zsy5qig"; }; outputs = [ "out" "dev" ]; - configureFlags = [ + mesonFlags = [ (mkFlag documentationSupport "documentation") - (mkFlag eventGUISupport "event-gui") + (mkFlag eventGUISupport "debug-gui") (mkFlag testsSupport "tests") ]; - nativeBuildInputs = [ pkgconfig ]; + patches = [ ./udev-absolute-path.patch ]; - buildInputs = [ libevdev mtdev libwacom autoconf automake ] + nativeBuildInputs = [ meson ninja pkgconfig ]; + buildInputs = [ libevdev mtdev libwacom ] ++ optionals eventGUISupport [ cairo glib gtk3 ] ++ optionals documentationSupport [ doxygen graphviz ] ++ optionals testsSupport [ check valgrind ]; propagatedBuildInputs = [ udev ]; - patches = [ ./udev-absolute-path.patch ]; - patchFlags = [ "-p0" ]; - meta = { description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver"; homepage = http://www.freedesktop.org/wiki/Software/libinput; diff --git a/pkgs/development/libraries/libinput/udev-absolute-path.patch b/pkgs/development/libraries/libinput/udev-absolute-path.patch index 2d3fa966b299..4b6bfc96d5a5 100644 --- a/pkgs/development/libraries/libinput/udev-absolute-path.patch +++ b/pkgs/development/libraries/libinput/udev-absolute-path.patch @@ -1,12 +1,11 @@ ---- configure.ac 2016-05-27 14:00:25.248388226 +0200 -+++ configure.ac 2016-05-27 14:01:28.228943416 +0200 -@@ -214,7 +214,8 @@ AM_CONDITIONAL(BUILD_DOCS, [test "x$buil - # Used by the udev rules so we can use callouts during testing without - # installing everything first. Default is the empty string so the installed - # rule will use udev's default path. Override is in udev/Makefile.am --AC_SUBST(UDEV_TEST_PATH, "") -+UDEV_TEST_PATH="${UDEV_DIR}/" -+AC_SUBST(UDEV_TEST_PATH) - AC_PATH_PROG(SED, [sed]) +--- a/meson.build 2017-09-25 11:37:07.787726521 +0000 ++++ b/meson.build 2017-09-25 11:38:48.958233247 +0000 +@@ -100,7 +100,7 @@ + args : model_quirks) - AC_CONFIG_FILES([Makefile + udev_rules_config = configuration_data() +-udev_rules_config.set('UDEV_TEST_PATH', '') ++udev_rules_config.set('UDEV_TEST_PATH', udev_dir + '/') + configure_file(input : 'udev/80-libinput-device-groups.rules.in', + output : '80-libinput-device-groups.rules', + install : true,