Merge pull request #145754 from eduarrrd/marktext
This commit is contained in:
commit
788fceee45
1 changed files with 19 additions and 6 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue