python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / by-name / sh / shadps4 / package.nix
blob5484724d886eda2e82f88396686d10737bea8530
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   alsa-lib,
7   boost184,
8   cmake,
9   cryptopp,
10   glslang,
11   ffmpeg,
12   fmt,
13   jack2,
14   libdecor,
15   libpulseaudio,
16   libunwind,
17   libusb1,
18   magic-enum,
19   mesa,
20   pkg-config,
21   pugixml,
22   qt6,
23   rapidjson,
24   renderdoc,
25   sndio,
26   toml11,
27   vulkan-headers,
28   vulkan-loader,
29   vulkan-memory-allocator,
30   xorg,
31   xxHash,
32   zlib-ng,
33   unstableGitUpdater,
36 stdenv.mkDerivation (finalAttrs: {
37   pname = "shadps4";
38   version = "0.4.0";
40   src = fetchFromGitHub {
41     owner = "shadps4-emu";
42     repo = "shadPS4";
43     rev = "refs/tags/v.${finalAttrs.version}";
44     hash = "sha256-dAhm9XMFnpNmbgi/TGktNHMdFDYPOWj31pZkBoUfQhA=";
45     fetchSubmodules = true;
46   };
48   patches = [
49     # https://github.com/shadps4-emu/shadPS4/issues/758
50     ./bloodborne.patch
51     # Fix controls without a numpad
52     ./laptop-controls.patch
54     # Disable auto-updating, as
55     # downloading an AppImage and trying to run it just won't work.
56     # https://github.com/shadps4-emu/shadPS4/issues/1368
57     ./0001-Disable-update-checking.patch
59     # https://github.com/shadps4-emu/shadPS4/issues/1457
60     ./av_err2str_macro.patch
61   ];
63   buildInputs = [
64     alsa-lib
65     boost184
66     cryptopp
67     glslang
68     ffmpeg
69     fmt
70     jack2
71     libdecor
72     libpulseaudio
73     libunwind
74     libusb1
75     xorg.libX11
76     xorg.libXext
77     magic-enum
78     mesa
79     pugixml
80     qt6.qtbase
81     qt6.qtdeclarative
82     qt6.qtmultimedia
83     qt6.qttools
84     qt6.qtwayland
85     rapidjson
86     renderdoc
87     sndio
88     toml11
89     vulkan-headers
90     vulkan-loader
91     vulkan-memory-allocator
92     xxHash
93     zlib-ng
94   ];
96   nativeBuildInputs = [
97     cmake
98     pkg-config
99     qt6.wrapQtAppsHook
100   ];
102   cmakeFlags = [
103     (lib.cmakeBool "ENABLE_QT_GUI" true)
104   ];
106   # Still in development, help with debugging
107   cmakeBuildType = "RelWithDebugInfo";
108   dontStrip = true;
110   installPhase = ''
111     runHook preInstall
113     install -D -t $out/bin shadps4
114     install -Dm644 -t $out/share/icons/hicolor/512x512/apps $src/.github/shadps4.png
115     install -Dm644 -t $out/share/applications $src/.github/shadps4.desktop
117     runHook postInstall
118   '';
120   fixupPhase = ''
121     patchelf --add-rpath ${
122       lib.makeLibraryPath [
123         vulkan-loader
124         xorg.libXi
125       ]
126     } \
127       $out/bin/shadps4
128   '';
130   passthru.updateScript = unstableGitUpdater {
131     tagFormat = "v.*";
132     tagPrefix = "v.";
133   };
135   meta = {
136     description = "Early in development PS4 emulator";
137     homepage = "https://github.com/shadps4-emu/shadPS4";
138     changelog = "https://github.com/shadps4-emu/shadPS4/releases/tag/v.${finalAttrs.version}";
139     license = lib.licenses.gpl2Plus;
140     maintainers = with lib.maintainers; [ ryand56 ];
141     mainProgram = "shadps4";
142     platforms = lib.intersectLists lib.platforms.linux lib.platforms.x86_64;
143   };