forked from jan-leila/nix-config
		
	
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			960 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			960 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   fetchurl,
 | |
|   appimageTools,
 | |
|   writeShellScript,
 | |
| }: let
 | |
|   pname = "prostudiomasters";
 | |
|   version = "2.5.6";
 | |
|   src = fetchurl {
 | |
|     url = "https://download.prostudiomasters.com/linux/ProStudioMasters-${version}.AppImage";
 | |
|     hash = "sha256-7owOwdcucFfl+JsVj+Seau2KOz0J4P/ep7WrBSNSmbs=";
 | |
|   };
 | |
| 
 | |
|   # 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
 | |
|       '';
 | |
|   })
 |