2022-05-30 12:36:31 +00:00
|
|
|
{ cmake
|
2020-11-11 14:26:00 +00:00
|
|
|
, fetchFromGitHub
|
2022-05-30 12:36:31 +00:00
|
|
|
, lib
|
2023-06-28 11:38:58 +00:00
|
|
|
, llvmPackages_16
|
2023-06-08 19:30:19 +00:00
|
|
|
, cubeb
|
2022-05-30 12:36:31 +00:00
|
|
|
, curl
|
2023-09-13 08:47:26 +00:00
|
|
|
, extra-cmake-modules
|
2022-05-30 12:36:31 +00:00
|
|
|
, ffmpeg
|
2023-06-28 11:38:58 +00:00
|
|
|
, fmt_8
|
2020-11-11 14:26:00 +00:00
|
|
|
, gettext
|
|
|
|
, harfbuzz
|
|
|
|
, libaio
|
2022-05-30 12:36:31 +00:00
|
|
|
, libbacktrace
|
2020-11-11 14:26:00 +00:00
|
|
|
, libpcap
|
|
|
|
, libsamplerate
|
2022-05-30 12:36:31 +00:00
|
|
|
, libXrandr
|
|
|
|
, libzip
|
2021-01-17 02:30:45 +00:00
|
|
|
, pkg-config
|
2022-05-30 12:36:31 +00:00
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, qtwayland
|
|
|
|
, rapidyaml
|
2020-11-11 14:26:00 +00:00
|
|
|
, SDL2
|
|
|
|
, soundtouch
|
2023-06-10 03:49:31 +00:00
|
|
|
, strip-nondeterminism
|
2022-03-18 11:54:53 +00:00
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
2021-12-07 19:46:56 +00:00
|
|
|
, wayland
|
2022-05-30 12:36:31 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
, xz
|
|
|
|
, zip
|
2020-01-08 11:32:45 +00:00
|
|
|
}:
|
2016-02-26 09:21:31 +00:00
|
|
|
|
2022-05-30 12:36:31 +00:00
|
|
|
let
|
|
|
|
# The pre-zipped files in releases don't have a versioned link, we need to zip them ourselves
|
|
|
|
pcsx2_patches = fetchFromGitHub {
|
|
|
|
owner = "PCSX2";
|
|
|
|
repo = "pcsx2_patches";
|
2023-09-13 08:47:26 +00:00
|
|
|
rev = "04d727b3bf451da11b6594602036e4f7f5580610";
|
|
|
|
sha256 = "sha256-zrulsSMRNLPFvrC/jeYzl53i4ZvFQ4Yl2nB0bA6Y8KU=";
|
2022-05-30 12:36:31 +00:00
|
|
|
};
|
|
|
|
in
|
2023-06-28 11:38:58 +00:00
|
|
|
llvmPackages_16.stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "pcsx2";
|
2023-09-13 08:47:26 +00:00
|
|
|
version = "1.7.5004";
|
2016-02-26 09:21:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PCSX2";
|
|
|
|
repo = "pcsx2";
|
2020-11-11 14:26:00 +00:00
|
|
|
fetchSubmodules = true;
|
2021-12-07 19:44:45 +00:00
|
|
|
rev = "v${version}";
|
2023-09-13 08:47:26 +00:00
|
|
|
sha256 = "sha256-o+9VSuoZgTkS75rZ6qYM8ITD+0OcwXp+xh/hdUGpVK4=";
|
2016-02-26 09:21:31 +00:00
|
|
|
};
|
|
|
|
|
2020-01-08 11:32:45 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DDISABLE_ADVANCE_SIMD=TRUE"
|
2022-05-30 12:36:31 +00:00
|
|
|
"-DUSE_SYSTEM_LIBS=ON"
|
2023-06-28 11:38:58 +00:00
|
|
|
"-DUSE_LINKED_FFMPEG=ON"
|
2022-05-30 12:36:31 +00:00
|
|
|
"-DDISABLE_BUILD_DATE=TRUE"
|
2020-01-08 11:32:45 +00:00
|
|
|
];
|
2016-02-26 09:21:31 +00:00
|
|
|
|
2023-06-10 05:21:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2023-09-13 08:47:26 +00:00
|
|
|
extra-cmake-modules
|
2023-06-10 05:21:40 +00:00
|
|
|
pkg-config
|
2023-06-10 03:49:31 +00:00
|
|
|
strip-nondeterminism
|
2023-06-10 05:21:40 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
zip
|
|
|
|
];
|
2016-02-26 09:21:31 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-05-30 12:36:31 +00:00
|
|
|
curl
|
|
|
|
ffmpeg
|
2023-06-28 11:38:58 +00:00
|
|
|
fmt_8
|
2020-01-08 11:32:45 +00:00
|
|
|
gettext
|
|
|
|
harfbuzz
|
|
|
|
libaio
|
2022-05-30 12:36:31 +00:00
|
|
|
libbacktrace
|
2020-01-08 11:32:45 +00:00
|
|
|
libpcap
|
2020-11-11 14:26:00 +00:00
|
|
|
libsamplerate
|
2022-05-30 12:36:31 +00:00
|
|
|
libXrandr
|
|
|
|
libzip
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtwayland
|
|
|
|
rapidyaml
|
2020-01-08 11:32:45 +00:00
|
|
|
SDL2
|
|
|
|
soundtouch
|
2022-05-30 12:36:31 +00:00
|
|
|
vulkan-headers
|
2022-03-18 11:54:53 +00:00
|
|
|
vulkan-loader
|
2021-12-07 19:46:56 +00:00
|
|
|
wayland
|
2022-05-30 12:36:31 +00:00
|
|
|
xz
|
2023-06-08 19:30:19 +00:00
|
|
|
]
|
|
|
|
++ cubeb.passthru.backendLibs;
|
2016-02-26 09:21:31 +00:00
|
|
|
|
2022-05-30 12:36:31 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -a bin/pcsx2-qt bin/resources $out/bin/
|
|
|
|
|
2023-06-28 11:38:58 +00:00
|
|
|
install -Dm644 $src/pcsx2-qt/resources/icons/AppIcon64.png $out/share/pixmaps/PCSX2.png
|
2022-05-30 12:36:31 +00:00
|
|
|
install -Dm644 $src/.github/workflows/scripts/linux/pcsx2-qt.desktop $out/share/applications/PCSX2.desktop
|
|
|
|
|
|
|
|
zip -jq $out/bin/resources/patches.zip ${pcsx2_patches}/patches/*
|
2023-06-10 03:49:31 +00:00
|
|
|
strip-nondeterminism $out/bin/resources/patches.zip
|
2022-03-18 11:54:53 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-30 12:36:31 +00:00
|
|
|
qtWrapperArgs = [
|
2023-06-08 19:30:19 +00:00
|
|
|
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([
|
2022-05-30 12:36:31 +00:00
|
|
|
vulkan-loader
|
2023-06-08 19:30:19 +00:00
|
|
|
] ++ cubeb.passthru.backendLibs)}"
|
2022-05-30 12:36:31 +00:00
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-02-26 09:21:31 +00:00
|
|
|
description = "Playstation 2 emulator";
|
2021-12-07 19:44:45 +00:00
|
|
|
longDescription = ''
|
2016-02-26 09:21:31 +00:00
|
|
|
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.
|
|
|
|
'';
|
2020-01-08 11:32:45 +00:00
|
|
|
homepage = "https://pcsx2.net";
|
2022-05-30 12:36:31 +00:00
|
|
|
license = with licenses; [ gpl3 lgpl3 ];
|
2021-03-30 00:52:58 +00:00
|
|
|
maintainers = with maintainers; [ hrdinka govanify ];
|
2022-05-30 12:36:31 +00:00
|
|
|
mainProgram = "pcsx2-qt";
|
2022-03-18 11:54:53 +00:00
|
|
|
platforms = platforms.x86_64;
|
2016-02-26 09:21:31 +00:00
|
|
|
};
|
|
|
|
}
|