2026-04-30 14:24:48 +02:00
|
|
|
{
|
|
|
|
|
# Build tools.
|
|
|
|
|
installShellFiles, stdenvNoCC,
|
|
|
|
|
|
|
|
|
|
# Packages.
|
|
|
|
|
systemd, zsh,
|
|
|
|
|
}:
|
2025-03-10 23:54:40 +01:00
|
|
|
|
2026-04-29 16:14:59 +02:00
|
|
|
with stdenvNoCC;
|
2025-03-10 23:54:40 +01:00
|
|
|
|
|
|
|
|
mkDerivation {
|
2026-04-30 14:24:48 +02:00
|
|
|
name = "journalctl-last-invocation";
|
2025-03-15 14:01:46 +01:00
|
|
|
|
2026-04-30 14:24:48 +02:00
|
|
|
src = ./.;
|
2025-03-10 23:54:40 +01:00
|
|
|
|
2026-04-30 14:24:48 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
buildInputs = [ zsh ];
|
2025-03-15 13:59:05 +01:00
|
|
|
|
|
|
|
|
installPhase = ''
|
2026-04-30 14:24:48 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
|
|
installBin journalctl-last-invocation
|
2025-03-15 13:59:05 +01:00
|
|
|
|
2026-04-30 14:24:48 +02:00
|
|
|
runHook postInstall
|
|
|
|
|
'';
|
2025-03-10 23:54:40 +01:00
|
|
|
|
2026-04-30 14:24:48 +02:00
|
|
|
preFixup = ''
|
|
|
|
|
substituteInPlace $out/bin/journalctl-last-invocation \
|
|
|
|
|
--replace-fail journalctl ${systemd}/bin/journalctl \
|
|
|
|
|
--replace-fail systemctl ${systemd}/bin/systemctl
|
2026-04-29 16:09:15 +02:00
|
|
|
'';
|
2025-03-10 23:54:40 +01:00
|
|
|
}
|