summary refs log tree commit diff
path: root/pkgs/applications/misc/marktext
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2020-01-14 20:13:22 +0100
committerNiklas Hambüchen <mail@nh2.me>2020-01-14 20:23:18 +0100
commit5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c (patch)
tree43f7efa21b8eb2786b7ac1ba356f9ec656b185d0 /pkgs/applications/misc/marktext
parent353ea7f3ebd34a989c30cfa714644b86f1fd50ef (diff)
downloadnixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.tar
nixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.tar.gz
nixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.tar.bz2
nixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.tar.lz
nixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.tar.xz
nixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.tar.zst
nixpkgs-5cafbb14f91f98fed6a82b7b7fc8d88d71b17e7c.zip
marktext: init at v0.16.0-rc.2
This uses the .AppImage binary release, until we have a real source package
(see https://github.com/marktext/marktext/issues/1647).

I used the `notable` package as a template.
Diffstat (limited to 'pkgs/applications/misc/marktext')
-rw-r--r--pkgs/applications/misc/marktext/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/applications/misc/marktext/default.nix b/pkgs/applications/misc/marktext/default.nix
new file mode 100644
index 00000000000..5813fc15c0d
--- /dev/null
+++ b/pkgs/applications/misc/marktext/default.nix
@@ -0,0 +1,35 @@
+{ appimageTools, fetchurl, lib }:
+
+let
+  pname = "marktext";
+  version = "v0.16.0-rc.2";
+in
+appimageTools.wrapType2 rec {
+  name = "${pname}-${version}-binary";
+
+  src = fetchurl {
+    url = "https://github.com/marktext/marktext/releases/download/${version}/marktext-x86_64.AppImage";
+    sha256 = "1w1mxa1j94zr36xhvlhzq8d77pi359vdxqb2j8mnz2bib9khxk9k";
+  };
+
+  profile = ''
+    export LC_ALL=C.UTF-8
+  '';
+
+  multiPkgs = null; # no 32bit needed
+  extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
+    p.libsecret
+    p.xlibs.libxkbfile
+  ];
+
+  # Strip version from binary name.
+  extraInstallCommands = "mv $out/bin/${name} $out/bin/${pname}";
+
+  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 ];
+    platforms = [ "x86_64-linux" ];
+  };
+}