2020-11-19 00:13:47 +00:00
|
|
|
{ alsaLib
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fmt
|
|
|
|
, gcc-unwrapped
|
|
|
|
, gettext
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, harfbuzz
|
|
|
|
, libaio
|
|
|
|
, libpcap
|
|
|
|
, libpng
|
|
|
|
, libpulseaudio
|
|
|
|
, libsamplerate
|
|
|
|
, libxml2
|
|
|
|
, makeWrapper
|
|
|
|
, perl
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-11-19 00:13:47 +00:00
|
|
|
, portaudio
|
|
|
|
, SDL2
|
|
|
|
, soundtouch
|
2021-01-15 22:18:51 +00:00
|
|
|
, lib, stdenv
|
2020-11-19 00:13:47 +00:00
|
|
|
, udev
|
|
|
|
, wrapGAppsHook
|
|
|
|
, wxGTK
|
|
|
|
, zlib
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
stdenv.mkDerivation {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pcsx2";
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "unstable-2020-11-13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PCSX2";
|
|
|
|
repo = "pcsx2";
|
2020-11-19 00:13:47 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
rev = "319287dbe552c8405720b25dfdf5fa518deeee0b";
|
|
|
|
sha256 = "1kswc8vw9hbv2nigp8cxrgf2s0ik7p4i203cbqci8zjmnkaqpsai";
|
2020-04-24 23:36:52 +00: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"
|
2020-10-27 00:29:36 +00:00
|
|
|
"-DGTK3_API=TRUE"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DPACKAGE_MODE=TRUE"
|
|
|
|
"-DPLUGIN_DIR=${placeholder "out"}/lib/pcsx2"
|
|
|
|
"-DREBUILD_SHADER=TRUE"
|
2020-10-27 00:29:36 +00:00
|
|
|
"-DUSE_LTO=TRUE"
|
|
|
|
"-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
|
|
|
|
"-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
|
|
|
|
"-DwxWidgets_LIBRARIES=${wxGTK}/lib"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DXDG_STD=TRUE"
|
|
|
|
];
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cmake/BuildParameters.cmake \
|
|
|
|
--replace /usr/bin/gcc-ar ${gcc-unwrapped}/bin/gcc-ar \
|
|
|
|
--replace /usr/bin/gcc-nm ${gcc-unwrapped}/bin/gcc-nm \
|
|
|
|
--replace /usr/bin/gcc-ranlib ${gcc-unwrapped}/bin/gcc-ranlib
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/PCSX2 \
|
|
|
|
--set __GL_THREADED_OPTIMIZATIONS 1
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper perl pkg-config wrapGAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsaLib
|
2020-11-19 00:13:47 +00:00
|
|
|
fmt
|
2020-04-24 23:36:52 +00:00
|
|
|
gettext
|
2020-10-27 00:29:36 +00:00
|
|
|
glib
|
|
|
|
gtk3
|
2020-04-24 23:36:52 +00:00
|
|
|
harfbuzz
|
|
|
|
libaio
|
|
|
|
libpcap
|
|
|
|
libpng
|
2020-11-19 00:13:47 +00:00
|
|
|
libpulseaudio
|
|
|
|
libsamplerate
|
2020-04-24 23:36:52 +00:00
|
|
|
libxml2
|
|
|
|
portaudio
|
|
|
|
SDL2
|
|
|
|
soundtouch
|
|
|
|
udev
|
|
|
|
wxGTK
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = "https://pcsx2.net";
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ hrdinka govanify ];
|
2021-05-03 20:48:10 +00:00
|
|
|
mainProgram = "PCSX2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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;
|
2020-10-27 00:29:36 +00:00
|
|
|
platforms = platforms.x86;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|