diff --git a/pkgs/development/libraries/openal-soft/default.nix b/pkgs/development/libraries/openal-soft/default.nix index 89ac85b752b7..76f2861428d6 100644 --- a/pkgs/development/libraries/openal-soft/default.nix +++ b/pkgs/development/libraries/openal-soft/default.nix @@ -20,6 +20,14 @@ stdenv.mkDerivation rec { sha256 = "0b0g0q1c36nfb289xcaaj3cmyfpiswvvgky3qyalsf9n4dj7vnzi"; }; + # 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 \ + --replace "@OUT@" $out + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [] diff --git a/pkgs/development/libraries/openal-soft/search-out.patch b/pkgs/development/libraries/openal-soft/search-out.patch new file mode 100644 index 000000000000..0f9c2abad3c3 --- /dev/null +++ b/pkgs/development/libraries/openal-soft/search-out.patch @@ -0,0 +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 @@ + } + } + ++ DirectorySearch("@OUT@/share", ext, &results); ++ + alstr_reset(&path); + } +