nixpkgs/pkgs/applications/misc/marktext/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

41 lines
1.1 KiB
Nix

{ appimageTools, fetchurl, lib }:
let
pname = "marktext";
version = "0.17.1";
src = fetchurl {
url = "https://github.com/marktext/marktext/releases/download/v${version}/marktext-x86_64.AppImage";
sha256 = "2e2555113e37df830ba3958efcccce7020907b12fd4162368cfd906aeda630b7";
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
};
in
appimageTools.wrapType2 rec {
inherit pname version src;
profile = ''
export LC_ALL=C.UTF-8
'';
extraPkgs = pkgs: [ pkgs.libsecret pkgs.xorg.libxkbfile ];
extraInstallCommands = ''
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 = "Simple and elegant markdown editor, available for Linux, macOS and Windows";
homepage = "https://www.marktext.cc";
license = licenses.mit;
maintainers = with maintainers; [ nh2 eduarrrd ];
platforms = [ "x86_64-linux" ];
mainProgram = "marktext";
};
}