summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/openal-soft/default.nix22
-rw-r--r--pkgs/development/libraries/openal-soft/search-out.patch4
2 files changed, 16 insertions, 10 deletions
diff --git a/pkgs/development/libraries/openal-soft/default.nix b/pkgs/development/libraries/openal-soft/default.nix
index d2cdebdf3553e..23812229a9d4d 100644
--- a/pkgs/development/libraries/openal-soft/default.nix
+++ b/pkgs/development/libraries/openal-soft/default.nix
@@ -1,40 +1,46 @@
-{ lib, stdenv, fetchFromGitHub, cmake
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
 , alsaSupport ? !stdenv.isDarwin, alsa-lib
+, dbusSupport ? !stdenv.isDarwin, dbus
+, pipewireSupport ? !stdenv.isDarwin, pipewire
 , pulseSupport ? !stdenv.isDarwin, libpulseaudio
 , CoreServices, AudioUnit, AudioToolbox
 }:
 
 stdenv.mkDerivation rec {
   pname = "openal-soft";
-  version = "1.21.1";
+  version = "1.22.0";
 
   src = fetchFromGitHub {
     owner = "kcat";
     repo = "openal-soft";
     rev = version;
-    sha256 = "sha256-rgc6kjXaZb6sCR+e9Gu7BEEHIiCHMygpLIeSqgWkuAg=";
+    sha256 = "sha256-Y2KhPkwtG6tBzUhSqwV2DVnOjZwxPihidLKahjaIvyU=";
   };
 
   # this will make it find its own data files (e.g. HRTF profiles)
   # without any other configuration
   patches = [ ./search-out.patch ];
   postPatch = ''
-    substituteInPlace alc/helpers.cpp \
+    substituteInPlace core/helpers.cpp \
       --replace "@OUT@" $out
   '';
 
   strictDeps = true;
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake pkg-config ];
 
   buildInputs = lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) stdenv.cc.libc
     ++ lib.optional alsaSupport alsa-lib
+    ++ lib.optional dbusSupport dbus
+    ++ lib.optional pipewireSupport pipewire
     ++ lib.optional pulseSupport libpulseaudio
     ++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
 
-  NIX_LDFLAGS = toString (
-    lib.optional alsaSupport "-lasound"
-    ++ lib.optional pulseSupport "-lpulse");
+  cmakeFlags = [
+    # Automatically links dependencies without having to rely on dlopen, thus
+    # removes the need for NIX_LDFLAGS.
+    "-DALSOFT_DLOPEN=OFF"
+  ];
 
   meta = with lib; {
     description = "OpenAL alternative";
diff --git a/pkgs/development/libraries/openal-soft/search-out.patch b/pkgs/development/libraries/openal-soft/search-out.patch
index 796642aa3c899..5813cd48ee67f 100644
--- a/pkgs/development/libraries/openal-soft/search-out.patch
+++ b/pkgs/development/libraries/openal-soft/search-out.patch
@@ -1,7 +1,7 @@
 diff --git a/alc/helpers.cpp b/alc/helpers.cpp
 index 8c1c856..19bbc0f 100644
---- a/alc/helpers.cpp
-+++ b/alc/helpers.cpp
+--- a/core/helpers.cpp
++++ b/core/helpers.cpp
 @@ -402,6 +402,7 @@ al::vector<std::string> SearchDataFiles(const char *ext, const char *subdir)
  
          DirectorySearch(path.c_str(), ext, &results);