Merge pull request #264157 from SuperSamus/citra-update

citra: nightly 1963 -> 2043, canary 2573 -> 2695

authored by Peder Bergebakken Sundt and committed by GitHub b9bab33a 45827faa

+69 -48
+5 -5
pkgs/applications/emulators/citra/default.nix
··· 9 9 # Please make sure to update this when updating citra! 10 10 compat-list = fetchurl { 11 11 name = "citra-compat-list"; 12 - url = "https://web.archive.org/web/20230807103651/https://api.citra-emu.org/gamedb/"; 12 + url = "https://web.archive.org/web/20231111133415/https://api.citra-emu.org/gamedb"; 13 13 hash = "sha256-J+zqtWde5NgK2QROvGewtXGRAWUTNSKHNMG6iu9m1fU="; 14 14 }; 15 15 in { 16 16 nightly = qt6Packages.callPackage ./generic.nix rec { 17 17 pname = "citra-nightly"; 18 - version = "1963"; 18 + version = "2043"; 19 19 20 20 src = fetchFromGitHub { 21 21 owner = "citra-emu"; 22 22 repo = "citra-nightly"; 23 23 rev = "nightly-${version}"; 24 - sha256 = "0ggi1l8327s43xaxs616g0s9vmal6q7vsv69bn07gp71gchhcmyi"; 24 + sha256 = "sha256-26M3uzqp4rUMOhr619UooupZT11B03IJfamUPNkceQk="; 25 25 fetchSubmodules = true; 26 26 }; 27 27 ··· 30 30 31 31 canary = qt6Packages.callPackage ./generic.nix rec { 32 32 pname = "citra-canary"; 33 - version = "2573"; 33 + version = "2695"; 34 34 35 35 src = fetchFromGitHub { 36 36 owner = "citra-emu"; 37 37 repo = "citra-canary"; 38 38 rev = "canary-${version}"; 39 - sha256 = "sha256-tQJ3WcqGcnW9dOiwDrBgL0n3UNp1DGQ/FjCR28Xjdpc="; 39 + sha256 = "sha256-090er4aUGze8bk3DIFZoa+/6EcJhr4bim3nWgZHs1mo="; 40 40 fetchSubmodules = true; 41 41 }; 42 42
+64 -43
pkgs/applications/emulators/citra/generic.nix
··· 6 6 7 7 , lib 8 8 , stdenv 9 - , fetchFromGitHub 10 9 , cmake 11 10 , boost 12 11 , pkg-config 12 + , catch2_3 13 + , cpp-jwt 14 + , cryptopp 15 + , enet 16 + , ffmpeg 17 + , fmt 18 + , glslang 19 + , httplib 20 + , inih 13 21 , libusb1 14 - , glslang 22 + , nlohmann_json 23 + , openal 24 + , openssl 25 + , SDL2 26 + , soundtouch 27 + , spirv-tools 15 28 , zstd 16 - , libressl 17 - , enableSdl2 ? true, SDL2 18 - , enableQt ? true, qtbase, qtmultimedia, wrapQtAppsHook 29 + , vulkan-headers 30 + , vulkan-loader 31 + , enableSdl2Frontend ? true 32 + , enableQt ? true, qtbase, qtmultimedia, qtwayland, wrapQtAppsHook 19 33 , enableQtTranslation ? enableQt, qttools 20 34 , enableWebService ? true 21 35 , enableCubeb ? true, cubeb 22 - , enableFfmpegAudioDecoder ? true 23 - , enableFfmpegVideoDumper ? true 24 - , ffmpeg_4 25 36 , useDiscordRichPresence ? true, rapidjson 26 - , enableFdk ? false, fdk_aac 27 37 }: 28 - assert lib.assertMsg (!enableFfmpegAudioDecoder || !enableFdk) "Can't enable both enableFfmpegAudioDecoder and enableFdk"; 29 - 30 - stdenv.mkDerivation rec { 38 + stdenv.mkDerivation { 31 39 inherit pname version src; 32 40 33 41 nativeBuildInputs = [ 34 42 cmake 35 - glslang 36 43 pkg-config 44 + ffmpeg 45 + glslang 37 46 ] ++ lib.optionals enableQt [ wrapQtAppsHook ]; 38 47 39 48 buildInputs = [ 40 49 boost 50 + catch2_3 51 + cpp-jwt 52 + cryptopp 53 + # intentionally omitted: dynarmic - prefer vendored version for compatibility 54 + enet 55 + fmt 56 + httplib 57 + inih 41 58 libusb1 42 - ] ++ lib.optionals enableQt [ qtbase qtmultimedia ] 43 - ++ lib.optional enableSdl2 SDL2 59 + nlohmann_json 60 + openal 61 + openssl 62 + SDL2 63 + soundtouch 64 + spirv-tools 65 + vulkan-headers 66 + # intentionally omitted: xbyak - prefer vendored version for compatibility 67 + zstd 68 + ] ++ lib.optionals enableQt [ qtbase qtmultimedia qtwayland ] 44 69 ++ lib.optional enableQtTranslation qttools 45 - ++ lib.optionals enableCubeb cubeb.passthru.backendLibs 46 - ++ lib.optional (enableFfmpegAudioDecoder || enableFfmpegVideoDumper) ffmpeg_4 47 - ++ lib.optional useDiscordRichPresence rapidjson 48 - ++ lib.optional enableFdk fdk_aac; 70 + ++ lib.optional enableCubeb cubeb 71 + ++ lib.optional useDiscordRichPresence rapidjson; 49 72 50 73 cmakeFlags = [ 51 - "-DUSE_SYSTEM_BOOST=ON" 52 - "-DCITRA_WARNINGS_AS_ERRORS=OFF" 53 - "-DCITRA_USE_BUNDLED_FFMPEG=OFF" 54 - "-DCITRA_USE_BUNDLED_QT=OFF" 55 - "-DUSE_SYSTEM_SDL2=ON" 56 - "-DCMAKE_INSTALL_INCLUDEDIR=include" 57 - "-DCMAKE_INSTALL_LIBDIR=lib" 74 + "-DUSE_SYSTEM_LIBS=ON" 75 + 76 + "-DDISABLE_SYSTEM_DYNARMIC=ON" 77 + "-DDISABLE_SYSTEM_GLSLANG=ON" # The following imported targets are referenced, but are missing: SPIRV-Tools-opt 78 + "-DDISABLE_SYSTEM_LODEPNG=ON" # Not packaged in nixpkgs 79 + "-DDISABLE_SYSTEM_VMA=ON" 80 + "-DDISABLE_SYSTEM_XBYAK=ON" 58 81 59 - # We dont want to bother upstream with potentially outdated compat reports 82 + # We don't want to bother upstream with potentially outdated compat reports 60 83 "-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON" 61 84 "-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF" # We provide this deterministically 62 - ] ++ lib.optional (!enableSdl2) "-DENABLE_SDL2=OFF" 85 + ] ++ lib.optional (!enableSdl2Frontend) "-DENABLE_SDL2_FRONTEND=OFF" 63 86 ++ lib.optional (!enableQt) "-DENABLE_QT=OFF" 64 87 ++ lib.optional enableQtTranslation "-DENABLE_QT_TRANSLATION=ON" 65 88 ++ lib.optional (!enableWebService) "-DENABLE_WEB_SERVICE=OFF" 66 89 ++ lib.optional (!enableCubeb) "-DENABLE_CUBEB=OFF" 67 - ++ lib.optional enableFfmpegAudioDecoder "-DENABLE_FFMPEG_AUDIO_DECODER=ON" 68 - ++ lib.optional enableFfmpegVideoDumper "-DENABLE_FFMPEG_VIDEO_DUMPER=ON" 69 - ++ lib.optional useDiscordRichPresence "-DUSE_DISCORD_PRESENCE=ON" 70 - ++ lib.optional enableFdk "-DENABLE_FDK=ON"; 90 + ++ lib.optional useDiscordRichPresence "-DUSE_DISCORD_PRESENCE=ON"; 91 + 92 + # causes redefinition of _FORTIFY_SOURCE 93 + hardeningDisable = [ "fortify3" ]; 71 94 72 - postPatch = with lib; let 95 + postPatch = let 73 96 branchCaptialized = (lib.toUpper (lib.substring 0 1 branch) + lib.substring 1 (-1) branch); 74 97 in '' 75 98 # Fix file not found when looking in var/empty instead of opt ··· 85 108 86 109 # Add versions 87 110 echo 'set(BUILD_FULLNAME "${branchCaptialized} ${version}")' >> CMakeModules/GenerateBuildInfo.cmake 88 - 89 - # Devendoring 90 - rm -rf externals/zstd externals/libressl 91 - cp -r ${zstd.src} externals/zstd 92 - tar xf ${libressl.src} -C externals/ 93 - mv externals/${libressl.name} externals/libressl 94 - chmod -R a+w externals/zstd 95 111 ''; 96 112 97 - # Fixes https://github.com/NixOS/nixpkgs/issues/171173 98 - postInstall = lib.optionalString (enableCubeb && enableSdl2) '' 113 + postInstall = let 114 + libs = lib.makeLibraryPath [ vulkan-loader ]; 115 + in lib.optionalString enableSdl2Frontend '' 99 116 wrapProgram "$out/bin/citra" \ 100 - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath cubeb.passthru.backendLibs} 117 + --prefix LD_LIBRARY_PATH : ${libs} 118 + '' + lib.optionalString enableQt '' 119 + qtWrapperArgs+=( 120 + --prefix LD_LIBRARY_PATH : ${libs} 121 + ) 101 122 ''; 102 123 103 124 meta = with lib; {