diff --git a/pkgs/by-name/re/remnote/package.nix b/pkgs/by-name/re/remnote/package.nix index fbfded978243..a5ec21433c24 100644 --- a/pkgs/by-name/re/remnote/package.nix +++ b/pkgs/by-name/re/remnote/package.nix @@ -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" ''