1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-02-18 08:59:42 +00:00

Merge pull request #132793 from SuperSandro2000/libinput

This commit is contained in:
Sandro 2021-08-06 08:45:00 +02:00 committed by GitHub
commit b3bb8b0d62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,14 +1,10 @@
{ lib, stdenv, fetchFromGitLab, pkg-config, 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, python3 ? null
, documentationSupport ? false, doxygen, graphviz # Documentation
, eventGUISupport ? false, cairo, glib, gtk3 # GUI event viewer support
, testsSupport ? false, check, valgrind, python3
}:
assert documentationSupport -> doxygen != null && graphviz != null && python3 != null;
assert eventGUISupport -> cairo != null && glib != null && gtk3 != null;
assert testsSupport -> check != null && valgrind != null && python3 != null;
let
mkFlag = optSet: flag: "-D${flag}=${lib.boolToString optSet}";
@ -24,7 +20,6 @@ let
else null;
in
with lib;
stdenv.mkDerivation rec {
pname = "libinput";
version = "1.16.4";
@ -48,7 +43,7 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [ pkg-config meson ninja ]
++ optionals documentationSupport [ doxygen graphviz sphinx-build ];
++ lib.optionals documentationSupport [ doxygen graphviz sphinx-build ];
buildInputs = [
libevdev
@ -60,8 +55,7 @@ stdenv.mkDerivation rec {
pyyaml
setuptools
]))
]
++ optionals eventGUISupport [ cairo glib gtk3 ];
] ++ lib.optionals eventGUISupport [ cairo glib gtk3 ];
checkInputs = [
check
@ -73,15 +67,16 @@ stdenv.mkDerivation rec {
patches = [ ./udev-absolute-path.patch ];
postPatch = ''
patchShebangs tools/helper-copy-and-exec-from-tmp.sh
patchShebangs test/symbols-leak-test
patchShebangs test/check-leftover-udev-rules.sh
patchShebangs test/helper-copy-and-exec-from-tmp.sh
patchShebangs \
tools/helper-copy-and-exec-from-tmp.sh \
test/symbols-leak-test \
test/check-leftover-udev-rules.sh \
test/helper-copy-and-exec-from-tmp.sh
'';
doCheck = testsSupport && stdenv.hostPlatform == stdenv.buildPlatform;
meta = {
meta = with lib; {
description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver";
homepage = "https://www.freedesktop.org/wiki/Software/libinput/";
license = licenses.mit;