Skip to content

Commit fa0a81c

Browse files
committed
1 parent fdb79bf commit fa0a81c

File tree

1 file changed

+54
-10
lines changed

1 file changed

+54
-10
lines changed

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

Lines changed: 54 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,69 @@
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-uFVC2zkiXjEFPAWX7fHnPiqEHvvdH/nVmXo022HCEEk=";
5266
fetchSubmodules = true;
67+
68+
leaveDotGit = true;
69+
postFetch = ''
70+
cd "$out"
71+
git rev-parse --abbrev-ref HEAD > $out/BRANCH
72+
git rev-parse --short=8 HEAD > $out/COMMIT
73+
date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%dT%H:%M:%SZ" > $out/SOURCE_DATE_EPOCH
74+
find "$out" -name .git -print0 | xargs -0 rm -rf
75+
'';
5376
};
5477

78+
postPatch = ''
79+
substituteInPlace src/common/scm_rev.cpp.in \
80+
--replace-fail @APP_VERSION@ ${finalAttrs.version} \
81+
--replace-fail @GIT_REV@ $(cat COMMIT) \
82+
--replace-fail @GIT_BRANCH@ $(cat BRANCH) \
83+
--replace-fail @GIT_DESC@ $(cat COMMIT) \
84+
--replace-fail @BUILD_DATE@ $(cat SOURCE_DATE_EPOCH)
85+
'';
86+
5587
buildInputs = [
5688
alsa-lib
5789
boost
5890
cryptopp
91+
game-music-emu
5992
glslang
6093
ffmpeg
94+
flac
95+
fluidsynth
6196
fmt
6297
half
6398
jack2
6499
libdecor
100+
libGL
65101
libpulseaudio
66102
libunwind
67103
libusb1
68-
xorg.libX11
69-
xorg.libXext
70-
magic-enum
104+
libvorbis
105+
libxmp
106+
libx11
107+
libxcb
108+
libxcursor
109+
libxext
110+
libxi
111+
libxrandr
112+
libxscrnsaver
113+
libxtst
71114
libgbm
115+
magic-enum
116+
mpg123
72117
pipewire
73118
pugixml
74119
rapidjson
75120
renderdoc
76121
robin-map
77-
sdl3
78122
sndio
79123
stb
80124
toml11
@@ -114,7 +158,7 @@ stdenv.mkDerivation (finalAttrs: {
114158

115159
runtimeDependencies = [
116160
vulkan-loader
117-
xorg.libXi
161+
libxi
118162
];
119163

120164
passthru = {

0 commit comments

Comments
 (0)