From 32f1b9bdb3ea19f5c9bfd301dc4d4dcccef8ea8b Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 21 Nov 2024 11:28:32 +0900 Subject: [PATCH 1/3] zettlr: 3.2.0 -> 3.3.1 Diff: https://github.com/Zettlr/Zettlr/compare/v3.2.0...v3.3.1 Bumped to Electron 33 in https://github.com/Zettlr/Zettlr/commit/faa1f1e1d93993f3ed4f1ad49bd98391c18343ce --- pkgs/applications/misc/zettlr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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="; }; } From 887364d54d3d0bc012e087fde6da2417c5e97356 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 21 Nov 2024 12:52:00 +0900 Subject: [PATCH 2/3] zettlr: add commandLineArgs for wrapProgram --- pkgs/applications/misc/zettlr/generic.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/zettlr/generic.nix b/pkgs/applications/misc/zettlr/generic.nix index 76c4cf9c7463e..e24bc1312c548 100644 --- a/pkgs/applications/misc/zettlr/generic.nix +++ b/pkgs/applications/misc/zettlr/generic.nix @@ -6,6 +6,8 @@ lib, fetchurl, makeWrapper, + # command line arguments which are always set e.g ["--wayland-text-input-version=3"] + commandLineArgs ? [ ], }: # Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs. @@ -30,7 +32,8 @@ 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 \ From 966d72d398fee85af28838eda550833f9c3d60d8 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 21 Nov 2024 12:59:05 +0900 Subject: [PATCH 3/3] zettlr: add passthru.tests.version --- pkgs/applications/misc/zettlr/generic.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/misc/zettlr/generic.nix b/pkgs/applications/misc/zettlr/generic.nix index e24bc1312c548..46a21f3714744 100644 --- a/pkgs/applications/misc/zettlr/generic.nix +++ b/pkgs/applications/misc/zettlr/generic.nix @@ -8,6 +8,8 @@ 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. @@ -40,6 +42,10 @@ appimageTools.wrapType2 rec { --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";