Skip to content

zelda64recomp: init at 1.2.2#313013

Merged
SuperSandro2000 merged 2 commits intoNixOS:masterfrom
qubitnano:pr/recomp
Dec 11, 2025
Merged

zelda64recomp: init at 1.2.2#313013
SuperSandro2000 merged 2 commits intoNixOS:masterfrom
qubitnano:pr/recomp

Conversation

@qubitnano
Copy link
Contributor

@qubitnano qubitnano commented May 20, 2024

Description of changes

Closes #310947

https://github.com/Zelda64Recomp/Zelda64Recomp

Zelda 64: Recompiled is a project that uses N64: Recompiled to statically recompile Majora's Mask (and soon Ocarina of Time) into a native port with many new features and enhancements. This project uses RT64 as the rendering engine to provide some of these enhancements.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: python Python is a high-level, general-purpose programming language. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels May 20, 2024
@qubitnano
Copy link
Contributor Author

Result of nixpkgs-review run on x86_64-linux 1

13 packages built:
  • mm-decomp
  • n64recomp
  • python311Packages.libyaz0
  • python311Packages.libyaz0.dist
  • python311Packages.mapfile-parser
  • python311Packages.mapfile-parser.dist
  • python311Packages.rabbitizer
  • python311Packages.rabbitizer.dist
  • python312Packages.libyaz0
  • python312Packages.libyaz0.dist
  • python312Packages.rabbitizer
  • python312Packages.rabbitizer.dist
  • zelda64recomp

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 20, 2024
@keenanweaver
Copy link
Member

Result of nixpkgs-review pr 313013 run on x86_64-linux 1

1 package failed to build:
  • zelda64recomp
12 packages built:
  • mm-decomp
  • n64recomp
  • python311Packages.libyaz0
  • python311Packages.libyaz0.dist
  • python311Packages.mapfile-parser
  • python311Packages.mapfile-parser.dist
  • python311Packages.rabbitizer
  • python311Packages.rabbitizer.dist
  • python312Packages.libyaz0
  • python312Packages.libyaz0.dist
  • python312Packages.rabbitizer
  • python312Packages.rabbitizer.dist

@keenanweaver
Copy link
Member

Great work! Do we have concern for supporting only one hash for the ROM? There are a couple of different No-Intro ROMs (BigEndian, ByteSwapped), additional regions of the ROM may eventually be supported, some people may have some ancient non-No-intro ROMs, etc. Should we just say to acquire the latest No-Intro ROM (BigEndian) for Majora's Mask? Also, is the ROM required for build, or is it simply for convenience?

Build error for me as well:

