refactor: made pkgs dendrites
This commit is contained in:
parent
88041e86bd
commit
df8dd110ad
54 changed files with 1184 additions and 1058 deletions
43
modules/nixos/pkgs/prostudiomasters.nix
Normal file
43
modules/nixos/pkgs/prostudiomasters.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{...}: let
|
||||
package = {
|
||||
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
|
||||
'';
|
||||
});
|
||||
in {
|
||||
flake.commonModules.prostudiomasters = {pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
prostudiomasters = pkgs.callPackage package {};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue