2020-03-29 18:14:30 +01:00
|
|
|
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3 }:
|
2020-01-14 19:13:22 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "marktext";
|
2020-07-06 22:00:19 +01:00
|
|
|
version = "v0.16.2";
|
2020-01-14 19:13:22 +00:00
|
|
|
in
|
|
|
|
appimageTools.wrapType2 rec {
|
|
|
|
name = "${pname}-${version}-binary";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/marktext/marktext/releases/download/${version}/marktext-x86_64.AppImage";
|
2020-07-06 22:00:19 +01:00
|
|
|
sha256 = "0ivf9lvv2jk7dvxmqprzcsxgya3617xmx5bppjvik44z14b5x8r7";
|
2020-01-14 19:13:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
profile = ''
|
|
|
|
export LC_ALL=C.UTF-8
|
2020-03-29 18:14:30 +01:00
|
|
|
''
|
|
|
|
# Fixes file open dialog error
|
|
|
|
# GLib-GIO-ERROR **: 20:36:48.243: No GSettings schemas are installed on the system
|
|
|
|
# See https://github.com/NixOS/nixpkgs/pull/83701#issuecomment-608034097
|
|
|
|
+ ''
|
|
|
|
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
|
2020-01-14 19:13:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
multiPkgs = null; # no 32bit needed
|
|
|
|
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
|
|
|
|
p.libsecret
|
2021-03-16 18:16:31 +00:00
|
|
|
p.xorg.libxkbfile
|
2020-01-14 19:13:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Strip version from binary name.
|
|
|
|
extraInstallCommands = "mv $out/bin/${name} $out/bin/${pname}";
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "A simple and elegant markdown editor, available for Linux, macOS and Windows";
|
2020-01-14 19:13:22 +00:00
|
|
|
homepage = "https://marktext.app";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nh2 ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|