1 { appimageTools, fetchurl, lib }:
8 url = "https://github.com/marktext/marktext/releases/download/v${version}/marktext-x86_64.AppImage";
9 sha256 = "2e2555113e37df830ba3958efcccce7020907b12fd4162368cfd906aeda630b7";
12 appimageContents = appimageTools.extractType2 {
13 inherit pname version src;
16 appimageTools.wrapType2 rec {
17 inherit pname version src;
23 multiArch = false; # no 32bit needed
24 extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
29 extraInstallCommands = ''
30 # Strip version from binary name.
31 mv $out/bin/${pname}-${version} $out/bin/${pname}
33 install -m 444 -D ${appimageContents}/marktext.desktop $out/share/applications/marktext.desktop
34 substituteInPlace $out/share/applications/marktext.desktop \
35 --replace "Exec=AppRun" "Exec=${pname} --"
37 cp -r ${appimageContents}/usr/share/icons $out/share
41 description = "A simple and elegant markdown editor, available for Linux, macOS and Windows";
42 homepage = "https://marktext.app";
43 license = licenses.mit;
44 maintainers = with maintainers; [ nh2 eduarrrd ];
45 platforms = [ "x86_64-linux" ];
46 mainProgram = "marktext";