Merge pull request #145754 from eduarrrd/marktext

This commit is contained in:
Sandro 2021-11-19 17:07:48 +01:00 committed by GitHub
commit 788fceee45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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";