1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 07:31:20 +00:00

typora: 0.9.73 -> 0.9.89

This commit is contained in:
oxalica 2020-07-04 22:25:22 +08:00
parent 55668eb671
commit c886cb026c
No known key found for this signature in database
GPG key ID: CED392DE0C483D00

View file

@ -2,7 +2,7 @@
, lib , lib
, fetchurl , fetchurl
, makeWrapper , makeWrapper
, electron_5 , electron_8
, dpkg , dpkg
, gtk3 , gtk3
, glib , glib
@ -14,11 +14,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "typora"; pname = "typora";
version = "0.9.73"; version = "0.9.89";
src = fetchurl { src = fetchurl {
url = "https://www.typora.io/linux/typora_${version}_amd64.deb"; url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
sha256 = "1fgcb4bx5pw8ah5j30d38gw7qi1cmqarfhvgdns9f2n0d57bvvw3"; sha256 = "0gk8j13z1ymad34zzcy4vqwyjgd5khgyw5xjj9rbzm5v537kqmx6";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -33,7 +33,8 @@ stdenv.mkDerivation rec {
gtk3 gtk3
]; ];
unpackPhase = "dpkg-deb -x $src ."; # The deb contains setuid permission on `chrome-sandbox`, which will actually not get installed.
unpackPhase = "dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner";
dontWrapGApps = true; dontWrapGApps = true;
@ -51,7 +52,7 @@ stdenv.mkDerivation rec {
''; '';
postFixup = '' postFixup = ''
makeWrapper ${electron_5}/bin/electron $out/bin/typora \ makeWrapper ${electron_8}/bin/electron $out/bin/typora \
--add-flags $out/share/typora \ --add-flags $out/share/typora \
"''${gappsWrapperArgs[@]}" \ "''${gappsWrapperArgs[@]}" \
${lib.optionalString withPandoc ''--prefix PATH : "${lib.makeBinPath [ pandoc ]}"''} \ ${lib.optionalString withPandoc ''--prefix PATH : "${lib.makeBinPath [ pandoc ]}"''} \