about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/openal-soft
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-09-27 16:00:58 +0000
committerAlyssa Ross <hi@alyssa.is>2021-09-27 16:00:58 +0000
commitc504e5d19d940926b3ddcf62c983d66f49f3cbb2 (patch)
treeec955e58bcac2cb93b9f8c10786b23f61d40cd7e /nixpkgs/pkgs/development/libraries/openal-soft
parent72789cefce7b17419815f600fbd18238d89afcc9 (diff)
parent1737f98af6667560e3e4f930312f9b5002649d04 (diff)
downloadnixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar
nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.gz
nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.bz2
nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.lz
nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.xz
nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.tar.zst
nixlib-c504e5d19d940926b3ddcf62c983d66f49f3cbb2.zip
Merge commit '1737f98af6667560e3e4f930312f9b5002649d04'
Conflicts:
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/scripts/default.nix
	nixpkgs/pkgs/development/node-packages/default.nix
	nixpkgs/pkgs/development/python-modules/priority/deadline.patch
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/openal-soft')
-rw-r--r--nixpkgs/pkgs/development/libraries/openal-soft/default.nix32
-rw-r--r--nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch18
2 files changed, 22 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/development/libraries/openal-soft/default.nix b/nixpkgs/pkgs/development/libraries/openal-soft/default.nix
index 2d469a406dec..d28f7b25792e 100644
--- a/nixpkgs/pkgs/development/libraries/openal-soft/default.nix
+++ b/nixpkgs/pkgs/development/libraries/openal-soft/default.nix
@@ -1,45 +1,39 @@
 { lib, stdenv, fetchFromGitHub, cmake
-, alsaSupport ? !stdenv.isDarwin, alsa-lib ? null
-, pulseSupport ? !stdenv.isDarwin, libpulseaudio ? null
+, alsaSupport ? !stdenv.isDarwin, alsa-lib
+, pulseSupport ? !stdenv.isDarwin, libpulseaudio
 , CoreServices, AudioUnit, AudioToolbox
 }:
 
-with lib;
-
-assert alsaSupport -> alsa-lib != null;
-assert pulseSupport -> libpulseaudio != null;
-
 stdenv.mkDerivation rec {
-  version = "1.19.1";
   pname = "openal-soft";
+  version = "1.21.1";
 
   src = fetchFromGitHub {
     owner = "kcat";
     repo = "openal-soft";
-    rev = "${pname}-${version}";
-    sha256 = "0b0g0q1c36nfb289xcaaj3cmyfpiswvvgky3qyalsf9n4dj7vnzi";
+    rev = version;
+    sha256 = "sha256-rgc6kjXaZb6sCR+e9Gu7BEEHIiCHMygpLIeSqgWkuAg=";
   };
 
   # 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.c \
+    substituteInPlace alc/helpers.cpp \
       --replace "@OUT@" $out
   '';
 
   nativeBuildInputs = [ cmake ];
 
-  buildInputs = []
-    ++ optional alsaSupport alsa-lib
-    ++ optional pulseSupport libpulseaudio
-    ++ optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
+  buildInputs = lib.optional alsaSupport alsa-lib
+    ++ lib.optional pulseSupport libpulseaudio
+    ++ lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
 
-  NIX_LDFLAGS = toString ([]
-    ++ optional alsaSupport "-lasound"
-    ++ optional pulseSupport "-lpulse");
+  NIX_LDFLAGS = toString (
+    lib.optional alsaSupport "-lasound"
+    ++ lib.optional pulseSupport "-lpulse");
 
-  meta = {
+  meta = with lib; {
     description = "OpenAL alternative";
     homepage = "https://kcat.strangesoft.net/openal.html";
     license = licenses.lgpl2;
diff --git a/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch b/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch
index 0f9c2abad3c3..796642aa3c89 100644
--- a/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch
+++ b/nixpkgs/pkgs/development/libraries/openal-soft/search-out.patch
@@ -1,12 +1,12 @@
-diff -Nuar a/Alc/helpers.c b/Alc/helpers.c
---- a/Alc/helpers.c	1970-01-01 00:00:01.000000000 +0000
-+++ b/Alc/helpers.c	1970-01-01 00:00:02.000000000 +0000
-@@ -951,6 +951,8 @@
-             }
-         }
+diff --git a/alc/helpers.cpp b/alc/helpers.cpp
+index 8c1c856..19bbc0f 100644
+--- a/alc/helpers.cpp
++++ b/alc/helpers.cpp
+@@ -402,6 +402,7 @@ al::vector<std::string> SearchDataFiles(const char *ext, const char *subdir)
  
-+        DirectorySearch("@OUT@/share", ext, &results);
-+
-         alstr_reset(&path);
+         DirectorySearch(path.c_str(), ext, &results);
      }
++    DirectorySearch("@OUT@/share/", ext, &results);
  
+     return results;
+ }