diff --git a/pkgs/applications/emulators/libretro/cores/mupen64plus.nix b/pkgs/applications/emulators/libretro/cores/mupen64plus.nix index bf455e034deb..ef1bef033783 100644 --- a/pkgs/applications/emulators/libretro/cores/mupen64plus.nix +++ b/pkgs/applications/emulators/libretro/cores/mupen64plus.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch2, libGL, libGLU, libpng, @@ -20,6 +21,26 @@ mkLibretroCore { hash = "sha256-nII/PMYo2xLznmAcKs6jDWGRS1DC3tiDeT6KJKRnaCI="; }; + # Fix for GCC 14 + # https://github.com/libretro/mupen64plus-libretro-nx/pull/526 + patches = [ + (fetchpatch2 { + name = "minizip-avoid_trying_to_compile_problematic_code.patch"; + url = "https://github.com/libretro/mupen64plus-libretro-nx/commit/2b05477dd9cd99e7f9425f58cb544f454fc0d813.patch?full_index=1"; + hash = "sha256-Q0yymeS6taeFRt6BH6IX5q1SDUMh2Zn3mFpdJguyk9M="; + }) + (fetchpatch2 { + name = "EmuThread-align_with_co_create()_and_pthread_create().patch"; + url = "https://github.com/libretro/mupen64plus-libretro-nx/commit/26dfd670ffdd5ed6a03e6704dc73f82c13d81dd9.patch?full_index=1"; + hash = "sha256-BraCR/b8DTmVAWrUxiXp9nxBYvTpTW9OQAt8TP1eusI="; + }) + (fetchpatch2 { + name = "Fix_compilation_of_bundled_libzlib.patch"; + url = "https://github.com/libretro/mupen64plus-libretro-nx/commit/3c3e7fbc70b8f533c09c964cf468ba5e8d61351c.patch?full_index=1"; + hash = "sha256-PCJLNYhhccnWLcnPaHL6tz+5qdjogJRYfzZIh3r+Vlk="; + }) + ]; + extraBuildInputs = [ libGLU libGL