2019-11-13 20:38:29 +00:00
|
|
|
{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, qtbase, qtmultimedia
|
2017-09-27 15:33:00 +01:00
|
|
|
, glew, libzip, snappy, zlib, withGamepads ? true, SDL2 }:
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
assert withGamepads -> (SDL2 != null);
|
2015-07-29 13:51:15 +01:00
|
|
|
with stdenv.lib;
|
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";
|
2017-09-27 15:33:00 +01:00
|
|
|
version = "1.4.2";
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hrydgard";
|
|
|
|
repo = "ppsspp";
|
|
|
|
rev = "v${version}";
|
2014-05-27 04:22:24 +01:00
|
|
|
fetchSubmodules = true;
|
2017-09-27 15:33:00 +01:00
|
|
|
sha256 = "0m4qkhx7q496sm7ibg2n7rm3npxzfr93iraxgndk0vhfk8vy8w75";
|
2014-05-27 04:22:24 +01:00
|
|
|
};
|
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
patchPhase = ''
|
|
|
|
echo 'const char *PPSSPP_GIT_VERSION = "${src.rev}";' >> git-version.cpp
|
|
|
|
substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
|
|
|
|
'';
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [ qtbase qtmultimedia glew libzip snappy zlib ]
|
|
|
|
++ optionals withGamepads [ SDL2 SDL2.dev ];
|
2016-12-17 04:58:57 +00:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DUSING_QT_UI=ON" ];
|
2016-07-17 15:42:46 +01:00
|
|
|
|
2017-09-27 15:33:00 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/ppsspp
|
|
|
|
mv PPSSPPQt $out/bin/ppsspp
|
|
|
|
mv assets $out/share/ppsspp
|
|
|
|
'';
|
2014-05-27 04:22:24 +01:00
|
|
|
|
2017-10-01 09:33:02 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-07-29 13:51:15 +01:00
|
|
|
meta = {
|
2017-09-27 15:33:00 +01:00
|
|
|
homepage = https://www.ppsspp.org/;
|
|
|
|
description = "A PSP emulator for Android, Windows, Mac and Linux, written in C++";
|
2014-05-27 04:22:24 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2016-12-17 04:58:57 +00:00
|
|
|
maintainers = with maintainers; [ fuuzetsu AndersonTorres ];
|
2014-06-07 21:28:56 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin;
|
2014-05-27 04:22:24 +01:00
|
|
|
};
|
2015-07-29 13:51:15 +01:00
|
|
|
}
|