@@ -1,21 +1,19 @@
1−{ alsaLib, cmake, fetchFromGitHub, glib, gettext, gtk2, harfbuzz, lib, libaio
2−, libpng, libpcap, libxml2, makeWrapper, perl, pkgconfig, portaudio
3−, SDL2, soundtouch, stdenv, udev, wxGTK, zlib
1+{ alsaLib, cmake, fetchFromGitHub, gcc-unwrapped, gettext, glib, gtk3, harfbuzz
2+, libaio, libpcap, libpng, libxml2, makeWrapper, perl, pkgconfig, portaudio
3+, SDL2, soundtouch, stdenv, udev, wrapGAppsHook, wxGTK, zlib
44}:
55
6−stdenv.mkDerivation rec {
6+stdenv.mkDerivation {
77 pname = "pcsx2";
8− version = "1.6.0";
8+ version = "unstable-2020-10-10";
99
1010 src = fetchFromGitHub {
1111 owner = "PCSX2";
1212 repo = "pcsx2";
13− rev = "v${version}";
14− sha256 = "0528kh3275285lvfsykycdhc35c1z8pmccl2s7dfi3va2cp4x8wa";
13+ rev = "7e2ccd64e8e6049b6059141e8767037463421c33";
14+ sha256 = "0c7m74ch68p4y9xlld34a9r38kb2py6wlkg4vranc6dicxvi1b3r";
1515 };
1616
17− postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp";
18−
1917 cmakeFlags = [
2018 "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
2119 "-DDISABLE_ADVANCE_SIMD=TRUE"
@@ -23,31 +21,36 @@ stdenv.mkDerivation rec {
2321 "-DDOC_DIR=${placeholder "out"}/share/doc/pcsx2"
2422 "-DGAMEINDEX_DIR=${placeholder "out"}/share/pcsx2"
2523 "-DGLSL_SHADER_DIR=${placeholder "out"}/share/pcsx2"
26− "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
27− "-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
28− "-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
24+ "-DGTK3_API=TRUE"
2925 "-DPACKAGE_MODE=TRUE"
3026 "-DPLUGIN_DIR=${placeholder "out"}/lib/pcsx2"
3127 "-DREBUILD_SHADER=TRUE"
28+ "-DUSE_LTO=TRUE"
29+ "-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
30+ "-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
31+ "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
3232 "-DXDG_STD=TRUE"
33− "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
34− "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
35− "-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0"
36− "-DGTK3_API=FALSE"
3733 ];
3834
35+ postPatch = ''
36+ substituteInPlace cmake/BuildParameters.cmake \
37+ --replace /usr/bin/gcc-ar ${gcc-unwrapped}/bin/gcc-ar \
38+ --replace /usr/bin/gcc-nm ${gcc-unwrapped}/bin/gcc-nm \
39+ --replace /usr/bin/gcc-ranlib ${gcc-unwrapped}/bin/gcc-ranlib
40+ '';
41+
3942 postFixup = ''
4043 wrapProgram $out/bin/PCSX2 \
4144 --set __GL_THREADED_OPTIMIZATIONS 1
4245 '';
4346
44− nativeBuildInputs = [ cmake makeWrapper perl pkgconfig ];
47+ nativeBuildInputs = [ cmake makeWrapper perl pkgconfig wrapGAppsHook ];
4548
4649 buildInputs = [
4750 alsaLib
48− glib
4951 gettext
50− gtk2
52+ glib
53+ gtk3
5154 harfbuzz
5255 libaio
5356 libpcap
@@ -71,13 +74,13 @@ stdenv.mkDerivation rec {
7174 PC, with many additional features and benefits.
7275 '';
7376 homepage = "https://pcsx2.net";
74− maintainers = with maintainers; [ hrdinka ];
77+ maintainers = with maintainers; [ hrdinka samuelgrf ];
7578
7679 # PCSX2's source code is released under LGPLv3+. It However ships
7780 # additional data files and code that are licensed differently.
7881 # This might be solved in future, for now we should stick with
7982 # license.free
8083 license = licenses.free;
81− platforms = platforms.i686;
84+ platforms = platforms.x86;
8285 };
8386}