From afed809954178530aaafe14182271262d22dcbca Mon Sep 17 00:00:00 2001 From: r-vdp Date: Mon, 13 Jul 2026 12:56:50 +0200 Subject: [PATCH] mako: route D-Bus activation through mako.service The D-Bus activation file shipped by mako has no SystemdService= line, so dbus execs mako directly when a notification arrives before the compositor is up. mako then dies with "failed to create display", repeatedly, and the notification is lost. nixpkgs installs the upstream contrib systemd unit, which has Type=dbus, After=graphical-session.target and an ExecCondition on WAYLAND_DISPLAY. Point the activation file at it so early notifications wait for the session instead of failing. Upstream mako cannot do this unconditionally because meson does not install the contrib unit. --- pkgs/by-name/ma/mako/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ma/mako/package.nix b/pkgs/by-name/ma/mako/package.nix index d72185274177..75c399acd796 100644 --- a/pkgs/by-name/ma/mako/package.nix +++ b/pkgs/by-name/ma/mako/package.nix @@ -70,6 +70,12 @@ stdenv.mkDerivation (finalAttrs: { substitute $src/contrib/systemd/mako.service $out/lib/systemd/user/mako.service \ --replace-fail '/usr/bin' "$out/bin" chmod 0644 $out/lib/systemd/user/mako.service + + # Route D-Bus activation through the unit installed above, so it + # waits for graphical-session.target instead of exec'ing mako + # before the compositor is up. + echo "SystemdService=mako.service" \ + >> $out/share/dbus-1/services/fr.emersion.mako.service ''; meta = {