From f384fdb24091c028c23a977ad0f463c90b585c30 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 11 Sep 2018 10:01:45 +0800 Subject: [PATCH] pulseaudio-modules-bt: init at unstable-2018-09-11 --- .../audio/pulseaudio-modules-bt/default.nix | 63 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 65 insertions(+) create mode 100644 pkgs/applications/audio/pulseaudio-modules-bt/default.nix diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix new file mode 100644 index 000000000000..e3d07fcc2457 --- /dev/null +++ b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix @@ -0,0 +1,63 @@ +{ stdenv +, runCommand +, fetchFromGitHub +, libpulseaudio +, pulseaudio +, pkgconfig +, libtool +, cmake +, bluez +, dbus +, sbc +}: + +let + pulseSources = runCommand "pulseaudio-sources" {} '' + mkdir $out + tar -xf ${pulseaudio.src} + mv pulseaudio*/* $out/ + ''; + +in stdenv.mkDerivation rec { + name = "pulseaudio-modules-bt-${version}"; + version = "unstable-2018-09-11"; + + src = fetchFromGitHub { + owner = "EHfive"; + repo = "pulseaudio-modules-bt"; + rev = "9c6ad75382f3855916ad2feaa6b40e37356d80cc"; + sha256 = "1iz4m3y6arsvwcyvqc429w252dl3apnhvl1zhyvfxlbg00d2ii0h"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + pkgconfig + cmake + ]; + + buildInputs = [ + libpulseaudio + pulseaudio + libtool + bluez + dbus + sbc + ]; + + NIX_CFLAGS_COMPILE = [ + "-L${pulseaudio}/lib/pulseaudio" + ]; + + prePatch = '' + rm -r pa + ln -s ${pulseSources} pa + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/EHfive/pulseaudio-modules-bt; + description = "SBC, Sony LDAC codec (A2DP Audio) support for Pulseaudio"; + platforms = platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ adisbladis ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 40440f1b379f..249e96610841 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13706,6 +13706,8 @@ with pkgs; bluez5 = callPackage ../os-specific/linux/bluez { }; + pulseaudio-modules-bt = callPackage ../applications/audio/pulseaudio-modules-bt { }; + bluez = bluez5; inherit (python3Packages) bedup;