push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake
index 87f012c..052f1be 100644
--- a/cmake/Pcsx2Utils.cmake
+++ b/cmake/Pcsx2Utils.cmake
@@ -44,7 +44,6 @@ function(detect_compiler)
endfunction()
function(get_git_version_info)
- set(PCSX2_GIT_REV "")
set(PCSX2_GIT_TAG "")
set(PCSX2_GIT_HASH "")
if (GIT_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.git)

View File

@@ -0,0 +1,166 @@
{
lib,
fetchFromGitHub,
sdl3,
cmake,
cubeb,
curl,
extra-cmake-modules,
ffmpeg,
gtk3,
libXrandr,
libaio,
libbacktrace,
libpcap,
libwebp,
llvmPackages,
lz4,
pkg-config,
qt6,
shaderc,
soundtouch,
strip-nondeterminism,
vulkan-headers,
vulkan-loader,
wayland,
wrapGAppsHook3,
zip,
zstd,
plutovg,
plutosvg,
kddockwidgets,
}:
let
pcsx2_patches = fetchFromGitHub {
owner = "PCSX2";
repo = "pcsx2_patches";
rev = "9b193aa0a61f5e93d3bd4124b111e8f296ef9fa8";
hash = "sha256-1hhdjFxJCNfeO/FIAnjRHESfiyzkErYddZqpRxzG7VQ=";
};
inherit (qt6)
qtbase
qtsvg
qttools
qtwayland
wrapQtAppsHook
;
in
llvmPackages.stdenv.mkDerivation (finalAttrs: {
pname = "pcsx2";
version = "2.4.0";
src = fetchFromGitHub {
pname = "pcsx2-source";
owner = "PCSX2";
repo = "pcsx2";
tag = "v${finalAttrs.version}";
hash = "sha256-R+BdywkZKxR/+Z+o1512O3A1mg9A6s7i+JZjFyUbJVs=";
};
patches = [
# Remove PCSX2_GIT_REV
./0000-define-rev.patch
./remove-cubeb-vendor.patch
];
cmakeFlags = [
(lib.cmakeBool "PACKAGE_MODE" true)
(lib.cmakeBool "DISABLE_ADVANCE_SIMD" true)
(lib.cmakeBool "USE_LINKED_FFMPEG" true)
(lib.cmakeFeature "PCSX2_GIT_REV" finalAttrs.src.tag)
];
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
strip-nondeterminism
wrapGAppsHook3
wrapQtAppsHook
zip
];
buildInputs = [
curl
ffmpeg
gtk3
libaio
libbacktrace
libpcap
libwebp
libXrandr
lz4
qtbase
qtsvg
qttools
qtwayland
sdl3
plutovg
plutosvg
kddockwidgets
shaderc
soundtouch
vulkan-headers
wayland
zstd
cubeb
];
strictDeps = true;
postInstall = ''
install -Dm644 $src/pcsx2-qt/resources/icons/AppIcon64.png $out/share/pixmaps/PCSX2.png
install -Dm644 $src/.github/workflows/scripts/linux/pcsx2-qt.desktop $out/share/applications/PCSX2.desktop
zip -jq $out/share/PCSX2/resources/patches.zip ${pcsx2_patches}/patches/*
strip-nondeterminism $out/share/PCSX2/resources/patches.zip
'';
qtWrapperArgs =
let
libs = lib.makeLibraryPath [
vulkan-loader
shaderc
];
in
[ "--prefix LD_LIBRARY_PATH : ${libs}" ];
dontWrapGApps = true;
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
passthru = {
inherit pcsx2_patches;
updateScript.command = [ ./update.sh ];
};
meta = {
homepage = "https://pcsx2.net";
description = "Playstation 2 emulator";
longDescription = ''
PCSX2 is an open-source PlayStation 2 (AKA PS2) emulator. Its purpose is
to emulate the PS2 hardware, using a combination of MIPS CPU Interpreters,
Recompilers and a Virtual Machine which manages hardware states and PS2
system memory. This allows you to play PS2 games on your PC, with many
additional features and benefits.
'';
changelog = "https://github.com/PCSX2/pcsx2/releases/tag/v${finalAttrs.version}";
downloadPage = "https://github.com/PCSX2/pcsx2";
license = with lib.licenses; [
gpl3Plus
lgpl3Plus
];
mainProgram = "pcsx2-qt";
maintainers = with lib.maintainers; [
_0david0mp
hrdinka
govanify
matteopacini
];
platforms = lib.systems.inspect.patternLogicalAnd lib.systems.inspect.patterns.isLinux lib.systems.inspect.patterns.isx86_64;
};
})

View File

@@ -0,0 +1,33 @@
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index ff66f9c..e177c90 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -100,9 +100,8 @@ if(USE_VULKAN)
add_subdirectory(3rdparty/vulkan EXCLUDE_FROM_ALL)
endif()
-add_subdirectory(3rdparty/cubeb EXCLUDE_FROM_ALL)
-disable_compiler_warnings_for_target(cubeb)
-disable_compiler_warnings_for_target(speex)
+find_package(cubeb REQUIRED GLOBAL)
+add_library(cubeb ALIAS cubeb::cubeb)
# Find the Qt components that we need.
find_package(Qt6 6.7.2 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets LinguistTools REQUIRED)
diff --git a/pcsx2/Host/CubebAudioStream.cpp b/pcsx2/Host/CubebAudioStream.cpp
index 4cd9993..74c2f5a 100644
--- a/pcsx2/Host/CubebAudioStream.cpp
+++ b/pcsx2/Host/CubebAudioStream.cpp
@@ -288,9 +288,9 @@ std::vector<std::pair<std::string, std::string>> AudioStream::GetCubebDriverName
std::vector<std::pair<std::string, std::string>> names;
names.emplace_back(std::string(), TRANSLATE_STR("AudioStream", "Default"));
- const char** cubeb_names = cubeb_get_backend_names();
- for (u32 i = 0; cubeb_names[i] != nullptr; i++)
- names.emplace_back(cubeb_names[i], cubeb_names[i]);
+ cubeb_backend_names backends = cubeb_get_backend_names();
+ for (u32 i = 0; i < backends.count; i++)
+ names.emplace_back(backends.names[i], backends.names[i]);
return names;
}

16
pkgs/by-name/pc/pcsx2/update.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix-update common-updater-scripts coreutils jq
set -ex
latestPatchesRev=`git ls-remote -b https://github.com/PCSX2/pcsx2_patches main | cut -f1`
update-source-version pcsx2 \
--ignore-same-version \
--rev=$latestPatchesRev \
--source-key=pcsx2_patches
latestVersion="`curl "https://api.github.com/repos/PCSX2/pcsx2/releases/latest" \
| jq -r ".tag_name[1:]"`"
nix-update pcsx2 --version=$latestVersion