anytype: wayland support

This commit is contained in:
Kira Bruneau 2023-08-31 15:46:27 -04:00
parent a63a64b593
commit 9c6b83001d

View File

@ -1,4 +1,4 @@
{ lib, fetchurl, appimageTools }:
{ lib, fetchurl, appimageTools, makeWrapper }:
let
pname = "anytype";
@ -20,6 +20,9 @@ appimageTools.wrapType2 {
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${appimageContents}/anytype.desktop -t $out/share/applications
substituteInPlace $out/share/applications/anytype.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'