sm64ex-coop-deluxe: ship (and configure so that you dont have to drag the rom)

This commit is contained in:
2024-09-07 06:19:34 +00:00
parent 1d5f71f935
commit 2d1e7777e8
4 changed files with 31 additions and 2 deletions

View File

@@ -257,6 +257,7 @@ in
# "powermanga" # STYLISH space invaders derivative (keyboard-only) # "powermanga" # STYLISH space invaders derivative (keyboard-only)
"shattered-pixel-dungeon" # doesn't cross compile "shattered-pixel-dungeon" # doesn't cross compile
"sm64ex-coop" "sm64ex-coop"
"sm64ex-coop-deluxe"
"space-cadet-pinball" # LMB/RMB controls (bindable though. volume buttons?) "space-cadet-pinball" # LMB/RMB controls (bindable though. volume buttons?)
"steam" "steam"
"superTux" # keyboard-only controls "superTux" # keyboard-only controls

View File

@@ -157,6 +157,7 @@
./shadow.nix ./shadow.nix
./signal-desktop.nix ./signal-desktop.nix
./sm64ex-coop.nix ./sm64ex-coop.nix
./sm64ex-coop-deluxe.nix
./soundconverter.nix ./soundconverter.nix
./splatmoji.nix ./splatmoji.nix
./spot.nix ./spot.nix

View File

@@ -0,0 +1,24 @@
{ config, lib, ... }:
let
cfg = config.sane.programs.sm64ex-coop-deluxe;
in
{
sane.programs.sm64ex-coop-deluxe = {
sandbox.method = "bunpen";
sandbox.net = "all";
sandbox.whitelistAudio = true;
sandbox.whitelistDri = true;
sandbox.whitelistWayland = true;
sandbox.whitelistX = true;
sandbox.extraPaths = [
"/dev/input" #< for controllers
];
persist.byStore.plaintext = [
".local/share/sm64ex-coop"
];
};
# LAN play
networking.firewall.allowedUDPPorts = lib.mkIf cfg.enabled [ 2345 ];
}

View File

@@ -86,11 +86,14 @@ in (callPackage "${nixpkgs}/pkgs/games/sm64ex/generic.nix" {
mkdir -p $out/bin mkdir -p $out/bin
( (
echo '#!${bash}/bin/bash' echo '#!${bash}/bin/bash'
echo "cd $out/share/${pname}" echo "cd $out/share/${pname}"
echo 'exec ./${pname}-unwrapped "$@"' echo 'exec ./${pname}-unwrapped "$@"'
) > $out/bin/${pname} ) > $out/bin/${pname}
chmod a+x $out/bin/${pname} chmod a+x $out/bin/${pname}
# you're supposed to manually drag and drop the baserom at start, or you can put it here and it discovers it :)
cp ./baserom.*.z64 $out/share/sm64coopdx
runHook postInstall runHook postInstall
''; '';
} }