marktext: 0.16.2 -> 0.16.3

Add .desktop file, icons in the process.
This commit is contained in:
Eduard Bachmakov 2021-11-13 14:17:23 +01:00
parent 594fa6aea6
commit 40e650fa3d

View file

@ -2,16 +2,21 @@
let
pname = "marktext";
version = "v0.16.2";
in
appimageTools.wrapType2 rec {
version = "v0.16.3";
name = "${pname}-${version}-binary";
src = fetchurl {
url = "https://github.com/marktext/marktext/releases/download/${version}/marktext-x86_64.AppImage";
sha256 = "0ivf9lvv2jk7dvxmqprzcsxgya3617xmx5bppjvik44z14b5x8r7";
sha256 = "0s93c79vy2vsi7b6xq4hvsvjjad8bdkhl1q135vp98zmbf7bvm9b";
};
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in
appimageTools.wrapType2 rec {
inherit name src;
profile = ''
export LC_ALL=C.UTF-8
''
@ -28,8 +33,16 @@ appimageTools.wrapType2 rec {
p.xorg.libxkbfile
];
# Strip version from binary name.
extraInstallCommands = "mv $out/bin/${name} $out/bin/${pname}";
extraInstallCommands = ''
# Strip version from binary name.
mv $out/bin/${name} $out/bin/${pname}
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
'';
meta = with lib; {
description = "A simple and elegant markdown editor, available for Linux, macOS and Windows";