11 # Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
14 url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
17 appimageContents = appimageTools.extractType2 {
18 inherit pname version src;
21 appimageTools.wrapType2 rec {
22 inherit pname version src;
29 nativeBuildInputs = [ makeWrapper ];
31 extraInstallCommands = ''
32 wrapProgram $out/bin/zettlr \
33 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
34 install -m 444 -D ${appimageContents}/Zettlr.desktop $out/share/applications/Zettlr.desktop
35 install -m 444 -D ${appimageContents}/Zettlr.png $out/share/icons/hicolor/512x512/apps/Zettlr.png
36 substituteInPlace $out/share/applications/Zettlr.desktop \
37 --replace-fail 'Exec=AppRun' 'Exec=${pname}'
41 description = "Markdown editor for writing academic texts and taking notes";
42 homepage = "https://www.zettlr.com";
43 platforms = [ "x86_64-linux" ];
44 license = lib.licenses.gpl3;
45 maintainers = with lib.maintainers; [ tfmoraes ];
46 mainProgram = "zettlr";