diff --git a/pkgs/applications/emulators/libretro/cores/pcsx2.nix b/pkgs/applications/emulators/libretro/cores/pcsx2.nix index e518f9049e51..ad08ff019a4e 100644 --- a/pkgs/applications/emulators/libretro/cores/pcsx2.nix +++ b/pkgs/applications/emulators/libretro/cores/pcsx2.nix @@ -11,13 +11,13 @@ }: mkLibretroCore { core = "pcsx2"; - version = "0-unstable-2025-09-14"; + version = "0-unstable-2025-09-29"; src = fetchFromGitHub { owner = "libretro"; repo = "ps2"; - rev = "bb03c99fa968b50309bd80d74598f053fe9168ce"; - hash = "sha256-qIdrsLQWH29PGL0TNcUtFw6aSFUJKJccKrhMoi/vYCA="; + rev = "9485a53fa5aa2bff17e04518116107f81a8c82e3"; + hash = "sha256-xkRPESbLNX9AFOIdEA9iW4Xn7hdJXfdi+TEbegC8KXA="; fetchSubmodules = true; }; @@ -33,14 +33,20 @@ mkLibretroCore { xz ]; - # libretro/ps2 needs at least those flags to compile, and probably doesn't - # work on x86_64-v1 - # https://github.com/libretro/ps2/blob/397b8f54b92aeffd2dd502c2c9b601305fb1de9d/cmake/BuildParameters.cmake#L101 - env.NIX_CFLAGS_COMPILE = toString [ - "-msse" - "-msse2" - "-msse4.1" - "-mfxsr" + cmakeFlags = with lib.strings; [ + # Workaround the following error: + # > CMake Error at 3rdparty/libzip/libzip/CMakeLists.txt:1 (cmake_minimum_required): + # > Compatibility with CMake < 3.5 has been removed from CMake. + # + # > Update the VERSION argument value. Or, use the ... syntax + # > to tell CMake that the project requires at least but has been updated + # > to work with policies introduced by or earlier. + # + # > Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. + (cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5") + # Explicitly set ARCH_FLAG to avoid -march=native + # https://github.com/libretro/ps2/blob/9485a53fa5aa2bff17e04518116107f81a8c82e3/cmake/BuildParameters.cmake#L106-L117 + (cmakeFeature "ARCH_FLAG" "-msse4.1") ]; makefile = "Makefile";