3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/typora/default.nix
R. RyanTM fae90476b7 typora: 0.9.70 -> 0.9.72
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/typora/versions
2019-07-02 19:13:24 -07:00

56 lines
1.3 KiB
Nix

{ stdenv, fetchurl, makeWrapper, electron_3, dpkg, gtk3, glib, gsettings-desktop-schemas, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "typora";
version = "0.9.72";
src = fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "0q7fj77pr3ykpwgip87h12qxvpvlzs15mi9w3phqm3p9mmm9rlrs";
};
nativeBuildInputs = [
dpkg
makeWrapper
wrapGAppsHook
];
buildInputs = [
glib
gsettings-desktop-schemas
gtk3
];
unpackPhase = "dpkg-deb -x $src .";
dontWrapGApps = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
{
cd usr
mv share/typora/resources/app $out/share/typora
mv share/{applications,icons,doc} $out/share/
}
runHook postInstall
'';
postFixup = ''
makeWrapper ${electron_3}/bin/electron $out/bin/typora \
--add-flags $out/share/typora \
"''${gappsWrapperArgs[@]}" \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}"
'';
meta = with stdenv.lib; {
description = "A minimal Markdown reading & writing app";
homepage = https://typora.io;
license = licenses.unfree;
maintainers = with maintainers; [ jensbin worldofpeace ];
inherit (electron_3.meta) platforms;
};
}