about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/zettlr/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/zettlr/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/zettlr/default.nix45
1 files changed, 8 insertions, 37 deletions
diff --git a/nixpkgs/pkgs/applications/misc/zettlr/default.nix b/nixpkgs/pkgs/applications/misc/zettlr/default.nix
index cfee5cb43e3f..79d386e349c0 100644
--- a/nixpkgs/pkgs/applications/misc/zettlr/default.nix
+++ b/nixpkgs/pkgs/applications/misc/zettlr/default.nix
@@ -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;
-
-  multiPkgs = null; # 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=";
   };
 }