pulseaudio-modules-bt: unstable-2018-09-11 -> unstable-2018-10-16

This commit is contained in:
adisbladis 2018-10-17 21:55:05 +08:00
parent 4473d3d56b
commit dc427b0ff0
No known key found for this signature in database
GPG Key ID: ED58F95069B004F5
2 changed files with 38 additions and 8 deletions

View File

@ -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; {

View File

@ -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/)