2020-01-08 12:32:45 +01:00
|
|
|
{ alsaLib, cmake, fetchFromGitHub, glib, gettext, gtk2, harfbuzz, lib, libaio
|
|
|
|
, libpng, libpcap, libxml2, makeWrapper, perl, pkgconfig, portaudio
|
|
|
|
, SDL2, soundtouch, stdenv, udev, wxGTK, zlib
|
|
|
|
}:
|
2016-02-26 10:21:31 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pcsx2";
|
2020-08-11 08:55:15 +02:00
|
|
|
version = "1.6.0";
|
2016-02-26 10:21:31 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PCSX2";
|
|
|
|
repo = "pcsx2";
|
2020-04-22 11:48:05 +02:00
|
|
|
rev = "v${version}";
|
2020-08-11 08:55:15 +02:00
|
|
|
sha256 = "0528kh3275285lvfsykycdhc35c1z8pmccl2s7dfi3va2cp4x8wa";
|
2016-02-26 10:21:31 +01:00
|
|
|
};
|
|
|
|
|
2016-06-19 10:18:30 +02:00
|
|
|
postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp";
|
|
|
|
|
2020-01-08 12:32:45 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
|
|
|
|
"-DDISABLE_ADVANCE_SIMD=TRUE"
|
|
|
|
"-DDISABLE_PCSX2_WRAPPER=TRUE"
|
|
|
|
"-DDOC_DIR=${placeholder "out"}/share/doc/pcsx2"
|
|
|
|
"-DGAMEINDEX_DIR=${placeholder "out"}/share/pcsx2"
|
|
|
|
"-DGLSL_SHADER_DIR=${placeholder "out"}/share/pcsx2"
|
|
|
|
"-DwxWidgets_LIBRARIES=${wxGTK}/lib"
|
|
|
|
"-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
|
|
|
|
"-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
|
|
|
|
"-DPACKAGE_MODE=TRUE"
|
|
|
|
"-DPLUGIN_DIR=${placeholder "out"}/lib/pcsx2"
|
|
|
|
"-DREBUILD_SHADER=TRUE"
|
|
|
|
"-DXDG_STD=TRUE"
|
|
|
|
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
|
|
|
|
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
|
|
|
|
"-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0"
|
|
|
|
"-DGTK3_API=FALSE"
|
|
|
|
];
|
2016-02-26 10:21:31 +01:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/PCSX2 \
|
|
|
|
--set __GL_THREADED_OPTIMIZATIONS 1
|
|
|
|
'';
|
|
|
|
|
2020-01-08 12:32:45 +01:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper perl pkgconfig ];
|
2016-02-26 10:21:31 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-01-08 12:32:45 +01:00
|
|
|
alsaLib
|
|
|
|
glib
|
|
|
|
gettext
|
|
|
|
gtk2
|
|
|
|
harfbuzz
|
|
|
|
libaio
|
|
|
|
libpcap
|
|
|
|
libpng
|
|
|
|
libxml2
|
|
|
|
portaudio
|
|
|
|
SDL2
|
|
|
|
soundtouch
|
|
|
|
udev
|
|
|
|
wxGTK
|
|
|
|
zlib
|
2016-02-26 10:21:31 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Playstation 2 emulator";
|
|
|
|
longDescription= ''
|
|
|
|
PCSX2 is an open-source PlayStation 2 (AKA PS2) emulator. Its purpose
|
|
|
|
is to emulate the PS2 hardware, using a combination of MIPS CPU
|
|
|
|
Interpreters, Recompilers and a Virtual Machine which manages hardware
|
|
|
|
states and PS2 system memory. This allows you to play PS2 games on your
|
|
|
|
PC, with many additional features and benefits.
|
|
|
|
'';
|
2020-01-08 12:32:45 +01:00
|
|
|
homepage = "https://pcsx2.net";
|
2016-02-26 10:21:31 +01:00
|
|
|
maintainers = with maintainers; [ hrdinka ];
|
|
|
|
|
|
|
|
# PCSX2's source code is released under LGPLv3+. It However ships
|
|
|
|
# additional data files and code that are licensed differently.
|
|
|
|
# This might be solved in future, for now we should stick with
|
|
|
|
# license.free
|
|
|
|
license = licenses.free;
|
|
|
|
platforms = platforms.i686;
|
|
|
|
};
|
|
|
|
}
|