elogind: various fixes (#506122)

This commit is contained in:
Aaron Andersen
2026-04-10 12:40:47 +00:00
committed by GitHub
+9
View File
@@ -35,6 +35,9 @@
enableSystemd ? false,
}:
let
system = "/run/current-system/sw";
in
stdenv.mkDerivation (finalAttrs: {
pname = "elogind";
version = "255.5";
@@ -83,6 +86,9 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace meson.build --replace-fail "install_emptydir(elogindstatedir)" ""
''
+ lib.optionalString (!enableSystemd) ''
substituteInPlace ./rules.d/71-seat.rules.in --replace-fail "{{BINDIR}}/udevadm" "${eudev}/bin/udevadm"
'';
patches = [
@@ -148,6 +154,9 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonOption "dbuspolicydir" "${placeholder "out"}/share/dbus-1/system.d")
(lib.mesonOption "dbussystemservicedir" "${placeholder "out"}/share/dbus-1/system-services")
(lib.mesonOption "sysconfdir" "${placeholder "out"}/etc")
(lib.mesonOption "halt-path" "${system}/bin/halt")
(lib.mesonOption "poweroff-path" "${system}/bin/poweroff")
(lib.mesonOption "reboot-path" "${system}/bin/reboot")
(lib.mesonBool "utmp" (!stdenv.hostPlatform.isMusl))
(lib.mesonEnable "xenctrl" false)
];