2016-02-26 10:21:31 +01:00
|
|
|
{ alsaLib, cmake, fetchFromGitHub, glib, gtk2, gettext, libaio, libpng
|
|
|
|
, makeWrapper, perl, pkgconfig, portaudio, SDL2, soundtouch, stdenv
|
|
|
|
, wxGTK30, zlib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "pcsx2-${version}";
|
|
|
|
version = "1.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PCSX2";
|
|
|
|
repo = "pcsx2";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0s7mxq2cgzwjfsq0vhpz6ljk7wr725nxg48128iyirf85585l691";
|
|
|
|
};
|
|
|
|
|
2016-06-19 10:18:30 +02:00
|
|
|
postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp";
|
|
|
|
|
2016-02-26 10:21:31 +01:00
|
|
|
configurePhase = ''
|
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
cmake \
|
|
|
|
-DBIN_DIR="$out/bin" \
|
|
|
|
-DCMAKE_BUILD_PO=TRUE \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="$out" \
|
2016-04-10 20:44:23 +02:00
|
|
|
-DDISABLE_ADVANCE_SIMD=TRUE \
|
2016-02-26 10:21:31 +01:00
|
|
|
-DDISABLE_PCSX2_WRAPPER=TRUE \
|
|
|
|
-DDOC_DIR="$out/share/doc/pcsx2" \
|
|
|
|
-DGAMEINDEX_DIR="$out/share/pcsx2" \
|
|
|
|
-DGLSL_SHADER_DIR="$out/share/pcsx2" \
|
2016-04-14 03:11:58 +02:00
|
|
|
-DGTK2_GLIBCONFIG_INCLUDE_DIR='${glib.out}/lib/glib-2.0/include' \
|
|
|
|
-DGTK2_GDKCONFIG_INCLUDE_DIR='${gtk2.out}/lib/gtk-2.0/include' \
|
2016-04-16 19:34:51 +02:00
|
|
|
-DGTK2_INCLUDE_DIRS='${gtk2.dev}/include/gtk-2.0' \
|
2016-02-26 10:21:31 +01:00
|
|
|
-DPACKAGE_MODE=TRUE \
|
|
|
|
-DPLUGIN_DIR="$out/lib/pcsx2" \
|
|
|
|
-DREBUILD_SHADER=TRUE \
|
2019-03-09 04:55:58 +01:00
|
|
|
-DXDG_STD=TRUE \
|
2016-02-26 10:21:31 +01:00
|
|
|
..
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/PCSX2 \
|
|
|
|
--set __GL_THREADED_OPTIMIZATIONS 1
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsaLib glib gettext gtk2 libaio libpng makeWrapper portaudio SDL2
|
|
|
|
soundtouch wxGTK30 zlib
|
|
|
|
];
|
|
|
|
|
2016-06-19 10:18:30 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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.
|
|
|
|
'';
|
2018-06-23 13:34:55 +02: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;
|
|
|
|
};
|
|
|
|
}
|