Skip to content

zelda64recomp: init at 1.2.2#313013

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

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

Conversation

@qubitnano

@qubitnano qubitnano commented May 20, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

qubitnano commented May 20, 2024

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@qubitnano

Copy link
Copy Markdown
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

qubitnano commented May 21, 2024

Copy link
Copy Markdown
Contributor Author

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

@uninsane uninsane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for linking the guide in requireFile. it still forces a lot of burden onto the user, but it's better than being left to flail in the dark. i'll remove my PR block.

package output structure could be improved though.

ls -F ./result/bin
assets/  gamecontrollerdb.txt@	Zelda64Recompiled*

best to link only the executables into bin/ and keep the assets somewhere in share/ or even opt/.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you lift baseRom into the call args section? e.g.

{
  lib,
  SDL2,
  ...
  requireFile,
  mm64baserom ? null,
}:
let
  baseRom = if mm64baserom != null then mm64baserom else requireFile {
    ...
  };
...

this gives users the ability to provide their own baserom in whatever manner they prefer. for example, it would let me swap it out with fetchzip by just injecting my own mm64baserom expression into the package set like this.

@qubitnano

Copy link
Copy Markdown
Contributor Author

thanks for linking the guide in requireFile. it still forces a lot of burden onto the user, but it's better than being left to flail in the dark. i'll remove my PR block.

package output structure could be improved though.

ls -F ./result/bin
assets/  gamecontrollerdb.txt@	Zelda64Recompiled*

best to link only the executables into bin/ and keep the assets somewhere in share/ or even opt/.

Zelda64Recompiled requires those two to be read in its working directory to load, but I moved assets to $out/share and symlinked.

@keenanweaver keenanweaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 313013


x86_64-linux

✅ 3 packages built:
  • n64recomp
  • z64decompress
  • zelda64recomp

@keenanweaver keenanweaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 313013


x86_64-linux

✅ 3 packages built:
  • n64recomp
  • z64decompress
  • zelda64recomp

Comment thread pkgs/by-name/n6/n64recomp/package.nix Outdated
@Sirius902

Copy link
Copy Markdown
Contributor

@qubitnano Oops just realized RecompModTool requires zip and unzip (for zip -T) to be in PATH at runtime. This patch should do the trick! Tested it by building one of my mods and it worked.

diff --git a/pkgs/by-name/n6/n64recomp/package.nix b/pkgs/by-name/n6/n64recomp/package.nix
index c75586983..d172f0e3b 100644
--- a/pkgs/by-name/n6/n64recomp/package.nix
+++ b/pkgs/by-name/n6/n64recomp/package.nix
@@ -3,6 +3,9 @@
   stdenv,
   fetchFromGitHub,
   cmake,
+  zip,
+  unzip,
+  makeWrapper,
   installShellFiles,
 }:
 
@@ -22,6 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   nativeBuildInputs = [
     cmake
+    makeWrapper
     installShellFiles
   ];
 
