util-linux: fix build with systemd disabled

Fixes: 025e637434 ("util-linux: split lastlog into dedicated output")
This commit is contained in:
Alyssa Ross
2025-08-29 12:59:33 +02:00
parent e946876244
commit 69ed93c6a7
+4 -3
View File
@@ -188,12 +188,13 @@ stdenv.mkDerivation (finalPackage: rec {
${lib.optionalString (!stdenv.hostPlatform.isStatic) ''moveToOutput "lib/security" "$lastlog"''}
moveToOutput "lib/tmpfiles.d/lastlog2-tmpfiles.conf" "$lastlog"
moveToOutput "bin/lastlog2" "$lastlog"
ln -svf "$lastlog/bin/"* $bin/bin/
''
+ lib.optionalString (withLastlog && systemdSupport) ''
moveToOutput "lib/systemd/system/lastlog2-import.service" "$lastlog"
substituteInPlace $lastlog/lib/systemd/system/lastlog2-import.service \
--replace-fail "$bin/bin/lastlog2" "$lastlog/bin/lastlog2"
moveToOutput "bin/lastlog2" "$lastlog"
ln -svf "$lastlog/bin/"* $bin/bin/
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''