From 7e482f30473feb045084b03aed8e786ba2e27124 Mon Sep 17 00:00:00 2001 From: Coca Date: Thu, 16 Oct 2025 17:03:00 +0100 Subject: [PATCH] space-station-14-launcher: fix audio libraries for bundled SDL2 Audio libraries now have to be included manually as SDL2 was bundled into the launcher and thusly has them no longer provided through it. --- .../sp/space-station-14-launcher/package.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/sp/space-station-14-launcher/package.nix b/pkgs/by-name/sp/space-station-14-launcher/package.nix index e1a02b008761..431cf922b9b8 100644 --- a/pkgs/by-name/sp/space-station-14-launcher/package.nix +++ b/pkgs/by-name/sp/space-station-14-launcher/package.nix @@ -1,5 +1,7 @@ { lib, + stdenv, + config, buildDotnetModule, dotnetCorePackages, fetchFromGitHub, @@ -16,7 +18,6 @@ libXrandr, fontconfig, glew, - SDL2, glfw, glibc, libGL, @@ -30,6 +31,15 @@ zlib, glib, gdk-pixbuf, + alsa-lib, + libjack2, + pipewire, + libpulseaudio, + alsaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, + jackSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, + pipewireSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, + pulseaudioSupport ? + config.pulseaudio or stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid, soundfont-fluid, # Path to set ROBUST_SOUNDFONT_OVERRIDE to, essentially the default soundfont used. @@ -100,7 +110,6 @@ buildDotnetModule rec { libXrandr glfw - SDL2 glibc libGL openal @@ -111,7 +120,6 @@ buildDotnetModule rec { runtimeDeps = [ # Required by the game. glfw - SDL2 glibc libGL openal @@ -139,7 +147,11 @@ buildDotnetModule rec { glew # TODO: Figure out dependencies for CEF support. - ]; + ] + ++ lib.optional alsaSupport alsa-lib + ++ lib.optional jackSupport libjack2 + ++ lib.optional pipewireSupport pipewire + ++ lib.optional pulseaudioSupport libpulseaudio; # ${soundfont-path} is escaped here: # https://github.com/NixOS/nixpkgs/blob/d29975d32b1dc7fe91d5cb275d20f8f8aba399ad/pkgs/build-support/setup-hooks/make-wrapper.sh#L126C35-L126C45