2021-03-20 04:20:00 +00:00
|
|
|
{ appimageTools
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, texlive
|
|
|
|
, pandoc
|
2021-02-19 19:06:45 +00:00
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
|
|
|
|
let
|
|
|
|
pname = "zettlr";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "2.3.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-3p9RO6hpioYF6kdGV+/9guoqxaPCJG73OsrN69SHQHk=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
|
|
inherit name src;
|
|
|
|
};
|
2021-03-20 04:20:00 +00:00
|
|
|
in
|
|
|
|
appimageTools.wrapType2 rec {
|
2020-09-25 04:45:31 +00:00
|
|
|
inherit name src;
|
|
|
|
|
|
|
|
multiPkgs = null; # no 32bit needed
|
2021-03-20 04:20:00 +00:00
|
|
|
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ texlive pandoc ];
|
2020-09-25 04:45:31 +00:00
|
|
|
extraInstallCommands = ''
|
|
|
|
mv $out/bin/{${name},${pname}}
|
2021-10-28 06:52:43 +00:00
|
|
|
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 \
|
2021-04-18 02:13:31 +00:00
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A markdown editor for writing academic texts and taking notes";
|
|
|
|
homepage = "https://www.zettlr.com";
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ tfmoraes ];
|
|
|
|
};
|
|
|
|
}
|