mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
zettlr-beta: init at 3.0.0-beta.7
This commit is contained in:
parent
570f93b3e2
commit
e31b7df1b8
@ -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=";
|
||||
};
|
||||
}
|
||||
|
42
pkgs/applications/misc/zettlr/generic.nix
Normal file
42
pkgs/applications/misc/zettlr/generic.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user