3
0
Fork 0
forked from mirrors/nixpkgs

ppsspp: 1.3 -> 1.4.2

This commit is contained in:
Yegor Timoshenko 2017-09-27 14:33:00 +00:00
parent 37464fd42a
commit 3c22ef8c0e
2 changed files with 28 additions and 24 deletions

View file

@ -1,37 +1,41 @@
{ stdenv, fetchgit, zlib, libpng, qt4, qmake4Hook, pkgconfig { stdenv, fetchFromGitHub, cmake, pkgconfig, qtbase, qtmultimedia
, withGamepads ? true, SDL # SDL is used for gamepad functionality , glew, libzip, snappy, zlib, withGamepads ? true, SDL2 }:
}:
assert withGamepads -> (SDL != null); assert withGamepads -> (SDL2 != null);
let
version = "1.3";
fstat = x: fn: "-D" + fn + "=" + (if x then "ON" else "OFF");
in
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec{
name = "PPSSPP-${version}";
src = fetchgit { stdenv.mkDerivation rec {
url = "https://github.com/hrydgard/ppsspp.git"; name = "PPSSPP-${version}";
rev = "refs/tags/v${version}"; version = "1.4.2";
src = fetchFromGitHub {
owner = "hrydgard";
repo = "ppsspp";
rev = "v${version}";
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "0l8vgdlw657r8gv7rz8iqa6zd9zrbzw10pwhcnahzil7w9qrd03g"; sha256 = "0m4qkhx7q496sm7ibg2n7rm3npxzfr93iraxgndk0vhfk8vy8w75";
}; };
buildInputs = [ zlib libpng qt4 ] patchPhase = ''
++ (if withGamepads then [ SDL ] else [ ]); echo 'const char *PPSSPP_GIT_VERSION = "${src.rev}";' >> git-version.cpp
substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
'';
nativeBuildInputs = [ pkgconfig qmake4Hook ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ qtbase qtmultimedia glew libzip snappy zlib ]
++ optionals withGamepads [ SDL2 SDL2.dev ];
qmakeFlags = [ "PPSSPPQt.pro" ]; cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DUSING_QT_UI=ON" ];
preConfigure = "cd Qt"; installPhase = ''
installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin"; mkdir -p $out/bin $out/share/ppsspp
mv PPSSPPQt $out/bin/ppsspp
mv assets $out/share/ppsspp
'';
meta = { meta = {
homepage = http://www.ppsspp.org/; homepage = https://www.ppsspp.org/;
description = "A PSP emulator, the Qt4 version"; description = "A PSP emulator for Android, Windows, Mac and Linux, written in C++";
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
maintainers = with maintainers; [ fuuzetsu AndersonTorres ]; maintainers = with maintainers; [ fuuzetsu AndersonTorres ];
platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin; platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin;

View file

@ -19107,7 +19107,7 @@ with pkgs;
pjsip = callPackage ../applications/networking/pjsip { }; pjsip = callPackage ../applications/networking/pjsip { };
PPSSPP = callPackage ../misc/emulators/ppsspp { SDL = SDL2; }; PPSSPP = libsForQt5.callPackage ../misc/emulators/ppsspp { };
pt = callPackage ../applications/misc/pt { }; pt = callPackage ../applications/misc/pt { };