2021-05-11 04:39:53 +02:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config, git
|
2020-06-29 14:01:37 +02:00
|
|
|
, qtbase, qtquickcontrols, openal, glew, vulkan-headers, vulkan-loader, libpng
|
2021-05-11 04:39:53 +02:00
|
|
|
, ffmpeg, libevdev, libusb1, zlib, curl, python3
|
|
|
|
, sdl2Support ? true, SDL2
|
2019-06-03 18:17:03 +02:00
|
|
|
, pulseaudioSupport ? true, libpulseaudio
|
|
|
|
, waylandSupport ? true, wayland
|
2021-06-10 04:57:09 +02:00
|
|
|
, alsaSupport ? true, alsa-lib
|
2019-06-03 18:17:03 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-05-11 04:39:53 +02:00
|
|
|
majorVersion = "0.0.16";
|
|
|
|
gitVersion = "12235-a4f4b81e6"; # echo $(git rev-list HEAD --count)-$(git rev-parse --short HEAD)
|
2019-06-03 18:17:03 +02:00
|
|
|
in
|
2020-03-20 14:59:31 +01:00
|
|
|
mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "rpcs3";
|
2019-06-03 18:17:03 +02:00
|
|
|
version = "${majorVersion}-${gitVersion}";
|
|
|
|
|
2021-05-11 04:39:53 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RPCS3";
|
|
|
|
repo = "rpcs3";
|
|
|
|
rev = "a4f4b81e6b0c00f4c30f9f5f182e5fe56f9fb03c";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
sha256 = "1d70nljl1kmpbk50jpjki7dglw1bbxd7x4qzg6nz5np2sdsbpckd";
|
2019-06-03 18:17:03 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cat > ./rpcs3/git-version.h <<EOF
|
|
|
|
#define RPCS3_GIT_VERSION "${gitVersion}"
|
2020-12-13 02:16:41 +01:00
|
|
|
#define RPCS3_GIT_FULL_BRANCH "RPCS3/rpcs3/master"
|
2019-06-03 18:17:03 +02:00
|
|
|
#define RPCS3_GIT_BRANCH "HEAD"
|
|
|
|
#define RPCS3_GIT_VERSION_NO_UPDATE 1
|
2018-06-25 11:45:51 +02:00
|
|
|
EOF
|
|
|
|
'';
|
2018-02-23 18:38:29 +01:00
|
|
|
|
|
|
|
cmakeFlags = [
|
2021-05-11 04:39:53 +02:00
|
|
|
"-DUSE_SYSTEM_ZLIB=ON"
|
|
|
|
"-DUSE_SYSTEM_LIBUSB=ON"
|
2018-02-23 18:38:29 +01:00
|
|
|
"-DUSE_SYSTEM_LIBPNG=ON"
|
|
|
|
"-DUSE_SYSTEM_FFMPEG=ON"
|
2021-05-11 04:39:53 +02:00
|
|
|
"-DUSE_SYSTEM_CURL=ON"
|
|
|
|
# NB: Can't use this yet, our CMake doesn't include FindWolfSSL.cmake
|
|
|
|
#"-DUSE_SYSTEM_WOLFSSL=ON"
|
2018-02-23 18:38:29 +01:00
|
|
|
"-DUSE_NATIVE_INSTRUCTIONS=OFF"
|
|
|
|
];
|
|
|
|
|
2021-01-17 03:30:45 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config git ];
|
2018-02-23 18:38:29 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-06-29 14:01:37 +02:00
|
|
|
qtbase qtquickcontrols openal glew vulkan-headers vulkan-loader libpng ffmpeg
|
2021-05-11 04:39:53 +02:00
|
|
|
libevdev zlib libusb1 curl python3
|
|
|
|
] ++ lib.optional sdl2Support SDL2
|
|
|
|
++ lib.optional pulseaudioSupport libpulseaudio
|
2021-06-10 04:57:09 +02:00
|
|
|
++ lib.optional alsaSupport alsa-lib
|
2018-02-23 18:38:29 +01:00
|
|
|
++ lib.optional waylandSupport wayland;
|
|
|
|
|
2020-03-20 14:59:31 +01:00
|
|
|
meta = with lib; {
|
2018-02-23 18:38:29 +01:00
|
|
|
description = "PS3 emulator/debugger";
|
|
|
|
homepage = "https://rpcs3.net/";
|
2021-01-13 22:56:52 +01:00
|
|
|
maintainers = with maintainers; [ abbradar neonfuz ilian ];
|
2021-05-11 04:39:53 +02:00
|
|
|
license = licenses.gpl2Only;
|
2018-02-23 18:38:29 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|