remnote: add NIXOS_OZONE_WL flags

This commit is contained in:
Muhammad Talal Anwar 2026-07-01 06:41:35 +02:00
commit 74f7586818
No known key found for this signature in database

View file

@ -2,6 +2,7 @@
lib,
fetchurl,
appimageTools,
makeWrapper,
writeScript,
}:
let
@ -11,16 +12,21 @@ let
url = "https://download2.remnote.io/remnote-desktop2/RemNote-${version}.AppImage";
hash = "sha256-3F1lC/3ek6k3x6qZ4WswJRe/QYEy3iTNMhMmLtR6i0U=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
install -Dm444 ${appimageContents}/remnote.desktop -t $out/share/applications
substituteInPlace $out/share/applications/remnote.desktop \
--replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=remnote %u'
install -Dm444 ${appimageContents}/remnote.png -t $out/share/icons/hicolor/512x512/apps
wrapProgram $out/bin/remnote \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-wayland-ime=true --wayland-text-input-version=3}}"
'';
passthru.updateScript = writeScript "update.sh" ''