2021-04-27 01:14:04 +01:00
|
|
|
{ mkDerivation
|
2019-12-19 11:24:02 +00:00
|
|
|
, fetchFromGitHub
|
2021-05-21 00:01:03 +01:00
|
|
|
, fetchpatch
|
2021-04-27 01:14:04 +01:00
|
|
|
, SDL2
|
|
|
|
, cmake
|
|
|
|
, ffmpeg
|
2019-12-19 11:24:02 +00:00
|
|
|
, glew
|
|
|
|
, lib
|
|
|
|
, libzip
|
2021-01-17 02:30:45 +00:00
|
|
|
, pkg-config
|
2019-12-19 11:24:02 +00:00
|
|
|
, python3
|
|
|
|
, qtbase
|
|
|
|
, qtmultimedia
|
|
|
|
, snappy
|
|
|
|
, zlib
|
|
|
|
}:
|
2017-09-27 15:33:00 +01:00
|
|
|
|
2019-11-13 20:38:29 +00:00
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ppsspp";
|
2021-02-08 18:45:37 +00:00
|
|
|
version = "1.11";
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hrydgard";
|
2020-10-09 16:31:36 +01:00
|
|
|
repo = pname;
|
2017-09-27 15:33:00 +01:00
|
|
|
rev = "v${version}";
|
2014-05-27 04:22:24 +01:00
|
|
|
fetchSubmodules = true;
|
2021-04-27 01:14:04 +01:00
|
|
|
sha256 = "sha256-vfp/vacIItlPP5dR7jzDT7oOUNFnjvvdR46yi79EJKU=";
|
2014-05-27 04:22:24 +01:00
|
|
|
};
|
|
|
|
|
2021-05-21 00:01:03 +01:00
|
|
|
patches = [
|
2021-05-21 22:49:22 +01:00
|
|
|
# fix compability with ffmpeg 4.4, remove on next release after 1.11
|
2021-05-21 00:01:03 +01:00
|
|
|
(fetchpatch {
|
2021-05-21 22:49:22 +01:00
|
|
|
name = "fix_ffmpeg_4.4.patch";
|
2021-05-21 00:01:03 +01:00
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/hrydgard/ppsspp/pull/14176.patch";
|
|
|
|
sha256 = "sha256-ecDoOydaLfL6+eFpahcO1TnRl866mZZVHlr6Qrib1mo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-12-19 11:24:02 +00:00
|
|
|
postPatch = ''
|
2020-10-09 16:31:36 +01:00
|
|
|
substituteInPlace git-version.cmake --replace unknown ${src.rev}
|
|
|
|
substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
|
2017-09-27 15:33:00 +01:00
|
|
|
'';
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2021-01-17 02:30:45 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config python3 ];
|
2019-12-19 11:24:02 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
2021-04-27 01:14:04 +01:00
|
|
|
ffmpeg
|
2019-12-19 11:24:02 +00:00
|
|
|
glew
|
|
|
|
libzip
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
snappy
|
|
|
|
zlib
|
|
|
|
];
|
2016-12-17 04:58:57 +00:00
|
|
|
|
2019-12-19 11:24:02 +00:00
|
|
|
cmakeFlags = [
|
2021-04-27 01:14:04 +01:00
|
|
|
"-DHEADLESS=OFF"
|
2019-12-19 11:24:02 +00:00
|
|
|
"-DOpenGL_GL_PREFERENCE=GLVND"
|
|
|
|
"-DUSE_SYSTEM_FFMPEG=ON"
|
|
|
|
"-DUSE_SYSTEM_LIBZIP=ON"
|
|
|
|
"-DUSE_SYSTEM_SNAPPY=ON"
|
|
|
|
"-DUSING_QT_UI=ON"
|
|
|
|
];
|
2016-07-17 15:42:46 +01:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
installPhase = ''
|
2021-04-27 01:14:04 +01:00
|
|
|
runHook preInstall
|
2019-12-19 11:24:02 +00:00
|
|
|
mkdir -p $out/share/ppsspp
|
|
|
|
install -Dm555 PPSSPPQt $out/bin/ppsspp
|
2017-09-27 15:33:00 +01:00
|
|
|
mv assets $out/share/ppsspp
|
2021-04-27 01:14:04 +01:00
|
|
|
runHook postInstall
|
2017-09-27 15:33:00 +01:00
|
|
|
'';
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2019-12-19 11:24:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.ppsspp.org/";
|
2021-04-27 01:14:04 +01:00
|
|
|
description = "A HLE Playstation Portable emulator, written in C++";
|
2014-05-27 04:22:24 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2019-12-05 07:29:48 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
2020-10-09 16:31:36 +01:00
|
|
|
platforms = platforms.linux;
|
2014-05-27 04:22:24 +01:00
|
|
|
};
|
2015-07-29 13:51:15 +01:00
|
|
|
}
|
2020-10-09 16:31:36 +01:00
|
|
|
# TODO: add SDL headless port
|