diff --git a/pkgs/applications/misc/zettlr/default.nix b/pkgs/applications/misc/zettlr/default.nix index 7ac5133d11b9a..4054aaf1c37c0 100644 --- a/pkgs/applications/misc/zettlr/default.nix +++ b/pkgs/applications/misc/zettlr/default.nix @@ -2,7 +2,7 @@ builtins.mapAttrs (pname: attrs: callPackage ./generic.nix (attrs // { inherit pname; })) { zettlr = { - version = "3.2.0"; - hash = "sha256-gttDGWFJ/VmOyqgOSKnCqqPtNTKJd1fmDpa0ZAX3xc8="; + version = "3.3.1"; + hash = "sha256-jKqe3dEWEtg/SqY2sfgi+AaPOk2fn4tfEMhNDGlJMQw="; }; } diff --git a/pkgs/applications/misc/zettlr/generic.nix b/pkgs/applications/misc/zettlr/generic.nix index 76c4cf9c7463e..46a21f3714744 100644 --- a/pkgs/applications/misc/zettlr/generic.nix +++ b/pkgs/applications/misc/zettlr/generic.nix @@ -6,6 +6,10 @@ lib, fetchurl, makeWrapper, + # command line arguments which are always set e.g ["--wayland-text-input-version=3"] + commandLineArgs ? [ ], + testers, + zettlr, }: # Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs. @@ -30,13 +34,18 @@ appimageTools.wrapType2 rec { extraInstallCommands = '' wrapProgram $out/bin/zettlr \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \ + --add-flags ${lib.escapeShellArg commandLineArgs} install -m 444 -D ${appimageContents}/Zettlr.desktop $out/share/applications/Zettlr.desktop install -m 444 -D ${appimageContents}/Zettlr.png $out/share/icons/hicolor/512x512/apps/Zettlr.png substituteInPlace $out/share/applications/Zettlr.desktop \ --replace-fail 'Exec=AppRun' 'Exec=${pname}' ''; + passthru.tests.version = testers.testVersion { + package = zettlr; + }; + meta = { description = "Markdown editor for writing academic texts and taking notes"; homepage = "https://www.zettlr.com";