about summary refs log tree commit diff
path: root/pkgs/applications/editors/typora
diff options
context:
space:
mode:
authoroxalica <oxalicc@pm.me>2020-07-04 22:25:22 +0800
committeroxalica <oxalicc@pm.me>2020-07-04 22:25:22 +0800
commitc886cb026cf7a5cce884719b45705dc1a1f7cc4a (patch)
treeb2c6a1d2e369df1376f564d3fc2dbd0f31af132b /pkgs/applications/editors/typora
parent55668eb671b915b49bcaaeec4518cc49d8de0a99 (diff)
typora: 0.9.73 -> 0.9.89
Diffstat (limited to 'pkgs/applications/editors/typora')
-rw-r--r--pkgs/applications/editors/typora/default.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/applications/editors/typora/default.nix b/pkgs/applications/editors/typora/default.nix
index 583229eb86841..1418734fba1a9 100644
--- a/pkgs/applications/editors/typora/default.nix
+++ b/pkgs/applications/editors/typora/default.nix
@@ -2,7 +2,7 @@
 , lib
 , fetchurl
 , makeWrapper
-, electron_5
+, electron_8
 , dpkg
 , gtk3
 , glib
@@ -14,11 +14,11 @@
 
 stdenv.mkDerivation rec {
   pname = "typora";
-  version = "0.9.73";
+  version = "0.9.89";
 
   src = fetchurl {
     url = "https://www.typora.io/linux/typora_${version}_amd64.deb";
-    sha256 = "1fgcb4bx5pw8ah5j30d38gw7qi1cmqarfhvgdns9f2n0d57bvvw3";
+    sha256 = "0gk8j13z1ymad34zzcy4vqwyjgd5khgyw5xjj9rbzm5v537kqmx6";
   };
 
   nativeBuildInputs = [
@@ -33,7 +33,8 @@ stdenv.mkDerivation rec {
     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;
 
@@ -51,7 +52,7 @@ stdenv.mkDerivation rec {
   '';
 
   postFixup = ''
-    makeWrapper ${electron_5}/bin/electron $out/bin/typora \
+    makeWrapper ${electron_8}/bin/electron $out/bin/typora \
       --add-flags $out/share/typora \
       "''${gappsWrapperArgs[@]}" \
       ${lib.optionalString withPandoc ''--prefix PATH : "${lib.makeBinPath [ pandoc ]}"''} \