2023-04-18 10:22:05 +00:00
|
|
|
{ pkgs, runCommand, zstd, lib, buildFHSEnvChroot }:
|
2023-02-27 17:31:50 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
typora-tar = builtins.fetchurl {
|
|
|
|
url = "https://download.typora.io/linux/Typora-linux-arm64.tar.gz";
|
|
|
|
sha256 = "sha256:1xp25rvr8hr8b4dwb55d9229bbnpq7kd2bxvz7l3dfhn39zpxxjg";
|
|
|
|
};
|
|
|
|
|
|
|
|
typora-src = runCommand "typora-src" { } ''
|
|
|
|
mkdir -p $out
|
|
|
|
tar xvf ${typora-tar} -C $out
|
|
|
|
'';
|
|
|
|
in
|
2023-04-18 10:22:05 +00:00
|
|
|
buildFHSEnvChroot {
|
2023-02-27 17:31:50 +00:00
|
|
|
name = "typora";
|
|
|
|
targetPkgs = pkgs: with pkgs; [
|
|
|
|
glib
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
at-spi2-atk
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
gtk3
|
|
|
|
pango
|
|
|
|
cairo
|
|
|
|
mesa
|
|
|
|
expat
|
|
|
|
libdrm
|
|
|
|
libxkbcommon
|
|
|
|
alsa-lib
|
|
|
|
freefont_ttf
|
|
|
|
liberation_ttf
|
|
|
|
wayland
|
|
|
|
libglvnd
|
|
|
|
electron
|
|
|
|
] ++ (with pkgs.xorg; [
|
|
|
|
libX11
|
|
|
|
libXcomposite
|
|
|
|
libXdamage
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXrandr
|
|
|
|
libxcb
|
|
|
|
]);
|
|
|
|
extraBuildCommands = ''
|
|
|
|
# ldd ${typora-src}/bin/Typora-linux-arm64/Typora && false
|
|
|
|
'';
|
|
|
|
# runScript = "${typora-src}/bin/Typora-linux-arm64/Typora --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
|
|
|
runScript = "electron ${typora-src}/bin/Typora-linux-arm64/resources/app.asar";
|
|
|
|
}
|