2021-02-05 17:12:51 +00:00
|
|
|
{ pname, version, src, branchName
|
2021-07-14 22:03:04 +00:00
|
|
|
, stdenv, lib, wrapQtAppsHook
|
2021-02-05 17:12:51 +00:00
|
|
|
, cmake, pkg-config
|
2021-06-28 23:13:55 +00:00
|
|
|
, libpulseaudio, libjack2, alsa-lib, sndio
|
2021-02-05 17:12:51 +00:00
|
|
|
, vulkan-loader, vulkan-headers
|
|
|
|
, qtbase, qtwebengine, qttools
|
|
|
|
, nlohmann_json, rapidjson
|
|
|
|
, zlib, zstd, libzip, lz4
|
|
|
|
, glslang
|
|
|
|
, boost173
|
|
|
|
, catch2
|
2021-07-14 22:03:04 +00:00
|
|
|
, fmt_8
|
2021-02-05 17:12:51 +00:00
|
|
|
, SDL2
|
|
|
|
, udev
|
|
|
|
, libusb1
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
inherit pname version src;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
libpulseaudio libjack2 alsa-lib sndio
|
2021-02-05 17:12:51 +00:00
|
|
|
vulkan-loader vulkan-headers
|
|
|
|
qtbase qtwebengine qttools
|
|
|
|
nlohmann_json rapidjson
|
|
|
|
zlib zstd libzip lz4
|
|
|
|
glslang
|
|
|
|
boost173
|
|
|
|
catch2
|
2021-07-14 22:03:04 +00:00
|
|
|
fmt_8
|
2021-02-05 17:12:51 +00:00
|
|
|
SDL2
|
|
|
|
udev
|
|
|
|
libusb1
|
|
|
|
ffmpeg
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2021-05-28 09:39:13 +00:00
|
|
|
"-DYUZU_USE_BUNDLED_QT=OFF"
|
|
|
|
"-DYUZU_USE_BUNDLED_SDL2=OFF"
|
|
|
|
"-DYUZU_USE_BUNDLED_FFMPEG=OFF"
|
2021-02-05 17:12:51 +00:00
|
|
|
"-DENABLE_QT_TRANSLATION=ON"
|
|
|
|
"-DYUZU_USE_QT_WEB_ENGINE=ON"
|
|
|
|
"-DUSE_DISCORD_PRESENCE=ON"
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# This changes `ir/opt` to `ir/var/empty` in `externals/dynarmic/src/dynarmic/CMakeLists.txt`
|
|
|
|
# making the build fail, as that path does not exist
|
|
|
|
dontFixCmake = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preConfigure = ''
|
2021-02-24 18:30:23 +00:00
|
|
|
# Trick the configure system. This prevents a check for submodule directories.
|
2021-02-05 17:12:51 +00:00
|
|
|
rm -f .gitmodules
|
2021-02-24 18:30:23 +00:00
|
|
|
|
|
|
|
# see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
|
|
|
|
cmakeFlagsArray+=(
|
2021-07-14 22:03:04 +00:00
|
|
|
"-DTITLE_BAR_FORMAT_IDLE=yuzu ${branchName} ${version}"
|
|
|
|
"-DTITLE_BAR_FORMAT_RUNNING=yuzu ${branchName} ${version} | {3}"
|
2021-02-24 18:30:23 +00:00
|
|
|
)
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Fix vulkan detection
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/yuzu --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
|
|
|
wrapProgram $out/bin/yuzu-cmd --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://yuzu-emu.org";
|
|
|
|
description = "The ${branchName} branch of an experimental Nintendo Switch emulator written in C++";
|
|
|
|
longDescription = ''
|
|
|
|
An experimental Nintendo Switch emulator written in C++.
|
|
|
|
Using the mainline branch is recommanded for general usage.
|
|
|
|
Using the early-access branch is recommanded if you would like to try out experimental features, with a cost of stability.
|
|
|
|
'';
|
|
|
|
license = with licenses; [
|
|
|
|
gpl2Plus
|
|
|
|
# Icons
|
|
|
|
cc-by-nd-30 cc0
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [ ivar joshuafern ];
|
|
|
|
platforms = platforms.linux;
|
2021-07-14 22:03:04 +00:00
|
|
|
broken = stdenv.isAarch64; # Currently aarch64 is not supported.
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|