Skip to content

Commit f3a7eb9

Browse files
committed
1 parent fdb79bf commit f3a7eb9

File tree

1 file changed

+53
-10
lines changed

1 file changed

+53
-10
lines changed

pkgs/by-name/sh/shadps4/package.nix

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,44 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5+
56
nixosTests,
67
alsa-lib,
78
boost,
89
cmake,
910
cryptopp,
11+
game-music-emu,
1012
glslang,
1113
ffmpeg,
14+
flac,
15+
fluidsynth,
1216
fmt,
1317
half,
1418
jack2,
1519
libdecor,
20+
libGL,
1621
libpulseaudio,
1722
libunwind,
1823
libusb1,
19-
magic-enum,
24+
libvorbis,
25+
libxmp,
2026
libgbm,
27+
libx11,
28+
libxcb,
29+
libxcursor,
30+
libxext,
31+
libxi,
32+
libxrandr,
33+
libxscrnsaver,
34+
libxtst,
35+
magic-enum,
36+
mpg123,
2137
pipewire,
2238
pkg-config,
2339
pugixml,
2440
rapidjson,
2541
renderdoc,
2642
robin-map,
27-
sdl3,
2843
sndio,
2944
stb,
3045
toml11,
@@ -33,7 +48,6 @@
3348
vulkan-loader,
3449
vulkan-memory-allocator,
3550
xbyak,
36-
xorg,
3751
xxHash,
3852
zlib-ng,
3953
zydis,
@@ -42,39 +56,68 @@
4256

4357
stdenv.mkDerivation (finalAttrs: {
4458
pname = "shadps4";
45-
version = "0.12.5";
59+
version = "0.13.0";
4660

4761
src = fetchFromGitHub {
4862
owner = "shadps4-emu";
4963
repo = "shadPS4";
5064
tag = "v.${finalAttrs.version}";
51-
hash = "sha256-H/GOnArWxMe/90qgyLb9fXbeJabUOV8CjLtpGokoStQ=";
65+
hash = "sha256-zc3zhFTphty/vwioFEOfhgXttpD9MG2F7+YJYcW0H2w=";
5266
fetchSubmodules = true;
67+
68+
leaveDotGit = true;
69+
postFetch = ''
70+
cd "$out"
71+
git rev-parse --short=8 HEAD > $out/COMMIT
72+
date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%dT%H:%M:%SZ" > $out/SOURCE_DATE_EPOCH
73+
find "$out" -name .git -print0 | xargs -0 rm -rf
74+
'';
5375
};
5476

77+
postPatch = ''
78+
substituteInPlace src/common/scm_rev.cpp.in \
79+
--replace-fail @APP_VERSION@ ${finalAttrs.version} \
80+
--replace-fail @GIT_REV@ $(cat COMMIT) \
81+
--replace-fail @GIT_BRANCH@ ${finalAttrs.version} \
82+
--replace-fail @GIT_DESC@ nixpkgs \
83+
--replace-fail @BUILD_DATE@ $(cat SOURCE_DATE_EPOCH)
84+
'';
85+
5586
buildInputs = [
5687
alsa-lib
5788
boost
5889
cryptopp
90+
game-music-emu
5991
glslang
6092
ffmpeg
93+
flac
94+
fluidsynth
6195
fmt
6296
half
6397
jack2
6498
libdecor
99+
libGL
65100
libpulseaudio
66101
libunwind
67102
libusb1
68-
xorg.libX11
69-
xorg.libXext
70-
magic-enum
103+
libvorbis
104+
libxmp
105+
libx11
106+
libxcb
107+
libxcursor
108+
libxext
109+
libxi
110+
libxrandr
111+
libxscrnsaver
112+
libxtst
71113
libgbm
114+
magic-enum
115+
mpg123
72116
pipewire
73117
pugixml
74118
rapidjson
75119
renderdoc
76120
robin-map
77-
sdl3
78121
sndio
79122
stb
80123
toml11
@@ -114,7 +157,7 @@ stdenv.mkDerivation (finalAttrs: {
114157

115158
runtimeDependencies = [
116159
vulkan-loader
117-
xorg.libXi
160+
libxi
118161
];
119162

120163
passthru = {

0 commit comments

Comments
 (0)