2022-05-15 04:08:10 +02:00
|
|
|
{ appimageTools, fetchurl, lib }:
|
2020-01-14 20:13:22 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "marktext";
|
2022-04-30 02:40:10 +02:00
|
|
|
version = "0.17.1";
|
2020-01-14 20:13:22 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-04-30 02:40:10 +02:00
|
|
|
url = "https://github.com/marktext/marktext/releases/download/v${version}/marktext-x86_64.AppImage";
|
2022-03-05 22:15:16 +01:00
|
|
|
sha256 = "2e2555113e37df830ba3958efcccce7020907b12fd4162368cfd906aeda630b7";
|
2020-01-14 20:13:22 +01:00
|
|
|
};
|
|
|
|
|
2021-11-13 14:17:23 +01:00
|
|
|
appimageContents = appimageTools.extractType2 {
|
2022-04-30 02:40:10 +02:00
|
|
|
inherit pname version src;
|
2021-11-13 14:17:23 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
appimageTools.wrapType2 rec {
|
2022-04-30 02:40:10 +02:00
|
|
|
inherit pname version src;
|
2021-11-13 14:17:23 +01:00
|
|
|
|
2020-01-14 20:13:22 +01:00
|
|
|
profile = ''
|
|
|
|
export LC_ALL=C.UTF-8
|
|
|
|
'';
|
|
|
|
|
|
|
|
multiPkgs = null; # no 32bit needed
|
|
|
|
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
|
|
|
|
p.libsecret
|
2021-03-16 19:16:31 +01:00
|
|
|
p.xorg.libxkbfile
|
2020-01-14 20:13:22 +01:00
|
|
|
];
|
|
|
|
|
2021-11-13 14:17:23 +01:00
|
|
|
extraInstallCommands = ''
|
|
|
|
# Strip version from binary name.
|
2022-04-30 02:40:10 +02:00
|
|
|
mv $out/bin/${pname}-${version} $out/bin/${pname}
|
2021-11-13 14:17:23 +01:00
|
|
|
|
|
|
|
install -m 444 -D ${appimageContents}/marktext.desktop $out/share/applications/marktext.desktop
|
|
|
|
substituteInPlace $out/share/applications/marktext.desktop \
|
|
|
|
--replace "Exec=AppRun" "Exec=${pname} --"
|
|
|
|
|
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
2020-01-14 20:13:22 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "A simple and elegant markdown editor, available for Linux, macOS and Windows";
|
2020-01-14 20:13:22 +01:00
|
|
|
homepage = "https://marktext.app";
|
|
|
|
license = licenses.mit;
|
2022-03-05 22:15:16 +01:00
|
|
|
maintainers = with maintainers; [ nh2 eduarrrd ];
|
2020-01-14 20:13:22 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-12-28 23:52:34 +01:00
|
|
|
mainProgram = "marktext";
|
2020-01-14 20:13:22 +01:00
|
|
|
};
|
|
|
|
}
|