diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index a1a389314105..3250dc419d1e 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -81,7 +81,12 @@ in stdenv.mkDerivation { ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 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 find . -type f -iname '*makefile*' -exec sed -i -e 's/depmod -a/:/g' {} + - 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 + sed -i -e ' + s@"libasound.so.2"@"${alsaLib}/lib/libasound.so.2"@g + ${optionalString pulseSupport '' + s@"libpulse.so.0"@"${libpulseaudio}/lib/libpulse.so.0"@g + ''} + ' src/VBox/Main/xml/Settings.cpp src/VBox/Devices/Audio/{alsa,pulse}_stubs.c export USER=nix set +x '';