36 lines
886 B
Nix
36 lines
886 B
Nix
{
|
|
appimageTools,
|
|
fetchurl,
|
|
libgdiplus,
|
|
}: let
|
|
pname = "smath-studio";
|
|
version = "1.3.0.9126";
|
|
|
|
src = fetchurl {
|
|
url = "https://smath.com/en-US/files/Download/cqSek/SMathStudioDesktop.1_3_0_9126.x86_64.ubuntu-22_04.glibc2.35.AppImage";
|
|
hash = "sha256-4FpdFGPFaPDK6WWSJHVtxcC8auaNkGmHyUtbegij6cQ=";
|
|
};
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
inherit pname version src;
|
|
};
|
|
in
|
|
appimageTools.wrapType2 {
|
|
inherit pname version src;
|
|
|
|
extraPkgs = pkgs:
|
|
with pkgs; [
|
|
gtk2
|
|
];
|
|
|
|
profile = ''
|
|
export LD_PRELOAD="${libgdiplus}/lib/libgdiplus.so.0"
|
|
'';
|
|
|
|
extraInstallCommands = ''
|
|
install -m 444 -D ${appimageContents}/*.desktop -t $out/share/applications
|
|
sed -i "s|^Exec=.*|Exec=smath-studio %U|" $out/share/applications/*.desktop
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
'';
|
|
}
|