@@ -31,6 +35,10 @@ stdenv.mkDerivation (finalAttrs: {
     installBin {N64Recomp,RSPRecomp,RecompModTool}
     install -Dm644 -t $out/share/licenses/n64recomp ../LICENSE
 
+    wrapProgram $out/bin/RecompModTool \
+      --prefix PATH : ${zip}/bin \
+      --prefix PATH : ${unzip}/bin
+
     runHook postInstall
   '';
 

@Krutonium

Copy link
Copy Markdown
Contributor

LGTM!

@Krutonium

Krutonium commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

After these latest pushes, the game still compiles, however it immediately crashes when run.

✔ >>  Zelda64Recompiled 
Failed to preload executable!
SDL Video Driver: wayland
Opening mod mm_recomp_camera_fixes
Opening mod mm_recomp_fancy_jumps
Opening mod mm_seam_fix
Opening mod MM_EZ_Text_Replacer_API
Opening mod mm_recomp_map_overhaul
Opening mod play_as_cj
Opening mod this_band_sucks
Opening mod mm_recomp_draw_distance
Opening mod mm_recomp_textured_stars
Opening mod mm_MMN64HD
Opening mod ProxyMM_ObjDepLoader
Opening mod mm_recomp_better_double_sot
Opening mod mm_recomp_message_hooks
Opening mod mm_recomp_song_utils
Opening mod mm_bigger_wallets
Opening mod ProxyMM_3DItems
fish: Job 1, 'Zelda64Recompiled' terminated by signal SIGSEGV (Address boundary error)

(I'd remove the mods if I could find where it sticks them, but from what I've read the mods aren't actually loaded until after the main menu, so they shouldn't be the cause of the issue - And they worked before.)

Edit: Verified on my Laptop:

Failed to preload executable!
SDL Video Driver: wayland
fish: Job 1, 'Zelda64Recompiled' terminated by signal SIGSEGV (Address boundary error)

@qubitnano

Copy link
Copy Markdown
Contributor Author

The last push I removed the flag to force X11 since it used to exit months ago. RT64 added wayland support a while back. Looks like there's still some issues with wayland. Loaded okay for me with KDE and wayland without mods. Perhaps something to do with mods? Anyway, it defaults to X11 again, with an added option to build with wayland if wanted.

@keenanweaver

Copy link
Copy Markdown
Member

FWIW, I have the latest package update from prior to this revert in my config and it's working fine for me. No mods installed, so I'm assuming it's a mod.

Failed to preload executable!
SDL Video Driver: wayland
SVG plugin initialised.
Loaded font face 'rmlui-debugger-font' [regular] from 'memory'.
Loaded font face 'rmlui-debugger-font' [italic] from 'memory'.
Loaded font face 'LatoLatin' [regular] from 'assets/LatoLatin-Regular.ttf'.
Loaded font face 'Chiaro' [regular] from 'assets/ChiaroNormal.otf'.
Loaded font face 'Chiaro' [bold] from 'assets/ChiaroBold.otf'.
Loaded font face 'LatoLatin' [italic] from 'assets/LatoLatin-Italic.ttf'.
Loaded font face 'LatoLatin' [bold] from 'assets/LatoLatin-Bold.ttf'.
Loaded font face 'LatoLatin' [italic, bold] from 'assets/LatoLatin-BoldItalic.ttf'.
Loaded font face 'Noto Emoji' [regular] from 'assets/NotoEmoji-Regular.ttf'.
Loaded font face 'PromptFont' [regular] from 'assets/promptfont/promptfont.ttf'.

@Krutonium

Copy link
Copy Markdown
Contributor

FWIW, I have the latest package update from prior to this revert in my config and it's working fine for me. No mods installed, so I'm assuming it's a mod.

Failed to preload executable!
SDL Video Driver: wayland
SVG plugin initialised.
Loaded font face 'rmlui-debugger-font' [regular] from 'memory'.
Loaded font face 'rmlui-debugger-font' [italic] from 'memory'.
Loaded font face 'LatoLatin' [regular] from 'assets/LatoLatin-Regular.ttf'.
Loaded font face 'Chiaro' [regular] from 'assets/ChiaroNormal.otf'.
Loaded font face 'Chiaro' [bold] from 'assets/ChiaroBold.otf'.
Loaded font face 'LatoLatin' [italic] from 'assets/LatoLatin-Italic.ttf'.
Loaded font face 'LatoLatin' [bold] from 'assets/LatoLatin-Bold.ttf'.
Loaded font face 'LatoLatin' [italic, bold] from 'assets/LatoLatin-BoldItalic.ttf'.
Loaded font face 'Noto Emoji' [regular] from 'assets/NotoEmoji-Regular.ttf'.
Loaded font face 'PromptFont' [regular] from 'assets/promptfont/promptfont.ttf'.

The laptop I tried it on second doesn't have any mods installed.

@Krutonium

Krutonium commented Jun 24, 2025

Copy link
Copy Markdown
Contributor
Failed to preload executable!
SDL Video Driver: x11
fish: Job 1, 'Zelda64Recompiled' terminated by signal SIGSEGV (Address boundary error)

Well there goes that theory. Why is it an issue now? 🤔

It does actually manage to open a Window now, though it closes just as quickly.

@Krutonium

Krutonium commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Up to now I've been running it via
NIXPKGS_ALLOW_UNFREE=1 nix shell github:NixOS/nixpkgs/pull/313013/head#zelda64recomp --impure

I instead tried (in an attempt to rule out things leaking in from being impure)

{ pkgs ? import (fetchTarball {
    # Pulls the PR branch tarball
    url = "https://github.com/NixOS/nixpkgs/archive/refs/pull/313013/head.tar.gz";
    sha256 = "sha256:092wx81xhrm5krgqkf03adszcqmwsp194j671xhxvzxg64755aqj";
  }) {
    config.allowUnfree = true;
  }
}:

pkgs.mkShell {
  name = "pr-313013-env";

  packages = [
    # Add packages from the PR here
    pkgs.zelda64recomp
  ];
}

And the error message changed slightly:

Failed to preload executable!
SDL Video Driver: x11
Segmentation fault (core dumped)

And on my Desktop:

Failed to preload executable!
SDL Video Driver: x11
<mod list>
Controller added: -1
Controller removed: 0
Segmentation fault (core dumped)

Now it's possible this is something weird due to my NixOS config, but honestly I have no idea what.

@qubitnano

Copy link
Copy Markdown
Contributor Author

The only other thing is that I rebase on master, so there may be a divergence between your system's libraries and the shell's. If this still happens when you backup and clear ~/.config/Zelda64Recompiled then there's probably something with your config. Can you gist the coredump?

@Krutonium

Krutonium commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

https://gist.github.com/Krutonium/35d1588efe9751287ad378d39e4bbab6

(Not gunna lie, had to look up to how to do that)

@qubitnano

Copy link
Copy Markdown
Contributor Author

https://gist.github.com/Krutonium/35d1588efe9751287ad378d39e4bbab6

(Not gunna lie, had to look up to how to do that)

Try to run without mangohud?

@Krutonium

Krutonium commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Huh, yeah running it without Mangohud worked. I have it installed globally (and it wasn't an issue before? weird.) so for anyone else MANGOHUD=0 if that's you too.

Edit: I'm going to guess it's a library mismatch between upstream and the branch this is on making MangoHud specifically upset. 👍

@qubitnano

Copy link
Copy Markdown
Contributor Author

Is wayland working well for everyone else? Should we disable the x11 override by default?

@keenanweaver

Copy link
Copy Markdown
Member

Is wayland working well for everyone else? Should we disable the x11 override by default?

I'm not having any issues with Wayland. KDE Plasma 6.4.0.

@Krutonium

Copy link
Copy Markdown
Contributor

Working fine for me on Wayland as well with MangoHud disabled.

@Krutonium

Krutonium commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

Has anyone posted this in the Discourse thread for "PR's that are ready to be merged" or whatever it's called?

Edit https://discourse.nixos.org/t/prs-ready-for-review/3032/

@Sirius902

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@Sirius902

Sirius902 commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Contributor Author

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

@uninsane

Copy link
Copy Markdown
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
Copy Markdown
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.

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