36 enableSdl2Frontend ? true,
40 enableQtTranslations ? enableQt,
43 useDiscordRichPresence ? false,
56 stdenv.mkDerivation (finalAttrs: {
61 url = "https://github.com/Lime3DS/Lime3DS/releases/download/${finalAttrs.version}/lime3ds-unified-source-${finalAttrs.version}.tar.xz";
62 hash = "sha256-cBPSzkvvivWGTD2E7fjeY3uJ1nSlALbOgIalGdk6xLU=";
69 ] ++ lib.optionals enableQt [ kdePackages.wrapQtAppsHook ];
101 ++ optionals enableQt (
110 ++ optionals enableSdl2Frontend [ SDL2 ]
111 ++ optionals enableQtTranslations [ kdePackages.qttools ]
112 ++ optionals enableCubeb [ cubeb ]
113 ++ optional useDiscordRichPresence rapidjson;
116 # Fix file not found when looking in var/empty instead of opt
117 mkdir externals/dynarmic/src/dynarmic/ir/var
118 ln -s ../opt externals/dynarmic/src/dynarmic/ir/var/empty
120 # We already know the submodules are present
121 substituteInPlace CMakeLists.txt \
122 --replace-fail "check_submodules_present()" ""
125 substituteInPlace externals/gamemode/include/gamemode_client.h \
126 --replace-fail "libgamemode.so.0" "${getLib gamemode}/lib/libgamemode.so.0"
131 libs = makeLibraryPath [ vulkan-loader ];
133 optionalString enableSdl2Frontend ''
134 for binfile in lime3ds lime3ds-room
136 wrapProgram "$out/bin/$binfile" \
137 --prefix LD_LIBRARY_PATH : ${libs}
139 + optionalString enableQt ''
141 --prefix LD_LIBRARY_PATH : ${libs}
148 (cmakeBool "LIME3DS_USE_PRECOMPILED_HEADERS" false)
149 (cmakeBool "USE_SYSTEM_LIBS" true)
150 (cmakeBool "DISABLE_SYSTEM_DYNARMIC" true)
151 (cmakeBool "DISABLE_SYSTEM_GLSLANG" true)
152 (cmakeBool "DISABLE_SYSTEM_LODEPNG" true)
153 (cmakeBool "DISABLE_SYSTEM_VMA" true)
154 (cmakeBool "DISABLE_SYSTEM_XBYAK" true)
155 (cmakeBool "ENABLE_QT" enableQt)
156 (cmakeBool "ENABLE_SDL2_FRONTEND" enableSdl2Frontend)
157 (cmakeBool "ENABLE_CUBEB" enableCubeb)
158 (cmakeBool "USE_DISCORD_PRESENCE" useDiscordRichPresence)
160 ++ optionals enableQt [
161 (cmakeBool "ENABLE_QT_TRANSLATION" enableQtTranslations)
165 description = "A Nintendo 3DS emulator based on Citra";
166 homepage = "https://github.com/Lime3DS/Lime3DS";
167 license = lib.licenses.gpl2Only;
168 maintainers = with lib.maintainers; [ arthsmn ];
169 mainProgram = "lime3ds";
170 platforms = lib.platforms.linux;