diff options
author | Guilherme Ramos Costa Paixao <guircp@usp.br> | 2023-08-01 09:27:39 -0300 |
---|---|---|
committer | Guilherme Ramos Costa Paixao <guircp@usp.br> | 2023-08-01 09:27:39 -0300 |
commit | e31b7df1b85516222cbd64eb4251347c6afb4d3e (patch) | |
tree | 7a1488dceab4f5d5f698c83c824576fae69a3ed6 /pkgs/applications/misc/zettlr | |
parent | 570f93b3e24e88beed521c8be4be41cb3151023a (diff) |
zettlr-beta: init at 3.0.0-beta.7
Diffstat (limited to 'pkgs/applications/misc/zettlr')
-rw-r--r-- | pkgs/applications/misc/zettlr/default.nix | 45 | ||||
-rw-r--r-- | pkgs/applications/misc/zettlr/generic.nix | 42 |
2 files changed, 50 insertions, 37 deletions
diff --git a/pkgs/applications/misc/zettlr/default.nix b/pkgs/applications/misc/zettlr/default.nix index 586d9f95f1f70..79d386e349c05 100644 --- a/pkgs/applications/misc/zettlr/default.nix +++ b/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; - - 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="; }; } diff --git a/pkgs/applications/misc/zettlr/generic.nix b/pkgs/applications/misc/zettlr/generic.nix new file mode 100644 index 0000000000000..4a8bcbd8549e9 --- /dev/null +++ b/pkgs/applications/misc/zettlr/generic.nix @@ -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 ]; + }; +} |