From 9c6d94f81086781f535a009c1ddbb7f1959795e3 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 9 Jul 2024 21:31:01 -0300 Subject: [PATCH 1/4] pcsx2: "remove" macos binary package Let's "remove" the binary-only, MacOS-only package from this expression, because it should be maintained by MacOS maintainers. Besides, no other modification will be made right now, just a merge between files. --- pkgs/by-name/pc/pcsx2/linux.nix | 130 ----------------------------- pkgs/by-name/pc/pcsx2/package.nix | 132 +++++++++++++++++++++++++++--- 2 files changed, 122 insertions(+), 140 deletions(-) delete mode 100644 pkgs/by-name/pc/pcsx2/linux.nix diff --git a/pkgs/by-name/pc/pcsx2/linux.nix b/pkgs/by-name/pc/pcsx2/linux.nix deleted file mode 100644 index 862b20150ef36..0000000000000 --- a/pkgs/by-name/pc/pcsx2/linux.nix +++ /dev/null @@ -1,130 +0,0 @@ -{ - cmake, - fetchFromGitHub, - lib, - llvmPackages_17, - callPackage, - cubeb, - curl, - extra-cmake-modules, - ffmpeg, - libaio, - libbacktrace, - libpcap, - libwebp, - libXrandr, - lz4, - makeWrapper, - pkg-config, - qt6, - SDL2, - soundtouch, - strip-nondeterminism, - vulkan-headers, - vulkan-loader, - wayland, - zip, - zstd, - - pname, - version, - meta, -}: - -let - shaderc-patched = callPackage ./shaderc-patched.nix { }; - # 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"; - rev = "9e71956797332471010e563a4b75a5934bef9d4e"; - hash = "sha256-jpaRpvJox78zRGyrVIGYVoSEo/ICBlBfw3dTMz9QGuU="; - }; - inherit (qt6) - qtbase - qtsvg - qttools - qtwayland - wrapQtAppsHook - ; -in -llvmPackages_17.stdenv.mkDerivation (finalAttrs: { - inherit pname version meta; - - src = fetchFromGitHub { - owner = "PCSX2"; - repo = "pcsx2"; - rev = "v${finalAttrs.version}"; - # NOTE: Don't forget to change the hash in shaderc-patched.nix as well. - hash = "sha256-cDugEbbz40uLPW64bcDGxfo1Y3ahYnEVaalfMp/J95s="; - }; - - patches = [ ./define-rev.patch ]; - - cmakeFlags = [ - (lib.cmakeBool "DISABLE_ADVANCE_SIMD" true) - (lib.cmakeBool "USE_LINKED_FFMPEG" true) - (lib.cmakeFeature "PCSX2_GIT_REV" finalAttrs.src.rev) - ]; - - nativeBuildInputs = [ - cmake - extra-cmake-modules - pkg-config - strip-nondeterminism - wrapQtAppsHook - zip - ]; - - buildInputs = [ - curl - ffmpeg - libaio - libbacktrace - libpcap - libwebp - libXrandr - lz4 - qtbase - qtsvg - qttools - qtwayland - SDL2 - shaderc-patched - soundtouch - vulkan-headers - wayland - zstd - ] ++ cubeb.passthru.backendLibs; - - installPhase = '' - mkdir -p $out/bin - cp -a bin/pcsx2-qt bin/resources $out/bin/ - - 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/bin/resources/patches.zip ${pcsx2_patches}/patches/* - strip-nondeterminism $out/bin/resources/patches.zip - ''; - - qtWrapperArgs = - let - libs = lib.makeLibraryPath ( - [ - vulkan-loader - shaderc-patched - ] - ++ cubeb.passthru.backendLibs - ); - in - [ "--prefix LD_LIBRARY_PATH : ${libs}" ]; - - # https://github.com/PCSX2/pcsx2/pull/10200 - # Can't avoid the double wrapping, the binary wrapper from qtWrapperArgs doesn't support --run - postFixup = '' - source "${makeWrapper}/nix-support/setup-hook" - wrapProgram $out/bin/pcsx2-qt \ - --run 'if [[ -z $I_WANT_A_BROKEN_WAYLAND_UI ]]; then export QT_QPA_PLATFORM=xcb; fi' - ''; -}) diff --git a/pkgs/by-name/pc/pcsx2/package.nix b/pkgs/by-name/pc/pcsx2/package.nix index bd982263c0a87..ae85f85e54211 100644 --- a/pkgs/by-name/pc/pcsx2/package.nix +++ b/pkgs/by-name/pc/pcsx2/package.nix @@ -1,11 +1,130 @@ { - stdenv, lib, + SDL2, callPackage, + cmake, + cubeb, + curl, + extra-cmake-modules, + fetchFromGitHub, + ffmpeg, + libXrandr, + libaio, + libbacktrace, + libpcap, + libwebp, + llvmPackages_17, + lz4, + makeWrapper, + pkg-config, + qt6, + soundtouch, + strip-nondeterminism, + vulkan-headers, + vulkan-loader, + wayland, + zip, + zstd, }: + let + shaderc-patched = callPackage ./shaderc-patched.nix { }; + # 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"; + rev = "9e71956797332471010e563a4b75a5934bef9d4e"; + hash = "sha256-jpaRpvJox78zRGyrVIGYVoSEo/ICBlBfw3dTMz9QGuU="; + }; + inherit (qt6) + qtbase + qtsvg + qttools + qtwayland + wrapQtAppsHook + ; +in +llvmPackages_17.stdenv.mkDerivation (finalAttrs: { pname = "pcsx2"; version = "1.7.5919"; + + src = fetchFromGitHub { + owner = "PCSX2"; + repo = "pcsx2"; + rev = "v${finalAttrs.version}"; + # NOTE: Don't forget to change the hash in shaderc-patched.nix as well. + hash = "sha256-cDugEbbz40uLPW64bcDGxfo1Y3ahYnEVaalfMp/J95s="; + }; + + patches = [ ./define-rev.patch ]; + + cmakeFlags = [ + (lib.cmakeBool "DISABLE_ADVANCE_SIMD" true) + (lib.cmakeBool "USE_LINKED_FFMPEG" true) + (lib.cmakeFeature "PCSX2_GIT_REV" finalAttrs.src.rev) + ]; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + pkg-config + strip-nondeterminism + wrapQtAppsHook + zip + ]; + + buildInputs = [ + curl + ffmpeg + libaio + libbacktrace + libpcap + libwebp + libXrandr + lz4 + qtbase + qtsvg + qttools + qtwayland + SDL2 + shaderc-patched + soundtouch + vulkan-headers + wayland + zstd + ] ++ cubeb.passthru.backendLibs; + + installPhase = '' + mkdir -p $out/bin + cp -a bin/pcsx2-qt bin/resources $out/bin/ + + 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/bin/resources/patches.zip ${pcsx2_patches}/patches/* + strip-nondeterminism $out/bin/resources/patches.zip + ''; + + qtWrapperArgs = + let + libs = lib.makeLibraryPath ( + [ + vulkan-loader + shaderc-patched + ] + ++ cubeb.passthru.backendLibs + ); + in + [ "--prefix LD_LIBRARY_PATH : ${libs}" ]; + + # https://github.com/PCSX2/pcsx2/pull/10200 + # Can't avoid the double wrapping, the binary wrapper from qtWrapperArgs doesn't support --run + postFixup = '' + source "${makeWrapper}/nix-support/setup-hook" + wrapProgram $out/bin/pcsx2-qt \ + --run 'if [[ -z $I_WANT_A_BROKEN_WAYLAND_UI ]]; then export QT_QPA_PLATFORM=xcb; fi' + ''; + meta = with lib; { description = "Playstation 2 emulator"; longDescription = '' @@ -21,19 +140,12 @@ let gpl3Plus lgpl3Plus ]; + mainProgram = "pcsx2-qt"; maintainers = with maintainers; [ hrdinka govanify matteopacini ]; - mainProgram = "pcsx2-qt"; platforms = [ "x86_64-linux" "x86_64-darwin" ]; - sourceProvenance = - lib.optional stdenv.isDarwin sourceTypes.binaryNativeCode - ++ lib.optional stdenv.isLinux sourceTypes.fromSource; }; -in -if stdenv.isDarwin then - callPackage ./darwin.nix { inherit pname version meta; } -else - callPackage ./linux.nix { inherit pname version meta; } +}) From eb7ef344a0bc542a39a17545728d162037e403c8 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 9 Jul 2024 23:00:43 -0300 Subject: [PATCH 2/4] pcsx2: fix expression - lacks runHooks on installPhase - remove nested with --- pkgs/by-name/pc/pcsx2/package.nix | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/pc/pcsx2/package.nix b/pkgs/by-name/pc/pcsx2/package.nix index ae85f85e54211..bc55d1f2647fc 100644 --- a/pkgs/by-name/pc/pcsx2/package.nix +++ b/pkgs/by-name/pc/pcsx2/package.nix @@ -95,6 +95,7 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { ] ++ cubeb.passthru.backendLibs; installPhase = '' + runHook preInstall mkdir -p $out/bin cp -a bin/pcsx2-qt bin/resources $out/bin/ @@ -103,6 +104,7 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { zip -jq $out/bin/resources/patches.zip ${pcsx2_patches}/patches/* strip-nondeterminism $out/bin/resources/patches.zip + runHook postInstall ''; qtWrapperArgs = @@ -125,27 +127,28 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { --run 'if [[ -z $I_WANT_A_BROKEN_WAYLAND_UI ]]; then export QT_QPA_PLATFORM=xcb; fi' ''; - meta = with lib; { + 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. + 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. ''; - hydraPlatforms = platforms.linux; - homepage = "https://pcsx2.net"; - license = with licenses; [ + license = with lib.licenses; [ gpl3Plus lgpl3Plus ]; mainProgram = "pcsx2-qt"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ hrdinka govanify matteopacini ]; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; + platforms = lib.systems.inspect.patternLogicalAnd + lib.systems.inspect.patterns.isLinux + lib.systems.inspect.patterns.isx86_64; }; }) From f27707080129ff8f41d6ca57502766afc130fdcf Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Wed, 10 Jul 2024 00:26:34 -0300 Subject: [PATCH 3/4] pcsx2: big rewrite - Gather all the sources in a same expression under sources.nix - Doc-comment and rename the patch - strictDeps is set as true - Why extra-cmake-modules does not work in nativeBuildInputs?? - Add myself as maintainer --- ...define-rev.patch => 0000-define-rev.patch} | 0 pkgs/by-name/pc/pcsx2/package.nix | 38 +++++------ pkgs/by-name/pc/pcsx2/shaderc-patched.nix | 35 ---------- pkgs/by-name/pc/pcsx2/sources.nix | 64 +++++++++++++++++++ 4 files changed, 79 insertions(+), 58 deletions(-) rename pkgs/by-name/pc/pcsx2/{define-rev.patch => 0000-define-rev.patch} (100%) delete mode 100644 pkgs/by-name/pc/pcsx2/shaderc-patched.nix create mode 100644 pkgs/by-name/pc/pcsx2/sources.nix diff --git a/pkgs/by-name/pc/pcsx2/define-rev.patch b/pkgs/by-name/pc/pcsx2/0000-define-rev.patch similarity index 100% rename from pkgs/by-name/pc/pcsx2/define-rev.patch rename to pkgs/by-name/pc/pcsx2/0000-define-rev.patch diff --git a/pkgs/by-name/pc/pcsx2/package.nix b/pkgs/by-name/pc/pcsx2/package.nix index bc55d1f2647fc..b94a34248830d 100644 --- a/pkgs/by-name/pc/pcsx2/package.nix +++ b/pkgs/by-name/pc/pcsx2/package.nix @@ -28,14 +28,7 @@ }: let - shaderc-patched = callPackage ./shaderc-patched.nix { }; - # 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"; - rev = "9e71956797332471010e563a4b75a5934bef9d4e"; - hash = "sha256-jpaRpvJox78zRGyrVIGYVoSEo/ICBlBfw3dTMz9QGuU="; - }; + sources = callPackage ./sources.nix { }; inherit (qt6) qtbase qtsvg @@ -45,18 +38,12 @@ let ; in llvmPackages_17.stdenv.mkDerivation (finalAttrs: { - pname = "pcsx2"; - version = "1.7.5919"; - - src = fetchFromGitHub { - owner = "PCSX2"; - repo = "pcsx2"; - rev = "v${finalAttrs.version}"; - # NOTE: Don't forget to change the hash in shaderc-patched.nix as well. - hash = "sha256-cDugEbbz40uLPW64bcDGxfo1Y3ahYnEVaalfMp/J95s="; - }; + inherit (sources.pcsx2) pname version src; - patches = [ ./define-rev.patch ]; + patches = [ + # Remove PCSX2_GIT_REV + ./0000-define-rev.patch + ]; cmakeFlags = [ (lib.cmakeBool "DISABLE_ADVANCE_SIMD" true) @@ -66,7 +53,6 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake - extra-cmake-modules pkg-config strip-nondeterminism wrapQtAppsHook @@ -75,6 +61,7 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { buildInputs = [ curl + extra-cmake-modules ffmpeg libaio libbacktrace @@ -87,13 +74,15 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { qttools qtwayland SDL2 - shaderc-patched + sources.shaderc-patched soundtouch vulkan-headers wayland zstd ] ++ cubeb.passthru.backendLibs; + strictDeps = true; + installPhase = '' runHook preInstall mkdir -p $out/bin @@ -102,7 +91,7 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { 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/bin/resources/patches.zip ${pcsx2_patches}/patches/* + zip -jq $out/bin/resources/patches.zip ${sources.pcsx2_patches.src}/patches/* strip-nondeterminism $out/bin/resources/patches.zip runHook postInstall ''; @@ -112,7 +101,7 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { libs = lib.makeLibraryPath ( [ vulkan-loader - shaderc-patched + sources.shaderc-patched ] ++ cubeb.passthru.backendLibs ); @@ -137,12 +126,15 @@ llvmPackages_17.stdenv.mkDerivation (finalAttrs: { 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; [ + AndersonTorres hrdinka govanify matteopacini diff --git a/pkgs/by-name/pc/pcsx2/shaderc-patched.nix b/pkgs/by-name/pc/pcsx2/shaderc-patched.nix deleted file mode 100644 index 1b6ef4c02cb07..0000000000000 --- a/pkgs/by-name/pc/pcsx2/shaderc-patched.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - lib, - fetchFromGitHub, - fetchpatch, - pcsx2, - shaderc, -}: - -let - version = "2024.1"; -in -shaderc.overrideAttrs (old: { - inherit version; - pname = "shaderc-patched-for-pcsx2"; - src = fetchFromGitHub { - owner = "google"; - repo = "shaderc"; - rev = "v${version}"; - hash = "sha256-2L/8n6KLVZWXt6FrYraVlZV5YqbPHD7rzXPCkD0d4kg="; - }; - patches = (old.patches or [ ]) ++ [ - (fetchpatch { - url = "file://${pcsx2.src}/.github/workflows/scripts/common/shaderc-changes.patch"; - hash = "sha256-/qX2yD0RBuPh4Cf7n6OjVA2IyurpaCgvCEsIX/hXFdQ="; - excludes = [ - "libshaderc/CMakeLists.txt" - "third_party/CMakeLists.txt" - ]; - }) - ]; - cmakeFlags = (old.cmakeFlags or [ ]) ++ [ - (lib.cmakeBool "SHADERC_SKIP_EXAMPLES" true) - (lib.cmakeBool "SHADERC_SKIP_TESTS" true) - ]; -}) diff --git a/pkgs/by-name/pc/pcsx2/sources.nix b/pkgs/by-name/pc/pcsx2/sources.nix new file mode 100644 index 0000000000000..3ed1d8858f609 --- /dev/null +++ b/pkgs/by-name/pc/pcsx2/sources.nix @@ -0,0 +1,64 @@ +{ + lib, + fetchFromGitHub, + fetchpatch, + pcsx2, + shaderc, +}: + +{ + pcsx2 = let + self = { + pname = "pcsx2"; + version = "1.7.5919"; + src = fetchFromGitHub { + owner = "PCSX2"; + repo = "pcsx2"; + rev = "v${self.version}"; + hash = "sha256-cDugEbbz40uLPW64bcDGxfo1Y3ahYnEVaalfMp/J95s="; + }; + }; + in + self; + + # The pre-zipped files in releases don't have a versioned link, we need to zip + # them ourselves + pcsx2_patches = { + pname = "pcsx2_patches"; + version = "0-unstable-2024-06-23"; + src = fetchFromGitHub { + owner = "PCSX2"; + repo = "pcsx2_patches"; + rev = "9e71956797332471010e563a4b75a5934bef9d4e"; + hash = "sha256-jpaRpvJox78zRGyrVIGYVoSEo/ICBlBfw3dTMz9QGuU="; + }; + }; + + shaderc-patched = let + pname = "shaderc-patched-for-pcsx2"; + version = "2024.1"; + src = fetchFromGitHub { + owner = "google"; + repo = "shaderc"; + rev = "v${version}"; + hash = "sha256-2L/8n6KLVZWXt6FrYraVlZV5YqbPHD7rzXPCkD0d4kg="; + }; + in + shaderc.overrideAttrs (old: { + inherit pname version src; + patches = (old.patches or [ ]) ++ [ + (fetchpatch { + url = "file://${pcsx2.src}/.github/workflows/scripts/common/shaderc-changes.patch"; + hash = "sha256-/qX2yD0RBuPh4Cf7n6OjVA2IyurpaCgvCEsIX/hXFdQ="; + excludes = [ + "libshaderc/CMakeLists.txt" + "third_party/CMakeLists.txt" + ]; + }) + ]; + cmakeFlags = (old.cmakeFlags or [ ]) ++ [ + (lib.cmakeBool "SHADERC_SKIP_EXAMPLES" true) + (lib.cmakeBool "SHADERC_SKIP_TESTS" true) + ]; + }); +} From a47fc28cdc7dfd94e40f49c6e4e16601186e79cb Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 9 Jul 2024 21:53:06 -0300 Subject: [PATCH 4/4] pcsx2-bin: "init" at 1.7.5919 This is a repack of MacOS-only precompiled package from upstream. Basically it is a migration of the previous Darwin-only package for pcsx2. By request, matteo-pacini is set as the sole maintainer of this package. --- pkgs/by-name/pc/pcsx2-bin/package.nix | 47 +++++++++++++++++++++++++++ pkgs/by-name/pc/pcsx2/darwin.nix | 32 ------------------ 2 files changed, 47 insertions(+), 32 deletions(-) create mode 100644 pkgs/by-name/pc/pcsx2-bin/package.nix delete mode 100644 pkgs/by-name/pc/pcsx2/darwin.nix diff --git a/pkgs/by-name/pc/pcsx2-bin/package.nix b/pkgs/by-name/pc/pcsx2-bin/package.nix new file mode 100644 index 0000000000000..a3c868de23bf7 --- /dev/null +++ b/pkgs/by-name/pc/pcsx2-bin/package.nix @@ -0,0 +1,47 @@ +{ + lib, + stdenvNoCC, + fetchurl, + makeWrapper, + # To grab metadata + pcsx2, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pcsx2"; + version = "1.7.5919"; + + src = fetchurl { + url = "https://github.com/PCSX2/pcsx2/releases/download/v${finalAttrs.version}/pcsx2-v${finalAttrs.version}-macos-Qt.tar.xz"; + hash = "sha256-NYgHsYXoIhI2pxqqiMgz5sKBAezEFf4AfEfu5S3diMg="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + dontPatch = true; + dontConfigure = true; + dontBuild = true; + + sourceRoot = "."; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,Applications} + cp -r "PCSX2-v${finalAttrs.version}.app" $out/Applications/PCSX2.app + makeWrapper $out/Applications/PCSX2.app/Contents/MacOS/PCSX2 $out/bin/pcsx2-qt + runHook postInstall + ''; + + meta = { + inherit (pcsx2.meta) homepage longDescription license changelog downloadPage; + description = "Playstation 2 emulator; precompiled binary for MacOS, repacked from official website"; + maintainers = with lib.maintainers; [ + matteopacini + ]; + mainProgram = "pcsx2-qt"; + platforms = lib.systems.inspect.patternLogicalAnd + lib.systems.inspect.patterns.isDarwin + lib.systems.inspect.patterns.isx86_64; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) diff --git a/pkgs/by-name/pc/pcsx2/darwin.nix b/pkgs/by-name/pc/pcsx2/darwin.nix deleted file mode 100644 index c0655b7879af9..0000000000000 --- a/pkgs/by-name/pc/pcsx2/darwin.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - stdenvNoCC, - fetchurl, - pname, - version, - meta, - makeWrapper, -}: -stdenvNoCC.mkDerivation (finalAttrs: { - inherit pname version meta; - - src = fetchurl { - url = "https://github.com/PCSX2/pcsx2/releases/download/v${version}/pcsx2-v${version}-macos-Qt.tar.xz"; - hash = "sha256-NYgHsYXoIhI2pxqqiMgz5sKBAezEFf4AfEfu5S3diMg="; - }; - - nativeBuildInputs = [ makeWrapper ]; - - dontPatch = true; - dontConfigure = true; - dontBuild = true; - - sourceRoot = "."; - - installPhase = '' - runHook preInstall - mkdir -p $out/{bin,Applications} - cp -r "PCSX2-v${finalAttrs.version}.app" $out/Applications/PCSX2.app - makeWrapper $out/Applications/PCSX2.app/Contents/MacOS/PCSX2 $out/bin/pcsx2-qt - runHook postInstall - ''; -})