diff options
Diffstat (limited to 'pkgs/applications/audio/pulseaudio-modules-bt')
-rw-r--r-- | pkgs/applications/audio/pulseaudio-modules-bt/default.nix | 35 | ||||
-rw-r--r-- | pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch | 11 |
2 files changed, 38 insertions, 8 deletions
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix index e3d07fcc245..6bb432b3fd8 100644 --- a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix +++ b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix @@ -4,11 +4,14 @@ , libpulseaudio , pulseaudio , pkgconfig +, ffmpeg_4 +, patchelf , libtool , cmake , bluez , dbus , sbc +, lib }: let @@ -20,37 +23,53 @@ let in stdenv.mkDerivation rec { name = "pulseaudio-modules-bt-${version}"; - version = "unstable-2018-09-11"; + version = "unstable-2018-10-16"; src = fetchFromGitHub { owner = "EHfive"; repo = "pulseaudio-modules-bt"; - rev = "9c6ad75382f3855916ad2feaa6b40e37356d80cc"; - sha256 = "1iz4m3y6arsvwcyvqc429w252dl3apnhvl1zhyvfxlbg00d2ii0h"; + rev = "552c2b48c0cc7dd44d0746b261f7c7d5559e8e30"; + sha256 = "052jb1hjx1in7bafx4zpn78s7r6f2y7djriwi36dzqy9wmalmyjy"; fetchSubmodules = true; }; + patches = [ + ./fix-install-path.patch + ]; + nativeBuildInputs = [ pkgconfig + patchelf cmake ]; buildInputs = [ libpulseaudio pulseaudio + ffmpeg_4 libtool bluez dbus sbc ]; - NIX_CFLAGS_COMPILE = [ - "-L${pulseaudio}/lib/pulseaudio" - ]; - - prePatch = '' + postPatch = '' + # Upstream bundles pulseaudio as a submodule rm -r pa ln -s ${pulseSources} pa + + # Pulseaudio version is detected with a -rebootstrapped suffix which build system assumptions + substituteInPlace config.h.in --replace PulseAudio_VERSION ${pulseaudio.version} + substituteInPlace CMakeLists.txt --replace '${"\${PulseAudio_VERSION}"}' ${pulseaudio.version} + ''; + + postFixup = '' + for so in $out/lib/pulse-${pulseaudio.version}/modules/*.so; do + orig_rpath=$(patchelf --print-rpath "$so") + patchelf \ + --set-rpath "$orig_rpath:${lib.getLib ffmpeg_4}/lib:$out/lib/pulse-${pulseaudio.version}/modules" \ + "$so" + done ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch new file mode 100644 index 00000000000..2b4ff86ab71 --- /dev/null +++ b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0f5baa0..1f35cce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,5 +121,4 @@ INSTALL(TARGETS + module-bluez5-device + module-bluetooth-discover + module-bluetooth-policy +- LIBRARY DESTINATION ${PulseAudio_modlibexecdir}) +- ++ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pulse-${PulseAudio_VERSION}/modules/) |