diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/typora/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/editors/typora/default.nix | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/applications/editors/typora/default.nix b/nixpkgs/pkgs/applications/editors/typora/default.nix index 583229eb868..3c55cffdcf1 100644 --- a/nixpkgs/pkgs/applications/editors/typora/default.nix +++ b/nixpkgs/pkgs/applications/editors/typora/default.nix @@ -2,7 +2,7 @@ , lib , fetchurl , makeWrapper -, electron_5 +, electron_9 , dpkg , gtk3 , glib @@ -12,13 +12,16 @@ , pandoc }: +let + electron = electron_9; +in stdenv.mkDerivation rec { pname = "typora"; - version = "0.9.73"; + version = "0.9.95"; src = fetchurl { url = "https://www.typora.io/linux/typora_${version}_amd64.deb"; - sha256 = "1fgcb4bx5pw8ah5j30d38gw7qi1cmqarfhvgdns9f2n0d57bvvw3"; + sha256 = "0kgzk7z707vlbjrvykrnw2h6wscmc3h5hxycyz1z1j2cz26fns4p"; }; nativeBuildInputs = [ @@ -33,7 +36,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 +55,7 @@ stdenv.mkDerivation rec { ''; postFixup = '' - makeWrapper ${electron_5}/bin/electron $out/bin/typora \ + makeWrapper ${electron}/bin/electron $out/bin/typora \ --add-flags $out/share/typora \ "''${gappsWrapperArgs[@]}" \ ${lib.optionalString withPandoc ''--prefix PATH : "${lib.makeBinPath [ pandoc ]}"''} \ |