ce641f4048
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
67 lines
2 KiB
Nix
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" ];
|
|
};
|
|
}
|