mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 03:34:58 +00:00
1a634cc057
they're unnecessary since https://github.com/NixOS/nixpkgs/pull/161739/files which links the schemas to their correct fhs locations and adds gsettings-desktop-schemas and hicolor-icon-theme to appimage fhs
49 lines
1.3 KiB
Nix
49 lines
1.3 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
|
|
'';
|
|
|
|
multiPkgs = null; # no 32bit needed
|
|
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
|
|
p.libsecret
|
|
p.xorg.libxkbfile
|
|
];
|
|
|
|
extraInstallCommands = ''
|
|
# Strip version from binary name.
|
|
mv $out/bin/${pname}-${version} $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";
|
|
homepage = "https://marktext.app";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ nh2 eduarrrd ];
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "marktext";
|
|
};
|
|
}
|