2020-03-20 13:59:31 +00:00
|
|
|
{ mkDerivation, lib, fetchgit, cmake, pkgconfig, git
|
2020-06-29 13:01:37 +01:00
|
|
|
, qtbase, qtquickcontrols, openal, glew, vulkan-headers, vulkan-loader, libpng
|
|
|
|
, ffmpeg, libevdev, python3
|
2019-06-03 17:17:03 +01:00
|
|
|
, pulseaudioSupport ? true, libpulseaudio
|
|
|
|
, waylandSupport ? true, wayland
|
|
|
|
, alsaSupport ? true, alsaLib
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2020-03-20 13:59:31 +00:00
|
|
|
majorVersion = "0.0.8";
|
|
|
|
gitVersion = "9300-341fdf7eb"; # echo $(git rev-list HEAD --count)-$(git rev-parse --short HEAD)
|
2019-06-03 17:17:03 +01:00
|
|
|
in
|
2020-03-20 13:59:31 +00:00
|
|
|
mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "rpcs3";
|
2019-06-03 17:17:03 +01:00
|
|
|
version = "${majorVersion}-${gitVersion}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/RPCS3/rpcs3";
|
2020-06-29 13:01:37 +01:00
|
|
|
rev = "v${majorVersion}";
|
2020-03-20 13:59:31 +00:00
|
|
|
sha256 = "1qx97zkkjl6bmv5rhfyjqynbz0v8h40b2wxqnl59g287wj0yk3y1";
|
2019-06-03 17:17:03 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cat > ./rpcs3/git-version.h <<EOF
|
|
|
|
#define RPCS3_GIT_VERSION "${gitVersion}"
|
|
|
|
#define RPCS3_GIT_BRANCH "HEAD"
|
|
|
|
#define RPCS3_GIT_VERSION_NO_UPDATE 1
|
2018-06-25 10:45:51 +01:00
|
|
|
EOF
|
|
|
|
'';
|
2018-02-23 17:38:29 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_LIBPNG=ON"
|
|
|
|
"-DUSE_SYSTEM_FFMPEG=ON"
|
|
|
|
"-DUSE_NATIVE_INSTRUCTIONS=OFF"
|
|
|
|
];
|
|
|
|
|
2018-06-25 10:45:51 +01:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig git ];
|
2018-02-23 17:38:29 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-06-29 13:01:37 +01:00
|
|
|
qtbase qtquickcontrols openal glew vulkan-headers vulkan-loader libpng ffmpeg
|
|
|
|
libevdev python3
|
2018-02-23 17:38:29 +00:00
|
|
|
] ++ lib.optional pulseaudioSupport libpulseaudio
|
|
|
|
++ lib.optional alsaSupport alsaLib
|
|
|
|
++ lib.optional waylandSupport wayland;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-03-20 13:59:31 +00:00
|
|
|
meta = with lib; {
|
2018-02-23 17:38:29 +00:00
|
|
|
description = "PS3 emulator/debugger";
|
|
|
|
homepage = "https://rpcs3.net/";
|
2018-06-25 10:45:51 +01:00
|
|
|
maintainers = with maintainers; [ abbradar nocent ];
|
2018-02-23 17:38:29 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|