at 15.09-beta 35 lines 1.1 kB view raw
1{ stdenv, fetchgit, zlib, libpng, qt4, pkgconfig 2, withGamepads ? true, SDL # SDL is used for gamepad functionality 3}: 4 5assert withGamepads -> (SDL != null); 6 7let 8 version = "1.1.0"; 9 fstat = x: fn: "-D" + fn + "=" + (if x then "ON" else "OFF"); 10in 11with stdenv.lib; 12stdenv.mkDerivation rec{ 13 name = "PPSSPP-${version}"; 14 15 src = fetchgit { 16 url = "https://github.com/hrydgard/ppsspp.git"; 17 rev = "8c8e5de89d52b8bcb968227d96cbf049d04d1241"; 18 fetchSubmodules = true; 19 sha256 = "71dfa0be045f31969b1d6ab4f1adf6a208f9ef4834d708bc7bf6d9195efb5f80"; 20 }; 21 22 buildInputs = [ zlib libpng pkgconfig qt4 ] 23 ++ (if withGamepads then [ SDL ] else [ ]); 24 25 configurePhase = "cd Qt && qmake PPSSPPQt.pro"; 26 installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin"; 27 28 meta = { 29 homepage = "http://www.ppsspp.org/"; 30 description = "A PSP emulator, the Qt4 version"; 31 license = licenses.gpl2Plus; 32 maintainers = [ maintainers.fuuzetsu maintainers.AndersonTorres ]; 33 platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin; 34 }; 35}