summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/emulators/ppsspp
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-02-15 23:28:16 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-02-16 01:38:20 -0300
commit8d65e832f0a18f60e2040940c80d96373ac8b88c (patch)
tree3d6ade66b2a81403e3852b80b9e7c660699b6ed6 /pkgs/applications/emulators/ppsspp
parent19574af0af3ffaf7c9e359744ed32556f34536bd (diff)
Move misc/emulators to applications/emulators - part 1
Emulators form a class by themselves. So, they should be moved to applications/.
Diffstat (limited to 'pkgs/applications/emulators/ppsspp')
-rw-r--r--pkgs/applications/emulators/ppsspp/default.nix72
1 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/ppsspp/default.nix b/pkgs/applications/emulators/ppsspp/default.nix
new file mode 100644
index 000000000000..b84d18a4e7a0
--- /dev/null
+++ b/pkgs/applications/emulators/ppsspp/default.nix
@@ -0,0 +1,72 @@
+{ mkDerivation
+, fetchFromGitHub
+, SDL2
+, cmake
+, ffmpeg
+, glew
+, lib
+, libzip
+, pkg-config
+, python3
+, qtbase
+, qtmultimedia
+, snappy
+, zlib
+}:
+
+mkDerivation rec {
+ pname = "ppsspp";
+ version = "1.12.3";
+
+ src = fetchFromGitHub {
+ owner = "hrydgard";
+ repo = pname;
+ rev = "v${version}";
+ fetchSubmodules = true;
+ sha256 = "sha256-S16rTB0svksW5MwrPV/+qpTK4uKZ7mFcmbOyEmMmzhY=";
+ };
+
+ postPatch = ''
+ substituteInPlace git-version.cmake --replace unknown ${src.rev}
+ substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
+ '';
+
+ nativeBuildInputs = [ cmake pkg-config python3 ];
+
+ buildInputs = [
+ SDL2
+ ffmpeg
+ glew
+ libzip
+ qtbase
+ qtmultimedia
+ snappy
+ zlib
+ ];
+
+ cmakeFlags = [
+ "-DHEADLESS=OFF"
+ "-DOpenGL_GL_PREFERENCE=GLVND"
+ "-DUSE_SYSTEM_FFMPEG=ON"
+ "-DUSE_SYSTEM_LIBZIP=ON"
+ "-DUSE_SYSTEM_SNAPPY=ON"
+ "-DUSING_QT_UI=ON"
+ ];
+
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $out/share/ppsspp
+ install -Dm555 PPSSPPQt $out/bin/ppsspp
+ mv assets $out/share/ppsspp
+ runHook postInstall
+ '';
+
+ meta = with lib; {
+ homepage = "https://www.ppsspp.org/";
+ description = "A HLE Playstation Portable emulator, written in C++";
+ license = licenses.gpl2Plus;
+ maintainers = with maintainers; [ AndersonTorres ];
+ platforms = platforms.linux;
+ };
+}
+# TODO: add SDL headless port