virtualbox: Fix load of libpulse.so at runtime.
Within fractions* of a second, the beautifully crafted history and
branching mechanisms of SVN found out the exact revision which caused
this to be visible in version 5.x but not in version 4.x:
https://www.virtualbox.org/changeset?old_path=%2Fvbox%2Ftrunk&old=30933&new_path=%2Fvbox%2Ftrunk&new=30934
Also note the very short URL and the informative changeset message which
shows you exactly what was the issue, I think.
Be warned however, it may contain traces of history amnesia, revision
epilepsy and other related diseases.
As for the issue itself: This was very much broken in 4.x as well, but
it didn't show an error message in the UI. The PulseAudio library is
loaded at runtime and it's not able to do that unless it's in
LD_LIBRARY_PATH.
Now, we're doing the same as with the ALSA libraries: We're hardcoding
the path to the shared object file in patchPhase.
Thanks to @devhell for reporting and testing.
*: Might be off several minutes or hours due to rounding errors in
floating point arithmetic.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: devhell <"^"@regexmail.net>
Tested-by: devhell <"^"@regexmail.net>
commit13e83251a0bd69cf3ab99fa78f571d71932b79ee
authoraszlig <aszlig@redmoonstudios.org>
dateMon 13 Jul 2015, 19:30 (11 years ago)
parentfd06533
pkgs/applications/virtualization/virtualbox/default.nix+6−1
@@ -81,7 +81,12 @@ in stdenv.mkDerivation {
8181 ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2
8282 ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2
8383 find . -type f -iname '*makefile*' -exec sed -i -e 's/depmod -a/:/g' {} +
84− sed -e 's@"libasound.so.2"@"${alsaLib}/lib/libasound.so.2"@g' -i src/VBox/Main/xml/Settings.cpp src/VBox/Devices/Audio/alsa_stubs.c
84+ sed -i -e '
85+ s@"libasound.so.2"@"${alsaLib}/lib/libasound.so.2"@g
86+ ${optionalString pulseSupport ''
87+ s@"libpulse.so.0"@"${libpulseaudio}/lib/libpulse.so.0"@g
88+ ''}
89+ ' src/VBox/Main/xml/Settings.cpp src/VBox/Devices/Audio/{alsa,pulse}_stubs.c
8590 export USER=nix
8691 set +x
8792 '';