9 url = "https://releases.lmstudio.ai/linux/x86/${version}/3/LM_Studio-${version}.AppImage";
10 hash = "sha256-5yArraRyNY1TLmgGSe/1Zsirm093w+6tvXJr4+xiVtY=";
13 appimageContents = appimageTools.extractType2 { inherit pname version src; };
15 appimageTools.wrapType2 {
16 inherit meta pname version src;
18 extraPkgs = pkgs: [ pkgs.ocl-icd ];
20 extraInstallCommands = ''
21 mkdir -p $out/share/applications
22 cp -r ${appimageContents}/usr/share/icons $out/share
23 install -m 444 -D ${appimageContents}/lm-studio.desktop -t $out/share/applications
24 substituteInPlace $out/share/applications/lm-studio.desktop \
25 --replace-fail 'Exec=AppRun --no-sandbox %U' 'Exec=lmstudio'