3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/misc/emulators/yuzu/default.nix

48 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
2021-01-17 02:30:45 +00:00
, cmake, pkg-config, wrapQtAppsHook
2020-04-02 16:36:10 +01:00
, boost173, catch2, fmt, lz4, nlohmann_json, rapidjson, zlib, zstd, SDL2
, udev, libusb1, libzip, qtbase, qtwebengine, qttools, ffmpeg
, libpulseaudio, libjack2, alsaLib, sndio, ecasound
, useVulkan ? true, vulkan-loader, vulkan-headers
}:
stdenv.mkDerivation rec {
pname = "yuzu";
version = "482";
src = fetchFromGitHub {
owner = "yuzu-emu";
repo = "yuzu-mainline"; # They use a separate repo for mainline “branch”
rev = "mainline-0-${version}";
sha256 = "1bhkdbhj1dv33qv0np26gzsw65p4z88whjmd6bc7mh2b5lvrjwxm";
fetchSubmodules = true;
};
2021-01-17 02:30:45 +00:00
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
2020-04-02 16:36:10 +01:00
buildInputs = [ qtbase qtwebengine qttools boost173 catch2 fmt lz4 nlohmann_json rapidjson zlib zstd SDL2 udev libusb1 libpulseaudio alsaLib sndio ecasound libjack2 libzip ffmpeg ]
2021-01-15 13:21:58 +00:00
++ lib.optionals useVulkan [ vulkan-loader vulkan-headers ];
2020-04-02 16:36:10 +01:00
cmakeFlags = [ "-DENABLE_QT_TRANSLATION=ON" "-DYUZU_USE_QT_WEB_ENGINE=ON" "-DUSE_DISCORD_PRESENCE=ON" ]
2021-01-15 13:21:58 +00:00
++ lib.optionals (!useVulkan) [ "-DENABLE_VULKAN=No" ];
2020-04-02 16:36:10 +01:00
# Trick the configure system. This prevents a check for submodule directories.
preConfigure = "rm .gitmodules";
# Fix vulkan detection
2021-01-15 13:21:58 +00:00
postFixup = lib.optionals useVulkan ''
2020-04-02 16:36:10 +01:00
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; {
2020-04-02 16:36:10 +01:00
homepage = "https://yuzu-emu.org";
description = "An experimental Nintendo Switch emulator written in C++";
license = with licenses; [
gpl2Plus
# Icons
cc-by-nd-30 cc0
];
maintainers = with maintainers; [ ivar joshuafern ];
platforms = platforms.linux;
};
}