Skip to content

Commit a72a9fb

Browse files
authored
Fix audio libraries in nix package (#242)
1 parent c15e193 commit a72a9fb

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

nix/package.nix

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
lib,
3+
stdenv,
4+
config,
35
buildDotnetModule,
46
dotnetCorePackages,
57
fetchFromGitHub,
@@ -16,7 +18,6 @@
1618
libXrandr,
1719
fontconfig,
1820
glew,
19-
SDL2,
2021
glfw,
2122
glibc,
2223
libGL,
@@ -30,6 +31,15 @@
3031
zlib,
3132
glib,
3233
gdk-pixbuf,
34+
alsa-lib,
35+
libjack2,
36+
pipewire,
37+
libpulseaudio,
38+
alsaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
39+
jackSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
40+
pipewireSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
41+
pulseaudioSupport ?
42+
config.pulseaudio or stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
3343
soundfont-fluid,
3444

3545
# Path to set ROBUST_SOUNDFONT_OVERRIDE to, essentially the default soundfont used.
@@ -100,7 +110,6 @@ buildDotnetModule rec {
100110
libXrandr
101111

102112
glfw
103-
SDL2
104113
glibc
105114
libGL
106115
openal
@@ -111,7 +120,6 @@ buildDotnetModule rec {
111120
runtimeDeps = [
112121
# Required by the game.
113122
glfw
114-
SDL2
115123
glibc
116124
libGL
117125
openal
@@ -139,7 +147,11 @@ buildDotnetModule rec {
139147
glew
140148

141149
# TODO: Figure out dependencies for CEF support.
142-
];
150+
]
151+
++ lib.optional alsaSupport alsa-lib
152+
++ lib.optional jackSupport libjack2
153+
++ lib.optional pipewireSupport pipewire
154+
++ lib.optional pulseaudioSupport libpulseaudio;
143155

144156
# ${soundfont-path} is escaped here:
145157
# https://github.com/NixOS/nixpkgs/blob/d29975d32b1dc7fe91d5cb275d20f8f8aba399ad/pkgs/build-support/setup-hooks/make-wrapper.sh#L126C35-L126C45

0 commit comments

Comments
 (0)