1451a52a38
I haven't been doing any maintenance for a long time now and not only do I get notified, it also creates a fake impression that all these packages had at least one maintainer when in practice they had none.
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkgconfig, qtbase, qtmultimedia
|
|
, glew, libzip, snappy, zlib, withGamepads ? true, SDL2 }:
|
|
|
|
assert withGamepads -> (SDL2 != null);
|
|
with stdenv.lib;
|
|
|
|
mkDerivation rec {
|
|
pname = "ppsspp";
|
|
version = "1.4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hrydgard";
|
|
repo = "ppsspp";
|
|
rev = "v${version}";
|
|
fetchSubmodules = true;
|
|
sha256 = "0m4qkhx7q496sm7ibg2n7rm3npxzfr93iraxgndk0vhfk8vy8w75";
|
|
};
|
|
|
|
patchPhase = ''
|
|
echo 'const char *PPSSPP_GIT_VERSION = "${src.rev}";' >> git-version.cpp
|
|
substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
buildInputs = [ qtbase qtmultimedia glew libzip snappy zlib ]
|
|
++ optionals withGamepads [ SDL2 SDL2.dev ];
|
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DUSING_QT_UI=ON" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/share/ppsspp
|
|
mv PPSSPPQt $out/bin/ppsspp
|
|
mv assets $out/share/ppsspp
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = {
|
|
homepage = https://www.ppsspp.org/;
|
|
description = "A PSP emulator for Android, Windows, Mac and Linux, written in C++";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin;
|
|
};
|
|
}
|