2019-01-28 22:13:37 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, electron_3, dpkg, gtk3, glib, gnome3, wrapGAppsHook }:
|
2017-05-20 08:52:11 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-01-28 22:13:37 +00:00
|
|
|
pname = "typora";
|
|
|
|
version = "0.9.64";
|
2017-05-20 08:52:11 +01:00
|
|
|
|
2019-01-28 22:13:37 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
|
|
|
|
sha256 = "0dffydc11ys2i38gdy8080ph1xlbbzhcdcc06hyfv0dr0nf58a09";
|
|
|
|
};
|
2017-05-20 08:52:11 +01:00
|
|
|
|
2019-01-28 22:13:37 +00:00
|
|
|
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
|
2017-05-20 08:52:11 +01:00
|
|
|
|
2019-01-28 22:13:37 +00:00
|
|
|
buildInputs = [ gtk3 glib gnome3.gsettings-desktop-schemas ];
|
2018-05-28 10:55:17 +01:00
|
|
|
|
2019-01-28 22:13:37 +00:00
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
2017-05-20 08:52:11 +01:00
|
|
|
|
2019-01-28 22:13:37 +00:00
|
|
|
dontWrapGApps = true;
|
2017-05-20 08:52:11 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-01-28 22:13:37 +00:00
|
|
|
mkdir -p $out/bin $out/share/typora
|
|
|
|
{
|
|
|
|
cd usr
|
|
|
|
mv share/typora/resources/app/* $out/share/typora
|
|
|
|
mv share/applications $out/share
|
|
|
|
mv share/icons $out/share
|
|
|
|
mv share/doc $out/share
|
|
|
|
}
|
|
|
|
|
|
|
|
makeWrapper ${electron_3}/bin/electron $out/bin/typora \
|
|
|
|
--add-flags $out/share/typora \
|
2018-05-28 10:55:17 +01:00
|
|
|
"''${gappsWrapperArgs[@]}" \
|
2019-01-28 22:13:37 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}"
|
2017-05-20 08:52:11 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A minimal Markdown reading & writing app";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://typora.io;
|
2017-11-05 17:53:40 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ jensbin ];
|
2019-01-28 22:13:37 +00:00
|
|
|
inherit (electron_3.meta) platforms;
|
2017-05-20 08:52:11 +01:00
|
|
|
};
|
|
|
|
}
|