2019-12-19 12:24:02 +01:00
|
|
|
{ SDL2
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
2020-06-07 14:39:09 +02:00
|
|
|
, ffmpeg_3
|
2019-12-19 12:24:02 +01:00
|
|
|
, glew
|
|
|
|
, lib
|
|
|
|
, libzip
|
|
|
|
, mkDerivation
|
2021-01-17 03:30:45 +01:00
|
|
|
, pkg-config
|
2019-12-19 12:24:02 +01:00
|
|
|
, python3
|
|
|
|
, qtbase
|
|
|
|
, qtmultimedia
|
|
|
|
, snappy
|
|
|
|
, zlib
|
|
|
|
}:
|
2017-09-27 16:33:00 +02:00
|
|
|
|
2019-11-13 21:38:29 +01:00
|
|
|
mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "ppsspp";
|
2021-02-08 19:45:37 +01:00
|
|
|
version = "1.11";
|
2014-05-27 05:22:24 +02:00
|
|
|
|
2017-09-27 16:33:00 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hrydgard";
|
2020-10-09 17:31:36 +02:00
|
|
|
repo = pname;
|
2017-09-27 16:33:00 +02:00
|
|
|
rev = "v${version}";
|
2014-05-27 05:22:24 +02:00
|
|
|
fetchSubmodules = true;
|
2021-02-08 19:45:37 +01:00
|
|
|
sha256 = "19948jzqpclf8zfzp3k7s580xfjgqcyfwlcp7x7xj8h8lyypzymx";
|
2014-05-27 05:22:24 +02:00
|
|
|
};
|
|
|
|
|
2019-12-19 12:24:02 +01:00
|
|
|
postPatch = ''
|
2020-10-09 17:31:36 +02:00
|
|
|
substituteInPlace git-version.cmake --replace unknown ${src.rev}
|
|
|
|
substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
|
2017-09-27 16:33:00 +02:00
|
|
|
'';
|
2014-05-27 05:22:24 +02:00
|
|
|
|
2021-01-17 03:30:45 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config python3 ];
|
2019-12-19 12:24:02 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
2020-06-07 14:39:09 +02:00
|
|
|
ffmpeg_3
|
2019-12-19 12:24:02 +01:00
|
|
|
glew
|
|
|
|
libzip
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
snappy
|
|
|
|
zlib
|
|
|
|
];
|
2016-12-17 05:58:57 +01:00
|
|
|
|
2019-12-19 12:24:02 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DOpenGL_GL_PREFERENCE=GLVND"
|
|
|
|
"-DUSE_SYSTEM_FFMPEG=ON"
|
|
|
|
"-DUSE_SYSTEM_LIBZIP=ON"
|
|
|
|
"-DUSE_SYSTEM_SNAPPY=ON"
|
|
|
|
"-DUSING_QT_UI=ON"
|
2020-10-09 17:31:36 +02:00
|
|
|
"-DHEADLESS=OFF"
|
2019-12-19 12:24:02 +01:00
|
|
|
];
|
2016-07-17 16:42:46 +02:00
|
|
|
|
2017-09-27 16:33:00 +02:00
|
|
|
installPhase = ''
|
2019-12-19 12:24:02 +01:00
|
|
|
mkdir -p $out/share/ppsspp
|
|
|
|
install -Dm555 PPSSPPQt $out/bin/ppsspp
|
2017-09-27 16:33:00 +02:00
|
|
|
mv assets $out/share/ppsspp
|
|
|
|
'';
|
2014-05-27 05:22:24 +02:00
|
|
|
|
2019-12-19 12:24:02 +01:00
|
|
|
meta = with lib; {
|
2020-10-09 17:31:36 +02:00
|
|
|
description = "A HLE Playstation Portable emulator, written in C++";
|
2019-12-19 12:24:02 +01:00
|
|
|
homepage = "https://www.ppsspp.org/";
|
2014-05-27 05:22:24 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2019-12-05 08:29:48 +01:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2020-10-09 17:31:36 +02:00
|
|
|
platforms = platforms.linux;
|
2014-05-27 05:22:24 +02:00
|
|
|
};
|
2015-07-29 14:51:15 +02:00
|
|
|
}
|
2020-10-09 17:31:36 +02:00
|
|
|
# TODO: add SDL headless port
|