From b0a14018d37f64f4fbd831ec6aea64a7042454e5 Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Mon, 29 Apr 2024 17:09:44 +0200 Subject: [PATCH] pcsx2: migrate to by-name --- .../pc}/pcsx2/define-rev.patch | 0 .../pc/pcsx2/package.nix} | 21 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 -- 3 files changed, 12 insertions(+), 11 deletions(-) rename pkgs/{applications/emulators => by-name/pc}/pcsx2/define-rev.patch (100%) rename pkgs/{applications/emulators/pcsx2/default.nix => by-name/pc/pcsx2/package.nix} (92%) diff --git a/pkgs/applications/emulators/pcsx2/define-rev.patch b/pkgs/by-name/pc/pcsx2/define-rev.patch similarity index 100% rename from pkgs/applications/emulators/pcsx2/define-rev.patch rename to pkgs/by-name/pc/pcsx2/define-rev.patch diff --git a/pkgs/applications/emulators/pcsx2/default.nix b/pkgs/by-name/pc/pcsx2/package.nix similarity index 92% rename from pkgs/applications/emulators/pcsx2/default.nix rename to pkgs/by-name/pc/pcsx2/package.nix index cb39b5417b09..5deeed45dad6 100644 --- a/pkgs/applications/emulators/pcsx2/default.nix +++ b/pkgs/by-name/pc/pcsx2/package.nix @@ -15,17 +15,13 @@ , lz4 , makeWrapper , pkg-config -, qtbase -, qtsvg -, qttools -, qtwayland +, qt6 , SDL2 , soundtouch , strip-nondeterminism , vulkan-headers , vulkan-loader , wayland -, wrapQtAppsHook , xz , zip , zstd @@ -39,8 +35,15 @@ let rev = "e3b354f144de71d2b87471166cca8911867c1dfd"; sha256 = "sha256-H7cFyBYZumcCZ0/FFOFZoChoi0XPs4siA4dHcFt9U7k="; }; + inherit (qt6) + qtbase + qtsvg + qttools + qtwayland + wrapQtAppsHook + ; in -llvmPackages_17.stdenv.mkDerivation rec { +llvmPackages_17.stdenv.mkDerivation (finalAttrs: { pname = "pcsx2"; version = "1.7.5587"; @@ -48,7 +51,7 @@ llvmPackages_17.stdenv.mkDerivation rec { owner = "PCSX2"; repo = "pcsx2"; fetchSubmodules = true; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-PCZ1r6x28Z5FEVMXWm4oxpTknz/XEiwo0rRGhn4B33g="; }; @@ -59,7 +62,7 @@ llvmPackages_17.stdenv.mkDerivation rec { cmakeFlags = [ "-DDISABLE_ADVANCE_SIMD=ON" "-DUSE_LINKED_FFMPEG=ON" - "-DPCSX2_GIT_REV=v${version}" + "-DPCSX2_GIT_REV=v${finalAttrs.version}" ]; nativeBuildInputs = [ @@ -137,4 +140,4 @@ llvmPackages_17.stdenv.mkDerivation rec { mainProgram = "pcsx2-qt"; platforms = platforms.x86_64; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f798e32202bd..fab2e194b74c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2717,8 +2717,6 @@ with pkgs; pcem = callPackage ../applications/emulators/pcem { }; - pcsx2 = qt6Packages.callPackage ../applications/emulators/pcsx2 { }; - pcsxr = callPackage ../applications/emulators/pcsxr { }; ppsspp-sdl = let