about summary refs log tree commit diff
path: root/pkgs/misc/emulators/ppsspp/default.nix
blob: 87ae977c7cc7e9fb2e0b025ac81c9c78d1ce8df7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchgit, zlib, libpng, qt4, qmake4Hook, pkgconfig
, withGamepads ? true, SDL # SDL is used for gamepad functionality
}:

assert withGamepads -> (SDL != null);

let
  version = "1.1.0";
  fstat = x: fn: "-D" + fn + "=" + (if x then "ON" else "OFF");
in
with stdenv.lib;
stdenv.mkDerivation rec{
  name = "PPSSPP-${version}";

  src = fetchgit {
    url = "https://github.com/hrydgard/ppsspp.git";
    rev = "8c8e5de89d52b8bcb968227d96cbf049d04d1241";
    fetchSubmodules = true;
    sha256 = "71dfa0be045f31969b1d6ab4f1adf6a208f9ef4834d708bc7bf6d9195efb5f80";
  };

  buildInputs = [ zlib libpng pkgconfig qt4 qmake4Hook ]
                ++ (if withGamepads then [ SDL ] else [ ]);

  preConfigure = "cd Qt";
  installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin";

  meta = {
    homepage = "http://www.ppsspp.org/";
    description = "A PSP emulator, the Qt4 version";
    license = licenses.gpl2Plus;
    maintainers = [ maintainers.fuuzetsu maintainers.AndersonTorres ];
    platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin;
  };
}