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

pcsx2: 1.7.5587 -> 1.7.5779 #305509

Merged
merged 2 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,77 @@
, fetchFromGitHub
, lib
, llvmPackages_17
, callPackage
, cubeb
, curl
, extra-cmake-modules
, fetchpatch
, ffmpeg
, libaio
, libbacktrace
, libpcap
, libwebp
, libXrandr
, libzip
, lz4
, makeWrapper
, pkg-config
, qtbase
, qtsvg
, qttools
, qtwayland
, qt6
, SDL2
, soundtouch
, strip-nondeterminism
, vulkan-headers
, vulkan-loader
, wayland
, wrapQtAppsHook
, xz
, zip
, zstd
}:

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
pcsx2_patches = fetchFromGitHub {
owner = "PCSX2";
repo = "pcsx2_patches";
rev = "e3b354f144de71d2b87471166cca8911867c1dfd";
sha256 = "sha256-H7cFyBYZumcCZ0/FFOFZoChoi0XPs4siA4dHcFt9U7k=";
rev = "b3a788e16ea12efac006cbbe1ece45b6b9b34326";
sha256 = "sha256-Uvpz2Gpj533Sr6wLruubZxssoXefQDey8GHIDKWhW3s=";
};
inherit (qt6)
qtbase
qtsvg
qttools
qtwayland
wrapQtAppsHook
;
in
llvmPackages_17.stdenv.mkDerivation rec {
llvmPackages_17.stdenv.mkDerivation (finalAttrs: {
pname = "pcsx2";
version = "1.7.5587";
version = "1.7.5779";

src = fetchFromGitHub {
owner = "PCSX2";
repo = "pcsx2";
fetchSubmodules = true;
rev = "v${version}";
sha256 = "sha256-PCZ1r6x28Z5FEVMXWm4oxpTknz/XEiwo0rRGhn4B33g=";
rev = "v${finalAttrs.version}";
sha256 = "sha256-WiwnP5yoBy8bRLUPuCZ7z4nhIzrY8P29KS5ZjErM/A4=";
};

patches = [
./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 = [
"-DDISABLE_ADVANCE_SIMD=ON"
"-DUSE_LINKED_FFMPEG=ON"
"-DPCSX2_GIT_REV=v${version}"
(lib.cmakeBool "DISABLE_ADVANCE_SIMD" true)
(lib.cmakeBool "USE_LINKED_FFMPEG" true)
(lib.cmakeFeature "PCSX2_GIT_REV" finalAttrs.src.rev)
];

nativeBuildInputs = [
Expand All @@ -79,17 +92,16 @@ llvmPackages_17.stdenv.mkDerivation rec {
libpcap
libwebp
libXrandr
libzip
lz4
qtbase
qtsvg
qttools
qtwayland
SDL2
shaderc-patched
soundtouch
vulkan-headers
wayland
xz
zstd
]
++ cubeb.passthru.backendLibs;
Expand Down Expand Up @@ -132,9 +144,9 @@ llvmPackages_17.stdenv.mkDerivation rec {
PC, with many additional features and benefits.
'';
homepage = "https://pcsx2.net";
license = with licenses; [ gpl3 lgpl3 ];
license = with licenses; [ gpl3Plus lgpl3Plus ];
maintainers = with maintainers; [ hrdinka govanify ];
mainProgram = "pcsx2-qt";
platforms = platforms.x86_64;
platforms = [ "x86_64-linux" ];
};
}
})
20 changes: 20 additions & 0 deletions pkgs/by-name/pc/pcsx2/shaderc-patched.nix
Original file line number Diff line number Diff line change
@@ -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"
];
})
];
})
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2717,8 +2717,6 @@ with pkgs;

pcem = callPackage ../applications/emulators/pcem { };

pcsx2 = qt6Packages.callPackage ../applications/emulators/pcsx2 { };

pcsxr = callPackage ../applications/emulators/pcsxr { };

ppsspp-sdl = let
Expand Down