Skip to content

Commit c36ab0c

Browse files
yuzu: init at 482
1 parent 5b8fd7a commit c36ab0c

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{ stdenv, fetchFromGitHub
2+
, cmake, pkgconfig, wrapQtAppsHook
3+
, boost173, catch2, fmt, lz4, nlohmann_json, rapidjson, zlib, zstd, SDL2
4+
, udev, libusb1, libzip, qtbase, qtwebengine, qttools, ffmpeg
5+
, libpulseaudio, libjack2, alsaLib, sndio, ecasound
6+
, useVulkan ? true, vulkan-loader, vulkan-headers
7+
}:
8+
9+
stdenv.mkDerivation rec {
10+
pname = "yuzu";
11+
version = "482";
12+
13+
src = fetchFromGitHub {
14+
owner = "yuzu-emu";
15+
repo = "yuzu-mainline"; # They use a separate repo for mainline “branch”
16+
rev = "mainline-0-${version}";
17+
sha256 = "1bhkdbhj1dv33qv0np26gzsw65p4z88whjmd6bc7mh2b5lvrjwxm";
18+
fetchSubmodules = true;
19+
};
20+
21+
nativeBuildInputs = [ cmake pkgconfig wrapQtAppsHook ];
22+
buildInputs = [ qtbase qtwebengine qttools boost173 catch2 fmt lz4 nlohmann_json rapidjson zlib zstd SDL2 udev libusb1 libpulseaudio alsaLib sndio ecasound libjack2 libzip ffmpeg ]
23+
++ stdenv.lib.optionals useVulkan [ vulkan-loader vulkan-headers ];
24+
cmakeFlags = [ "-DENABLE_QT_TRANSLATION=ON" "-DYUZU_USE_QT_WEB_ENGINE=ON" "-DUSE_DISCORD_PRESENCE=ON" ]
25+
++ stdenv.lib.optionals (!useVulkan) [ "-DENABLE_VULKAN=No" ];
26+
27+
# Trick the configure system. This prevents a check for submodule directories.
28+
preConfigure = "rm .gitmodules";
29+
30+
# Fix vulkan detection
31+
postFixup = stdenv.lib.optionals useVulkan ''
32+
wrapProgram $out/bin/yuzu --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
33+
wrapProgram $out/bin/yuzu-cmd --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
34+
'';
35+
36+
meta = with stdenv.lib; {
37+
homepage = "https://yuzu-emu.org";
38+
description = "An experimental Nintendo Switch emulator written in C++";
39+
license = with licenses; [
40+
gpl2Plus
41+
# Icons
42+
cc-by-nd-30 cc0
43+
];
44+
maintainers = with maintainers; [ ivar joshuafern ];
45+
platforms = platforms.linux;
46+
};
47+
}

pkgs/top-level/all-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28569,6 +28569,10 @@ in
2856928569

2857028570
yaxg = callPackage ../tools/graphics/yaxg {};
2857128571

28572+
yuzu = libsForQt5.callPackage ../misc/emulators/yuzu {
28573+
stdenv = gcc10Stdenv;
28574+
};
28575+
2857228576
zap = callPackage ../tools/networking/zap { };
2857328577

2857428578
zigbee2mqtt = callPackage ../servers/zigbee2mqtt { };

0 commit comments

Comments
 (0)