zettlr-beta: init at 3.0.0-beta.7

This commit is contained in:
Guilherme Ramos Costa Paixao 2023-08-01 09:27:39 -03:00
parent 570f93b3e2
commit e31b7df1b8
No known key found for this signature in database
GPG Key ID: 55DCD99EC656E556
3 changed files with 52 additions and 39 deletions

View File

@ -1,41 +1,12 @@
{ appimageTools
, lib
, fetchurl
, texlive
, pandoc
}:
{ callPackage, texlive }:
# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
let
pname = "zettlr";
version = "2.3.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
sha256 = "sha256-3p9RO6hpioYF6kdGV+/9guoqxaPCJG73OsrN69SHQHk=";
builtins.mapAttrs (pname: attrs: callPackage ./generic.nix (attrs // { inherit pname; inherit texlive; })) {
zettlr = {
version = "2.3.0";
hash = "sha256-3p9RO6hpioYF6kdGV+/9guoqxaPCJG73OsrN69SHQHk=";
};
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in
appimageTools.wrapType2 rec {
inherit name src;
multiArch = false; # no 32bit needed
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ texlive pandoc ];
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
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 'Exec=AppRun' 'Exec=${pname}'
'';
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 ];
zettlr-beta = {
version = "3.0.0-beta.7";
hash = "sha256-zIZaINE27bcjbs8yCGQ3UKAwStFdvhHD3Q1F93LrG4U=";
};
}

View File

@ -0,0 +1,42 @@
{ pname
, version
, hash
, appimageTools
, lib
, fetchurl
, texlive
, pandoc
}:
# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
let
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
inherit hash;
};
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in
appimageTools.wrapType2 rec {
inherit name src;
multiArch = false; # no 32bit needed
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) ++ [ texlive pandoc ];
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
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 'Exec=AppRun' 'Exec=${pname}'
'';
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 ];
};
}

View File

@ -41503,9 +41503,9 @@ with pkgs;
zalgo = callPackage ../tools/misc/zalgo { };
zettlr = callPackage ../applications/misc/zettlr {
inherit (callPackage ../applications/misc/zettlr {
texlive = texlive.combined.scheme-medium;
};
}) zettlr zettlr-beta;
unpoller = callPackage ../servers/monitoring/unpoller { };