2021-02-05 17:12:51 +00:00
|
|
|
{ mkDerivation, lib, fetchgit, cmake, pkg-config, git
|
2020-07-18 16:06:22 +00:00
|
|
|
, qtbase, qtquickcontrols, openal, glew, vulkan-headers, vulkan-loader, libpng
|
|
|
|
, ffmpeg, libevdev, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, pulseaudioSupport ? true, libpulseaudio
|
|
|
|
, waylandSupport ? true, wayland
|
|
|
|
, alsaSupport ? true, alsaLib
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2020-12-25 13:55:36 +00:00
|
|
|
majorVersion = "0.0.12";
|
|
|
|
gitVersion = "10811-a86a3d2fe"; # echo $(git rev-list HEAD --count)-$(git rev-parse --short HEAD)
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
pname = "rpcs3";
|
|
|
|
version = "${majorVersion}-${gitVersion}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/RPCS3/rpcs3";
|
2020-07-18 16:06:22 +00:00
|
|
|
rev = "v${majorVersion}";
|
2020-12-25 13:55:36 +00:00
|
|
|
sha256 = "182rkmbnnlcfzam4bwas7lwv10vqiqvvaw3299a3hariacd7rq8x";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cat > ./rpcs3/git-version.h <<EOF
|
|
|
|
#define RPCS3_GIT_VERSION "${gitVersion}"
|
2020-12-25 13:55:36 +00:00
|
|
|
#define RPCS3_GIT_FULL_BRANCH "RPCS3/rpcs3/master"
|
2020-04-24 23:36:52 +00:00
|
|
|
#define RPCS3_GIT_BRANCH "HEAD"
|
|
|
|
#define RPCS3_GIT_VERSION_NO_UPDATE 1
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_LIBPNG=ON"
|
|
|
|
"-DUSE_SYSTEM_FFMPEG=ON"
|
|
|
|
"-DUSE_NATIVE_INSTRUCTIONS=OFF"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config git ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-07-18 16:06:22 +00:00
|
|
|
qtbase qtquickcontrols openal glew vulkan-headers vulkan-loader libpng ffmpeg
|
|
|
|
libevdev python3
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optional pulseaudioSupport libpulseaudio
|
|
|
|
++ lib.optional alsaSupport alsaLib
|
|
|
|
++ lib.optional waylandSupport wayland;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "PS3 emulator/debugger";
|
|
|
|
homepage = "https://rpcs3.net/";
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with maintainers; [ abbradar neonfuz ilian ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|