Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yuzu: init at 482 #84117

Merged
merged 1 commit into from Dec 26, 2020
Merged

yuzu: init at 482 #84117

merged 1 commit into from Dec 26, 2020

Conversation

IvarWithoutBones
Copy link
Member

@IvarWithoutBones IvarWithoutBones commented Apr 2, 2020

Motivation for this change

This adds the yuzu-mainline package, a Nintendo Switch emulator.

The DENABLE_VULKAN=No CMake flag is used due to this issue. EDIT: The issue is fixed, this is no longer required.
Libressl is included as its required for this issue. EDIT: The issue is fixed, this is no longer required.

Closes #58176

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@Emantor Emantor left a comment

Choose a reason for hiding this comment

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

Builds and starts on NixOS unstable.

@IvarWithoutBones IvarWithoutBones changed the title yuzu-mainline: init at unstable-2020-04-02 yuzu-mainline: init at unstable-2020-04-13 Apr 13, 2020
Copy link
Member

@JoshuaFern JoshuaFern left a comment

Choose a reason for hiding this comment

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

Other than the incorrect hash and minor meta details, this package is building and running.

pkgs/misc/emulators/yuzu-mainline/default.nix Outdated Show resolved Hide resolved
pkgs/misc/emulators/yuzu-mainline/default.nix Outdated Show resolved Hide resolved
pkgs/misc/emulators/yuzu-mainline/default.nix Outdated Show resolved Hide resolved
@IvarWithoutBones
Copy link
Member Author

Adressed review comments. I've noticed you're using mkDerivation instead of wrapQtAppsHook, is that prefered? I just did this based off of this wiki page.

@JoshuaFern
Copy link
Member

Adressed review comments. I've noticed you're using mkDerivation instead of wrapQtAppsHook, is that prefered? I just did this based off of this wiki page.

I based my work off the Citra emulator package, which I'm familiar with. Both emulators originated from the same development team so I figured there's probably a lot of similarities between the two and it would be a good place to start.

On the nixpkgs manual it states:

Locating runtime dependencies. Qt applications need to be wrapped to find runtime dependencies. If you cannot use mkDerivation or mkDerivationWith above, include wrapQtAppsHook in nativeBuildInputs

So it sounds like you can use either, but mkDerivation is preferred.

@IvarWithoutBones
Copy link
Member Author

So it sounds like you can use either, but mkDerivation is preferred.

Ah, i didn't see that wiki page. Switched over to it.

I based my work off the Citra emulator package, which I'm familiar with. Both emulators originated from the same development team so I figured there's probably a lot of similarities between the two and it would be a good place to start.

Indeed, though from what I've heard from over at their Discord server they mostly share frontends at this point.

pkgs/misc/emulators/yuzu-mainline/default.nix Outdated Show resolved Hide resolved
pkgs/misc/emulators/yuzu-mainline/default.nix Outdated Show resolved Hide resolved
@JoshuaFern
Copy link
Member

Still working on figuring out vulkan support, slowed by compile times.

Here's the error in the logs:
Render.Vulkan <Error> video_core/renderer_vulkan/renderer_vulkan.cpp:CreateInstance:101: Vulkan library not available

Just tried adding vulkan-headers to nativeBuildInputs and vulkan-loader to buildInputs, that didn't work.

@IvarWithoutBones
Copy link
Member Author

IvarWithoutBones commented Apr 22, 2020

I tried that last week as well, the LunarG vulkan-tools did not seem to work either. Compile times are extremely slow, so its a pain to test indeed.

@JoshuaFern
Copy link
Member

Good news, I have working vulkan. Let me clean this up a bit and I'll send it your way.

@JoshuaFern
Copy link
Member

@JoshuaFern
Copy link
Member

JoshuaFern commented Apr 22, 2020

Do you have sound by the way? I'm playing Pokemon Mystery Dungeon DX and I'm soundless over here. Not sure if it's a problem with this game, or if the sound isn't working in general.

Edit: Adding alsaLib to the buildInputs fixed the sound for me.

@IvarWithoutBones
Copy link
Member Author

This seems to be working well: https://github.com/JoshuaFern/nur-package-lab/blob/master/pkgs/misc/emulators/yuzu-mainline/default.nix

Thanks a lot! I couldn't figure this one out myself.

Do you have sound by the way? I'm playing Pokemon Mystery Dungeon DX and I'm soundless over here. Not sure if it's a problem with this game, or if the sound isn't working in general.

Whoops, did not notice that one as i muted it beforehand since it'd sound all crackely because of the framerate. I'll add alsaLib, thanks again

@IvarWithoutBones IvarWithoutBones changed the title yuzu: init at 465 yuzu: init at 472 Dec 14, 2020
@aanderse
Copy link
Member

I think the solution I've just pushed is a bit clearer, as we just drop QT's mkDerivation all together, instead of overwriting it.

Yes, definitely. I just wanted to confirm gcc10 was the solution. Great stuff!

@aanderse
Copy link
Member

Anyone wanna merge this?

@IvarWithoutBones IvarWithoutBones changed the title yuzu: init at 472 yuzu: init at 482 Dec 23, 2020
@IvarWithoutBones
Copy link
Member Author

IvarWithoutBones commented Dec 25, 2020

Would love to see this finally get merged :)

/marvin opt-in
/status needs_reviewer

@marvin-mk2 marvin-mk2 bot added the marvin label Dec 25, 2020
@marvin-mk2
Copy link

marvin-mk2 bot commented Dec 25, 2020

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@aanderse
Copy link
Member

@jtojnar anything else before a merge?

@vikanezrimaya
Copy link
Member

Tried to build it, turns out Nix thinks its unfree. Why is this package marked as unfree?

@vikanezrimaya
Copy link
Member

I don't have a Switch so I can't verify if the software functions, but it launches.

/status needs_merger

Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

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

Merging based on:

  • code LGTM 👍
  • approval by @jtojnar
  • extensive testing by my kids 😆

@aanderse aanderse merged commit 8a801d4 into NixOS:master Dec 26, 2020
@aanderse
Copy link
Member

Thanks @IvarWithoutBones and all 🎉

@IvarWithoutBones
Copy link
Member Author

IvarWithoutBones commented Dec 26, 2020

I'm really happy we finally managed to get this merged.
Thanks everyone for the extensive reviewing and helping out on this PR, I've learned a lot.

Tried to build it, turns out Nix thinks its unfree. Why is this package marked as unfree?

@kisik21 Icons are licensed under cc-by-nd-30, which is unfree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

package request: yuzu