From 08b985a7ff77f986c7f4b2365a4467ca8a3e9903 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Fri, 22 May 2026 12:48:58 +0000 Subject: [PATCH] libinput: luaSupport flag Especially in constrained environments such as mobile and embedded devices the addition of Lua plugins may be undesirable due to the size of the resulting derivation. Allowing this feature to be easily disabled reduces boilerplate for downstream projects (such as *mobile-nixos*) significantly at little to no cost to *nixpkgs*. This change does cause rebuilds due to changes in the order of packages, however it does not constitute a breaking change as the default result is unchanged in terms of build results. Signed-off-by: benaryorg --- pkgs/development/libraries/libinput/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libinput/default.nix b/pkgs/development/libraries/libinput/default.nix index 90df7cf41b65..5a878bdc7d5d 100644 --- a/pkgs/development/libraries/libinput/default.nix +++ b/pkgs/development/libraries/libinput/default.nix @@ -7,7 +7,6 @@ meson, ninja, libevdev, - lua5_4, mtdev, udev, wacomSupport ? stdenv.hostPlatform.isLinux, @@ -20,6 +19,8 @@ cairo, glib, gtk3, + luaSupport ? true, + lua5_4, testsSupport ? false, check, valgrind, @@ -82,7 +83,6 @@ stdenv.mkDerivation rec { buildInputs = [ libevdev - lua5_4 mtdev (python3.withPackages ( pp: with pp; [ @@ -99,6 +99,9 @@ stdenv.mkDerivation rec { ++ lib.optionals wacomSupport [ libwacom ] + ++ lib.optionals luaSupport [ + lua5_4 + ] ++ lib.optionals eventGUISupport [ # GUI event viewer cairo @@ -121,6 +124,7 @@ stdenv.mkDerivation rec { (lib.mesonBool "debug-gui" eventGUISupport) (lib.mesonBool "tests" testsSupport) (lib.mesonBool "libwacom" wacomSupport) + (lib.mesonEnable "lua-plugins" luaSupport) "--sysconfdir=/etc" "--libexecdir=${placeholder "bin"}/libexec" ]