mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 21:33:07 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ pname
|
|
, version
|
|
, hash
|
|
, appimageTools
|
|
, lib
|
|
, fetchurl
|
|
}:
|
|
|
|
# Based on https://gist.github.com/msteen/96cb7df66a359b827497c5269ccbbf94 and joplin-desktop nixpkgs.
|
|
let
|
|
src = fetchurl {
|
|
url = "https://github.com/Zettlr/Zettlr/releases/download/v${version}/Zettlr-${version}-x86_64.appimage";
|
|
inherit hash;
|
|
};
|
|
appimageContents = appimageTools.extractType2 {
|
|
inherit pname version src;
|
|
};
|
|
in
|
|
appimageTools.wrapType2 rec {
|
|
inherit pname version src;
|
|
|
|
extraPkgs = pkgs: [ pkgs.texliveMedium pkgs.pandoc ];
|
|
|
|
extraInstallCommands = ''
|
|
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 = "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 ];
|
|
mainProgram = "zettlr";
|
|
};
|
|
}
|