zelda64recomp: ship it

This commit is contained in:
2025-03-09 02:06:39 +00:00
parent 3080c34398
commit 072a98dce4
5 changed files with 45 additions and 1 deletions

View File

@@ -274,6 +274,7 @@ in
"tumiki-fighters" # keyboard-only
"vvvvvv" # keyboard-only controls
# "wine"
"zelda64recomp"
];
guiApps = declPackageSet [

View File

@@ -232,6 +232,7 @@
./zathura.nix
./zeal.nix
./zecwallet-lite.nix
./zelda64recomp.nix
./zulip.nix
./zsa-udev-rules.nix
./zfs-tools.nix

View File

@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
sane.programs.zelda64recomp = {
# upstream package places non-binaries (e.g. art assets) in `bin/`;
# this especially confuses my sandboxer.
# so link only the files i want to be visible:
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.zelda64recomp [
"bin/Zelda64Recompiled"
"share/applications"
"share/icons"
];
sandbox.whitelistAudio = true;
sandbox.whitelistDri = true;
sandbox.whitelistWayland = true;
sandbox.whitelistX = true; #< TODO: it uses SDL; i might be able to get it to run on wayland only
sandbox.extraPaths = [
"/dev/input" #< for controllers (speculative)
];
sandbox.mesaCacheDir = ".cache/Zelda64Recompiled/mesa";
fs.".config/Zelda64Recompiled/mm.n64.us.1.0.z64".symlink.target = pkgs.mm64baserom;
# also config files for: graphics.json, general.json, controls.json, sound.json
persist.byStore.plaintext = [
".config/Zelda64Recompiled/saves"
];
};
}

View File

@@ -4,5 +4,11 @@
fetchzip {
name = "mm.us.rev1.rom.z64";
url = "https://serve.emulatorgames.net/roms/nintendo-64/Legend%20of%20Zelda,%20The%20-%20Majora's%20Mask%20(U)%20%5b!%5d.zip";
hash = "sha256-gZ2WUFaBYYKE8EOlvj0/5TwNKsFeiVxMGbJMSgAGVuA=";
hash = "sha256-W7aLDUxMVx57JgjNIowF5a94mJ+qHaHIybK3m1jOWBc=";
# .zip contains a single .z64 file inside it: move that to the toplevel, as expected by zelda64recomp package.
postFetch = ''
mv $out/* mm.us.rev1.rom.z64
rmdir $out
mv mm.us.rev1.rom.z64 $out
'';
}

View File

@@ -54,6 +54,12 @@ in
hash = "sha256-k/jxUUInhCvesF9l4Z1FMTqMaELZR1KSZkR6sQPAu6E=";
})
(fetchpatch' {
name = "zelda64recomp: init at 1.1.1-unstable-2025-02-14";
prUrl = "https://github.com/NixOS/nixpkgs/pull/313013";
hash = "sha256-DEim1fNRXfHAtaml6XJnRLVi5KwXm4KIiwZOGU+ePTA=";
})
(fetchpatch' {
name = "mesa: fix cross compilation";
prUrl = "https://github.com/NixOS/nixpkgs/pull/388328";