$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/313013/head:refs/nixpkgs-review/1
$ git worktree add /home/keenan/.cache/nixpkgs-review/pr-313013-6/nixpkgs f72f67152a44df2d2c09a578bac8e09b9390279b
Preparing worktree (detached HEAD f72f67152a44)
Updating files: 100% (41126/41126), done.
HEAD is now at f72f67152a44 texlive: set allowSubstitutes, preferLocalBuild values (#312049)
$ git merge --no-commit --no-ff 839a1a7929bce5dbc132fda00e1ad0c683d3d8e1
Auto-merging maintainers/maintainer-list.nix
Auto-merging pkgs/top-level/python-packages.nix
Automatic merge went well; stopped before committing as requested
$ nix build --file /nix/store/n0ahhfycjdkwvzzr2sq8h8z71n2w5yzk-nixpkgs-review-2.10.4/lib/python3.11/site-packages/nixpkgs_review/nix/review-shell.nix --nix-path nixpkgs=/home/keenan/.cache/nixpkgs-review/pr-313013-6/nixpkgs nixpkgs-overlays=/tmp/tmps3ilbfzv --extra-experimental-features nix-command no-url-literals --no-link --keep-going --no-allow-import-from-derivation --option build-use-sandbox relaxed --argstr system x86_64-linux --argstr nixpkgs-path /home/keenan/.cache/nixpkgs-review/pr-313013-6/nixpkgs --argstr nixpkgs-config-path /tmp/tmpc2f4etd_.nix --argstr attrs-path /home/keenan/.cache/nixpkgs-review/pr-313013-6/attrs.nix
error: builder for '/nix/store/qyndlf7d45d2qwnv4p3004z4wgp6qdr8-source.drv' failed with exit code 1;
       last 14 log lines:
       > exporting https://github.com/Mr-Wiseguy/Zelda64Recomp.git (rev 1.0.1) into /nix/store/7jgca6wc2ybhzmq839xhf586bx0k93jg-source
       > Initialized empty Git repository in /nix/store/7jgca6wc2ybhzmq839xhf586bx0k93jg-source/.git/
       > fatal: couldn't find remote ref refs/tags/1.0.1
       > remote: Enumerating objects: 275, done.
       > remote: Counting objects: 100% (275/275), done.
       > remote: Compressing objects: 100% (245/245), done.
       > remote: Total 275 (delta 11), reused 159 (delta 6), pack-reused 0
       > Receiving objects: 100% (275/275), 7.36 MiB | 15.37 MiB/s, done.
       > Resolving deltas: 100% (11/11), done.
       > From https://github.com/Mr-Wiseguy/Zelda64Recomp
       >  * branch            HEAD       -> FETCH_HEAD
       > fatal: Not a valid object name
       > Unrecognized git object type:
       > Unable to checkout refs/tags/1.0.1 from https://github.com/Mr-Wiseguy/Zelda64Recomp.git.
       For full logs, run 'nix log /nix/store/qyndlf7d45d2qwnv4p3004z4wgp6qdr8-source.drv'.
error: 1 dependencies of derivation '/nix/store/01p3zk5aal5dqpqn9jn4z2v841vq17jd-zelda64recomp-1.0.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/r5v1fxjdnr7ahkvb71vynjhdbpzkic4i-review-shell.drv' failed to build

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/313013

1 package failed to build:
zelda64recomp

12 packages built:
mm-decomp n64recomp python311Packages.libyaz0 python311Packages.libyaz0.dist python311Packages.mapfile-parser python311Packages.mapfile-parser.dist python311Packages.rabbitizer python311Packages.rabbitizer.dist python312Packages.libyaz0 python312Packages.libyaz0.dist python312Packages.rabbitizer python312Packages.rabbitizer.dist

error: build log of '/nix/store/01p3zk5aal5dqpqn9jn4z2v841vq17jd-zelda64recomp-1.0.1.drv^*' is not available
error: build log of '/nix/store/ggyi1hsa2cqvhaxhmbm9ym67v9i7azyy-zelda64recomp-1.0.1' is not available
Posting result comment on https://github.com/NixOS/nixpkgs/pull/313013
$ /nix/store/62nhzqm27dadv0czp5gqnnc38xfbi8k4-nix-2.18.2/bin/nix-shell --argstr system x86_64-linux --argstr nixpkgs-path /home/keenan/.cache/nixpkgs-review/pr-313013-6/nixpkgs --argstr nixpkgs-config-path /tmp/tmpc2f4etd_.nix --argstr attrs-path /home/keenan/.cache/nixpkgs-review/pr-313013-6/attrs.nix --nix-path nixpkgs=/home/keenan/.cache/nixpkgs-review/pr-313013-6/nixpkgs nixpkgs-overlays=/tmp/tmps3ilbfzv /nix/store/n0ahhfycjdkwvzzr2sq8h8z71n2w5yzk-nixpkgs-review-2.10.4/lib/python3.11/site-packages/nixpkgs_review/nix/review-shell.nix

@qubitnano
Copy link
Contributor Author

qubitnano commented May 20, 2024

Whoops, I had everything cached before changing the commits to versions, it should build now.

The required rom is the only one mm-decomp currently supports. It's needed to generate the outputs required for zelda64recomp.

@boomshroom
Copy link
Contributor

Managed to successfully build on the first try. Attempting to run (with SDL_VIDEODRIVER set to x11) gave a weird segfault that somehow happened within amdvlk64.so. I was able to get the port running in a manual build, so it shouldn't be a fundamental incompatibility or something specific to my machine.

@qubitnano qubitnano marked this pull request as draft May 20, 2024 11:33
@qubitnano
Copy link
Contributor Author

Can you describe your setup? or post a coredump? I'm trying to reproduce

I'm on KDE wayland, 5700 XT, sddm wayland-only

SDL_VIDEODRIVER unset runs
SDL_VIDEODRIVER=x11 runs
SDL_VIDEODRIVER=wayland segfaults. I added a patch from upstream to force x11 and to wrap the binary to run.

@boomshroom
Copy link
Contributor

I'm explicitly setting SDL_VIDEODRIVER=x11. Desktop is sway 1.9. Graphics card is [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev c1) and CPU is AMD Ryzen 7 7800X3D. Kernel is 6.9-rc6 from nixpkgs rev e4e7a43a9db7e22613accfeb1005cca1b2b1ee0d. Thread 1 is the only one that looks suspicious:

#0  0x00007fb1181e3a28 in ?? () from /nix/store/mj46nr01aw75bqsc0sb9cymqz4ila6qw-amdvlk-2023.Q4.2/lib/amdvlk64.so
#1  0x00007fb117dfe068 in ?? () from /nix/store/mj46nr01aw75bqsc0sb9cymqz4ila6qw-amdvlk-2023.Q4.2/lib/amdvlk64.so
#2  0x00007fb117e60e4b in ?? () from /nix/store/mj46nr01aw75bqsc0sb9cymqz4ila6qw-amdvlk-2023.Q4.2/lib/amdvlk64.so
#3  0x00007fb117e689ea in ?? () from /nix/store/mj46nr01aw75bqsc0sb9cymqz4ila6qw-amdvlk-2023.Q4.2/lib/amdvlk64.so
#4  0x00007fb117e3ef65 in ?? () from /nix/store/mj46nr01aw75bqsc0sb9cymqz4ila6qw-amdvlk-2023.Q4.2/lib/amdvlk64.so
#5  0x000055e1aee758d2 in RT64::VulkanGraphicsPipeline::VulkanGraphicsPipeline(RT64::VulkanDevice*, RT64::RenderGraphicsPipelineDesc const&) ()
#6  0x000055e1aee8124c in RT64::VulkanDevice::createGraphicsPipeline(RT64::RenderGraphicsPipelineDesc const&) ()
#7  0x000055e1aee27959 in RT64::ShaderLibrary::setupMultisamplingShaders(RT64::RenderInterface*, RT64::RenderDevice*, RT64::RenderMultisampling const&) ()
#8  0x000055e1aedd2f06 in RT64::Application::setup(unsigned int) ()
#9  0x000055e1ade2e3a6 in ultramodern::RT64Context::RT64Context(unsigned char*, ultramodern::WindowHandle, bool) ()
#10 0x000055e1ade2383b in gfx_thread_func(unsigned char*, moodycamel::LightweightSemaphore*, ultramodern::WindowHandle) ()
#11 0x000055e1af32b003 in execute_native_thread_routine ()
#12 0x00007fb16b1c0272 in start_thread () from /nix/store/apab5i73dqa09wx0q27b6fbhd1r18ihl-glibc-2.39-31/lib/libc.so.6
#13 0x00007fb16b23bdec in clone3 () from /nix/store/apab5i73dqa09wx0q27b6fbhd1r18ihl-glibc-2.39-31/lib/libc.so.6

@qubitnano
Copy link
Contributor Author

Yes, I'm seeing it now when enabling amdvlk, it wasn't crashing on the radeon drivers.

@qubitnano
Copy link
Contributor Author

I updated directx-shader-compiler and now it doesn't crash with amdvlk.

@ofborg ofborg bot requested review from Flakebi and expipiplus1 May 21, 2024 02:40
@ofborg ofborg bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 21, 2024
@qubitnano
Copy link
Contributor Author

qubitnano commented May 21, 2024

Sorry didn't mean to ping as I was building that locally, I'll squash and remove once it and amdvlk 2024.Q2.1 are merged.

@ofborg ofborg bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels May 21, 2024
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: games Gaming on NixOS labels Jul 24, 2025
@qubitnano qubitnano added the 6.topic: games Gaming on NixOS label Jul 24, 2025
@Sirius902
Copy link
Contributor

Not exactly sure where to put this but it seems on current nixos-unstable (system config) the game crashes on startup with this message.

> NIXPKGS_ALLOW_UNFREE=1 nix run 'github:qubitnano/nixpkgs?ref=pr/recomp#zelda64recomp' --impure
Failed to preload executable!
SDL Video Driver: x11
Failed to create window: Invalid window
Exiting with exit status '1'. Function exit_error, at file /build/source/src/main/main.cpp:59

I did a bisect and found that something in #425387 is responsible for the issue. I think something baked into the system environment or whatever is at fault and not updated derivations that zelda64recomp depends on as the same nix run command I gave before works when run on a NixOS system config built with 7379d27 but not on 17f6bd1 after the merge.

17f6bd177404d6d43017595c5264756764444ab8 is the first bad commit
commit 17f6bd177404d6d43017595c5264756764444ab8
Merge: 7379d27cddb8 2b1faa457957
Author: Vladimír Čunát <v@cunat.cz>
Date:   Sat Jul 26 18:59:46 2025 +0200

    staging-next 2025-07-15 (#425387)

I'm not sure what commit in the merge exactly is causing the problem or if this should be a separate issue so hopefully someone can help me out with this one. The only application I've been able to reproduce this problem with so far is recomp.

@qubitnano
Copy link
Contributor Author

Yeah I'm seeing the same thing. The branch runs now rebased with latest master.

@nixpkgs-ci nixpkgs-ci bot removed the 6.topic: games Gaming on NixOS label Jul 31, 2025
@Sirius902
Copy link
Contributor

Sirius902 commented Aug 15, 2025

@qubitnano Looks like this doesn't build anymore, I suspect updating the derivations to the latest commit would fix it though since they moved the dependency in question directly into the project instead of using a submodule.

EDIT: It looks like the issue is caused by the slot_map submodule moving from https://github.com/SergeyMakeev/slot_map to https://github.com/SergeyMakeev/SlotMap.

I believe this would be fixed by SergeyMakeev/SlotMap#6 if that issue is addressed.

❯ NIXPKGS_ALLOW_UNFREE=1 nix run 'github:qubitnano/nixpkgs?ref=pr/recomp#zelda64recomp' --impure
error: builder for '/nix/store/dpn0i0as6v3lvqgk6zfq3nlqssymmq5m-source.drv' failed with exit code 128;
       last 25 log lines:
       > Submodule path 'lib/rt64/src/contrib/volk': checked out '466085407d5d2f50583fd663c1d65f93a7709d3e'
       > remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
       > remote: Enumerating objects: 81, done.
       > remote: Counting objects: 100% (81/81), done.
       > remote: Compressing objects: 100% (42/42), done.
       > remote: Total 43 (delta 33), reused 4 (delta 0), pack-reused 0 (from 0)
       > Unpacking objects: 100% (43/43), 18.72 KiB | 1.04 MiB/s, done.
       > From https://github.com/Cyan4973/xxHash
       >  * branch            1864a50c9b5cf8500d8e9e61ed92aa0dd3772750 -> FETCH_HEAD
       > Submodule path 'lib/rt64/src/contrib/xxHash': checked out '1864a50c9b5cf8500d8e9e61ed92aa0dd3772750'
       > remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
       > remote: Enumerating objects: 471, done.
       > remote: Counting objects: 100% (471/471), done.
       > remote: Compressing objects: 100% (228/228), done.
       > remote: Total 246 (delta 206), reused 26 (delta 7), pack-reused 0 (from 0)
       > Receiving objects: 100% (246/246), 107.90 KiB | 2.40 MiB/s, done.
       > Resolving deltas: 100% (206/206), completed with 194 local objects.
       > From https://github.com/facebook/zstd
       >  * branch            0ff651dd876823b99fa5c5f53292be28381aee9b -> FETCH_HEAD
       > Submodule path 'lib/rt64/src/contrib/zstd': checked out '0ff651dd876823b99fa5c5f53292be28381aee9b'
       > remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
       > fatal: remote error: upload-pack: not our ref b8ac8ebd89aa1cd18f20ce6e4ad1cac716f1933f
       > fatal: Fetched in submodule path 'lib/slot_map', but it did not contain b8ac8ebd89aa1cd18f20ce6e4ad1cac716f1933f. Direct fetching of that commit failed.
       > fatal: remote error: upload-pack: not our ref b8ac8ebd89aa1cd18f20ce6e4ad1cac716f1933f
       > fatal: Fetched in submodule path 'lib/slot_map', but it did not contain b8ac8ebd89aa1cd18f20ce6e4ad1cac716f1933f. Direct fetching of that commit failed.
       For full logs, run:
         nix log /nix/store/dpn0i0as6v3lvqgk6zfq3nlqssymmq5m-source.drv
error: 1 dependencies of derivation '/nix/store/ppd4zhs3h24q3xlvm7l5zzr3kr83jhzx-zelda64recomp-1.2.0.drv' failed to build

@qubitnano qubitnano changed the title zelda64recomp: init at 1.2.0 zelda64recomp: init at 1.2.0-unstable-2025-08-11 Aug 15, 2025
@qubitnano
Copy link
Contributor Author

Thanks, I've updated to the latest dev commit for now.

@qubitnano qubitnano changed the title zelda64recomp: init at 1.2.0-unstable-2025-08-11 zelda64recomp: init at 1.2.1 Aug 18, 2025
@qubitnano qubitnano changed the title zelda64recomp: init at 1.2.1 zelda64recomp: init at 1.2.2 Aug 27, 2025
@qubitnano qubitnano added the 6.topic: games Gaming on NixOS label Sep 2, 2025
@uninsane
Copy link
Contributor

is there a way to ship a "dummy" baserom for this package? e.g., a ROM that has all the assets in the expected locations, but instead of the original assets they're freely distributable stock assets.

if we could package it this way, then the package would be buildable, and maintainable/reviewable with all the normal tooling (nixpkgs-review, etc). users could supply their own rom by overriding (or via something like zelda64recomp.passthru.z64-with-official-assets that overrides the baserom via the requireFile stuff you have here currently).

@qubitnano
Copy link
Contributor Author

Ideally we wouldn't even need it to compile. 2ship2harkinian can be built alone and searches/extracts the rom at runtime. But it seems the current recomp build process needs the rom to build the project. Probably best to check with upstream.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. and removed 6.topic: games Gaming on NixOS labels Nov 18, 2025
@SuperSandro2000 SuperSandro2000 added this pull request to the merge queue Dec 11, 2025
Merged via the queue into NixOS:master with commit 9e058e0 Dec 11, 2025
30 checks passed
@qubitnano qubitnano deleted the pr/recomp branch December 11, 2025 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: Zelda64Recomp

10 participants