citra: nightly 1907 -> 1963, canary 2484 -> 2573

This commit is contained in:
lasers 2023-08-07 06:42:39 -05:00
parent e1884471a8
commit 87679fc67c
3 changed files with 21 additions and 13 deletions

View file

@ -9,19 +9,19 @@ let
# Please make sure to update this when updating citra!
compat-list = fetchurl {
name = "citra-compat-list";
url = "https://web.archive.org/web/20230512234055/https://api.citra-emu.org/gamedb/";
hash = "sha256-J+zqtWde5NgK2QROvGewtXGRAWUTNSKHNMG6iu9m1fU=";
url = "https://web.archive.org/web/20230807103651/https://api.citra-emu.org/gamedb/";
hash = "sha256-Ma1SXgzhyMHa/MeoYuf8b+QYPjhoQEeKklLbGbkHwEk=";
};
in {
nightly = qt6Packages.callPackage ./generic.nix rec {
pname = "citra-nightly";
version = "1907";
version = "1963";
src = fetchFromGitHub {
owner = "citra-emu";
repo = "citra-nightly";
rev = "nightly-${version}";
sha256 = "l4pqok42/ybnRX90Qwhcgm2JR4/9C5bbCTk3j4QuWtw=";
sha256 = "0ggi1l8327s43xaxs616g0s9vmal6q7vsv69bn07gp71gchhcmyi";
fetchSubmodules = true;
};
@ -30,13 +30,13 @@ in {
canary = qt6Packages.callPackage ./generic.nix rec {
pname = "citra-canary";
version = "2484";
version = "2573";
src = fetchFromGitHub {
owner = "citra-emu";
repo = "citra-canary";
rev = "canary-${version}";
sha256 = "IgCpqt3rKV9IqNstF4QwnJlE3hPH+BkIhaOvEmshh0U=";
sha256 = "sha256-tQJ3WcqGcnW9dOiwDrBgL0n3UNp1DGQ/FjCR28Xjdpc=";
fetchSubmodules = true;
};

View file

@ -8,9 +8,10 @@
, stdenv
, fetchFromGitHub
, cmake
, boost179
, boost
, pkg-config
, libusb1
, glslang
, zstd
, libressl
, enableSdl2 ? true, SDL2
@ -31,11 +32,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
glslang
pkg-config
] ++ lib.optionals enableQt [ wrapQtAppsHook ];
buildInputs = [
boost179
boost
libusb1
] ++ lib.optionals enableQt [ qtbase qtmultimedia ]
++ lib.optional enableSdl2 SDL2
@ -47,6 +49,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DUSE_SYSTEM_BOOST=ON"
"-DCITRA_WARNINGS_AS_ERRORS=OFF"
"-DCITRA_USE_BUNDLED_FFMPEG=OFF"
"-DCITRA_USE_BUNDLED_QT=OFF"
"-DUSE_SYSTEM_SDL2=ON"
@ -66,7 +69,9 @@ stdenv.mkDerivation rec {
++ lib.optional useDiscordRichPresence "-DUSE_DISCORD_PRESENCE=ON"
++ lib.optional enableFdk "-DENABLE_FDK=ON";
postPatch = ''
postPatch = with lib; let
branchCaptialized = (lib.toUpper (lib.substring 0 1 branch) + lib.substring 1 (-1) branch);
in ''
# Fix file not found when looking in var/empty instead of opt
mkdir externals/dynarmic/src/dynarmic/ir/var
ln -s ../opt externals/dynarmic/src/dynarmic/ir/var/empty
@ -78,6 +83,9 @@ stdenv.mkDerivation rec {
substituteInPlace CMakeLists.txt \
--replace "check_submodules_present()" ""
# Add versions
echo 'set(BUILD_FULLNAME "${branchCaptialized} ${version}")' >> CMakeModules/GenerateBuildInfo.cmake
# Devendoring
rm -rf externals/zstd externals/libressl
cp -r ${zstd.src} externals/zstd

View file

@ -44,8 +44,8 @@ updateNightly() {
echo " Successfully fetched. hash: ${NEW_NIGHTLY_HASH}"
sed -i "s/${OLD_NIGHTLY_VERSION}/${NEW_NIGHTLY_VERSION}/" ./default.nix
sed -i "s/${OLD_NIGHTLY_HASH}/${NEW_NIGHTLY_HASH}/" ./default.nix
sed -i "s|${OLD_NIGHTLY_VERSION}|${NEW_NIGHTLY_VERSION}|" ./default.nix
sed -i "s|${OLD_NIGHTLY_HASH}|${NEW_NIGHTLY_HASH}|" ./default.nix
}
updateCanary() {
@ -69,8 +69,8 @@ updateCanary() {
echo " Successfully fetched. hash: ${NEW_CANARY_HASH}"
sed -i "s/${OLD_CANARY_VERSION}/${NEW_CANARY_VERSION}/" ./default.nix
sed -i "s/${OLD_CANARY_HASH}/${NEW_CANARY_HASH}/" ./default.nix
sed -i "s|${OLD_CANARY_VERSION}|${NEW_CANARY_VERSION}|" ./default.nix
sed -i "s|${OLD_CANARY_HASH}|${NEW_CANARY_HASH}|" ./default.nix
}
if [[ "$BRANCH" = "nightly" ]]; then