signal-desktop: support wayland even when running as a service
This commit is contained in:
@@ -30,6 +30,8 @@ in
|
|||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "20s";
|
RestartSec = "20s";
|
||||||
};
|
};
|
||||||
|
# for some reason the --ozone-platform-hint=auto flag fails when signal-desktop is launched from a service
|
||||||
|
environment.NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -120,6 +120,7 @@
|
|||||||
, stdenv
|
, stdenv
|
||||||
# , substituteAll
|
# , substituteAll
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
|
, xdg-utils
|
||||||
, yarn
|
, yarn
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -364,9 +365,15 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
# XXX: add --ozone-platform-hint=auto to make it so that NIXOS_OZONE_WL isn't *needed*.
|
||||||
|
# electron should auto-detect x11 v.s. wayland: launching with `NIXOS_OZONE_WL=1` is an optional way to force it when debugging.
|
||||||
|
# xdg-utils: needed for ozone-platform-hint=auto to work
|
||||||
|
# else `LaunchProcess: failed to execvp: xdg-settings`
|
||||||
makeShellWrapper ${electron'}/bin/electron $out/bin/signal-desktop \
|
makeShellWrapper ${electron'}/bin/electron $out/bin/signal-desktop \
|
||||||
"''${gappsWrapperArgs[@]}" \
|
"''${gappsWrapperArgs[@]}" \
|
||||||
--add-flags $out/lib/Signal/resources/app.asar \
|
--add-flags $out/lib/Signal/resources/app.asar \
|
||||||
|
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
||||||
|
--add-flags --ozone-platform-hint=auto \
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
|
||||||
--inherit-argv0
|
--inherit-argv0
|
||||||
'';
|
'';
|
||||||
|
Reference in New Issue
Block a user