fix: wrapped prostudiomasters in --in-process-gpu flag

This commit is contained in:
Leyla Becker 2025-09-17 19:42:15 -05:00
parent 3bee0c7402
commit 7e6fa744af
2 changed files with 22 additions and 4 deletions

View file

@ -1,6 +1,7 @@
{
fetchurl,
appimageTools,
writeShellScript,
}: let
pname = "prostudiomasters";
version = "2.5.6";
@ -8,7 +9,25 @@
url = "https://download.prostudiomasters.com/linux/ProStudioMasters-${version}.AppImage";
hash = "sha256-7owOwdcucFfl+JsVj+Seau2KOz0J4P/ep7WrBSNSmbs=";
};
in
appimageTools.wrapType2 {
# Create the base AppImage wrapper
baseApp = appimageTools.wrapType2 {
inherit pname version src;
}
};
# Create a wrapper script that automatically adds the --in-process-gpu flag
wrapper = writeShellScript "prostudiomasters-wrapper" ''
exec ${baseApp}/bin/prostudiomasters --in-process-gpu "$@"
'';
in
# Override the base app to use our wrapper script
baseApp.overrideAttrs (oldAttrs: {
buildCommand =
oldAttrs.buildCommand
+ ''
# Replace the original binary with our wrapper
rm $out/bin/prostudiomasters
cp ${wrapper} $out/bin/prostudiomasters
chmod +x $out/bin/prostudiomasters
'';
})