2019-06-03 17:17:03 +01:00
|
|
|
{ stdenv, lib, fetchgit, cmake, pkgconfig, git
|
|
|
|
, qt5, openal, glew, vulkan-loader, libpng, ffmpeg, libevdev, python27
|
|
|
|
, pulseaudioSupport ? true, libpulseaudio
|
|
|
|
, waylandSupport ? true, wayland
|
|
|
|
, alsaSupport ? true, alsaLib
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
majorVersion = "0.0.6";
|
|
|
|
gitVersion = "8187-790962425"; # echo $(git rev-list HEAD --count)-$(git rev-parse --short HEAD)
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "rpcs3-${version}";
|
|
|
|
version = "${majorVersion}-${gitVersion}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/RPCS3/rpcs3";
|
|
|
|
rev = "790962425cfb893529f72b3ef0dd1424fcc42973";
|
|
|
|
sha256 = "154ys29b9xdws3bp4b7rb3kc0h9hd49g2yf3z9268cdq8aclahaa";
|
|
|
|
};
|
|
|
|
|
|
|
|
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 = [
|
2018-06-25 10:45:51 +01:00
|
|
|
qt5.qtbase qt5.qtquickcontrols openal glew vulkan-loader libpng ffmpeg libevdev python27
|
2018-02-23 17:38:29 +00:00
|
|
|
] ++ lib.optional pulseaudioSupport libpulseaudio
|
|
|
|
++ lib.optional alsaSupport alsaLib
|
|
|
|
++ lib.optional waylandSupport wayland;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
}
|