diff options
author | Ivar <ivar.scholten@protonmail.com> | 2020-04-02 17:36:10 +0200 |
---|---|---|
committer | IvarWithoutBones <ivar.scholten@protonmail.com> | 2020-12-23 19:12:55 +0100 |
commit | c36ab0c678535a0c19b9eb7f9ad51dabfad02cc5 (patch) | |
tree | b5c1b86bc18fa175c498b45f4517802e1a827915 /pkgs/misc/emulators | |
parent | 5b8fd7afa7e1041ef80ff00f2731ab9404b34846 (diff) |
yuzu: init at 482
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r-- | pkgs/misc/emulators/yuzu/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/yuzu/default.nix b/pkgs/misc/emulators/yuzu/default.nix new file mode 100644 index 0000000000000..3c643822c16e4 --- /dev/null +++ b/pkgs/misc/emulators/yuzu/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub +, cmake, pkgconfig, wrapQtAppsHook +, 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; + }; + + nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ]; + buildInputs = [ qtbase qtwebengine qttools boost173 catch2 fmt lz4 nlohmann_json rapidjson zlib zstd SDL2 udev libusb1 libpulseaudio alsaLib sndio ecasound libjack2 libzip ffmpeg ] + ++ stdenv.lib.optionals useVulkan [ vulkan-loader vulkan-headers ]; + cmakeFlags = [ "-DENABLE_QT_TRANSLATION=ON" "-DYUZU_USE_QT_WEB_ENGINE=ON" "-DUSE_DISCORD_PRESENCE=ON" ] + ++ stdenv.lib.optionals (!useVulkan) [ "-DENABLE_VULKAN=No" ]; + + # Trick the configure system. This prevents a check for submodule directories. + preConfigure = "rm .gitmodules"; + + # Fix vulkan detection + postFixup = stdenv.lib.optionals useVulkan '' + 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 stdenv.lib; { + 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; + }; +} |