nixpkgs-suyu/pkgs/misc/emulators/rpcs3/default.nix
Zane van Iperen 659e4b7457
rpcs3: 0.0.16-12235-a4f4b81e6 -> 0.0.19-12975-37383f421
* De-vendor FAudio, WolfSSL, pugixml, and flatbuffers
* Add update script
* Add myself as maintainer
2021-11-02 19:42:35 +10:00

67 lines
2 KiB
Nix

{ gcc11Stdenv, lib, fetchFromGitHub, wrapQtAppsHook, cmake, pkg-config, git
, qtbase, qtquickcontrols, qtmultimedia, openal, glew, vulkan-headers, vulkan-loader, libpng
, ffmpeg, libevdev, libusb1, zlib, curl, wolfssl, python3, pugixml, faudio, flatbuffers
, sdl2Support ? true, SDL2
, pulseaudioSupport ? true, libpulseaudio
, waylandSupport ? true, wayland
, alsaSupport ? true, alsa-lib
}:
let
majorVersion = "0.0.19";
gitVersion = "12975-37383f421";
in
gcc11Stdenv.mkDerivation {
pname = "rpcs3";
version = "${majorVersion}-${gitVersion}";
src = fetchFromGitHub {
owner = "RPCS3";
repo = "rpcs3";
rev = "37383f4217e1c510a543e100d0ca495800b3361a";
fetchSubmodules = true;
sha256 = "1pm1r4j4cdcmr8xmslyv2n6iwcjldnr396by4r6lgf4mdlnwahhm";
};
passthru.updateScript = ./update.sh;
preConfigure = ''
cat > ./rpcs3/git-version.h <<EOF
#define RPCS3_GIT_VERSION "${gitVersion}"
#define RPCS3_GIT_FULL_BRANCH "RPCS3/rpcs3/master"
#define RPCS3_GIT_BRANCH "HEAD"
#define RPCS3_GIT_VERSION_NO_UPDATE 1
EOF
'';
cmakeFlags = [
"-DUSE_SYSTEM_ZLIB=ON"
"-DUSE_SYSTEM_LIBUSB=ON"
"-DUSE_SYSTEM_LIBPNG=ON"
"-DUSE_SYSTEM_FFMPEG=ON"
"-DUSE_SYSTEM_CURL=ON"
"-DUSE_SYSTEM_WOLFSSL=ON"
"-DUSE_SYSTEM_FAUDIO=ON"
"-DUSE_SYSTEM_PUGIXML=ON"
"-DUSE_SYSTEM_FLATBUFFERS=ON"
"-DUSE_NATIVE_INSTRUCTIONS=OFF"
];
nativeBuildInputs = [ cmake pkg-config git wrapQtAppsHook ];
buildInputs = [
qtbase qtquickcontrols qtmultimedia openal glew vulkan-headers vulkan-loader libpng ffmpeg
libevdev zlib libusb1 curl wolfssl python3 pugixml faudio flatbuffers
] ++ lib.optional sdl2Support SDL2
++ lib.optional pulseaudioSupport libpulseaudio
++ lib.optional alsaSupport alsa-lib
++ lib.optional waylandSupport wayland;
meta = with lib; {
description = "PS3 emulator/debugger";
homepage = "https://rpcs3.net/";
maintainers = with maintainers; [ abbradar neonfuz ilian zane ];
license = licenses.gpl2Only;
platforms = [ "x86_64-linux" ];
};
}