2016-04-17 01:51:25 +02:00
|
|
|
{ stdenv, fetchgit, zlib, libpng, qt4, qmake4Hook, pkgconfig
|
2014-05-27 05:22:24 +02:00
|
|
|
, withGamepads ? true, SDL # SDL is used for gamepad functionality
|
|
|
|
}:
|
|
|
|
|
2015-07-29 14:51:15 +02:00
|
|
|
assert withGamepads -> (SDL != null);
|
|
|
|
|
2014-05-27 05:22:24 +02:00
|
|
|
let
|
2016-12-17 05:58:57 +01:00
|
|
|
version = "1.3";
|
2014-05-27 05:22:24 +02:00
|
|
|
fstat = x: fn: "-D" + fn + "=" + (if x then "ON" else "OFF");
|
2015-07-29 14:51:15 +02:00
|
|
|
in
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec{
|
2014-05-27 05:22:24 +02:00
|
|
|
name = "PPSSPP-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/hrydgard/ppsspp.git";
|
2016-12-17 05:58:57 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2014-05-27 05:22:24 +02:00
|
|
|
fetchSubmodules = true;
|
2016-12-17 05:58:57 +01:00
|
|
|
sha256 = "0l8vgdlw657r8gv7rz8iqa6zd9zrbzw10pwhcnahzil7w9qrd03g";
|
2014-05-27 05:22:24 +02:00
|
|
|
};
|
|
|
|
|
2016-12-17 05:58:57 +01:00
|
|
|
buildInputs = [ zlib libpng qt4 ]
|
2014-05-27 05:22:24 +02:00
|
|
|
++ (if withGamepads then [ SDL ] else [ ]);
|
|
|
|
|
2016-12-17 05:58:57 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig qmake4Hook ];
|
|
|
|
|
2016-07-17 16:42:46 +02:00
|
|
|
qmakeFlags = [ "PPSSPPQt.pro" ];
|
|
|
|
|
2016-04-17 01:51:25 +02:00
|
|
|
preConfigure = "cd Qt";
|
2014-08-24 03:59:14 +02:00
|
|
|
installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin";
|
2014-05-27 05:22:24 +02:00
|
|
|
|
2015-07-29 14:51:15 +02:00
|
|
|
meta = {
|
2014-05-27 05:22:24 +02:00
|
|
|
homepage = "http://www.ppsspp.org/";
|
2014-11-11 14:20:43 +01:00
|
|
|
description = "A PSP emulator, the Qt4 version";
|
2014-05-27 05:22:24 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2016-12-17 05:58:57 +01:00
|
|
|
maintainers = with maintainers; [ fuuzetsu AndersonTorres ];
|
2014-06-07 22:28:56 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin;
|
2014-05-27 05:22:24 +02:00
|
|
|
};
|
2015-07-29 14:51:15 +02:00
|
|
|
}
|