Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
48 lines
1.4 KiB
Nix
48 lines
1.4 KiB
Nix
{
|
|
appimageTools,
|
|
lib,
|
|
fetchurl,
|
|
makeWrapper,
|
|
}:
|
|
|
|
# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
|
|
let
|
|
pname = "zettlr";
|
|
version = "3.4.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
|
|
hash = "sha256-ApgmHl9WoAmWl03tqv01D0W8orja25f7KZUFLhlZloQ=";
|
|
};
|
|
appimageContents = appimageTools.extractType2 {
|
|
inherit pname version src;
|
|
};
|
|
in
|
|
appimageTools.wrapType2 rec {
|
|
inherit pname version src;
|
|
|
|
extraPkgs = pkgs: [
|
|
pkgs.texliveMedium
|
|
pkgs.pandoc
|
|
];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
extraInstallCommands = ''
|
|
wrapProgram $out/bin/zettlr \
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
|
|
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}'
|
|
'';
|
|
|
|
meta = {
|
|
description = "Markdown editor for writing academic texts and taking notes";
|
|
homepage = "https://www.zettlr.com";
|
|
platforms = [ "x86_64-linux" ];
|
|
license = lib.licenses.gpl3;
|
|
mainProgram = "zettlr";
|
|
};
|
|
}
|