systemd: set kexec-path meson option

Since systemd/systemd@c3f32b9, meson no longer probes $PATH to
locate kexec and instead hardcodes /usr/bin/kexec unless the
-Dkexec-path option is explicitly set.

kexec has probably only ever worked on NixOS because of the
fallback codepath in shutdown.c that reboots via RB_KEXEC when
the kexec binary isn't found.

Fixes #498149
This commit is contained in:
Shiven Garia
2026-03-09 14:11:02 +05:30
parent 7ae70c14b7
commit ffe0111b60

View File

@@ -560,6 +560,9 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonOption "loadkeys-path" "${kbd}/bin/loadkeys")
(lib.mesonOption "setfont-path" "${kbd}/bin/setfont")
]
++ lib.optionals withKexectools [
(lib.mesonOption "kexec-path" "${kexec-tools}/bin/kexec")
]
++ lib.optionals withKmod [
(lib.mesonOption "kmod-path" "${kmod}/bin/kmod")
]