diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-02-01 19:47:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 19:47:12 +0100 |
commit | 1c51dd296463a41978c0ec811cd455de6ad1c5e1 (patch) | |
tree | 96d5c928b94930331e083fa612ae17be211deaf7 /pkgs/misc/emulators | |
parent | b1c3c4becd6f9f2e805f36baaa5b74fbf2396136 (diff) | |
parent | 44f4a61fc762dc49eb17d3ed8120e833cedc372a (diff) | |
download | nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.tar nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.tar.gz nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.tar.bz2 nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.tar.lz nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.tar.xz nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.tar.zst nixlib-1c51dd296463a41978c0ec811cd455de6ad1c5e1.zip |
Merge pull request #110810 from IvarWithoutBones/yuzu-{mainline,ea}
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r-- | pkgs/misc/emulators/yuzu/base.nix | 72 | ||||
-rw-r--r-- | pkgs/misc/emulators/yuzu/default.nix | 71 |
2 files changed, 98 insertions, 45 deletions
diff --git a/pkgs/misc/emulators/yuzu/base.nix b/pkgs/misc/emulators/yuzu/base.nix new file mode 100644 index 000000000000..89c8f2cd9474 --- /dev/null +++ b/pkgs/misc/emulators/yuzu/base.nix @@ -0,0 +1,72 @@ +{ pname, version, src, branchName +, stdenv, lib, fetchFromGitHub, wrapQtAppsHook +, cmake, pkg-config +, libpulseaudio, libjack2, alsaLib, sndio, ecasound +, vulkan-loader, vulkan-headers +, qtbase, qtwebengine, qttools +, nlohmann_json, rapidjson +, zlib, zstd, libzip, lz4 +, glslang +, boost173 +, catch2 +, fmt +, SDL2 +, udev +, libusb1 +, ffmpeg +}: + +stdenv.mkDerivation rec { + inherit pname version src; + + nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; + buildInputs = [ + libpulseaudio libjack2 alsaLib sndio ecasound + vulkan-loader vulkan-headers + qtbase qtwebengine qttools + nlohmann_json rapidjson + zlib zstd libzip lz4 + glslang + boost173 + catch2 + fmt + SDL2 + udev + libusb1 + ffmpeg + ]; + + cmakeFlags = [ + "-DENABLE_QT_TRANSLATION=ON" + "-DYUZU_USE_QT_WEB_ENGINE=ON" + "-DUSE_DISCORD_PRESENCE=ON" + ]; + + # Trick the configure system. This prevents a check for submodule directories. + preConfigure = '' + rm -f .gitmodules + ''; + + # 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; + }; +} diff --git a/pkgs/misc/emulators/yuzu/default.nix b/pkgs/misc/emulators/yuzu/default.nix index 5bb01b9fca08..89a500bb313c 100644 --- a/pkgs/misc/emulators/yuzu/default.nix +++ b/pkgs/misc/emulators/yuzu/default.nix @@ -1,47 +1,28 @@ -{ lib, stdenv, fetchFromGitHub -, cmake, pkg-config, 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; +{ branch ? "mainline", libsForQt5, fetchFromGitHub }: +let + inherit libsForQt5 fetchFromGitHub; +in { + mainline = libsForQt5.callPackage ./base.nix rec { + pname = "yuzu-mainline"; + version = "517"; + branchName = branch; + src = fetchFromGitHub { + owner = "yuzu-emu"; + repo = "yuzu-mainline"; + rev = "mainline-0-${version}"; + sha256 = "0i73yl2ycs8p9cqn25rw35cll0l6l68605f1mc1qvf4zy82jggbb"; + fetchSubmodules = true; + }; }; - - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; - buildInputs = [ qtbase qtwebengine qttools boost173 catch2 fmt lz4 nlohmann_json rapidjson zlib zstd SDL2 udev libusb1 libpulseaudio alsaLib sndio ecasound libjack2 libzip ffmpeg ] - ++ lib.optionals useVulkan [ vulkan-loader vulkan-headers ]; - cmakeFlags = [ "-DENABLE_QT_TRANSLATION=ON" "-DYUZU_USE_QT_WEB_ENGINE=ON" "-DUSE_DISCORD_PRESENCE=ON" ] - ++ lib.optionals (!useVulkan) [ "-DENABLE_VULKAN=No" ]; - - # Trick the configure system. This prevents a check for submodule directories. - preConfigure = "rm .gitmodules"; - - # Fix vulkan detection - postFixup = 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 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; + early-access = libsForQt5.callPackage ./base.nix rec { + pname = "yuzu-ea"; + version = "1377"; + branchName = branch; + src = fetchFromGitHub { + owner = "pineappleEA"; + repo = "pineapple-src"; + rev = "EA-${version}"; + sha256 = "0jjddmcqbkns5iqjwqh51hpjviw5j12n49jwfq7xwrsns6vbpqkf"; + }; }; -} +}.${branch} |