nixpkgs/pkgs/misc/emulators/ppsspp/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

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