Merge pull request #305509 from SuperSamus/pcsx2-update

pcsx2: 1.7.5587 -> 1.7.5779
This commit is contained in:
Christoph Hrdinka 2024-06-09 17:33:40 +02:00 committed by GitHub
commit 926be01458
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 53 additions and 23 deletions

View File

@ -2,64 +2,77 @@
, fetchFromGitHub , fetchFromGitHub
, lib , lib
, llvmPackages_17 , llvmPackages_17
, callPackage
, cubeb , cubeb
, curl , curl
, extra-cmake-modules , extra-cmake-modules
, fetchpatch
, ffmpeg , ffmpeg
, libaio , libaio
, libbacktrace , libbacktrace
, libpcap , libpcap
, libwebp , libwebp
, libXrandr , libXrandr
, libzip
, lz4 , lz4
, makeWrapper , makeWrapper
, pkg-config , pkg-config
, qtbase , qt6
, qtsvg
, qttools
, qtwayland
, SDL2 , SDL2
, soundtouch , soundtouch
, strip-nondeterminism , strip-nondeterminism
, vulkan-headers , vulkan-headers
, vulkan-loader , vulkan-loader
, wayland , wayland
, wrapQtAppsHook
, xz
, zip , zip
, zstd , zstd
}: }:
let let
shaderc-patched = callPackage ./shaderc-patched.nix { };
# The pre-zipped files in releases don't have a versioned link, we need to zip them ourselves # The pre-zipped files in releases don't have a versioned link, we need to zip them ourselves
pcsx2_patches = fetchFromGitHub { pcsx2_patches = fetchFromGitHub {
owner = "PCSX2"; owner = "PCSX2";
repo = "pcsx2_patches"; repo = "pcsx2_patches";
rev = "e3b354f144de71d2b87471166cca8911867c1dfd"; rev = "b3a788e16ea12efac006cbbe1ece45b6b9b34326";
sha256 = "sha256-H7cFyBYZumcCZ0/FFOFZoChoi0XPs4siA4dHcFt9U7k="; sha256 = "sha256-Uvpz2Gpj533Sr6wLruubZxssoXefQDey8GHIDKWhW3s=";
}; };
inherit (qt6)
qtbase
qtsvg
qttools
qtwayland
wrapQtAppsHook
;
in in
llvmPackages_17.stdenv.mkDerivation rec { llvmPackages_17.stdenv.mkDerivation (finalAttrs: {
pname = "pcsx2"; pname = "pcsx2";
version = "1.7.5587"; version = "1.7.5779";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "PCSX2"; owner = "PCSX2";
repo = "pcsx2"; repo = "pcsx2";
fetchSubmodules = true; fetchSubmodules = true;
rev = "v${version}"; rev = "v${finalAttrs.version}";
sha256 = "sha256-PCZ1r6x28Z5FEVMXWm4oxpTknz/XEiwo0rRGhn4B33g="; sha256 = "sha256-WiwnP5yoBy8bRLUPuCZ7z4nhIzrY8P29KS5ZjErM/A4=";
}; };
patches = [ patches = [
./define-rev.patch ./define-rev.patch
# Backport patches to fix random crashes on startup
(fetchpatch {
url = "https://github.com/PCSX2/pcsx2/commit/e47bcf8d80df9a93201eefbaf169ec1a0673a833.patch";
sha256 = "sha256-7CL1Kpu+/JgtKIenn9rQKAs3A+oJ40W5XHlqSg77Q7Y=";
})
(fetchpatch {
url = "https://github.com/PCSX2/pcsx2/commit/92b707db994f821bccc35d6eef67727ea3ab496b.patch";
sha256 = "sha256-HWJ8KZAY/qBBotAJerZg6zi5QUHuTD51zKH1rAtZ3tc=";
})
]; ];
cmakeFlags = [ cmakeFlags = [
"-DDISABLE_ADVANCE_SIMD=ON" (lib.cmakeBool "DISABLE_ADVANCE_SIMD" true)
"-DUSE_LINKED_FFMPEG=ON" (lib.cmakeBool "USE_LINKED_FFMPEG" true)
"-DPCSX2_GIT_REV=v${version}" (lib.cmakeFeature "PCSX2_GIT_REV" finalAttrs.src.rev)
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -79,17 +92,16 @@ llvmPackages_17.stdenv.mkDerivation rec {
libpcap libpcap
libwebp libwebp
libXrandr libXrandr
libzip
lz4 lz4
qtbase qtbase
qtsvg qtsvg
qttools qttools
qtwayland qtwayland
SDL2 SDL2
shaderc-patched
soundtouch soundtouch
vulkan-headers vulkan-headers
wayland wayland
xz
zstd zstd
] ]
++ cubeb.passthru.backendLibs; ++ cubeb.passthru.backendLibs;
@ -132,9 +144,9 @@ llvmPackages_17.stdenv.mkDerivation rec {
PC, with many additional features and benefits. PC, with many additional features and benefits.
''; '';
homepage = "https://pcsx2.net"; homepage = "https://pcsx2.net";
license = with licenses; [ gpl3 lgpl3 ]; license = with licenses; [ gpl3Plus lgpl3Plus ];
maintainers = with maintainers; [ hrdinka govanify ]; maintainers = with maintainers; [ hrdinka govanify ];
mainProgram = "pcsx2-qt"; mainProgram = "pcsx2-qt";
platforms = platforms.x86_64; platforms = [ "x86_64-linux" ];
}; };
} })

View File

@ -0,0 +1,20 @@
{
fetchpatch,
pcsx2,
shaderc,
}:
shaderc.overrideAttrs (old: {
pname = "shaderc-patched-for-pcsx2";
patches = (old.patches or [ ]) ++ [
(fetchpatch {
url = "file://${pcsx2.src}/.github/workflows/scripts/common/shaderc-changes.patch";
hash = "sha256-Ps/D+CdSbjVWg3ZGOEcgbpQbCNkI5Nuizm4E5qiM9Wo=";
excludes = [
"CHANGES"
"CMakeLists.txt"
"libshaderc/CMakeLists.txt"
];
})
];
})

View File

@ -2707,8 +2707,6 @@ with pkgs;
pcem = callPackage ../applications/emulators/pcem { }; pcem = callPackage ../applications/emulators/pcem { };
pcsx2 = qt6Packages.callPackage ../applications/emulators/pcsx2 { };
pcsxr = callPackage ../applications/emulators/pcsxr { }; pcsxr = callPackage ../applications/emulators/pcsxr { };
ppsspp-sdl = let ppsspp-sdl = let