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 <binary@benary.org>
This commit is contained in:
benaryorg
2026-05-22 12:48:58 +00:00
parent 3b64986111
commit 08b985a7ff
@@ -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"
]